/* =========================================================================
   American Dental Health Providers (ADHP) — adhp.com
   Shak Web Group build. Medical / clinical-trust archetype.
   Deep navy structure + teal action colour + the practice's real gold logo.

   Single stylesheet. Bump ?v=N on EVERY change (see STYLE-AND-FUNCTION-GUIDE.md).
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand */
  --navy:        #0E2438;
  --navy-deep:   #091823;
  --navy-soft:   #17334C;
  --teal:        #127C8C;
  --teal-bright: #1AA0B4;
  --teal-wash:   #E6F2F4;
  --gold:        #C3A661;
  --gold-deep:   #9D7035;

  /* Neutrals */
  --paper:  #FFFFFF;
  --cloud:  #F5F8FA;
  --cloud-2:#EDF3F7;
  --ink:    #16202B;
  --muted:  #5A6B7A;
  --line:   #DCE5EB;

  /* Type */
  --f-head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Rhythm */
  --wrap: 1200px;
  --gap: 1.75rem;
  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(14,36,56,.06), 0 2px 8px rgba(14,36,56,.05);
  --shadow-md: 0 4px 12px rgba(14,36,56,.08), 0 12px 32px rgba(14,36,56,.07);
  --shadow-lg: 0 10px 30px rgba(14,36,56,.10), 0 30px 60px rgba(14,36,56,.09);

  --t: 220ms cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--teal-bright); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 1.15rem; }
