/* /var/www/relyn/static_src/css/sample.css */

/* SAMPLE SECTION */
.sample-section {
  width: 100%;
  display: flex;
  justify-content: center;

  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #FFFFFF;
}

.sample-shell {
  position: relative;
  width: 100%;
  max-width: 1920px;

  /* ✅ Keep the original full section height feel by default */
  min-height: 2310px;

  /* ✅ SCALE TOKENS (desktop defaults) */
  --tags-max: 1514px;

  --card-w: 380px;
  --card-h: 495px;
  --grid-gap: 60px;

  --card-pad: 17.5px;
  --img-h: 218.3px;
  --img-r: 20px;

  --body-pad-bottom: 78px;

  --btn-w: 161px;
  --btn-h: 40px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 0 24px 160px; /* bottom padding so content breathes */
  box-sizing: border-box;
}

/* ✅ Background blur layer */
.sample-blur-layer {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);

  /* ✅ UPDATED: wider blur coverage */
  width: min(2200px, 140vw);
  height: 560px;

  background:
    radial-gradient(circle at 28% 40%, rgba(99, 62, 178, 0.52), transparent 64%),
    radial-gradient(circle at 72% 52%, rgba(166, 151, 224, 0.32), transparent 66%),
    radial-gradient(circle at 46% 78%, rgba(99, 62, 178, 0.36), transparent 62%);

  filter: blur(95px);
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
}

/* ✅ When filtering/searching: remove forced height so no huge blank space */
.sample-shell.is-compact {
  min-height: auto;
}

/* ✅ Fully transparent background behind glass UI (no blur layer) */
.sample-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

/* ✅ Topbar aligns to right with exact spacing */
.sample-topbar {
  position: relative;
  z-index: 1;

  width: 100%;
  display: flex;
  justify-content: flex-end;

  padding-top: 78px;     /* 78px from top border */
  padding-right: 203px;  /* 203px from right border */

  box-sizing: border-box;
}

/* Search cluster */
.sample-search {
  display: inline-flex;
  align-items: center;
  gap: 20px; /* 20px spacing between input and icon circle */
}

.sample-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Search input: W 419px, H 50px, radius 50px */
.sample-search-input {
  width: 419px;
  height: 50px;
  border-radius: 50px;

  padding: 0 18px;
  box-sizing: border-box;

  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) padding-box,
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) border-box;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  outline: none;
  color: #FFFFFF;

  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-align: left;
}

.sample-search-input::placeholder {
  color: rgba(255, 255, 255, 0.92);
}

.sample-search-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 62, 178, 0.22);
}

/* Search icon circle (50x50) with #633EB2 background */
.sample-search-btn {
  width: 50px;
  height: 50px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #633EB2;
  border: none;

  cursor: pointer;
  user-select: none;

  box-shadow: 0 18px 45px rgba(5, 10, 22, 0.28);

  color: #FFFFFF; /* icon is white via currentColor */
}

.sample-search-icon {
  display: block;
}

/* ✅ Tags area after 60px from search box bottom */
.sample-tags-wrap {
  position: relative;
  z-index: 1;

  width: 100%;
  margin-top: 60px;

  display: flex;
  justify-content: center;

  box-sizing: border-box;
}

/* Horizontal scroll container */
.sample-tags {
  width: 100%;
  max-width: var(--tags-max);

  display: flex;
  align-items: center;
  gap: 18px;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  padding: 0 12px 10px;
  box-sizing: border-box;

  scrollbar-width: thin;
  scrollbar-color: rgba(99, 62, 178, 0.65) rgba(255, 255, 255, 0.06);

  cursor: grab;
}

.sample-tags:active {
  cursor: grabbing;
}

.sample-tags::-webkit-scrollbar {
  height: 8px;
}

.sample-tags::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.sample-tags::-webkit-scrollbar-thumb {
  background: rgba(99, 62, 178, 0.65);
  border-radius: 999px;
}

