/* Next Phase Clinic — v2 (improved) build for Cloudflare Pages
   Same palette and type as the original; buttons/small text darkened to meet WCAG AA. */

:root {
  --blue: #5d8aa8;          /* brand blue: bands, large type, featured cards */
  --blue-ink: #46728f;      /* AA-compliant blue for buttons and small text on white */
  --blue-deep: #3a6079;
  --gold: #a38560;          /* icons, rules, accents */
  --gold-ink: #86683f;      /* AA-compliant gold for small text */
  --navy: #1e293b;
  --ink: #1e293b;
  --muted: #4b5563;
  --light: #f5f5f5;
  --cream: #faf7f2;
  --white: #fff;
  --line: rgba(84, 89, 95, .14);
  --shadow: 0 10px 30px rgba(30, 41, 59, .08);
  --shadow-lg: 0 18px 45px rgba(30, 41, 59, .14);

  --font-head: "Josefin Sans", sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", sans-serif;

  --container: 1140px;
  --gutter: 20px;
  --header-h: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 19px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-head); font-weight: 700; color: var(--navy); margin: 0 0 .5em; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 1em; height: 1em; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--white); color: var(--navy); padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

.section-head { max-width: 760px; margin: 0 auto 50px; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 12px; }
.section-title { font-size: 48px; line-height: 1.2; margin-bottom: 16px; }
.lead { font-size: 20px; color: var(--muted); margin: 0; text-wrap: balance; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-size: 18px; font-weight: 600; line-height: 1.1;
  padding: 14px 26px; border: 2px solid var(--blue-ink); border-radius: 4px;
  background: var(--blue-ink); color: var(--white); text-decoration: none; text-align: center;
  transition: background-color .25s, color .25s, border-color .25s, transform .2s, box-shadow .25s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(58, 96, 121, .25); }
.btn-lg { font-size: 19px; padding: 17px 30px; }
.btn-small { font-size: 16px; padding: 10px 20px; }
.btn-ghost { background: transparent; border-color: var(--white); color: var(--white); }
.btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue-ink); text-decoration: none; }
.text-link svg { transition: transform .2s; }
.text-link:hover { text-decoration: underline; }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .3s, box-shadow .3s; }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: padding .3s; }
.brand img { width: 210px; height: auto; transition: width .3s; }
.primary-nav { display: flex; align-items: center; gap: 22px; }
.menu { display: flex; align-items: center; }
.menu > li { position: relative; }
.menu > li > a, .sub-toggle {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-size: 18px; font-weight: 600;
  color: var(--white); text-decoration: none; padding: 10px 14px; background: none; border: 0; cursor: pointer;
  position: relative; transition: color .2s;
}
.menu > li > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s; }
.menu > li > a:hover::after, .menu > li > a[aria-current="page"]::after { transform: scaleX(1); }
.caret { width: 12px; height: 12px; transition: transform .2s; }
.sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 290px; padding: 8px;
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.sub-menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.sub-menu a { display: block; padding: 11px 14px; font-size: 17px; color: var(--navy); text-decoration: none; line-height: 1.35; border-radius: 6px; }
.sub-menu a:hover { background: var(--light); color: var(--blue-ink); }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.has-sub.open .caret, .has-sub:hover .caret { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 17px; white-space: nowrap; }
.nav-phone svg { width: 15px; height: 15px; color: var(--gold); }
.btn-header { font-size: 17px; padding: 11px 20px; background: transparent; border: 2px solid var(--white); white-space: nowrap; }
.btn-header:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.site-header.scrolled { background: rgba(255, 255, 255, .97); box-shadow: 0 2px 20px rgba(30, 41, 59, .1); backdrop-filter: saturate(1.2) blur(8px); }
.site-header.scrolled .header-inner { padding-top: 8px; padding-bottom: 8px; }
.site-header.scrolled .brand img { width: 150px; }
.site-header.scrolled .menu > li > a, .site-header.scrolled .sub-toggle, .site-header.scrolled .nav-phone { color: var(--navy); }
.site-header.scrolled .btn-header { background: var(--blue-ink); border-color: var(--blue-ink); color: var(--white); }
.site-header.scrolled .btn-header:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.site-header.scrolled .nav-toggle .bar { background: var(--navy); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--white); border-radius: 2px; transition: transform .25s, opacity .25s, background-color .25s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; max-height: 1000px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 170px 0 0; color: var(--white);
  background: #3b3b3b url("/assets/img/hero-pany-robinson.webp") center top / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 35, .72) 0%, rgba(15, 23, 35, .45) 50%, rgba(15, 23, 35, .12) 100%); }
