/* ============================================================
   DEVS-6451 — FAQ visual design, concept "Uni" (Ivory-Gold)
   Hero teaser (main page) + category tile heads + section bands.
   Loaded via cssFiles after vbstyles.css; gold tokens stay
   page-local (not part of the global --vibe-* set).
   ============================================================ */

:root {
  --faq-gold: #C19638;
  --faq-gold-text: #8C6A20;
  --faq-gold-tint: #F8F2E2;
  --faq-gold-deep: #6E5513;
  --faq-ivory: #FBF7EC;
}

#content .vibe-faq-teaser *,
#content .vibe-faq-band *,
#content .vibe-faq-tile-head * {
  box-sizing: border-box;
}

/* === Hero teaser (FAQ main page) === */

/* overflow stays visible so the search dropdown can escape the hero.
   994px / -22px mirrors the question-page hero (.vibe-faq-hero-image):
   full-bleed across the shell container's 22px side padding. */
#content .vibe-faq-teaser {
  position: relative;
  height: 250px;
  width: 994px;
  margin: 0 0 1.4rem -22px;
}

#content .vibe-faq-teaser picture,
#content .vibe-faq-teaser-img {
  display: block;
  width: 100%;
  height: 100%;
}

#content .vibe-faq-teaser-img {
  object-fit: cover;
  object-position: right center;
}

/* 1.25rem left inset lines the hero text/search up with the tile texts below
   (the grids are hero-full-bleed here, unlike the concept mock's inset grid). */
#content .vibe-faq-teaser-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.25rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 34%, transparent 55%);
}

#content .vibe-faq-teaser-overlay h1 {
  margin: 0 !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-32) !important;
  font-weight: 700 !important;
  color: var(--vibe-heading) !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

#content .vibe-faq-teaser-overlay p {
  margin: 0.45rem 0 0 !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-18) !important;
  color: var(--vibe-text-muted) !important;
  max-width: 44ch;
  line-height: 1.5;
}

/* === Hero search box (DEVS-6451 Phase 6) === */

#content .vibe-faq-search--hero {
  margin: 1rem 0 0 !important;
  padding: 0 !important;
  width: 380px;
  max-width: 100%;
}

#content .vibe-faq-search--hero .vibe-faq-search-input {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#content .vibe-faq-search--mobile {
  display: none;
  margin: 0 0 1.5rem !important;
  padding: 0 0.3rem !important;
}

/* Shell forces content-box on inputs — without this the input renders wider
   than its wrapper and the dropdown, which is sized off the wrapper. */
#content .vibe-faq-search-input {
  box-sizing: border-box !important;
}

#content .vibe-faq-search-input:focus {
  border-color: var(--faq-gold) !important;
  box-shadow: 0 0 0 2px rgba(193, 150, 56, 0.15) !important;
}

#content .vibe-faq-search-item:hover {
  background: var(--faq-gold-tint) !important;
  color: var(--faq-gold-text) !important;
}

/* === Category tiles (FAQ main page) === */

/* Grids align with the hero edges (994px full-bleed, no inner padding). */
#content .vibe-faq-categories-grid {
  width: 994px !important;
  margin: 0 0 3rem -22px !important;
  padding: 0 !important;
}

#content .vibe-faq-category-card {
  border-top: 4px solid var(--faq-gold) !important;
}

#content .vibe-faq-category-card:hover {
  border-color: var(--faq-gold) !important;
  box-shadow: 0 2px 8px rgba(193, 150, 56, 0.12) !important;
}

/* Uniform "Uni" look: the service card differs by motif only. */
#content .vibe-faq-shopping-card {
  background: var(--vibe-white) !important;
  border: 1px solid var(--vibe-border-strong) !important;
  border-top: 4px solid var(--faq-gold) !important;
}

#content .vibe-faq-tile-head {
  position: relative;
  display: block;
  height: 132px;
  overflow: hidden;
  text-decoration: none !important;
}

#content .vibe-faq-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

#content .vibe-faq-tile-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--faq-gold-tint) 0%, rgba(248, 242, 226, 0.45) 42%, transparent 68%);
}

#content .vibe-faq-tile-text {
  position: absolute;
  left: 1.2rem;
  bottom: 0.9rem;
  z-index: 2;
}

#content .vibe-faq-tile-kicker {
  display: block;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-12) !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faq-gold-deep);
}

#content .vibe-faq-tile-text h2 {
  margin: 0.1rem 0 0 !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-20) !important;
  font-weight: 700 !important;
  color: var(--vibe-heading) !important;
  letter-spacing: -0.01em;
}

/* Subcategory links inside tiles: hover switches from orange to gold. */
#content .vibe-faq-subcategory-link:hover {
  background: var(--faq-gold-tint) !important;
  color: var(--faq-gold-text) !important;
}

#content .vibe-faq-subcategory-link:hover::after {
  color: var(--faq-gold);
}

/* === Section band (category / subcategory / general pages) === */

#content .vibe-faq-band {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-bottom: 4px solid var(--faq-gold);
  width: 994px;
  margin: 0 0 1.5rem -22px;
}

#content .vibe-faq-band-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

