/* ==========================================================================
   Clínica Procardíaco — Design System
   Trust & Authority + Conversão · paleta da marca
   ========================================================================== */

:root {
  /* Brand */
  --magenta: #D12C7E;
  --magenta-dark: #B02167;
  --navy: #02398C;
  --navy-deep: #002456;
  --sky: #33B6E4;
  --sky-soft: #E9F6FC;

  /* WhatsApp */
  --wa: #25D366;
  --wa-dark: #1DA851;

  /* Neutrals */
  --ink: #0E1B2E;
  --slate: #46586F;
  --muted: #6B7A8F;
  --line: #E3E9F1;
  --bg: #FFFFFF;
  --bg-soft: #F5F8FC;
  --bg-navy-grad: linear-gradient(135deg, #02398C 0%, #002456 100%);

  /* Type */
  --font-head: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --container: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(2, 57, 140, .06);
  --shadow: 0 12px 34px rgba(2, 57, 140, .10);
  --shadow-lg: 0 26px 60px rgba(2, 57, 140, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--navy); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

/* Layout ------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(64px, 9vw, 118px) 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--bg-navy-grad); color: #D9E4F5; }
.section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--magenta);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--magenta); border-radius: 2px; }
.section--navy .eyebrow { color: var(--sky); }
.section--navy .eyebrow::before { background: var(--sky); }

.section-head { max-width: 720px; margin-bottom: clamp(38px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.lead { font-size: 1.12rem; color: var(--muted); margin-top: 16px; }
.section--navy .lead { color: #B9C9E6; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  --_bg: var(--navy); --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  line-height: 1; padding: 15px 26px; border-radius: 999px; border: 2px solid transparent;
  background: var(--_bg); color: var(--_fg); cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  min-height: 52px; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--wa { --_bg: var(--wa); }
.btn--wa:hover { background: var(--wa-dark); }
.btn--magenta { --_bg: var(--magenta); }
.btn--magenta:hover { background: var(--magenta-dark); }
.btn--ghost { --_bg: transparent; --_fg: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); background: #fff; }
.btn--light { --_bg: #fff; --_fg: var(--navy); }
.btn--outline-light { --_bg: transparent; --_fg: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--lg { padding: 17px 32px; font-size: 1.06rem; min-height: 58px; }
.btn--block { width: 100%; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
  background: transparent;
}
.site-header.solid { background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 78px; }
.brand { display: flex; align-items: center; }
.brand-imgs { position: relative; display: block; height: 42px; }
.brand img { height: 42px; width: auto; display: block; }
.brand-imgs .brand-full, .brand-imgs .brand-mark { transition: opacity .35s var(--ease); }
.brand-imgs .brand-mark { position: absolute; left: 0; top: 0; opacity: 0; }
.site-header.solid .brand-imgs .brand-full { opacity: 0; }
.site-header.solid .brand-imgs .brand-mark { opacity: 1; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a.navlink {
  font-family: var(--font-head); font-weight: 600; font-size: .97rem; color: #fff;
  padding: 10px 14px; border-radius: 10px; transition: color .15s, background .15s;
}
.site-header.solid .nav a.navlink { color: var(--ink); }
.nav a.navlink:hover { color: var(--sky); }
.site-header.solid .nav a.navlink:hover { color: var(--navy); background: var(--sky-soft); }
.nav .btn { margin-left: 10px; }

.nav-toggle {
  margin-left: auto; display: none; width: 48px; height: 48px; border: 0; background: transparent;
  cursor: pointer; align-items: center; justify-content: center; border-radius: 12px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 26px; height: 2.5px; background: #fff; border-radius: 3px;
  transition: transform .25s var(--ease), opacity .2s;
}
.site-header.solid .nav-toggle span, .site-header.solid .nav-toggle span::before, .site-header.solid .nav-toggle span::after { background: var(--ink); }
.nav-toggle span::before { transform: translateY(-8px); }
.nav-toggle span::after { transform: translateY(8px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: rotate(-45deg); }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: center;
  color: #fff; padding-top: 78px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(0,36,86,.94) 0%, rgba(2,57,140,.82) 45%, rgba(2,57,140,.45) 100%);
}
.hero .container { position: relative; z-index: 1; padding-block: 60px; }
.hero__content { max-width: 680px; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  font-family: var(--font-head); font-weight: 600; font-size: .86rem; color: #fff; margin-bottom: 22px;
}
.hero .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px rgba(51,182,228,.3); }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--sky); }
.hero p.hero-sub { font-size: 1.22rem; line-height: 1.6; color: #D6E3F6; margin-top: 20px; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 40px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.16); }
.hero__trust .t { display: flex; flex-direction: column; }
.hero__trust .t b { font-family: var(--font-head); font-size: 1.7rem; color: #fff; line-height: 1; }
.hero__trust .t span { font-size: .9rem; color: #AFC3E6; margin-top: 6px; }

/* Quick actions (overlap hero) ------------------------------------------- */
.qa-wrap { position: relative; z-index: 5; margin-top: clamp(-64px, -6vw, -84px); }
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.qa-card {
  display: flex; align-items: center; gap: 15px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 22px; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.qa-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.qa-card .ic { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--sky-soft);
  color: var(--navy); display: grid; place-items: center; transition: background .2s, color .2s; }
.qa-card:hover .ic { background: var(--navy); color: #fff; }
.qa-card .ic svg { width: 26px; height: 26px; }
.qa-card .txt { min-width: 0; }
.qa-card b { font-family: var(--font-head); color: var(--ink); font-size: 1.04rem; line-height: 1.2; display: block; }
.qa-card span { font-size: .88rem; color: var(--muted); }
.qa-card .arrow { flex: none; margin-left: auto; color: var(--sky); transition: transform .2s var(--ease); }
.qa-card:hover .arrow { transform: translateX(4px); color: var(--magenta); }
.qa-card .arrow svg { width: 20px; height: 20px; }

.wa-banner {
  display: flex; align-items: center; gap: 20px; margin-top: 18px; padding: 22px 26px;
  border-radius: var(--radius-lg); background: linear-gradient(100deg, #EAF9F0 0%, #F0FBF5 100%);
  border: 1px solid #CDEEDA;
}
.wa-banner .ic { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 20px rgba(37,211,102,.4); }
.wa-banner .ic svg { width: 30px; height: 30px; }
.wa-banner .txt b { font-family: var(--font-head); color: var(--ink); font-size: 1.12rem; display: block; }
.wa-banner .txt span { color: var(--slate); font-size: .96rem; }
.wa-banner .btn { margin-left: auto; flex: none; }

@media (max-width: 900px) { .qa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .qa-wrap { margin-top: -40px; }
  .wa-banner { flex-direction: column; align-items: flex-start; text-align: left; }
  .wa-banner .btn { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) { .qa-grid { grid-template-columns: 1fr; } }

/* Stat / trust bar -------------------------------------------------------- */
.trustbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trustbar .stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.trustbar .stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trustbar .stat .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--sky-soft); color: var(--navy);
  display: grid; place-items: center; margin-bottom: 16px; }
.trustbar .stat .ic svg { width: 24px; height: 24px; }
.trustbar .stat b { font-family: var(--font-head); display: block; font-size: 1.05rem; color: var(--ink); }
.trustbar .stat span { font-size: .96rem; color: var(--muted); }

/* Grid helpers ------------------------------------------------------------ */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards: services / exams ------------------------------------------------- */
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body h3 { color: var(--ink); }
.card__body p { color: var(--muted); font-size: .98rem; }
.card__link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-head);
  font-weight: 600; color: var(--magenta); font-size: .96rem;
}
.card__link svg { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }
.card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(2,57,140,.92); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: .78rem; padding: 6px 12px; border-radius: 999px; }

