/* ─────────────────────────────────────────
   SECTION — FAQ
   Category pills (the shared pill tabs) switch between panels; each panel
   is a list of expandable questions (<details>/<summary>: the question is
   always visible, tap to show the answer). Behaviour: js/script.js →
   faqTabs; open/close animation: js/animations.js.
   Answers still waiting for content are marked .faq-todo (terracotta,
   dashed) — search index.html for "To fill in".
───────────────────────────────────────── */

.faq { background: var(--surface); }  /* beige */

.faq-tabs {
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 32px;
}

.faq-tab {
  white-space: nowrap;
}

.faq-panels {
  max-width: 820px;
  margin: 0 auto;
}

.faq-panel[hidden] {
  display: none;
}

/* ── one question ── */
.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-item:first-child {
  border-top: 1px solid var(--hairline);
}

.faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px;
  color: var(--text-primary);
  transition: color 200ms var(--ease);
}

.faq-q::-webkit-details-marker {
  display: none;
}

/* the + in a circle, turning into × when open */
.faq-q::after {
  content: '+';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1;
  color: var(--text-primary);
  transition: transform 300ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
}

.faq-item[open] > .faq-q::after {
  transform: rotate(45deg);
  background: var(--inverse);
  color: var(--cream-50);
}

.faq-q:hover {
  color: var(--text-secondary);
}

.faq-q:hover::after {
  background: var(--surface-sunken);
}

.faq-q:focus-visible {
  outline: 2px solid var(--border);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq-a {
  overflow: hidden;   /* lets animations.js animate its height */
}

.faq-a p {
  max-width: 680px;
  padding: 0 4px 22px;
  color: var(--text-secondary);
  text-align: left;
}

.faq-a a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.faq-a a:hover {
  color: var(--text-muted);
}

/* highlighted note inside an answer (e.g. children leaving before dinner) */
.faq-a .faq-callout {
  max-width: 680px;
  margin: 0 4px 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--clay-300);
  background: rgba(196, 137, 106, 0.12);   /* terracotta, soft */
  color: var(--text-primary);
}

.faq-a .faq-callout strong {
  color: var(--text-primary);   /* terracotta text would be too low-contrast here */
  font-weight: 700;
}

/* placeholder answers still to be written */
.faq-a .faq-todo {
  display: inline-block;
  margin: 0 4px 22px;
  padding: 6px 12px;
  border: 1px dashed var(--clay-300);
  color: var(--text-muted);
}


/* desktop: a touch tighter so a category fits one screen */
@media (min-width: 1025px) {
  .faq .section-header {
    margin-bottom: clamp(24px, 3.5svh, 40px);
  }

  .faq-q {
    padding: clamp(12px, 1.8svh, 18px) 4px;
  }
}


/* responsive — tablet + phone: pills become one swipeable row */
@media (max-width: 1024px) {
  .faq-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin-left: calc(var(--slider-gutter, 32px) * -1);
    margin-right: calc(var(--slider-gutter, 32px) * -1);
    padding: 2px var(--slider-gutter, 32px);
    scroll-padding: 0 var(--slider-gutter, 32px);
  }

  .faq-tabs::-webkit-scrollbar {
    display: none;
  }

  .faq-q {
    gap: 16px;
  }
}
