/* FAQ page — builds on our-team.css (tokens, hero, dept-head, CTA, motion) */

/* ---------- TOPIC JUMP LINKS ---------- */
.faq-topics {
  max-width: 1180px;
  margin: 48px auto 0;
  padding: 0 32px;
  /* explicit direction/alignment: main.css styles every <nav> as a column on mobile */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  perspective: 1200px;
}

.faq-topic {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gray-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 22px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.faq-topic:hover,
.faq-topic:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ---------- FAQ LIST ---------- */
.faq-section {
  scroll-margin-top: 96px;
}

.faq-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  perspective: 1200px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.faq-item:hover,
.faq-item.is-open {
  border-color: rgba(217, 112, 78, .45);
  box-shadow: 0 12px 28px rgba(31, 42, 55, .06);
}

.faq-q {
  font-size: inherit;
  font-weight: inherit;
}

.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  background: none;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  color: var(--navy);
}

.faq-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.faq-item.is-open .faq-toggle {
  color: var(--orange);
}

/* plus → minus */
.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gray-bg);
  transition: background .25s ease, transform .4s cubic-bezier(.16, 1, .3, 1);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), background .25s ease;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-icon {
  background: var(--orange);
  transform: rotate(180deg);
}

.faq-item.is-open .faq-icon::before,
.faq-item.is-open .faq-icon::after {
  background: var(--white);
}

.faq-item.is-open .faq-icon::after {
  transform: rotate(0deg);
}

/* Panels stay open until faq.js marks the list ready, so answers are readable without JS */
.faq-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .45s cubic-bezier(.16, 1, .3, 1), visibility .45s;
}

.faq-list.faq-ready .faq-item:not(.is-open) .faq-panel {
  grid-template-rows: 0fr;
  visibility: hidden;
}

.faq-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-a {
  padding: 0 26px 24px;
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.65;
  max-width: 820px;
}

.faq-a p + p,
.faq-a p + ul,
.faq-a p + ol {
  margin-top: 10px;
}

.faq-a ul,
.faq-a ol {
  padding-left: 20px;
}

.faq-a li + li {
  margin-top: 6px;
}

.faq-a li::marker {
  color: var(--orange);
  font-weight: 700;
}

.faq-a b {
  color: var(--navy);
}

.faq-a a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

/* The shared reveal uses scale+blur; keep FAQ rows to a gentle rise so text stays crisp */
html.motion-on .faq-item.reveal-card {
  transform: translateY(24px);
  filter: none;
}

html.motion-on .faq-item.reveal-card.in-view {
  transform: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 680px) {
  .faq-topics {
    padding: 0 20px;
  }

  .faq-toggle {
    padding: 18px 20px;
    font-size: 15.5px;
  }

  .faq-icon {
    width: 30px;
    height: 30px;
  }

  .faq-a {
    padding: 0 20px 20px;
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-panel,
  .faq-icon,
  .faq-icon::before,
  .faq-icon::after {
    transition: none;
  }
}