/* Feature list (icon rows) ------------------------------------------------ */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ic { flex: none; width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--sky-soft); color: var(--navy); }
.feature .ic svg { width: 26px; height: 26px; }
.section--navy .feature .ic { background: rgba(255,255,255,.1); color: var(--sky); }
.feature h3 { font-size: 1.14rem; margin-bottom: 4px; }
.feature p { font-size: .98rem; color: var(--muted); }
.section--navy .feature p { color: #B9C9E6; }

/* Split (image + text) ---------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 5vw, 70px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.split__media .badge {
  position: absolute; bottom: -22px; right: -12px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 18px 22px; display: flex; align-items: center; gap: 14px; max-width: 260px;
}
.split__media .badge .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--magenta); color: #fff; display: grid; place-items: center; flex: none; }
.split__media .badge b { font-family: var(--font-head); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.split__media .badge span { font-size: .85rem; color: var(--muted); }

/* Team -------------------------------------------------------------------- */
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.doc:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.doc__photo { aspect-ratio: 1; overflow: hidden; background: var(--bg-soft); }
.doc__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doc__body { padding: 20px 22px 24px; }
.doc__body h3 { font-size: 1.16rem; color: var(--ink); }
.doc__role { font-family: var(--font-head); font-weight: 600; color: var(--magenta); font-size: .9rem; margin: 4px 0 12px; }
.doc__bio { font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* Convênios --------------------------------------------------------------- */
.conv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.conv {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; font-family: var(--font-head); font-weight: 600; font-size: .96rem;
  color: var(--ink); transition: border-color .18s, box-shadow .18s, transform .18s;
}
.conv:hover { border-color: var(--sky); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.conv .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sky-soft); color: var(--navy); display: grid; place-items: center; }
.conv .tick svg { width: 13px; height: 13px; }

/* Gallery ----------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery a { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery a:hover img { transform: scale(1.07); }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.contact-row { display: flex; gap: 15px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sky-soft); color: var(--navy); display: grid; place-items: center; }
.contact-row .ic svg { width: 22px; height: 22px; }
.contact-row b { font-family: var(--font-head); color: var(--ink); display: block; font-size: 1.02rem; }
.contact-row a, .contact-row span { color: var(--muted); font-size: .98rem; }
.contact-row a:hover { color: var(--magenta); }
.map-embed { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; height: 100%; border: 0; width: 100%; }

/* CTA band ---------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band .container { position: relative; z-index: 1; text-align: center; }
.cta-band h2 { color: #fff; max-width: 760px; margin-inline: auto; }
.cta-band p { color: #C7D6EE; max-width: 600px; margin: 16px auto 0; }
.cta-band .hero__cta { justify-content: center; }
.cta-band__glow { position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(51,182,228,.35), transparent 65%); top: -220px; right: -120px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--navy-deep); color: #A9BCDC; padding: 66px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer .brand img { height: 40px; filter: brightness(0) invert(1); opacity: .95; }
.site-footer p { font-size: .95rem; margin-top: 16px; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; color: #A9BCDC; padding: 6px 0; font-size: .96rem; transition: color .15s; }
.footer-col a:hover { color: var(--sky); }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.footer-social a:hover { background: var(--magenta); }
.footer-social svg { width: 20px; height: 20px; }
.footer-legal { margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .82rem; color: #7E93B8; }
.footer-bottom { margin-top: 14px; padding-top: 14px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .86rem; color: #7E93B8; }
.site-footer .footer-note { max-width: none; margin-top: 18px; padding: 14px 18px; border-radius: 12px;
  background: rgba(255,255,255,.06); border-left: 3px solid var(--magenta); font-size: .86rem; color: #C9D6EC; }
.footer-note strong { color: #fff; }
.site-footer .footer-disclaimer { max-width: none; margin-top: 10px; font-size: .8rem; color: #7E93B8; }

/* Floating WhatsApp ------------------------------------------------------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 0;
  background: var(--wa); color: #fff; border-radius: 999px; padding: 15px; box-shadow: 0 12px 30px rgba(37,211,102,.45);
  font-family: var(--font-head); font-weight: 600; overflow: hidden; transition: gap .25s var(--ease), padding .25s var(--ease), transform .2s;
}
.wa-float svg { width: 30px; height: 30px; flex: none; }
.wa-float span { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width .3s var(--ease), opacity .2s; }
.wa-float:hover { gap: 10px; padding-right: 22px; transform: translateY(-2px); }
.wa-float:hover span { max-width: 190px; opacity: 1; }

/* Agendamento modal ------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 20, 50, .55); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: calc(100dvh - 40px); overflow-y: auto; position: relative;
  transform: translateY(18px) scale(.98); transition: transform .28s var(--ease);
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; background: var(--bg-soft);
  border-radius: 11px; cursor: pointer; color: var(--slate); display: grid; place-items: center;
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-head { padding: 32px 32px 4px; }
.modal-head h2 { font-size: 1.5rem; }
.modal-head p { color: var(--muted); margin-top: 8px; font-size: .98rem; }
.modal-body { padding: 22px 32px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .92rem; }
.field select, .field input[type="date"], .field input[type="text"] {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #fff; transition: border-color .15s;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(51,182,228,.18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chips { display: flex; gap: 10px; }
.chip { flex: 1; margin: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span { display: block; text-align: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--slate); transition: border-color .15s, background .15s, color .15s; }
.chip input:checked + span { border-color: var(--navy); background: var(--sky-soft); color: var(--navy); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(51,182,228,.35); }
.modal-foot { padding: 6px 32px 28px; display: grid; gap: 12px; }
.modal-direct { background: none; border: 0; color: var(--navy); font-family: var(--font-head); font-weight: 600;
  cursor: pointer; padding: 8px; font-size: .96rem; }
.modal-direct:hover { color: var(--magenta); text-decoration: underline; }
.modal-note { text-align: center; font-size: .85rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.modal-note svg { width: 15px; height: 15px; color: var(--sky); flex: none; }
body.modal-open { overflow: hidden; }
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .modal-head, .modal-body, .modal-foot { padding-left: 22px; padding-right: 22px; }
  .modal-head { padding-top: 28px; }
}

/* Internal page hero ------------------------------------------------------ */
.page-hero { background: var(--bg-navy-grad); color: #fff; padding: 130px 0 64px; position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 780px; }
.page-hero p { color: #C7D6EE; font-size: 1.14rem; margin-top: 16px; max-width: 640px; }
.crumbs { display: flex; gap: 8px; font-size: .9rem; color: #9DB4DA; margin-bottom: 20px; font-family: var(--font-head); }
.crumbs a { color: #9DB4DA; } .crumbs a:hover { color: #fff; }

/* Prose (article content) ------------------------------------------------- */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 46px; font-size: 1.7rem; }
.prose h3 { margin-top: 30px; font-size: 1.28rem; color: var(--navy); }
.prose p, .prose li { color: var(--slate); }
.prose ul { padding-left: 4px; list-style: none; display: grid; gap: 12px; }
.prose ul li { position: relative; padding-left: 32px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sky-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2302398C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat; }
.prose strong { color: var(--ink); }
.info-box { background: var(--sky-soft); border: 1px solid #CDE9F5; border-left: 4px solid var(--sky); border-radius: var(--radius); padding: 22px 24px; }
.info-box h3 { margin-top: 0; color: var(--navy); }
.info-box--alert { background: #FDF0F6; border-color: #F6D3E4; border-left-color: var(--magenta); }
.info-box--alert h3 { color: var(--magenta-dark); }

/* Article layout (internal pages) ---------------------------------------- */
.article-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 54px; align-items: start; }
.side { position: sticky; top: 100px; display: grid; gap: 20px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.side-card h3 { font-size: 1.14rem; margin-bottom: 16px; }
.side-fact { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.side-fact:last-child { border-bottom: 0; }
.side-fact .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--sky-soft); color: var(--navy); display: grid; place-items: center; }
.side-fact .ic svg { width: 20px; height: 20px; }
.side-fact b { display: block; font-family: var(--font-head); color: var(--ink); font-size: .95rem; line-height: 1.3; }
.side-fact span { font-size: .86rem; color: var(--muted); }
.side-card--cta { background: var(--bg-navy-grad); color: #fff; text-align: center; }
.side-card--cta h3 { color: #fff; }
.side-card--cta p { color: #C7D6EE; font-size: .95rem; margin-bottom: 18px; }

.article-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 30px; aspect-ratio: 16/9; }
.article-media img { width: 100%; height: 100%; object-fit: cover; }

/* FAQ (details/summary) --------------------------------------------------- */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--sky); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-family: var(--font-head); font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2302398C' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .faq-a { padding: 0 22px 20px; color: var(--slate); }

/* Doctor byline ----------------------------------------------------------- */
.byline { display: flex; gap: 16px; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-top: 40px; }
.byline .av { flex: none; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: var(--navy); }
.byline .av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.byline b { font-family: var(--font-head); color: var(--ink); display: block; }
.byline span { font-size: .9rem; color: var(--muted); }

/* Related exams ----------------------------------------------------------- */
.related-mini { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.related-mini:hover { border-color: var(--sky); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-mini .ic { flex: none; width: 44px; height: 44px; border-radius: 11px; background: var(--sky-soft); color: var(--navy); display: grid; place-items: center; }
.related-mini .ic svg { width: 22px; height: 22px; }
.related-mini b { font-family: var(--font-head); color: var(--ink); font-size: .98rem; display: block; }
.related-mini span { font-size: .85rem; color: var(--muted); }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 34px; }
  .side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .side { grid-template-columns: 1fr; } }

/* Reveal animation — only hidden when JS is present (crawlers/no-JS see all) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Mobile nav + responsive ------------------------------------------------- */
@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 78px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(255,255,255,.98); backdrop-filter: blur(12px); padding: 18px 22px 26px;
    box-shadow: var(--shadow); transform: translateY(-140%); transition: transform .32s var(--ease); margin-left: 0;
    max-height: calc(100vh - 78px); overflow-y: auto;
  }
  body.nav-open .nav { transform: translateY(0); }
  .nav a.navlink { color: var(--ink); font-size: 1.06rem; padding: 13px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.navlink:hover { background: var(--sky-soft); }
  .nav .btn { margin: 12px 0 0; width: 100%; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trustbar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .split__media .badge { right: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero__trust .t b { font-size: 1.4rem; }
  .wa-float span { display: none; }
}
@media (max-width: 480px) {
  .grid-4, .trustbar, .conv-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
}