#content .vibe-faq-band-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.8rem;
  background: linear-gradient(90deg, var(--faq-gold-tint) 8%, rgba(248, 242, 226, 0.55) 45%, transparent 70%);
}

#content .vibe-faq-band-kicker {
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-12) !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faq-gold-deep);
}

#content .vibe-faq-band-overlay h1 {
  margin: 0.1rem 0 !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-24) !important;
  font-weight: 700 !important;
  color: var(--vibe-heading) !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Wraps up to 2 lines instead of hard ellipsis — the band is tall enough. */
#content .vibe-faq-band-overlay p {
  margin: 0 !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-16) !important;
  color: var(--vibe-text-muted) !important;
  max-width: 60ch;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Category-page grids and question lists align with the band edges. */
#content .vibe-faq-subcategories-grid {
  width: 994px;
  margin: 0 0 2rem -22px;
  padding: 0;
}

#content .vibe-faq-questions-list {
  width: 994px;
  margin: 0 0 2rem -22px;
  padding: 0;
}

/* Subcategory cards: compact concept proportions + gold hover. */
#content .vibe-faq-subcategory-card {
  padding: 1rem 1.2rem;
}

#content .vibe-faq-subcategory-card h2 {
  margin: 0;
  font-size: var(--vibe-fs-16);
  line-height: 1.25;
}

#content .vibe-faq-subcategory-card h2::after {
  font-size: var(--vibe-fs-20);
  line-height: 1;
}

/* !important beats the global `#content p` body-text rule and the shell's
   Futura-Light face — the concept uses the regular Futura weight here. */
#content .vibe-faq-subcategory-card p {
  margin-top: 0.25rem !important;
  font-family: var(--vibe-ff) !important;
  font-size: var(--vibe-fs-16) !important;
  line-height: 1.45 !important;
}

#content .vibe-faq-subcategory-card:hover {
  border-color: var(--faq-gold) !important;
  box-shadow: 0 2px 8px rgba(193, 150, 56, 0.12) !important;
}

#content .vibe-faq-subcategory-card:hover h2::after {
  color: var(--faq-gold);
  transform: translateX(3px);
}

/* Back button lines up with the full-bleed content edge. The 1.5rem top margin
   collapses away under grids (2rem bottom) — it only adds air on QA-list pages. */
#content .vibe-faq-back {
  width: 994px;
  margin: 1.5rem 0 2rem -22px;
  padding: 0;
  text-align: left;
}

/* === Mobile (same cut as the vbstyles FAQ block) === */

@media (max-width: 768px) {
  #content .vibe-faq-teaser {
    height: 160px;
    width: auto;
    margin: 0 0 1rem;
  }

  #content .vibe-faq-categories-grid {
    width: auto !important;
    margin: 0 0 2rem !important;
    padding: 0 0.3rem !important;
  }

  #content .vibe-faq-subcategories-grid,
  #content .vibe-faq-questions-list {
    width: auto;
    margin: 0 0 1.5rem;
    padding: 0 0.3rem;
  }

  #content .vibe-faq-teaser-overlay {
    padding: 0 16px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.58) 42%, transparent 66%);
  }

  #content .vibe-faq-teaser-overlay h1 {
    font-size: var(--vibe-fs-24) !important;
  }

  #content .vibe-faq-teaser-overlay p {
    font-size: var(--vibe-fs-12) !important;
    max-width: 26ch;
  }

  /* Mobile: search moves out of the hero into its own row below (concept "Uni"). */
  #content .vibe-faq-search--hero {
    display: none;
  }

  #content .vibe-faq-search--mobile {
    display: block;
  }

  #content .vibe-faq-tile-head {
    height: 96px;
  }

  #content .vibe-faq-tile-text {
    left: 0.9rem;
    bottom: 0.6rem;
  }

  #content .vibe-faq-tile-text h2 {
    font-size: var(--vibe-fs-16) !important;
  }

  #content .vibe-faq-band {
    height: 96px;
    width: auto;
    margin: 0 0.3rem 1rem;
  }

  #content .vibe-faq-band-overlay {
    padding: 0 16px;
  }

  #content .vibe-faq-band-overlay h1 {
    font-size: var(--vibe-fs-18) !important;
  }

  #content .vibe-faq-band-overlay p {
    font-size: var(--vibe-fs-12) !important;
    max-width: 36ch;
    -webkit-line-clamp: 3;
  }

  #content .vibe-faq-back {
    width: auto;
    margin: 0 0.3rem 1.5rem;
  }

  /* Comfortable touch target — the scaled-down shell button is only ~31px tall. */
  #content .vibe-faq-back a {
    padding: 0.8rem 1.1rem !important;
    min-height: 44px;
    box-sizing: border-box;
    align-items: center;
  }

  /* Compact category-tile link rows (concept: ~37px rows, dense list). */
  #content .vibe-faq-subcategory-link {
    padding: 0.55rem 0.9rem !important;
    line-height: 1.3;
  }

  /* Compact subcategory tiles (≈×0.6 of the desktop card geometry). */
  #content .vibe-faq-subcategory-card {
    padding: 0.75rem 0.9rem;
  }

  #content .vibe-faq-subcategory-card p {
    font-size: var(--vibe-fs-14) !important;
    margin-top: 0.2rem !important;
  }
}
