/* ============================================================================
   styles.css
   Sections: 1 Theme variables · 2 Base · 3 Buttons · 4 Header/nav · 5 Hero ·
   6 Content sections · 7 Floating gallery · 8 Lightbox · 9 Visit/Contact ·
   10 Footer · 11 Sticky appointment bar · 12 Image placeholders ·
   13 Setup panel · 14 Responsive breakpoints · 15 Reduced motion
   ========================================================================== */

/* ============ 1. THEME VARIABLES ============
   Change colours here (or via `site.theme` in doctor-config.js). */
:root {
  --bg: #FFFFFF;            /* main background */
  --ink: #172C3D;           /* primary text */
  --accent: #246B70;        /* primary accent (teal) */
  --accent-dark: #1B5458;   /* hover state of the accent */
  --accent-soft: #E3EFEF;   /* pale teal for decorative shapes */
  --tint: #F5F7F8;          /* light section background */
  --muted: #526574;         /* secondary text */
  --line: #E1E6E9;          /* subtle borders */

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 1px 2px rgba(23, 44, 61, .05), 0 4px 14px rgba(23, 44, 61, .05);
  --shadow-md: 0 12px 32px rgba(23, 44, 61, .10);
  --shadow-lg: 0 28px 64px rgba(23, 44, 61, .16);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 72px;
}

/* ============ 2. BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;                /* safety net: never scroll sideways */
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
[hidden] { display: none !important; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; }

