/* ==========================================================================
   HBIMS-NAF&SA · Medical FAQs — Design System 2026
   External stylesheet for medical-faqs.html
   Sections: Tokens · Base · Layout · Header · Card · Banner · Chips ·
             Categories · Accordion (Q&A) · Tools · Note · Footer ·
             Responsive · A11y
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy: #1A1F3A;
  --navy-2: #0F132A;
  --gold: #D4A24C;
  --gold-deep: #B5832E;
  --green: #0E8F63;
  --red: #C53B3A;
  --cream: #FAF6EE;
  --muted: #5B6072;
  --line: #E6E0D2;

  /* Type roles */
  --fd: 'Cormorant Garamond', Georgia, serif;             /* display  */
  --fb: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; /* body */
}

/* --- Base ----------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--fb);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }

/* --- Layout --------------------------------------------------------------- */
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 18px;
}

/* --- Header --------------------------------------------------------------- */
.head {
  background: radial-gradient(ellipse at top right, #26304F 0%, var(--navy) 45%, var(--navy-2) 100%);
  color: var(--cream);
  padding: 46px 0 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 7px 15px;
  border: 1px solid rgba(212, 162, 76, .34);
  border-radius: 22px;
  background: rgba(212, 162, 76, .12);
  color: var(--gold);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 2.3px;
  text-transform: uppercase;
}
.eyebrow b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.head h1 {
  margin-bottom: 10px;
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.5px;
}
.head h1 em {
  font-style: italic;
  color: var(--gold);
}

.head p {
  max-width: 600px;
  color: rgba(250, 246, 238, .82);
  font-weight: 300;
  font-size: 1rem;
}

/* --- Card ----------------------------------------------------------------- */
.card {
  margin: -26px auto 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #FFF;
  box-shadow: 0 24px 60px rgba(26, 31, 58, .10);
  overflow: hidden;
}
.pad { padding: 24px 24px 28px; }

/* --- Banner --------------------------------------------------------------- */
.banner {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(212, 162, 76, .45);
  border-radius: 13px;
  background: #FFF3DC;
  color: #6A5A35;
  font-size: .83rem;
}
.banner b { color: var(--navy); }

/* --- Jump chips ----------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.chip {
  padding: 7px 13px;
  border: 1.4px solid var(--line);
  border-radius: 20px;
  background: var(--cream);
  color: var(--navy);
  font-size: .74rem;
  font-weight: 600;
  text-decoration: none;
  transition: .15s;
}
.chip:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* --- Categories ----------------------------------------------------------- */
.cat {
  margin-top: 26px;
  scroll-margin-top: 18px;
}
.cat h2 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  color: var(--navy);
  font-family: var(--fd);
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- Accordion (question / answer) ---------------------------------------- */
.qa {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFF;
  overflow: hidden;
  transition: .15s;
}
.qa.open {
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(181, 131, 46, .10);
}

.q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  border: none;
  background: #FFF;
  color: var(--navy);
  font-family: inherit;
  font-size: .94rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.q:hover { background: var(--cream); }

.chev {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  color: var(--gold-deep);
  font-size: 1rem;
  font-weight: 800;
  transition: .2s;
  padding-bottom: 5px;
}
.qa.open .chev {
  transform: rotate(45deg);
  border-color: var(--gold);
  background: var(--gold);
  color: #FFF;
}

.a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.a p {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
}

/* --- Tools panel ---------------------------------------------------------- */
.tools {
  margin-top: 26px;
  padding: 22px;
  border-radius: 16px;
  background: var(--navy);
  color: var(--cream);
}
.tools h3 {
  margin-bottom: 6px;
  color: var(--gold);
  font-family: var(--fd);
  font-size: 1.4rem;
  font-weight: 700;
}
.tools p {
  margin-bottom: 14px;
  color: rgba(250, 246, 238, .8);
  font-size: .85rem;
}
.tools .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 11px 17px;
  border-radius: 10px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: .15s;
  cursor: pointer;
}
.btn.gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #FFF;
}
.btn.line {
  border: 1.4px solid rgba(250, 246, 238, .4);
  background: transparent;
  color: var(--cream);
}
.btn:hover { transform: translateY(-1px); }

/* --- Disclaimer note ------------------------------------------------------ */
.note {
  margin: 18px auto 30px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.6;
}
.note b { color: var(--navy); }

/* --- Footer --------------------------------------------------------------- */
.foot {
  padding: 24px 0;
  background: var(--navy);
  color: rgba(250, 246, 238, .72);
  font-size: .78rem;
  text-align: center;
}
.foot .sig {
  margin-bottom: 5px;
  color: var(--cream);
  font-family: var(--fd);
  font-size: 1.05rem;
  font-weight: 600;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 560px) {
  .card { margin-top: -18px; }
}

/* --- Accessibility refinements -------------------------------------------
   Keyboard focus ring and reduced-motion support. The accordion open/close
   is driven by inline max-height in JS, so it still works with motion off —
   it simply snaps instead of sliding. */
.q:focus-visible,
.chip:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  .a,
  .chev,
  .btn:hover {
    transition: none !important;
    animation: none !important;
  }
}