/* Tag pill (transparent glass) */
.sample-tag {
  height: 50px;
  width: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* ✅ increased width a bit (not too long) */
  padding-left: 42px;
  padding-right: 42px;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.00);
  border: 1px solid #6E60A2;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  color: #FFFFFF;

  font-size: 24px;
  font-weight: 400;
  line-height: 22px;

  white-space: nowrap;
  cursor: pointer;
  user-select: none;

  transition: transform 180ms ease, background 220ms ease, border-color 220ms ease;
}

.sample-tag:hover {
  transform: translateY(-1px);
}

.sample-tag.is-active {
  background: #633EB2;
  border-color: rgba(255, 255, 255, 0.12);
}

/* ✅ Arrow button (desktop + laptop + tablet-landscape): visible instead of scrollbar */
.sample-tags-more {
  display: none; /* enabled only for desktop/laptop/tablet-landscape */
}

/* ✅ Grid after 180px from tags bottom */
.sample-grid {
  position: relative;
  z-index: 1;

  width: 100%;
  margin-top: 180px;

  display: grid;
  grid-template-columns: repeat(3, var(--card-w));
  gap: var(--grid-gap);

  justify-content: center;
  align-items: start;

  box-sizing: border-box;
}

/* ✅ In compact mode (filter/search), auto-fit so 1–2 cards are centered and no weird empty columns */
.sample-shell.is-compact .sample-grid {
  margin-top: 120px; /* reduce extra spacing when filtering */
  grid-template-columns: repeat(auto-fit, var(--card-w));
}

/* CARD container */
.sample-card {
  position: relative;

  width: var(--card-w);
  height: var(--card-h);

  overflow: visible;

  box-sizing: border-box;
  box-shadow: 0 22px 60px rgba(5, 10, 22, 0.35);

  transition: transform 260ms ease, opacity 260ms ease;
}

/* SVG pathway background layer */
.sample-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Content layer above SVG */
.sample-card-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Reveal animation */
.has-js .sample-card {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.85s ease, opacity 0.85s ease;
}

.has-js .sample-card.is-inview {
  transform: translateY(0);
  opacity: 1;
}

.sample-card.is-inview:hover {
  transform: translateY(-4px);
}

/* Media area with exact paddings */
.sample-card-media {
  padding-top: var(--card-pad);
  padding-left: var(--card-pad);
  padding-right: var(--card-pad);
  box-sizing: border-box;
}

.sample-card-img {
  width: calc(var(--card-w) - (var(--card-pad) * 2));
  height: var(--img-h);
  border-radius: var(--img-r);

  display: block;
  object-fit: cover;
}

/* Body spacing */
.sample-card-body {
  padding-left: var(--card-pad);
  padding-right: var(--card-pad);
  padding-bottom: var(--body-pad-bottom); /* reserves button space */
  box-sizing: border-box;
}

/* Tag badge */
.sample-badge {
  width: 90px;
  height: 30px;
  margin-top: 20px;

  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) padding-box,
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) border-box;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  color: #FFFFFF;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}

.sample-card-title {
  margin: 16px 0 0;

  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  text-align: left;
  line-height: 28px;
}

.sample-card-text {
  margin: 24px 0 0;

  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  line-height: 24px;

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button (fixed size) */
.sample-card-btn {
  position: absolute;
  right: 0;
  bottom: 0;

  width: var(--btn-w);
  height: var(--btn-h);

  border-radius: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  box-sizing: border-box;

  text-decoration: none;

  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) padding-box,
    linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(99, 62, 178, 0.40) 100%) border-box;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #FFFFFF;

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.78);

  /* ✅ keep transforms compatible with mobile centering */
  --btn-tx: 0px;
  --btn-ty: 0px;
  transform: translate(var(--btn-tx), var(--btn-ty));

  transition: transform 0.18s ease-out, filter 0.18s ease-out, box-shadow 0.18s ease-out;
}

.sample-card-btn:hover {
  transform: translate(var(--btn-tx), calc(var(--btn-ty) - 2px));
  filter: brightness(1.04);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.90);
}

.sample-card-btn:active {
  transform: translate(var(--btn-tx), var(--btn-ty));
}

.sample-card-btn.is-pressed {
  transform: translate(var(--btn-tx), var(--btn-ty)) scale(0.98);
}

