/* ==========================================================================
   Frequently Asked Questions (admissions.html, #faq only).
   Two columns: a sticky heading column on the left (kicker, title with the
   index.html orange script "Questions", a short line and a pill button), and
   the questions on the right as numbered accordion rows. The <details> markup
   and the site.js accordion behaviour are unchanged.
   ========================================================================== */

#faq.faq {
  position: relative;
  background: #faf7f1;
  overflow-x: clip;
}

#faq .faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

/* ---------- heading column ---------- */
#faq .faq-head {
  position: sticky;
  top: 120px;
}

#faq .faq-head .kicker {
  display: inline-block;
  font-family: var(--hp-nav);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hp-orange);
  margin-bottom: 16px;
}

#faq .faq-head .kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1.5px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--hp-orange);
}

#faq .faq-head .h2 {
  font-family: var(--hp-sans);
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--hp-navy);
  margin: 0 0 22px;
  text-wrap: balance;
}

/* "Questions" in index.html's orange script */
#faq .faq-head .hp-script {
  font-size: 1.05em;
  letter-spacing: 0;
  white-space: normal;
}

#faq .faq-lead {
  font-family: var(--hp-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--hp-ink);
  max-width: 420px;
  margin: 0 0 30px;
}


/* ---------- question list ---------- */
#faq .faq-list {
  display: grid;
  gap: 14px;
  counter-reset: faq;
}

#faq .faq-list details {
  background: #fff;
  border: 1px solid #e6e2d8;
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .35s ease;
}

#faq .faq-list details[open] {
  border-color: var(--hp-blue);
  box-shadow: 0 14px 30px rgba(14, 42, 71, .07);
}

#faq .faq-list details:hover {
  border-color: #cfd8e4;
}

#faq .faq-list summary {
  position: relative;
  display: flex;
  justify-content: flex-start;
  text-align: left;
  align-items: center;
  gap: 16px;
  padding: 20px 60px 20px 22px;
  list-style: none;
  cursor: pointer;
  font-family: var(--hp-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hp-navy);
}

#faq .faq-list summary::-webkit-details-marker {
  display: none;
}

#faq .faq-list summary:focus-visible {
  outline: 2px solid var(--hp-orange);
  outline-offset: -2px;
  border-radius: 18px;
}

/* number badge before each question */
#faq .faq-list summary::before {
  counter-increment: faq;
  content: counter(faq, decimal-leading-zero);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fdf0e7;
  color: var(--hp-orange);
  font-family: var(--hp-nav);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .3s ease, color .3s ease;
}

#faq .faq-list details[open] summary::before {
  background: var(--hp-blue);
  color: #fff;
}

/* plus / minus indicator on the right: both bars centred with transforms */
#faq .faq-list summary i {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: 0;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1.5px solid var(--hp-navy);
  transition: background-color .3s ease, border-color .3s ease;
}

#faq .faq-list summary i::before,
#faq .faq-list summary i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--hp-navy);
  transform: translate(-50%, -50%);
  transition: transform .35s ease, background-color .3s ease;
}

/* vertical bar: hidden when open, leaving the minus */
#faq .faq-list summary i::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

#faq .faq-list details[open] summary i {
  background: var(--hp-orange);
  border-color: var(--hp-orange);
}

#faq .faq-list details[open] summary i::before,
#faq .faq-list details[open] summary i::after {
  background: #fff;
}

#faq .faq-list details[open] summary i::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

#faq .faq-list .ans {
  margin: 0;
  padding: 0 60px 22px 76px;
  font-family: var(--hp-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--hp-ink);
  animation: faq-in .45s ease both;
}

#faq .faq-list .ans a {
  color: var(--hp-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- tablet: heading above the list ---------- */
@media (max-width: 1024px) {
  #faq .faq-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  #faq .faq-head {
    position: static;
    max-width: 640px;
  }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  #faq .faq-head .h2 {
    font-size: clamp(34px, 9.5vw, 42px);
  }
  #faq .faq-lead {
    font-size: 16px;
    margin-bottom: 24px;
  }
  #faq .faq-list {
    gap: 10px;
  }
  #faq .faq-list summary {
    padding: 16px 52px 16px 16px;
    gap: 12px;
    font-size: 16px;
  }
  #faq .faq-list summary::before {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-radius: 10px;
  }
  #faq .faq-list summary i {
    right: 14px;
    width: 26px;
    height: 26px;
  }
  #faq .faq-list .ans {
    padding: 0 18px 18px 60px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #faq .faq-list .ans {
    animation: none;
  }
  #faq .faq-list summary i,
  #faq .faq-list summary i::before,
  #faq .faq-list summary i::after,
  #faq .faq-list details,
  #faq .faq-list summary::before {
    transition: none;
  }
}
