/* Styles for home/faq (app/sections/).
   Every rule is scoped to #section-faq, so none of it reaches other
   parts of the page.

   Two columns: on the left the heading and the "Still have questions?"
   note (which stays in view while the list is read); on the right the
   questions as a ruled list, no boxes. An answer opens smoothly to its
   own height; the plus turns into a cross. */

#section-faq {
  --fq-navy: #001e53;
  --fq-ink: #060c22;
  --fq-gold: #f1ae22;
  --fq-gold-hi: #ffc94d;
  --fq-cream: #f3eee2;
  --fq-line: rgba(243, 238, 226, 0.16);
  --fq-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fq-ease: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  padding: clamp(56px, 8vw, 112px) clamp(20px, 6vw, 96px);
  /* from the navy the newsletter ends on, into the partners' navy */
  background: linear-gradient(180deg, #001440 0%, var(--fq-navy) 55%, #001440 100%);
  color: #fff;
}

#section-faq *,
#section-faq *::before,
#section-faq *::after {
  box-sizing: border-box;
}

#section-faq ::selection {
  background: var(--fq-gold);
  color: var(--fq-navy);
}

#section-faq .faq-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(40px, 7vw, 112px);
}

/* ---------- Left: heading and the note ---------- */
#section-faq .faq-header {
  position: sticky;
  top: 150px;          /* under the fixed header */
}

#section-faq .faq-title {
  margin: 0;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
}

#section-faq .faq-title span {
  color: #feca16;
}

#section-faq .faq-subtitle {
  max-width: 36ch;
  margin: 18px 0 0;
  font-family: var(--fq-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(243, 238, 226, 0.85);
}

#section-faq .faq-cta {
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--fq-line);
}

#section-faq .faq-cta-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 400;
  color: #fff;
}

#section-faq .faq-cta-text {
  margin: 8px 0 20px;
  font-family: var(--fq-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(243, 238, 226, 0.8);
}

/* The gold button, as in the other sections */
#section-faq .faq-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--fq-gold);
  color: var(--fq-navy);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(6, 12, 34, 0.45);
  transition: background-color 0.25s ease, transform 0.35s var(--fq-ease);
}

#section-faq .faq-contact-btn svg {
  transition: transform 0.35s var(--fq-ease);
}

#section-faq .faq-contact-btn:hover {
  background: var(--fq-gold-hi);
  color: var(--fq-navy);
  transform: translateY(-2px);
}

#section-faq .faq-contact-btn:hover svg {
  transform: translateX(4px);
}

#section-faq a:focus-visible,
#section-faq button:focus-visible {
  outline: 2px solid var(--fq-gold-hi);
  outline-offset: 4px;
}

/* ---------- Right: the questions ---------- */
#section-faq .faq-container {
  border-top: 1px solid var(--fq-line);
}

#section-faq .faq-item {
  border-bottom: 1px solid var(--fq-line);
}

#section-faq .faq-q {
  margin: 0;
  font: inherit;
}

#section-faq .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: clamp(20px, 2.2vw, 28px) 0;
  border: 0;
  background: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

#section-faq .question-text {
  font-family: var(--fq-sans);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.2s ease;
}

#section-faq .faq-question:hover .question-text,
#section-faq .faq-item.active .question-text {
  color: var(--fq-gold-hi);
}

#section-faq .faq-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(243, 238, 226, 0.35);
  color: #fff;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

#section-faq .faq-icon svg {
  transition: transform 0.45s var(--fq-ease);
}

#section-faq .faq-question:hover .faq-icon {
  border-color: var(--fq-gold);
}

#section-faq .faq-item.active .faq-icon {
  border-color: var(--fq-gold);
  background: var(--fq-gold);
  color: var(--fq-navy);
}

#section-faq .faq-item.active .faq-icon svg {
  transform: rotate(45deg);
}

/* The answer opens to its own height (a grid row going from 0 to its
   content), so no fixed maximum can cut a long answer short. */
#section-faq .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--fq-ease);
}

#section-faq .faq-item.active .faq-answer {
  grid-template-rows: 1fr;
}

#section-faq .faq-answer-content {
  min-height: 0;
  overflow: hidden;
}

#section-faq .faq-answer-content p {
  max-width: 62ch;
  margin: 0;
  padding: 0 64px clamp(22px, 2.4vw, 30px) 0;
  font-family: var(--fq-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(243, 238, 226, 0.88);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#section-faq .faq-item.active .faq-answer-content p {
  opacity: 1;
  transition-delay: 0.1s;
}

/* ---------- Tablets and phones: one column ---------- */
@media (max-width: 900px) {
  #section-faq .faq-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  #section-faq .faq-header {
    position: static;
  }

  /* the note moves under the questions */
  #section-faq .faq-wrapper {
    display: flex;
    flex-direction: column;
  }

  #section-faq .faq-header {
    display: contents;
  }

  #section-faq .faq-title {
    order: 1;
  }

  #section-faq .faq-subtitle {
    order: 2;
    margin-top: -16px;
  }

  #section-faq .faq-container {
    order: 3;
  }

  #section-faq .faq-cta {
    order: 4;
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
  }

  #section-faq .faq-answer-content p {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #section-faq *,
  #section-faq *::before,
  #section-faq *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