/* ✅ Empty state */
.sample-empty {
  position: relative;
  z-index: 1;

  margin-top: 80px;
  margin-bottom: 0;

  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;

  max-width: 900px;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ✅ Pagination */
.sample-pagination {
  position: relative;
  z-index: 1;

  width: 100%;
  margin-top: 150px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  box-sizing: border-box;

  font-family: "DM Sans", "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ✅ In compact mode, reduce pagination gap distance */
.sample-shell.is-compact .sample-pagination {
  margin-top: 70px;
}

/* ✅ page number buttons stay as-is */
.sample-page-btn {
  width: 40px;
  height: 40px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 1px solid #633EB2;

  color: #FFFFFF;

  font-size: 14px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;
  user-select: none;

  transition: transform 180ms ease, background 220ms ease, filter 220ms ease;
}

.sample-page-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.sample-page-btn.is-active {
  background: #633EB2;
}

.sample-page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* =========================================================
   ✅ PREMIUM PREV/NEXT BUTTONS (SAME AS PREVIOUS SECTION)
   - applied to ONLY the pagination "<" and ">" buttons
   ========================================================= */
.sample-page-btn.sample-nav {
  width: 56px;
  height: 56px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: relative;
  isolation: isolate;

  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(99, 62, 178, 0.12);

  color: rgba(255, 255, 255, 0.98);

  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease, opacity 220ms ease, background 220ms ease;
}

.sample-page-btn.sample-nav::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(166, 151, 224, 0.70) 0%,
    rgba(99, 62, 178, 0.85) 45%,
    rgba(166, 151, 224, 0.55) 100%
  );
  z-index: 0;
  opacity: 0.95;
  pointer-events: none;

  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%);
  mask: radial-gradient(circle, transparent 63%, #000 64%);
}

.sample-page-btn.sample-nav::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(99, 62, 178, 0.35), transparent 62%);
  filter: blur(10px);
  z-index: 0;
  opacity: 0.75;
  pointer-events: none;
}

.sample-page-btn.sample-nav:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 22px 68px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(99, 62, 178, 0.18);
}

.sample-page-btn.sample-nav:active {
  transform: translateY(0);
  filter: brightness(1.00);
}

.sample-page-btn.sample-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.70);
  outline-offset: 4px;
}

.sample-page-btn.sample-nav.is-disabled {
  opacity: 0.40;
  pointer-events: none;
  filter: none;
}

/* icon wrapper + svg */
.sample-nav-icon {
  position: relative;
  z-index: 1;

  width: 28px;
  height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sample-nav-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* =========================================================
   DESKTOP + LAPTOP + TABLET (LANDSCAPE)
   ✅ No scrollbar on tags, show arrow to scroll
   ========================================================= */
@media (min-width: 821px) {
  .sample-tags {
    scrollbar-width: none; /* Firefox hide */
  }

  .sample-tags::-webkit-scrollbar {
    display: none; /* WebKit hide */
  }

  .sample-tags-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 50px;
    width: 52px;

    border-radius: 14px;

    flex: 0 0 auto;

    position: sticky;
    right: 0;

    margin-left: 10px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(99, 62, 178, 0.90) 0%, rgba(99, 62, 178, 0.55) 100%) padding-box,
      linear-gradient(135deg, rgba(99, 62, 178, 0.80) 0%, rgba(166, 151, 224, 0.30) 100%) border-box;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    color: #FFFFFF;
    cursor: pointer;
    user-select: none;

    box-shadow: 0 18px 45px rgba(5, 10, 22, 0.28);

    transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
  }

  .sample-tags-more:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
  }

  .sample-tags-more:active {
    transform: translateY(0px);
  }

  .sample-tags-more.is-disabled {
    opacity: 0.40;
    pointer-events: none;
    filter: none;
  }

  .sample-tags-more-icon {
    display: block;
  }
}

/* =========================================================
   LAPTOP + TABLET (LANDSCAPE)
   ✅ same layout as desktop, just smaller
   ✅ UPDATED: smaller button width + smaller fonts
   ========================================================= */