.hero > .container { position: relative; flex: 1; display: flex; align-items: center; }
.hero-copy { max-width: 720px; padding-bottom: 60px; }
.hero-eyebrow { font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #e9d8c1; margin-bottom: 18px; }
.hero h1 { font-size: 76px; font-weight: 600; line-height: 1.02; color: var(--white); margin-bottom: 26px; letter-spacing: -.01em; }
.hero-sub { font-size: 21px; line-height: 1.6; max-width: 640px; margin-bottom: 34px; color: rgba(255, 255, 255, .94); }

.trust-strip { position: relative; background: rgba(93, 138, 168, .92); backdrop-filter: blur(4px); }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-list li { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 10px; font-family: var(--font-head); font-weight: 600; font-size: 18px; line-height: 1.2; }
.trust-list li + li { border-left: 1px solid rgba(255, 255, 255, .28); }
.trust-list svg { width: 26px; height: 26px; color: var(--white); }

/* ---------- Symptoms ---------- */
.symptoms { padding: 100px 0 90px; }
.symptom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.symptom-card { background: var(--cream); border: 1px solid #efe7db; border-radius: 12px; padding: 30px 32px; }
.symptom-card h3 { font-size: 23px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 2px solid rgba(163, 133, 96, .35); }
.check-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 18px; line-height: 1.5; padding: 5px 0; }
.check-list svg { width: 18px; height: 18px; color: var(--gold); margin-top: 4px; }
.symptom-foot { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 34px; border-radius: 12px; background: var(--light); }
.symptom-foot p { margin: 0; font-size: 19px; max-width: 700px; }

/* ---------- Credentials band ---------- */
.band { background: var(--blue); color: var(--white); }
.creds { padding: 50px 0; }
.creds-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; }
.bhrt { display: flex; align-items: center; gap: 28px; }
.bhrt img { width: 170px; }
.bhrt h2 { font-size: 32px; color: var(--white); margin-bottom: 6px; }
.bhrt p { font-size: 19px; line-height: 1.55; margin: 0; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; border-left: 1px solid rgba(255, 255, 255, .28); padding-left: 40px; }
.badges img { height: 80px; width: auto; margin: 0 auto 14px; }
.badges span { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.25; display: block; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; }
.services-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card.card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; padding: 44px 48px; }
.card.card-wide .card-icon { width: 64px; height: 64px; margin: 0; }
.card.card-wide h3 { font-size: 30px; margin-bottom: 10px; }
.card.card-wide p { font-size: 19px; margin: 0; max-width: 620px; color: rgba(255, 255, 255, .95); }
.card-more.card-more-btn { margin: 0; padding: 14px 24px; border: 2px solid var(--white); border-radius: 4px; white-space: nowrap; transition: background-color .25s, color .25s; }
.card-link:hover .card-more.card-more-btn { background: var(--white); color: var(--blue-ink); }
.services-grid .card:not(.card.card-wide) { padding: 36px 32px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 32px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-icon { width: 46px; height: 46px; color: var(--gold); margin-bottom: 22px; }
.card h3 { font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
.card p { font-size: 17px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(163, 133, 96, .5); }
.card-more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue-ink); }
.card-more svg { transition: transform .2s; }
.card-link:hover .card-more svg { transform: translateX(4px); }
.card-featured { background: var(--blue); border: 2px solid var(--gold); }
.card-featured h3, .card-featured p, .card-featured .card-icon, .card-featured .card-more { color: var(--white); }
.tag { position: absolute; top: -13px; left: 24px; background: var(--gold-ink); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px 4px; border-radius: 30px; }

/* ---------- Services ---------- */
.services { padding: 100px 0; background: linear-gradient(var(--white), var(--light)); }
.pull-quote { margin: 60px auto 0; max-width: 760px; text-align: center; }
.pull-quote svg { width: 34px; height: 34px; color: var(--gold); margin: 0 auto 10px; display: block; }
.pull-quote p { font-family: var(--font-head); font-size: 30px; line-height: 1.35; color: var(--navy); margin-bottom: 12px; }
.pull-quote cite, .testimonial-feature figcaption { font-style: normal; font-weight: 600; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }

