/* =====================================================================
   FAQ page (2026-09 redesign)
   Palette: navy #1d407e, deep navy #16305d, yellow #fde362
   All classes are prefixed .fq- so nothing leaks into other pages.
   Accordion uses native <details>, search lives in js/web/faq.js.
   ===================================================================== */
.fq-page {
  --fq-navy: #1d407e; --fq-navy-deep: #16305d; --fq-yellow: #fde362;
  --fq-ink: #1f2a3d; --fq-muted: #5b6678; --fq-line: #e3e8f1;
  background: linear-gradient(to bottom, #fde362 0, #fff7cf 300px, #ffffff 660px);
  padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 80px);
  color: var(--fq-ink);
}
.fq-wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* ---- Hero ---- */
.fq-hero { text-align: center; margin: 0 auto clamp(20px, 3.5vw, 28px); }
.fq-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; background: var(--fq-navy); color: var(--fq-yellow);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.fq-hero h1 { color: var(--fq-navy); font-weight: 800; line-height: 1.15; margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); }
.fq-hero h1 span { background: linear-gradient(transparent 62%, rgba(255,255,255,.85) 62%); padding: 0 4px; }
.fq-hero p { color: var(--fq-navy-deep); font-size: clamp(16px, 2.2vw, 18px); margin: 0 0 20px; }

.fq-search { position: relative; max-width: 620px; margin: 0 auto; }
.fq-search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--fq-navy); font-size: 18px; pointer-events: none; }
.fq-search input {
  width: 100%; height: 56px; border-radius: 999px; border: 2px solid transparent;
  padding: 0 20px 0 50px; font-size: 16px; color: var(--fq-ink); background: #fff;
  box-shadow: 0 10px 28px rgba(22, 48, 93, .14); outline: 0; transition: border-color .2s;
}
.fq-search input:focus { border-color: var(--fq-navy); }

/* ---- Topic chips ---- */
.fq-topics {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 0 auto clamp(24px, 4vw, 36px);
}
.fq-topics a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--fq-navy); font-weight: 700; font-size: 14px; text-decoration: none;
  border: 1px solid var(--fq-line); box-shadow: 0 4px 12px rgba(22, 48, 93, .06); transition: background .2s, color .2s;
}
.fq-topics a:hover, .fq-topics a:focus-visible { background: var(--fq-navy); color: var(--fq-yellow); text-decoration: none; }

.fq-empty { text-align: center; color: var(--fq-muted); background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 6px 18px rgba(22,48,93,.08); }

/* ---- Groups ---- */
.fq-group { margin-bottom: clamp(24px, 4vw, 36px); scroll-margin-top: 80px; }
.fq-group h2 {
  display: flex; align-items: center; gap: 10px; text-align: left;
  color: var(--fq-navy-deep); font-weight: 800; font-size: clamp(20px, 2.8vw, 24px); margin: 0 0 12px;
}
.fq-group-icon {
  width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; flex: 0 0 38px;
  background: var(--fq-navy); color: var(--fq-yellow); font-size: 18px;
}

/* ---- Accordion items ---- */
.fq-item {
  background: #fff; border: 1px solid var(--fq-line); border-radius: 14px; margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(22, 48, 93, .06); transition: box-shadow .2s, border-color .2s;
}
.fq-item[open] { border-color: rgba(29, 64, 126, .35); box-shadow: 0 12px 30px rgba(22, 48, 93, .12); }
.fq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 56px 16px 20px; font-weight: 700; font-size: 16.5px; line-height: 1.4; color: var(--fq-navy);
}
.fq-item summary::-webkit-details-marker { display: none; }
.fq-item summary::after {
  content: "\F64D"; font-family: "bootstrap-icons"; position: absolute; right: 16px; top: 50%;
  width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; display: grid; place-items: center;
  background: #eef2fa; color: var(--fq-navy); font-size: 14px; transition: transform .25s, background .2s, color .2s;
}
.fq-item[open] summary::after { transform: rotate(45deg); background: var(--fq-navy); color: var(--fq-yellow); }
.fq-item summary:hover { color: var(--fq-navy-deep); }
.fq-item summary:focus-visible { outline: 2px solid var(--fq-navy); outline-offset: 2px; border-radius: 14px; }

