/*
  FAQ page — scoped to `.faq-hero`, `.faq-accordion`, `.faq-cta`, loaded only
  on /faq/ and /en/faq/ via pages/faq_page.py head_extra. The accordion reuses
  the shared native <details> markup (sections.faq_accordion) and is restyled
  only here — other pages that use the accordion don't load this file. Uses the
  site's own tokens; no global stylesheet affected.
*/

/* ---- Hero: text + "most common topics" panel ---- */
.faq-hero {
  padding-block: var(--space-md) var(--space-xl);
}

.faq-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.faq-hero__content {
  min-width: 0;
}

.faq-hero__title {
  margin: var(--space-xs) 0 var(--space-md);
  font-size: clamp(2.25rem, 2.4vw + 1rem, 3.25rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.faq-hero__lede {
  max-width: 34rem;
  margin: 0 0 var(--space-lg);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--graphite-900);
}

.faq-hero__panel {
  padding: var(--space-lg);
  background: var(--surface-card);
  border: var(--hairline) solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.faq-hero__panel-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--graphite-950);
}

.faq-hero__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.faq-hero__topics li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--graphite-900);
}

.faq-hero__topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-accent);
}

/* ---- Accordion ---- */
.faq-list-section {
  padding-block: 0 var(--space-xl);
}

.faq-accordion .faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 56rem;
}

.faq-accordion .faq-item {
  background: var(--surface-card);
  border: var(--hairline) solid var(--metal-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-accordion .faq-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  min-height: 44px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--graphite-950);
}

.faq-accordion .faq-item > summary::-webkit-details-marker {
  display: none;
}

/* +/- indicator (green), rotates when open. */
.faq-accordion .faq-item > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand-accent);
  transition: transform 0.15s ease;
}

.faq-accordion .faq-item[open] > summary::after {
  content: "\2212"; /* minus */
}

.faq-accordion .faq-item > summary:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: -2px;
}

.faq-accordion .faq-item > p {
  margin: 0;
  padding: 0 var(--space-lg) var(--space-md);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite-900);
  max-width: 52rem;
}

/* ---- Final CTA band ---- */
.faq-cta {
  padding-block: 0 var(--space-2xl);
}

.faq-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
  padding: var(--space-xl);
  background: rgba(47, 111, 94, 0.06);
  border: var(--hairline) solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

.faq-cta__text {
  flex: 1 1 320px;
  min-width: 0;
}

.faq-cta__title {
  margin: 0 0 var(--space-2xs);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: var(--leading-snug);
}

.faq-cta__body {
  margin: 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite-700);
}

.faq-cta__actions {
  flex: 0 0 auto;
}

/* ---- Tablet ---- */
@media (max-width: 1023px) {
  .faq-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .faq-hero__lede {
    max-width: none;
  }
  .faq-hero__panel {
    max-width: 560px;
  }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  .faq-hero {
    padding-block: var(--space-sm) var(--space-lg);
  }
  .faq-hero__title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  .faq-hero .cta-row,
  .faq-cta__actions {
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-sm);
  }
  .faq-hero .cta-row .btn,
  .faq-cta__actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
  .faq-cta__box {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-lg);
  }
}