/* ---------- About ---------- */
.about { padding: 110px 0; background: var(--light) url("/assets/img/bg-molecule.png") top center / cover no-repeat fixed; }
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.about-photo { position: relative; }
.about-photo img { border-radius: 14px; width: 100%; box-shadow: var(--shadow-lg); }
.photo-badge { position: absolute; right: -24px; bottom: 36px; background: var(--white); border-radius: 12px; padding: 16px 22px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--gold); }
.photo-badge strong { display: block; font-family: var(--font-head); font-size: 28px; color: var(--navy); line-height: 1.1; }
.photo-badge span { font-size: 15px; color: var(--muted); }
.about h2 { font-size: 44px; line-height: 1.15; margin-bottom: 6px; }
.role { font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--blue-ink); margin-bottom: 20px; }
.about-copy > p:not(.eyebrow):not(.role) { font-size: 19px; line-height: 1.7; }
.facts { display: grid; gap: 12px; margin: 6px 0 32px; }
.facts li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.5; background: rgba(255, 255, 255, .85); border-radius: 8px; padding: 12px 16px; }
.facts svg { width: 22px; height: 22px; color: var(--gold); margin-top: 1px; }

/* ---------- Telemedicine ---------- */
.telemed { position: relative; overflow: hidden; padding: 90px 0; color: var(--white); background: #1d2f3b url("/assets/img/telemedicine-coast-poster.webp") center / cover; }
.telemed-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.telemed::before { content: ""; position: absolute; inset: 0; background: rgba(10, 20, 30, .62); z-index: 1; }
.telemed-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.telemed-inner img { width: 100%; max-width: 540px; }
.telemed-copy { font-family: var(--font-head); font-size: 38px; line-height: 1.3; margin-bottom: 16px; }
.telemed-copy strong { font-weight: 700; color: #f0e2cf; }
.telemed-sub { font-size: 19px; color: rgba(255, 255, 255, .9); margin-bottom: 28px; }

/* ---------- Why ---------- */
.why { padding: 100px 0; }
.why .card { padding: 36px 32px; }

/* ---------- How it works ---------- */
.how { padding: 100px 0; background: var(--light); }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; position: relative; counter-reset: step; }
.timeline::before { content: ""; position: absolute; top: 28px; left: 16%; right: 16%; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 18px); }
.timeline li { position: relative; background: var(--white); border-radius: 12px; padding: 0 28px 30px; margin-top: 28px; box-shadow: var(--shadow); text-align: center; }
.step-dot { display: grid; place-items: center; width: 56px; height: 56px; margin: -28px auto 18px; border-radius: 50%; background: var(--blue); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 24px; border: 4px solid var(--light); position: relative; }
.timeline .step-num { font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 8px; }
.timeline h3 { font-size: 23px; margin-bottom: 14px; }
.timeline li > p:last-child { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0; }
.how-cta { margin-top: 50px; display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; }

