/*
  pages/faq.css
  FAQ page layout and accordion-style question/answer pairs.
*/

.faq-page {
  & .inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 60px;
  }
}

.faq-intro {
  text-align: center;
  margin-bottom: 2rem;
}


/* ─── Section ────────────────────────────────────────────────────────────── */

.faq-section {
  margin-bottom: 3rem;
}

.faq-section__heading {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  color: var(--emerald);
  font-family: var(--unical);
  font-size: 1.75rem;
}


/* ─── FAQ items ──────────────────────────────────────────────────────────── */

.faq-list {
  margin: 0;
  padding: 0;
}

.faq-item {
  border-bottom: 1px solid var(--jade);

  &:last-child {
    border-bottom: none;
  }
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--asphalt);
  list-style: none;
  user-select: none;

  &::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--emerald);
    transition: transform 125ms ease;
  }

  &.is-open::after {
    content: '−';
  }
}

.faq-item__answer {
  display: none;
  margin: 0;
  padding-bottom: 1rem;

  &.is-open {
    display: block;
  }

  & p {
    margin: 0 0 0.75rem;

    &:last-child {
      margin-bottom: 0;
    }
  }
}