/* ============ 3. BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(36, 107, 112, .24); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--outline:hover { background: var(--accent-soft); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; transition: border-color .2s, background-color .2s, opacity .2s;
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ 4. HEADER / NAVIGATION ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(23, 44, 61, .05); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; margin-right: auto; }
.brand-mark {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .02em;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.primary-nav ul { display: flex; gap: 4px; }
.primary-nav a {
  display: block; padding: 10px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: .9375rem; text-decoration: none;
  transition: color .2s, background-color .2s;
}
.primary-nav a:hover, .primary-nav a[aria-current="true"] { color: var(--ink); background: var(--tint); }

.menu-toggle {
  display: none; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--line);
  border-radius: 50%; background: #fff; cursor: pointer; place-items: center;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { border-top: 1px solid var(--line); background: #fff; padding: 12px 0 24px; box-shadow: var(--shadow-md); }
.mobile-menu a:not(.btn) { display: block; padding: 14px 4px; font-weight: 600; font-size: 1.0625rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 20px; }

/* ============ 5. HERO (highest design priority) ============ */
.hero { position: relative; overflow: hidden; background: var(--bg); padding-top: clamp(24px, 4vw, 56px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center; gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(72px, 9vw, 112px);
  min-height: min(740px, calc(100svh - var(--header-h)));
}
.hero-copy { max-width: 600px; }

/* The one orchestrated moment: the hero rises into place once on load. */
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.hero-copy > :nth-child(6) { animation-delay: .30s; }
.hero-portrait, .hero-card { animation: fade-in 1s .15s ease backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.hero-name {
  font-size: clamp(2.6rem, 6.4vw, 4.9rem); line-height: 1.02; font-weight: 800;
  letter-spacing: -.035em; color: var(--ink); text-wrap: balance;
}
.hero-title { margin-top: 20px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 600; color: var(--accent); line-height: 1.4; }
.hero-spec { display: block; margin-top: 4px; font-weight: 500; color: var(--muted); }
.hero-intro { margin-top: 16px; max-width: 48ch; font-size: 1.125rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 36px; color: var(--muted); font-size: .9375rem; }
.hero-facts li { padding-left: 14px; position: relative; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero-visual { position: relative; isolation: isolate; width: 100%; max-width: 540px; justify-self: end; padding: 0 0 24px; }
.hero-blob {
  position: absolute; z-index: -1; top: 4%; right: -14%; width: 92%; aspect-ratio: 1;
  background: var(--accent-soft); border-radius: 58% 42% 55% 45% / 47% 55% 45% 53%;
}
.hero-ring {
  position: absolute; z-index: -1; left: -10%; bottom: -2%; width: 58%; aspect-ratio: 1;
  border: 1.5px solid rgba(36, 107, 112, .3); border-radius: 50%;
}
.hero-portrait {
  position: relative; width: min(100%, 440px); margin-left: auto; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px;       /* arch-topped portrait */
  overflow: hidden; background: var(--tint); box-shadow: var(--shadow-lg);
}
.hero-card {
  position: absolute; left: 0; bottom: 12%; max-width: 230px;
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 14px 20px;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-md); border-left: 4px solid var(--accent);
}
.hero-card-label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-card-text { font-size: 1rem; line-height: 1.35; color: var(--ink); }

/* When there is no portrait (placeholders off and no photo): centre the text. */
.hero--no-photo .hero-grid { grid-template-columns: minmax(0, 760px); justify-content: center; min-height: 0; }
.hero--no-photo .hero-visual { display: none; }

/* Soft curve that leads into the next section (same colour as that section). */
.hero-curve { position: absolute; left: -10%; right: -10%; bottom: -1px; height: 56px; background: var(--tint); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }

/* ============ 6. CONTENT SECTIONS ============ */
.section { --card: var(--tint); padding: clamp(64px, 9vw, 112px) 0; background: var(--bg); }
.section.is-tint { --card: #fff; background: var(--tint); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
.section-head p { margin-top: 14px; font-size: 1.0625rem; color: var(--muted); }
.section h3 { font-size: 1.125rem; line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-main h2 { margin-bottom: 28px; }
.prose { max-width: 62ch; color: var(--muted); font-size: 1.0625rem; }
.prose p + p { margin-top: 1.1em; }
.approach { margin-top: 36px; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); max-width: 62ch; }
.approach-label { font-size: .875rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.approach p:last-child { font-size: 1.1875rem; line-height: 1.55; color: var(--ink); font-weight: 500; }
.about-aside { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); }
.glance > div + div { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.glance dt { font-size: .875rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.glance dd { font-weight: 550; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .9rem; font-weight: 550; }

/* Qualifications & experience */
.registration { margin: -16px 0 40px; padding: 14px 20px; display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); }
.registration strong { color: var(--ink); }
.qual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
.qual-grid.is-single { grid-template-columns: minmax(0, 720px); }
.qual-col h3 { margin-bottom: 28px; font-size: 1.25rem; }
.timeline { position: relative; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 32px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.tl-title { font-weight: 650; font-size: 1.0625rem; line-height: 1.4; }
.tl-meta { color: var(--accent); font-weight: 600; font-size: .9375rem; margin-top: 2px; }
.tl-place { color: var(--muted); margin-top: 2px; }
.tl-desc { color: var(--muted); margin-top: 8px; max-width: 52ch; }

/* Services: an open list, ruled rather than boxed */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.service-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.service-icon svg { width: 24px; height: 24px; }
.service p { margin-top: 10px; color: var(--muted); }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.ach { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.ach-type { font-size: .875rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.ach p { margin-top: 8px; color: var(--muted); }

/* ============ 7. FLOATING PHOTO GALLERY ("Inside the Clinic") ============ */
.section--gallery { overflow: hidden; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.gallery-head .section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.gallery-controls { display: flex; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }

.gallery-track {
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* Same value as the list's side padding, so the first card snaps to the container edge. */
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  scrollbar-width: none; padding-bottom: 36px;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -3px; }
.gallery-list {
  display: flex; align-items: flex-start; gap: clamp(16px, 2.4vw, 28px);
  width: max-content; margin-inline: auto;
  /* Left edge lines up with the page container; % = width of the scroll area. */
  padding: 8px max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))) 24px;
}
.gallery-card { flex: none; scroll-snap-align: start; width: min(78vw, 580px); }
.gallery-card:nth-child(3n+2) { width: min(60vw, 360px); margin-top: 56px; }
.gallery-card:nth-child(3n)   { width: min(60vw, 380px); margin-top: 20px; }
.gallery-btn {
  display: block; width: 100%; padding: 0; border: 0; background: var(--tint); cursor: zoom-in;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}
.gallery-btn:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.gallery-card .media { aspect-ratio: 5 / 4; }
.gallery-card:nth-child(3n+2) .media { aspect-ratio: 4 / 5; }
.gallery-card:nth-child(3n)   .media { aspect-ratio: 1 / 1; }
.gallery-caption { margin-top: 16px; padding-inline: 6px; color: var(--muted); font-size: .9375rem; font-weight: 500; }

.gallery-progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; max-width: 240px; }
.gallery-progress span { display: block; height: 100%; width: 30%; border-radius: 3px; background: var(--accent); transform-origin: left; will-change: transform; }

/* ============ 8. LIGHTBOX ============ */
.lightbox { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: #fff; }
.lightbox[open] { display: block; }
.lightbox::backdrop { background: rgba(14, 27, 38, .9); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 72px 72px 32px; }
.lightbox-stage { width: min(100%, 1000px); height: min(100%, 72vh); display: grid; place-items: center; }
.lightbox-stage .media { width: 100%; height: 100%; border-radius: var(--radius); background: transparent; }
.lightbox-stage .media-img { object-fit: contain; }
.lightbox-stage .media:not(.is-loaded) { max-width: 760px; max-height: 520px; }
.lightbox-caption { min-height: 1.5em; text-align: center; color: #E8EEF2; font-size: .9375rem; }
.lightbox .icon-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.lightbox .icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .24); color: #fff; border-color: #fff; }
.lightbox .icon-btn:focus-visible { outline-color: #fff; }
.lightbox-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ============ 9. VISIT & CONTACT ============ */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; max-width: 900px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: flex-start; }
.info-card h3 { font-size: 1.3125rem; margin-bottom: 16px; }
.address { font-style: normal; color: var(--muted); font-size: 1.0625rem; line-height: 1.7; margin-bottom: 28px; }
.hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.hours > div:first-child { border-top: 0; padding-top: 0; }
.hours dt { color: var(--muted); }
.hours dd { font-weight: 600; text-align: right; }
.hours-note { margin-top: 16px; color: var(--muted); font-size: .9375rem; }

.contact-wrap .section-head { margin-bottom: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-note { margin-top: 28px; max-width: 56ch; color: var(--muted); font-size: .9375rem; }
.social { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 24px; }
.social a { font-weight: 600; }

/* ============ 10. FOOTER ============ */
.site-footer { background: var(--ink); color: #D5DEE5; padding: 64px 0 32px; }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-name { font-size: 1.375rem; font-weight: 700; color: #fff; }
.footer-clinic { margin-top: 4px; color: #B6C4CF; }
.footer-disclaimer { margin-top: 20px; max-width: 52ch; font-size: .9rem; line-height: 1.65; color: #B6C4CF; }
.footer-h { font-size: .875rem; font-weight: 600; color: #B6C4CF; margin-bottom: 14px; }
.site-footer li + li { margin-top: 8px; }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .16); }
.privacy summary { cursor: pointer; font-weight: 600; color: #fff; width: fit-content; }
.privacy p { margin-top: 12px; max-width: 80ch; font-size: .9rem; color: #B6C4CF; }
.copyright { margin-top: 20px; font-size: .875rem; color: #B6C4CF; }

/* ============ 11. MOBILE STICKY APPOINTMENT BAR ============ */
.sticky-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transition: transform .3s ease;
}
.sticky-bar.is-tucked { transform: translateY(110%); }
.sticky-bar .btn { min-height: 50px; }

/* ============ 12. IMAGE PLACEHOLDERS ============
   Every photo slot is a .media box: a labelled placeholder underneath and the
   real <img> on top. When the image loads, it covers the placeholder. */
.media { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--tint); }
.media-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 16px; text-align: center; color: #5F7384;
  background:
    radial-gradient(120% 90% at 20% 10%, #EEF3F4 0%, transparent 60%),
    linear-gradient(160deg, #E9EEF0 0%, #DFE6E9 100%);
}
.media-ph svg { width: 56px; height: 56px; opacity: .75; }
.media-ph-label { font-weight: 600; font-size: .9375rem; letter-spacing: .01em; }
.media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.media.is-loaded .media-img { opacity: 1; }
.media.is-loaded .media-ph { visibility: hidden; }
.media.no-ph .media-ph { display: none; }          /* placeholders switched off */

/* ============ 13. SETUP PANEL (only with ?setup=1) ============ */
.setup-panel { position: fixed; left: 16px; bottom: 16px; z-index: 300; max-width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .875rem; }
.setup-panel h2 { font-size: 1rem; margin-bottom: 8px; }
.setup-panel ul { list-style: disc; padding-left: 18px; }
.setup-panel li + li { margin-top: 4px; }

/* ============ 14. RESPONSIVE BREAKPOINTS ============ */
@media (max-width: 1023px) {
  .primary-nav { display: none; }
  .menu-toggle { display: grid; }
  .header-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  /* Tablet/mobile hero: portrait first, then name and actions. */
  :root { --header-h: 64px; }
  .hero { padding-top: 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; padding-bottom: 80px; }
  .hero-visual { order: -1; justify-self: center; max-width: 380px; padding-bottom: 20px; }
  .hero-portrait { width: min(82%, 330px); margin-inline: auto; }
  .hero-card { left: 0; bottom: 10%; max-width: 190px; padding: 12px 14px 12px 16px; }
  .hero-blob { right: -8%; width: 88%; }
  .hero-copy { max-width: none; }
  .hero-actions .btn { flex: 1 1 200px; }

  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .qual-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .lightbox-inner { padding: 72px 16px 24px; }
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
  .lightbox-caption { order: 3; padding-inline: 60px; }
}

@media (max-width: 767px) {
  /* Sticky appointment bar is mobile-only. */
  .sticky-bar:not([hidden]) { display: block; }
  body.has-sticky { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .gallery-controls { display: none; }               /* touch swipe replaces arrows */
  .gallery-card { width: 78vw; }
  .gallery-card:nth-child(3n+2), .gallery-card:nth-child(3n) { width: 62vw; }
  .gallery-card:nth-child(3n+2) { margin-top: 40px; }
  .gallery-card:nth-child(3n) { margin-top: 16px; }
  .contact-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .hero-name { font-size: 2.35rem; }
  .brand-sub { display: none; }
  .hero-card { max-width: 160px; }
}

@media (min-width: 1280px) {
  .hero-grid { gap: 96px; }
}

/* ============ HOVER LIFT: doctor photo and cards ============
   Same lift as the clinic gallery photos. Only on devices with a real
   mouse, so touch screens don't get "stuck" hover states. */
.hero-portrait,
.hero-card,
.about-aside,
.service,
.ach,
.info-card {
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}

@media (hover: hover) {
  .hero-portrait:hover,
  .hero-card:hover,
  .about-aside:hover,
  .service:hover,
  .ach:hover,
  .info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
  }
}

/* ============ 15. REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .gallery-btn:hover, .hero-portrait:hover, .hero-card:hover, .about-aside:hover,
.service:hover, .ach:hover, .info-card:hover { transform: none; }
}