.fq-answer { padding: 0 20px 18px; border-top: 1px solid var(--fq-line); padding-top: 14px; font-size: 15.5px; line-height: 1.65; }
.fq-answer p { margin: 0 0 10px; }
.fq-answer p:last-child { margin-bottom: 0; }
.fq-answer a { color: var(--fq-navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--fq-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.fq-break { word-break: break-all; }

/* "How do I apply" ways */
.fq-ways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fq-way { background: #f6f8fc; border: 1px solid var(--fq-line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.fq-way > i { color: var(--fq-navy); font-size: 20px; }
.fq-way h3 { font-size: 15.5px; font-weight: 700; color: var(--fq-navy-deep); margin: 4px 0; }
.fq-way p { font-size: 14.5px; line-height: 1.55; }
.fq-ways > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Rates table */
.fq-table-wrap { border: 1px solid var(--fq-line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.fq-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fq-table thead th { background: var(--fq-navy); color: #fff; font-weight: 700; text-align: left; padding: 12px 14px; font-size: 13.5px; letter-spacing: .03em; text-transform: uppercase; }
.fq-table tbody th, .fq-table td { padding: 12px 14px; border-top: 1px solid var(--fq-line); text-align: left; }
.fq-table tbody th { font-weight: 700; color: var(--fq-navy-deep); }
.fq-table tbody tr:nth-child(even) { background: #f8fafd; }
.fq-table td:nth-child(2) { font-weight: 800; color: var(--fq-navy); white-space: nowrap; }
.fq-answer .fq-inline-cta {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: rgba(253,227,98,.45); padding: 8px 12px; border-radius: 10px; font-size: 14.5px;
}
.fq-answer .fq-inline-cta:hover { background: var(--fq-yellow); }

/* Requirement links */
.fq-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.fq-answer .fq-links a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
  background: #f6f8fc; border: 1px solid var(--fq-line); text-decoration: none; color: var(--fq-navy); font-weight: 700;
  transition: background .2s, color .2s;
}
.fq-answer .fq-links a .bi-chevron-right { margin-left: auto; opacity: .6; }
.fq-answer .fq-links a:hover { background: var(--fq-navy); color: #fff; }

.fq-note { border-left: 4px solid var(--fq-yellow); background: #f8fafd; border-radius: 0 10px 10px 0; padding: 10px 14px; margin-bottom: 10px; }
.fq-note strong { color: var(--fq-navy-deep); display: block; margin-bottom: 2px; }

/* ---- CTA ---- */
.fq-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px;
  border-radius: 18px; padding: clamp(22px, 4vw, 32px); color: #fff;
  background: linear-gradient(135deg, var(--fq-navy), var(--fq-navy-deep));
  box-shadow: 0 18px 48px rgba(22, 48, 93, .22);
}
.fq-cta h2 { color: #fff; font-weight: 800; font-size: clamp(22px, 3vw, 26px); margin: 0 0 4px; text-align: left; }
.fq-cta p { color: rgba(255,255,255,.82); margin: 0; }
.fq-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  font-weight: 700; font-size: 15px; padding: 11px 18px; border-radius: 12px; text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.fq-btn:hover { text-decoration: none; }
.fq-btn-yellow { background: var(--fq-yellow); color: var(--fq-navy-deep); }
.fq-btn-yellow:hover { background: #fff; color: var(--fq-navy-deep); }
.fq-btn-ghost { border: 2px solid rgba(255,255,255,.55); color: #fff; }
.fq-btn-ghost:hover { border-color: var(--fq-yellow); color: var(--fq-yellow); }

/* ================= Responsive ================= */
@media (max-width: 767.98px) {
  .fq-topics { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .fq-topics::-webkit-scrollbar { display: none; }
  .fq-topics a { flex: 0 0 auto; }
  .fq-ways, .fq-links { grid-template-columns: 1fr; }
  .fq-item summary { font-size: 15.5px; padding: 14px 52px 14px 16px; }
  .fq-answer { padding: 12px 16px 16px; font-size: 15px; }

  /* Rates table becomes stacked cards */
  .fq-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .fq-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fq-table, .fq-table tbody, .fq-table tr, .fq-table th, .fq-table td { display: block; width: 100%; }
  .fq-table tbody tr { border: 1px solid var(--fq-line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: #fff !important; }
  .fq-table tbody th { background: var(--fq-navy); color: #fff; border-top: 0; padding: 10px 14px; }
  .fq-table td { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; }
  .fq-table td:first-of-type { border-top: 0; }
  .fq-table td::before { content: attr(data-label); color: var(--fq-muted); font-weight: 600; }

  .fq-cta { flex-direction: column; align-items: stretch; }
  .fq-cta-actions .fq-btn { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .fq-item summary::after { transition: none; }
}
