/* ============================================
   FAQ accordion — native <details>/<summary>-based collapsible
   Q&A. Single-card container holds the rows; each row has a
   question header and an expandable answer.

   Pair the visible accordion with a JSON-LD FAQ schema script in
   the same section for SEO (Google's FAQ rich result). Schema
   text should mirror the visible Q&A 1:1.
   ============================================ */

.gs-faq {
  max-width: 1020px;
  margin: 0 auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
}

.gs-faq__item {
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  padding: 0;
}

.gs-faq__item:last-child {
  border-bottom: 0;
}

.gs-faq__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0.5rem;
  cursor: pointer;
  outline: none;
  user-select: none;
}

/* Hide the native marker (some browsers render an arrow in front
   of <summary>). The chevron in markup provides the visible cue. */
.gs-faq__summary::-webkit-details-marker {
  display: none;
}

.gs-faq__question {
  flex: 1;
  font-size: 1.125rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  color: var(--color-fg);
}

.gs-faq__chevron {
  width: 20px;
  height: 20px;
  color: var(--color-fg);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* Rotate chevron when row is open. */
.gs-faq__item[open] .gs-faq__chevron {
  transform: rotate(180deg);
}

/* Accordion drawer. faq.js drives the max-height interpolation
   via inline style on click; this rule provides the resting
   states + transition spec. Inline max-height set by JS overrides
   both rules below while a transition is running, then JS clears
   the inline value so one of these takes over again. */
.gs-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-fg-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.gs-faq__item[open] .gs-faq__answer {
  max-height: none;
}

.gs-faq__answer-inner {
  padding: 0 0.5rem 1.75rem;
}

.gs-faq__answer p {
  margin: 0 0 0.75rem;
}

.gs-faq__answer p:last-child {
  margin-bottom: 0;
}

/* Inline links — same recipe as body prose links across the site. */
.gs-faq__answer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.gs-faq__answer a:hover {
  color: var(--color-brand-accent);
}

/* Footer note below the accordion — e.g. "Learn more in our guide". */
.gs-faq__footer {
  text-align: center;
  margin: 2.5rem auto 0;
  max-width: 720px;
  font-size: var(--text-base);
  color: var(--color-fg-body);
}

.gs-faq__footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.gs-faq__footer a:hover {
  color: var(--color-brand-accent);
}

@media (max-width: 767px) {
  .gs-faq {
    padding: 1.5rem;
    border-radius: 20px;
  }
  .gs-faq__question {
    font-size: 1rem;
  }
  .gs-faq__summary {
    padding: 1.25rem 0.25rem;
  }
}