@media (max-width: 1400px) and (min-width: 821px) {
  .sample-topbar {
    padding-right: 90px;
  }

  .sample-search {
    gap: 16px;
  }

  .sample-search-input {
    width: 360px;
    height: 44px;
    font-size: 15px;
  }

  .sample-search-btn {
    width: 44px;
    height: 44px;
  }

  .sample-tags {
    gap: 14px;
    padding: 0 10px 8px;
  }

  .sample-tag {
    height: 44px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 12px;
    font-size: 18px;
  }

  .sample-tags-more {
    height: 44px;
    width: 46px;
    border-radius: 12px;
  }

  /* ✅ keep 3-in-a-row, just smaller */
  .sample-shell {
    --card-w: 320px;
    --card-h: 440px;
    --grid-gap: 44px;

    --card-pad: 15px;
    --img-h: 195px;

    --body-pad-bottom: 72px;

    /* ✅ UPDATED: narrower button */
    --btn-w: 128px;
    --btn-h: 36px;
  }

  .sample-card-title {
    font-size: 17px;
    line-height: 24px;
  }

  .sample-card-text {
    font-size: 14px;
    line-height: 21px;
    margin-top: 16px;
  }

  .sample-badge {
    height: 28px;
    font-size: 13px;
  }

  /* ✅ UPDATED: smaller button text */
  .sample-card-btn {
    font-size: 14px;
    border-radius: 28px;
  }

  /* ✅ OPTIONAL but consistent: slightly smaller pagination in landscape */
  .sample-page-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* ✅ keep premium nav visible & proportional */
  .sample-page-btn.sample-nav {
    width: 50px;
    height: 50px;
  }

  .sample-nav-icon {
    width: 26px;
    height: 26px;
  }
}

/* =========================================================
   TABLET + MOBILE (PORTRAIT)
   ✅ remove extra vertical spaces
   ✅ 1 box per view
   ✅ button bottom-centered, half in/half out
   ========================================================= */
@media (max-width: 920px) {
  .sample-topbar {
    justify-content: center;
    padding-right: 0;
  }

  .sample-search {
    width: 100%;
    justify-content: center;
  }

  .sample-search-input {
    width: min(419px, 72vw);
  }

  .sample-grid {
    grid-template-columns: var(--card-w);
  }
}

@media (max-width: 820px) {
  /* ✅ remove extra space between title/search and box + remove extra after box */
  .sample-shell {
    min-height: auto;
    padding: 0 18px 60px;
  }

  .sample-topbar {
    padding-top: 46px;
  }

  .sample-tags-wrap {
    margin-top: 28px;
  }

  .sample-grid {
    margin-top: 54px;
    gap: 64px;
    grid-template-columns: min(var(--card-w), 92vw);
  }

  .sample-shell.is-compact .sample-grid {
    margin-top: 54px;
    grid-template-columns: min(var(--card-w), 92vw);
  }

  /* ✅ ensure exactly 1 card per view */
  .sample-shell {
    --card-w: 380px;
    --card-h: 520px;
    --grid-gap: 64px;

    --card-pad: 16px;
    --img-h: 210px;

    --body-pad-bottom: 108px;

    --btn-w: 220px;
    --btn-h: 46px;
  }

  /* ✅ hide arrow on portrait (swipe/drag still works naturally) */
  .sample-tags-more {
    display: none !important;
  }

  /* ✅ button centered, half outside (no notch on the main box in JS path) */
  .sample-card-btn {
    left: 50%;
    right: auto;
    bottom: 0;

    --btn-tx: -50%;
    --btn-ty: 50%;

    border-radius: 18px;
  }

  .sample-pagination {
    margin-top: 70px;
  }

  .sample-shell.is-compact .sample-pagination {
    margin-top: 54px;
  }

  /* ✅ premium nav size for portrait */
  .sample-page-btn.sample-nav {
    width: 48px;
    height: 48px;
  }

  .sample-nav-icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 420px) {
  .sample-grid {
    grid-template-columns: min(380px, 92vw);
  }

  .sample-card {
    width: min(380px, 92vw);
  }

  .sample-card-img {
    width: calc(min(380px, 92vw) - (var(--card-pad) * 2));
  }

  .sample-page-btn.sample-nav {
    width: 46px;
    height: 46px;
  }

  .sample-nav-icon {
    width: 22px;
    height: 22px;
  }
}
