/* FAQ (.hp-faq) — markup in template-parts/faq.php, behaviour in assets/js/faq.js */

.hp-faq {
  background: var(--cs-color-white);
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hp-faq__inner {
  max-width: 1030px;
}

.hp-faq__title {
  margin: 0 0 var(--cs-space-lg);
  /* type styles from the global h2 rule */
}

.hp-faq__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-faq__item {
  border-block-end: 1px solid var(--cs-color-line);
}

.hp-faq__heading { margin: 0; }

.hp-faq__btn {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--cs-space-md);
  padding: 30px 0;
  text-align: start;
  /* no font overrides — inherits the type styles from its wrapping <h4 class="hp-faq__heading"> */
}

/* .hp-faq__q — the question text; gets the h4 type style through the <h4> → <button> cascade */
.hp-faq__icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  transition: transform var(--cs-transition);
  transform: rotate(270deg);   /* default (closed) state */
}
.hp-faq__icon svg { width: 100%; height: 100%; }

/* The open question flips the arrow to the opposite direction. */
.hp-faq__item.is-open .hp-faq__icon {
  transform: rotate(0deg);
}

.hp-faq__panel {
  padding-block-end: var(--cs-space-md);
}

.hp-faq__panel[hidden] { display: none; }

.hp-faq__answer {
  font-size: var(--cs-fs-small);
  line-height: 1.6;
  max-width: 75ch;
}

/* ─── Mobile (≤768px) — matches the Figma mobile design ─── */
@media (max-width: 768px) {
  .hp-faq { padding-block: 50px; }

  .hp-faq__title {
    font-size: 28px;
    margin-bottom: var(--cs-space-md);
  }

  .hp-faq__list {
    display: flex;
    flex-direction: column;
    gap: var(--cs-space-md);
  }

  /* Heavier 3px separators between questions. */
  .hp-faq__item {
    border-block-end: 3px solid var(--cs-color-line);
  }

  /* Chevron sits at the top-left, question on the right. */
  .hp-faq__btn {
    align-items: start;
    gap: 10px;
    padding: 0 0 var(--cs-space-md);
  }

  .hp-faq__q    { font-size: 20px; }
  .hp-faq__icon { width: 24px; height: 24px; }

  .hp-faq__panel  { padding-block-end: var(--cs-space-md); }
  .hp-faq__answer { font-size: 18px; }
}