ul, ol { margin: 0 0 1.15rem; padding-left: 1.35rem; }
li { margin-bottom: .45rem; }
blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.75rem;
  border-left: 4px solid var(--gold);
  background: var(--cloud);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--navy-soft);
}
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .8rem 1.2rem; z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout helpers -------------------------------------------- */
.wrap { width: min(var(--wrap), calc(100% - 3rem)); margin-inline: auto; }
.section { padding: clamp(3.25rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.25rem, 4.5vw, 3.5rem) 0; }
.section--cloud { background: var(--cloud); }
.section--navy  { background: var(--navy); color: #DCE7F0; }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
.section--navy a { color: var(--gold); }
.section--navy a:hover { color: #E0CB92; }

.section-head { max-width: 780px; margin: 0 auto clamp(2rem, 4vw, 3.25rem); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.section--navy .section-head p { color: #A9BFD1; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head--compact h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

.eyebrow {
  display: inline-block;
  font-family: var(--f-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .85rem;
}
.section--navy .eyebrow { color: var(--gold); }

.lede { font-size: 1.2rem; color: var(--navy-soft); }

/* ---------- 4. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-head); font-weight: 600; font-size: 1rem;
  padding: .95rem 1.9rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--teal-bright); color: #fff; box-shadow: var(--shadow-md); }
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: #D4BA7E; color: var(--navy-deep); }
.btn--ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn--on-navy { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn--on-navy:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn--sm { padding: .6rem 1.25rem; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-row--center { justify-content: center; }

/* ---------- 5. Header / nav ---------------------------------------------- */
.topbar {
  background: var(--navy-deep);
  color: #B9CCDC;
  font-size: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.topbar a { color: #D7E4EE; }
.topbar a:hover { color: var(--gold); }
.topbar__links { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.topbar__phone { font-family: var(--f-head); font-weight: 600; color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: 230px; height: auto; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav__list { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav__list > li { margin: 0; position: relative; }
.nav__list > li > a {
  font-family: var(--f-head);
  font-size: .93rem; font-weight: 600; letter-spacing: .02em;
  color: #E4EDF4; padding: .5rem 0; display: inline-block; position: relative;
}
.nav__list > li > a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.15rem; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav__list > li > a:hover { color: #fff; }
.nav__list > li > a:hover::after,
.nav__list > li.active > a::after { transform: scaleX(1); }
.nav__list > li.active > a { color: #fff; }

/* Dropdowns */
.nav__sub {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 260px; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .6rem; list-style: none; margin: .5rem 0 0;
  opacity: 0; visibility: hidden; transition: opacity var(--t), transform var(--t), visibility var(--t);
  border-top: 3px solid var(--gold);
}
.nav__list > li:hover > .nav__sub,
.nav__list > li:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__sub li { margin: 0; }
.nav__sub a {
  display: block; padding: .55rem .8rem; border-radius: 6px;
  font-size: .92rem; color: var(--navy); font-weight: 500;
}
.nav__sub a:hover { background: var(--teal-wash); color: var(--teal); }
.has-sub > a::before {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 1rem;
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Hero ------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  min-height: clamp(560px, 82vh, 860px);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
/* Big Five #6 — the hero visual is NEVER hidden. Do not add display:none to
   .hero__video. Reduced motion pauses it (see main.js); it keeps showing its
   poster/current frame. The nested <img> is the true no-video-support fallback. */
.hero__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero__video img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, rgba(9,24,35,.5) 0%, rgba(9,24,35,.3) 38%, rgba(9,24,35,.1) 68%, rgba(9,24,35,.02) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: clamp(3.5rem, 8vw, 6.5rem) 0; display: flex; align-items: center; min-height: clamp(560px, 82vh, 860px); }
/* The text sits on its own panel so it stays legible no matter which frame
   of the video is playing behind it — a gradient alone can't guarantee that.
   Kept narrow and light so the video still reads as the dominant element. */
.hero__body {
  max-width: 460px;
  background: rgba(7,18,29,.5);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 2rem);
}
.hero__eyebrow { color: var(--gold); font-family: var(--f-head); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; margin-bottom: 1rem; display: block; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero__sub { font-size: 1.2rem; color: #E6EEF4; max-width: 46ch; margin-bottom: 1.9rem; }

/* Explicit grid, never flex-wrap: a wrapped 3+1 row reads as a layout bug. */
.hero__trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 2rem;
  margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.22);
}
@media (max-width: 700px) { .hero__trust { grid-template-columns: repeat(2, 1fr); } }
.hero__trust div { min-width: 0; }
.hero__trust strong { display: block; font-family: var(--f-head); font-size: 1.55rem; color: var(--gold); line-height: 1.1; }
.hero__trust span { font-size: .87rem; color: #C7D8E6; }

/* Page banner (interior pages) */
.pagehead { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; padding: clamp(2.75rem, 5.5vw, 4.5rem) 0; }
.pagehead h1 { color: #fff; margin-bottom: .5rem; }
.pagehead p { color: #C7D8E6; font-size: 1.15rem; max-width: 64ch; margin-bottom: 0; }
.breadcrumb { font-size: .85rem; color: #93AEC4; margin-bottom: 1rem; }
.breadcrumb a { color: #C7D8E6; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 .4rem; opacity: .6; }

/* ---------- 7. THE GRID RULE (Big Five #4) -------------------------------
   Every multi-item layout uses an explicit 12-track grid, 4 tracks per item
   (3 per row). Partial last rows are CENTERED. Never use auto-fit here.
   When adding a NEW grid class, add it to all five selector groups below.
   ------------------------------------------------------------------------ */
.services-grid, .svc-grid, .doctors-grid, .locations-grid, .reviews-grid,
.related-grid, .process-grid, .about-gallery, .practice-gallery, .value-grid,
.video-grid, .ba-grid, .post-grid, .condition-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  list-style: none;
  padding: 0;
  margin: 0;
}
.services-grid > *, .svc-grid > *, .doctors-grid > *, .locations-grid > *,
.reviews-grid > *, .related-grid > *, .process-grid > *, .about-gallery > *,
.practice-gallery > *, .value-grid > *, .video-grid > *, .ba-grid > *,
.post-grid > *, .condition-grid > * { grid-column: span 4; margin: 0; }

/* 1 dangler -> centre it (cols 5-8) */
.services-grid  > :nth-child(3n+1):last-child,
.svc-grid       > :nth-child(3n+1):last-child,
.doctors-grid   > :nth-child(3n+1):last-child,
.locations-grid > :nth-child(3n+1):last-child,
.reviews-grid   > :nth-child(3n+1):last-child,
.related-grid   > :nth-child(3n+1):last-child,
.process-grid   > :nth-child(3n+1):last-child,
.about-gallery  > :nth-child(3n+1):last-child,
.practice-gallery > :nth-child(3n+1):last-child,
.value-grid     > :nth-child(3n+1):last-child,
.video-grid     > :nth-child(3n+1):last-child,
.ba-grid        > :nth-child(3n+1):last-child,
.post-grid      > :nth-child(3n+1):last-child,
.condition-grid > :nth-child(3n+1):last-child { grid-column: 5 / span 4; }

/* 2 danglers -> centre the pair (cols 3-6 + 7-10) */
.services-grid  > :nth-child(3n+1):nth-last-child(2),
.svc-grid       > :nth-child(3n+1):nth-last-child(2),
.doctors-grid   > :nth-child(3n+1):nth-last-child(2),
.locations-grid > :nth-child(3n+1):nth-last-child(2),
.reviews-grid   > :nth-child(3n+1):nth-last-child(2),
.related-grid   > :nth-child(3n+1):nth-last-child(2),
.process-grid   > :nth-child(3n+1):nth-last-child(2),
.about-gallery  > :nth-child(3n+1):nth-last-child(2),
.practice-gallery > :nth-child(3n+1):nth-last-child(2),
.value-grid     > :nth-child(3n+1):nth-last-child(2),
.video-grid     > :nth-child(3n+1):nth-last-child(2),
.ba-grid        > :nth-child(3n+1):nth-last-child(2),
.post-grid      > :nth-child(3n+1):nth-last-child(2),
.condition-grid > :nth-child(3n+1):nth-last-child(2) { grid-column: 3 / span 4; }

.services-grid  > :nth-child(3n+2):last-child,
.svc-grid       > :nth-child(3n+2):last-child,
.doctors-grid   > :nth-child(3n+2):last-child,
.locations-grid > :nth-child(3n+2):last-child,
.reviews-grid   > :nth-child(3n+2):last-child,
.related-grid   > :nth-child(3n+2):last-child,
.process-grid   > :nth-child(3n+2):last-child,
.about-gallery  > :nth-child(3n+2):last-child,
.practice-gallery > :nth-child(3n+2):last-child,
.value-grid     > :nth-child(3n+2):last-child,
.video-grid     > :nth-child(3n+2):last-child,
.ba-grid        > :nth-child(3n+2):last-child,
.post-grid      > :nth-child(3n+2):last-child,
.condition-grid > :nth-child(3n+2):last-child { grid-column: 7 / span 4; }

/* ---------- 8. Cards ----------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem; display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #C4D6E2; }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card__body { flex: 1 1 auto; }
.card__link { font-family: var(--f-head); font-weight: 600; font-size: .93rem; margin-top: .5rem; display: inline-flex; align-items: center; gap: .35rem; }
.card__link::after { content: '\2192'; transition: transform var(--t); }
.card:hover .card__link::after { transform: translateX(4px); }
.card__media { margin: -1.9rem -1.9rem 1.4rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--teal-wash);
  display: grid; place-items: center; margin-bottom: 1.1rem; flex-shrink: 0;
}
.card__icon img { width: 32px; height: 32px; object-fit: contain; }
.card--navy { background: var(--navy-soft); border-color: rgba(255,255,255,.1); }
.card--navy h3 { color: #fff; }
.card--navy p { color: #B4C8D8; }

/* Doctor cards */
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--t), box-shadow var(--t); }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.doc-card__photo { background: var(--cloud-2); }
.doc-card__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top center; }
.doc-card__body { padding: 1.5rem 1.6rem 1.7rem; flex: 1 1 auto; display: flex; flex-direction: column; }
.doc-card__body h3 { margin-bottom: .15rem; font-size: 1.28rem; }
.doc-card__role { font-family: var(--f-head); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: .8rem; }
.doc-card__body p { flex: 1 1 auto; font-size: .96rem; color: var(--muted); }

/* Location cards */
.loc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; transition: transform var(--t), box-shadow var(--t); }
.loc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.loc-card h3 { margin-bottom: .8rem; }
.loc-card address { font-style: normal; color: var(--muted); margin-bottom: .9rem; font-size: .98rem; }
.loc-card__phone { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; color: var(--navy); display: inline-block; margin-bottom: .9rem; }
.loc-card__phone:hover { color: var(--teal); }
.loc-card__hours { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .9rem; margin-top: auto; }
.loc-card__hours dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0; }
.loc-card__hours dt { font-weight: 600; color: var(--navy-soft); }
.loc-card__hours dd { margin: 0; text-align: right; }

/* Process / steps */
.process-grid .step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; position: relative; }
.step__num {
  font-family: var(--f-head); font-weight: 700; font-size: .8rem; letter-spacing: .12em;
  color: var(--teal); text-transform: uppercase; margin-bottom: .7rem; display: block;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); font-size: .97rem; margin-bottom: 0; }

/* Value / trust strip */
.value-grid .value { text-align: center; padding: 1.5rem 1rem; }
.value strong { display: block; font-family: var(--f-head); font-size: 2.1rem; color: var(--gold); line-height: 1.1; margin-bottom: .3rem; }
.value span { color: var(--muted); font-size: .95rem; }
.section--navy .value span { color: #A9BFD1; }

/* ---------- 9. Galleries (uniform 4:3, captions ALWAYS visible) ----------
   CRITICAL: aspect-ratio goes on the <img> only. Putting it on the __item
   wrapper clips the <figcaption> — that is the known regression.
   ------------------------------------------------------------------------ */
.about-gallery__item, .practice-gallery__item, .ba-grid__item {
  display: flex; flex-direction: column; aspect-ratio: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin: 0;
}
.about-gallery__item img, .practice-gallery__item img, .ba-grid__item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
}
.about-gallery__item figcaption, .practice-gallery__item figcaption, .ba-grid__item figcaption {
  flex: 1 1 auto; background: var(--cloud); color: var(--navy-soft);
  padding: .95rem 1.1rem; font-size: .92rem; line-height: 1.5;
}
/* Legacy size modifiers are neutralised — grids stay uniform, no jagged rows. */
.about-gallery__item--feature, .about-gallery__item--lg, .about-gallery__item--wide, .about-gallery__item--tall,
.practice-gallery__item--feature, .practice-gallery__item--lg, .practice-gallery__item--wide, .practice-gallery__item--tall {
  grid-column: span 4;
}

/* Before / after */
.ba-grid__item img { aspect-ratio: 16 / 7; }

/* ---------- 10. Video cards ---------------------------------------------- */
.video-card { border-radius: var(--radius); overflow: hidden; background: var(--navy); position: relative; display: block; }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .82; transition: opacity var(--t), transform var(--t); }
.video-card:hover img { opacity: 1; transform: scale(1.03); }
.video-card__play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.video-card__play span {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
}
.video-card__play span::after {
  content: ''; border-left: 17px solid var(--navy); border-top: 11px solid transparent;
  border-bottom: 11px solid transparent; margin-left: 4px;
}
.video-card__meta { padding: 1.1rem 1.25rem 1.35rem; background: #fff; border: 1px solid var(--line); border-top: 0; }
.video-card__meta h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.video-card__meta p { font-size: .9rem; color: var(--muted); margin: 0; }
.video-item { display: flex; flex-direction: column; }
.video-item .video-card { border-radius: var(--radius) var(--radius) 0 0; }
.video-item .video-card__meta { border-radius: 0 0 var(--radius) var(--radius); flex: 1 1 auto; }

/* ---------- 11. Split feature rows --------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.split + .split { margin-top: clamp(3rem, 6vw, 5rem); }
.split__body h2 { margin-bottom: .8rem; }
/* One step down the h-scale (h3 -> h4) so a sub-row heading never competes
   with the section-head h2 sitting directly above it. */
.split__body h3 { font-size: 1.15rem; }
.split__body h3 + p { font-size: .95rem; }

/* "Why patients choose ADHP" photo badges render at the source images' true
   800x800 (the declared width/height attrs are stale) so width:100% blows
   them up to half the section width. Cap them down to badge scale here only
   -- other .split rows on the site use correctly-proportioned photos. */
.section--why-choose .split__media img { width: 100%; max-width: 300px; margin-inline: auto; }

/* ---------- 12. FAQ / accordion ------------------------------------------ */
.faq { max-width: 860px; margin-inline: auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: .85rem; overflow: hidden;
}
.faq details[open] { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; padding: 1.15rem 3rem 1.15rem 1.4rem; position: relative;
  font-family: var(--f-head); font-weight: 600; color: var(--navy); font-size: 1.05rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 1.4rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--t);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq__body { padding: 0 1.4rem 1.3rem; color: var(--muted); }
.faq__body p:last-child { margin-bottom: 0; }

/* ---------- 13. Testimonials --------------------------------------------- */
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem; display: flex; flex-direction: column; }
.quote-card__stars { color: var(--gold); letter-spacing: .12em; margin-bottom: .8rem; font-size: 1.05rem; }
.quote-card blockquote { margin: 0 0 1.2rem; padding: 0; border: 0; background: none; font-size: 1.02rem; font-style: normal; color: var(--ink); flex: 1 1 auto; }
.quote-card__who { font-family: var(--f-head); font-weight: 600; color: var(--navy); font-size: .95rem; }
.quote-card__who span { display: block; font-weight: 400; color: var(--muted); font-size: .87rem; }

/* ---------- 14. Tables --------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 520px; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
th { font-family: var(--f-head); font-weight: 700; color: var(--navy); background: var(--cloud); }

/* ---------- 15. Forms ---------------------------------------------------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--f-head); font-weight: 600; font-size: .88rem; color: var(--navy); }
.field .req { color: #B3261E; }
.field input, .field select, .field textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color var(--t), box-shadow var(--t); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,124,140,.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.field__hint { font-size: .82rem; color: var(--muted); }

/* Honeypot — positioned off-screen, NOT display:none (screen readers + bots) */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.form-consent { font-size: .84rem; color: var(--muted); margin: 1.1rem 0 0; }
.cf-turnstile { margin: 1.2rem 0 .4rem; }

.form-status { border-radius: var(--radius-sm); padding: .95rem 1.15rem; margin-bottom: 1.4rem; font-size: .96rem; display: none; }
.form-status.is-visible { display: block; }
.form-status--ok   { background: #E7F5EC; border: 1px solid #A9D8BC; color: #1B5E34; }
.form-status--err  { background: #FDECEA; border: 1px solid #F3B7B0; color: #8C2018; }

/* ---------- 16. CTA band ------------------------------------------------- */
.cta-band { background: linear-gradient(135deg, var(--teal) 0%, #0E6373 100%); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #D6EEF2; max-width: 62ch; margin-inline: auto; font-size: 1.1rem; }
.cta-band .btn--gold:hover { background: #fff; }

/* ---------- 17. Footer --------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #A9BFD1; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: #C7D8E6; }
.site-footer a:hover { color: var(--gold); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.75rem; }
.footer__brand img { width: 240px; margin-bottom: 1.1rem; }
.footer__brand p { color: #92A9BC; font-size: .93rem; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: .55rem; }
.footer__social { display: flex; gap: .7rem; margin-top: 1.2rem; }
.footer__social a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: grid; place-items: center; transition: background var(--t), transform var(--t);
}
.footer__social a:hover { background: var(--gold); transform: translateY(-2px); }
.footer__social svg { width: 17px; height: 17px; fill: #fff; }
.footer__social a:hover svg { fill: var(--navy-deep); }

.footer__legal { border-top: 1px solid rgba(255,255,255,.1); padding: 1.75rem 0; font-size: .87rem; color: #8AA2B6; }
.footer__legal p { margin-bottom: .8rem; }
.footer__privacy-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.footer__privacy-links li { margin: 0; }

.footer__bar {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0 1.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .86rem; color: #8AA2B6;
}
/* Big Five #1 — the Shak mark is the ICON, never text. Class is footer-shak. */
.footer-shak { display: inline-flex; align-items: center; opacity: .8; transition: opacity var(--t); }
.footer-shak:hover { opacity: 1; }
.footer-shak img { width: 36px; height: 31px; }

/* ---------- 18. Accessibility widget ------------------------------------- */
.a11y-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--teal); color: #fff; box-shadow: var(--shadow-md);
  display: grid; place-items: center; transition: background var(--t), transform var(--t);
}
.a11y-toggle:hover { background: var(--teal-bright); transform: scale(1.05); }
.a11y-toggle svg { width: 26px; height: 26px; fill: #fff; }
.a11y-panel {
  position: fixed; right: 18px; bottom: 78px; z-index: 200;
  width: 270px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1.2rem; display: none; border: 1px solid var(--line);
}
.a11y-panel.is-open { display: block; }
.a11y-panel h3 { font-size: 1rem; margin-bottom: .85rem; }
.a11y-panel button {
  display: block; width: 100%; text-align: left; background: var(--cloud); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .5rem; cursor: pointer;
  font-family: var(--f-body); font-size: .92rem; color: var(--ink); transition: background var(--t);
}
.a11y-panel button:hover { background: var(--teal-wash); }
.a11y-panel button[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
body.a11y-large { font-size: 1.19rem; }
body.a11y-contrast { filter: contrast(1.22); }
body.a11y-underline a { text-decoration: underline; }
body.a11y-no-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---------- 19. Prose (blog / legal) ------------------------------------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.9rem; }
.prose img { border-radius: var(--radius); margin: 2rem 0; }
.prose ul li::marker { color: var(--teal); }

.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--t), box-shadow var(--t); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card__body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.post-card__date { font-size: .82rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; font-family: var(--f-head); font-weight: 600; }
.post-card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.post-card p { font-size: .95rem; color: var(--muted); flex: 1 1 auto; }

/* ---------- 20. Misc ----------------------------------------------------- */
.pill-row { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pill-row li { margin: 0; }
.pill {
  display: inline-block; padding: .45rem 1rem; border-radius: 999px;
  background: var(--teal-wash); color: var(--teal); font-size: .88rem; font-weight: 600;
  font-family: var(--f-head);
}
.insurance-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem 3rem; }
.insurance-logos img { max-height: 46px; width: auto; opacity: .75; transition: opacity var(--t); }
.insurance-logos img:hover { opacity: 1; }

.anchor-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.anchor-nav a {
  font-family: var(--f-head); font-size: .88rem; font-weight: 600;
  padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--navy); background: #fff; transition: all var(--t);
}
.anchor-nav a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.note {
  background: var(--teal-wash); border-left: 4px solid var(--teal);
  padding: 1.1rem 1.35rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.75rem 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- 21. Responsive ----------------------------------------------- */
@media (max-width: 1080px) {
  .nav__list { gap: 1.05rem; }
  .nav__list > li > a { font-size: .87rem; }
  .brand img { width: 195px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(370px, 86vw);
    background: var(--navy); flex-direction: column; align-items: stretch;
    padding: 5.5rem 1.5rem 2rem; gap: 0; overflow-y: auto;
    transform: translateX(100%); transition: transform var(--t); z-index: 99;
    box-shadow: -10px 0 40px rgba(0,0,0,.3);
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav__list > li { border-bottom: 1px solid rgba(255,255,255,.09); }
  .nav__list > li > a { display: block; padding: .9rem 0; font-size: 1rem; }
  .nav__list > li > a::after { display: none; }
  .nav__sub {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; background: transparent; border: 0; padding: 0 0 .8rem .9rem;
    margin: 0; min-width: 0; display: none;
  }
  .nav__list > li.is-expanded > .nav__sub { display: block; }
  .nav__sub a { color: #B4C8D8; padding: .45rem 0; }
  .nav__sub a:hover { background: transparent; color: var(--gold); }
  .has-sub > a { position: relative; }
  .has-sub > a::before { display: none; }
  .nav .btn { margin-top: 1.25rem; }

  .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Tablet: 2 per row; a single dangler centres */
@media (max-width: 900px) {
  .services-grid > *, .svc-grid > *, .doctors-grid > *, .locations-grid > *,
  .reviews-grid > *, .related-grid > *, .process-grid > *, .about-gallery > *,
  .practice-gallery > *, .value-grid > *, .video-grid > *, .ba-grid > *,
  .post-grid > *, .condition-grid > * { grid-column: span 6; }

  .services-grid  > :nth-child(3n+1):last-child,
  .svc-grid       > :nth-child(3n+1):last-child,
  .doctors-grid   > :nth-child(3n+1):last-child,
  .locations-grid > :nth-child(3n+1):last-child,
  .reviews-grid   > :nth-child(3n+1):last-child,
  .related-grid   > :nth-child(3n+1):last-child,
  .process-grid   > :nth-child(3n+1):last-child,
  .about-gallery  > :nth-child(3n+1):last-child,
  .practice-gallery > :nth-child(3n+1):last-child,
  .value-grid     > :nth-child(3n+1):last-child,
  .video-grid     > :nth-child(3n+1):last-child,
  .ba-grid        > :nth-child(3n+1):last-child,
  .post-grid      > :nth-child(3n+1):last-child,
  .condition-grid > :nth-child(3n+1):last-child,
  .services-grid  > :nth-child(3n+1):nth-last-child(2),
  .svc-grid       > :nth-child(3n+1):nth-last-child(2),
  .doctors-grid   > :nth-child(3n+1):nth-last-child(2),
  .locations-grid > :nth-child(3n+1):nth-last-child(2),
  .reviews-grid   > :nth-child(3n+1):nth-last-child(2),
  .related-grid   > :nth-child(3n+1):nth-last-child(2),
  .process-grid   > :nth-child(3n+1):nth-last-child(2),
  .about-gallery  > :nth-child(3n+1):nth-last-child(2),
  .practice-gallery > :nth-child(3n+1):nth-last-child(2),
  .value-grid     > :nth-child(3n+1):nth-last-child(2),
  .video-grid     > :nth-child(3n+1):nth-last-child(2),
  .ba-grid        > :nth-child(3n+1):nth-last-child(2),
  .post-grid      > :nth-child(3n+1):nth-last-child(2),
  .condition-grid > :nth-child(3n+1):nth-last-child(2),
  .services-grid  > :nth-child(3n+2):last-child,
  .svc-grid       > :nth-child(3n+2):last-child,
  .doctors-grid   > :nth-child(3n+2):last-child,
  .locations-grid > :nth-child(3n+2):last-child,
  .reviews-grid   > :nth-child(3n+2):last-child,
  .related-grid   > :nth-child(3n+2):last-child,
  .process-grid   > :nth-child(3n+2):last-child,
  .about-gallery  > :nth-child(3n+2):last-child,
  .practice-gallery > :nth-child(3n+2):last-child,
  .value-grid     > :nth-child(3n+2):last-child,
  .video-grid     > :nth-child(3n+2):last-child,
  .ba-grid        > :nth-child(3n+2):last-child,
  .post-grid      > :nth-child(3n+2):last-child,
  .condition-grid > :nth-child(3n+2):last-child { grid-column: span 6; }

  /* odd item count -> centre the final lone card */
  .services-grid  > :nth-child(odd):last-child,
  .svc-grid       > :nth-child(odd):last-child,
  .doctors-grid   > :nth-child(odd):last-child,
  .locations-grid > :nth-child(odd):last-child,
  .reviews-grid   > :nth-child(odd):last-child,
  .related-grid   > :nth-child(odd):last-child,
  .process-grid   > :nth-child(odd):last-child,
  .about-gallery  > :nth-child(odd):last-child,
  .practice-gallery > :nth-child(odd):last-child,
  .value-grid     > :nth-child(odd):last-child,
  .video-grid     > :nth-child(odd):last-child,
  .ba-grid        > :nth-child(odd):last-child,
  .post-grid      > :nth-child(odd):last-child,
  .condition-grid > :nth-child(odd):last-child { grid-column: 4 / span 6; }
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .topbar__inner { justify-content: center; }
  .topbar__links { display: none; }
}

/* Mobile: 1 per row, full width */
@media (max-width: 600px) {
  :root { --gap: 1.15rem; }
  .wrap { width: calc(100% - 2.2rem); }
  .services-grid > *, .svc-grid > *, .doctors-grid > *, .locations-grid > *,
  .reviews-grid > *, .related-grid > *, .process-grid > *, .about-gallery > *,
  .practice-gallery > *, .value-grid > *, .video-grid > *, .ba-grid > *,
  .post-grid > *, .condition-grid > *,
  .services-grid > :last-child, .svc-grid > :last-child, .doctors-grid > :last-child,
  .locations-grid > :last-child, .reviews-grid > :last-child, .related-grid > :last-child,
  .process-grid > :last-child, .about-gallery > :last-child, .practice-gallery > :last-child,
  .value-grid > :last-child, .video-grid > :last-child, .ba-grid > :last-child,
  .post-grid > :last-child, .condition-grid > :last-child { grid-column: 1 / -1; }

  .card { padding: 1.5rem; }
  .card__media { margin: -1.5rem -1.5rem 1.2rem; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .a11y-panel { right: 12px; width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card:hover, .doc-card:hover, .loc-card:hover, .post-card:hover, .btn:hover { transform: none; }
}

@media print {
  .site-header, .topbar, .site-footer, .a11y-toggle, .a11y-panel, .cta-band, .nav-toggle { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