/* ---------- Testimonial ---------- */
.testimonial-band { background: var(--blue); padding: 90px 0; color: var(--white); }
.testimonial-feature { max-width: 860px; margin: 0 auto; text-align: center; }
.testimonial-feature svg { width: 44px; height: 44px; color: #e9d8c1; margin: 0 auto 18px; display: block; }
.testimonial-feature blockquote { margin: 0 0 22px; }
.testimonial-feature p { font-family: var(--font-head); font-size: 30px; line-height: 1.45; margin: 0; }
.testimonial-feature figcaption { color: #f0e2cf; }

/* ---------- FAQ ---------- */
.faq { padding: 100px 0; background: var(--white) url("/assets/img/bg-caduceus.webp") center center / auto no-repeat fixed; }
.faq-inner { max-width: 900px; }
.faq .section-head { margin-bottom: 40px; }
.accordion { margin-bottom: 30px; }
.accordion details { background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(30, 41, 59, .04); transition: box-shadow .25s; }
.accordion details[open] { box-shadow: var(--shadow); border-color: rgba(163, 133, 96, .4); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  list-style: none; cursor: pointer; padding: 20px 26px;
  font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.35; color: var(--navy);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary svg { width: 18px; height: 18px; color: var(--gold); transition: transform .25s; }
.accordion details[open] summary svg { transform: rotate(180deg); }
.accordion .answer { padding: 0 26px 22px; }
.accordion .answer p { font-size: 18px; line-height: 1.65; color: var(--muted); }
.accordion .answer p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: var(--white); padding-top: 80px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; background: var(--white); color: var(--ink); border-radius: 18px; padding: 50px 56px; box-shadow: 0 20px 50px rgba(20, 40, 60, .18); }
.cta-card h2 { font-size: 40px; line-height: 1.2; margin-bottom: 10px; }
.cta-card p { font-size: 19px; color: var(--muted); margin: 0; max-width: 560px; }
.cta-actions { text-align: center; flex: none; }
.cta-alt { margin-top: 12px !important; font-size: 17px !important; }
.cta-alt a { color: var(--blue-ink); font-weight: 700; text-decoration: none; }
.cta-alt a:hover { text-decoration: underline; }

.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1.2fr; gap: 40px; padding: 70px 0 50px; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.footer-logo img { width: 220px; margin-bottom: 14px; }
.footer-brand p { font-size: 17px; line-height: 1.6; max-width: 280px; }
.footer-h { font-size: 22px; color: var(--white); margin-bottom: 18px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a, .footer-contact a, .copyright a { color: var(--white); text-decoration: none; font-size: 17px; }
.footer-links a:hover, .footer-contact a:hover, .copyright a:hover { text-decoration: underline; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; line-height: 1.55; margin-bottom: 12px; }
.footer-contact svg { width: 18px; height: 18px; margin-top: 4px; }
.social { display: flex; gap: 12px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); color: var(--white); transition: background-color .2s, color .2s; }
.social a:hover { background: var(--white); color: var(--blue-ink); }
.social svg { width: 20px; height: 20px; }
.copyright { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 22px var(--gutter) 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 16px; }
.copyright p { margin: 0; }
.copyright a { font-size: 16px; }

.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; background: var(--blue-ink); color: var(--white); display: grid; place-items: center; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.to-top svg { transform: rotate(180deg); width: 14px; height: 14px; }
.to-top.show { opacity: 1; visibility: visible; }

.mobile-bar { display: none; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card-link:hover, .btn:hover { transform: none; }
}

/* ---------- Mid desktop ---------- */
@media (max-width: 1280px) {
  .nav-phone { display: none; }
  .menu > li > a, .sub-toggle { padding: 10px 11px; font-size: 17px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root { --header-h: 76px; }
  body { font-size: 18px; }
  .about, .faq { background-attachment: scroll; }
  .hero { background-image: url("/assets/img/hero-pany-robinson-1280.webp"); background-position: 68% top; padding-top: 130px; max-height: none; }
  .hero h1 { font-size: 60px; }
  .section-title { font-size: 40px; }

  .brand img, .site-header.scrolled .brand img { width: 150px; }
  .nav-toggle { display: block; position: relative; z-index: 60; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .primary-nav.open { max-height: calc(100vh - 70px); overflow-y: auto; }
  .site-header:has(.primary-nav.open) { background: var(--white); }
  .site-header:has(.primary-nav.open) .nav-toggle .bar { background: var(--navy); }
  .menu { flex-direction: column; align-items: stretch; }
  .menu > li > a, .sub-toggle { color: var(--navy); padding: 15px 22px; width: 100%; justify-content: space-between; border-bottom: 1px solid #eee; text-align: left; }
  .menu > li > a::after { display: none; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0; border-radius: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { max-height: 0; }
  .has-sub:hover .caret { transform: none; }
  .has-sub.open .sub-menu { max-height: 400px; }
  .has-sub.open .caret { transform: rotate(180deg); }
  .sub-menu a { padding: 13px 22px 13px 40px; border-radius: 0; border-bottom: 1px solid #f1f1f1; }
  .nav-actions { flex-direction: column; align-items: stretch; padding: 18px 22px 22px; gap: 14px; }
  .nav-phone { display: flex; justify-content: center; color: var(--navy); }
  .btn-header { background: var(--blue-ink); border-color: var(--blue-ink); }

  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .trust-list li:nth-child(3) { border-left: 0; }
  .trust-list li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .28); }
  .creds-inner { grid-template-columns: 1fr; gap: 36px; }
  .bhrt { justify-content: center; }
  .badges { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .28); padding-top: 32px; }
  .about-inner { grid-template-columns: 1fr; gap: 50px; }
  .about-photo { max-width: 480px; margin: 0 auto; }
  .photo-badge { right: -10px; }
  .telemed-inner { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .telemed-inner img { margin: 0 auto; max-width: 440px; }
  .telemed-copy { font-size: 32px; }
  .card-grid.three { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .services-grid { gap: 22px; }
  .services-grid .card:not(.card.card-wide) { padding: 30px 24px; }
  .card.card-wide { grid-template-columns: auto 1fr; padding: 38px 36px; gap: 20px 28px; }
  .card.card-wide .card-more.card-more-btn { grid-column: 2; justify-self: start; }
  .timeline { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; gap: 20px; }
  .timeline::before { display: none; }
  .cta-card { flex-direction: column; text-align: center; padding: 44px 30px; }
  .cta-card p { margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { font-size: 17px; padding-bottom: 64px; }
  .hero { min-height: 640px; padding-top: 120px; background-position: 72% top; }
  .hero::before { background: linear-gradient(180deg, rgba(15, 23, 35, .55), rgba(15, 23, 35, .7)); }
  .hero-eyebrow { font-size: 12px; }
  .hero h1 { font-size: 42px; line-height: 1.08; }
  .hero-sub { font-size: 18px; }
  .hero .btn-row .btn { width: 100%; }
  .trust-list li { font-size: 15px; padding: 14px 8px; gap: 8px; flex-direction: column; text-align: center; }
  .trust-list svg { width: 22px; height: 22px; }
  .section-head { margin-bottom: 34px; }
  .section-title { font-size: 32px; }
  .lead { font-size: 18px; }
  .symptoms, .services, .why, .how, .faq, .about { padding: 64px 0; }
  .symptom-grid { grid-template-columns: 1fr; gap: 16px; }
  .symptom-card { padding: 24px 22px; }
  .symptom-card h3 { font-size: 21px; }
  .check-list li { font-size: 17px; }
  .symptom-foot { flex-direction: column; text-align: center; padding: 26px 22px; gap: 20px; }
  .bhrt { flex-direction: column; text-align: center; gap: 18px; }
  .bhrt img { width: 140px; }
  .bhrt h2 { font-size: 26px; }
  .badges { gap: 10px; }
  .badges img { height: 56px; }
  .badges span { font-size: 15px; }
  .services-grid { grid-template-columns: 1fr; gap: 28px; }
  .card.card-wide { grid-template-columns: 1fr; padding: 34px 24px 28px; gap: 18px; }
  .card.card-wide .card-icon { width: 48px; height: 48px; }
  .card.card-wide h3 { font-size: 24px; }
  .card.card-wide p { font-size: 17px; }
  .card.card-wide .card-more.card-more-btn { grid-column: auto; }
  .card { padding: 28px 24px; }
  .card h3 { font-size: 22px; }
  .pull-quote p, .testimonial-feature p { font-size: 22px; }
  .testimonial-band, .telemed { padding: 64px 0; }
  .about h2 { font-size: 34px; }
  .photo-badge { right: 12px; bottom: 16px; padding: 12px 16px; }
  .photo-badge strong { font-size: 22px; }
  .telemed-copy { font-size: 26px; }
  .accordion summary { font-size: 17px; padding: 16px 18px; }
  .accordion .answer { padding: 0 18px 18px; }
  .accordion .answer p { font-size: 17px; }
  .cta-card h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; padding-top: 50px; }
  .copyright { flex-direction: column; text-align: center; }
  .to-top { display: none; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 2fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--white); box-shadow: 0 -4px 20px rgba(0, 0, 0, .12); padding: 8px; gap: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 6px; font-weight: 700; font-size: 17px; text-decoration: none; color: var(--blue-ink); border: 2px solid var(--blue-ink); }
  .mobile-bar a.primary { background: var(--blue-ink); color: var(--white); }
  .mobile-bar svg { width: 16px; height: 16px; }
}
