/* ==========================================================================
   GNC SG — FAQ Accordion
   ========================================================================== */

.faq-group {
  margin-bottom: var(--space-10);
}

.faq-group__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-6);
}

/* FAQ item — <details> / <summary> */
.faq-item {
  border-bottom: 1px solid var(--color-border-light);
}

.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

/* Remove default marker */
.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::marker {
  display: none;
  content: '';
}

/* Chevron */
.faq-item__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: var(--space-4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding: 0 0 var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* ---- Page heading ----
   The FAQ page template renders no content_above, so the title comes from
   here instead. faq.png opens on it at 40px over the intro. */

.faq-page__title {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-5);
}

.faq-page__intro {
  font-size: var(--font-size-base);
  line-height: 22px;
  color: var(--color-text);
  margin-bottom: var(--space-10);
}

/* ==========================================================================
   Mobile (design/mobile/faq/faq.png, drawn at 375px)
   ==========================================================================
   The accordion mechanics need nothing — <details>/<summary> is already the
   right shape at any width. Only the type scale and the accent rule change.

   Measured at 375px: a 40px title, 16px intro on 22px, group titles over a
   40px rule, 16px questions in 68px rows, and 14px answers on 21px.
   ========================================================================== */

@media (max-width: 767px) {
  /* Size is unchanged from desktop — faq.png draws the title at 40px on
     mobile too, and "FAQ" sits on one line there. Only the gap under it
     tightens. */
  .faq-page__title {
    margin-bottom: var(--space-4);
  }

  .faq-page__intro {
    margin-bottom: var(--space-8);
  }

  .faq-group {
    margin-bottom: var(--space-8);
  }

  /* .heading-accent draws its rule 60px wide; the design shortens it here. */
  .faq-group__title.heading-accent::after {
    width: 40px;
    height: 2px;
  }

  /* The questions carry the weight in the design — medium reads as body text
     against the answer beneath it. */
  .faq-item__question {
    font-weight: var(--font-weight-bold);
    gap: var(--space-3);
  }

  /* 21px, against the 24.5 that --line-height-relaxed gives at this size. */
  .faq-item__answer {
    padding-bottom: var(--space-4);
    line-height: 21px;
  }
}
