/* ============================================================
   MEDiDENT
   ============================================================ */
:root{
  --accent:#3E7C6B;          
  --accent-strong:#2F6154;
  --accent-soft:#E2EEEA;
  --bg:#F4F6F5;
  --surface:#FFFFFF;
  --surface-alt:#EBEFED;
  --text:#1F2A26;
  --text-muted:#5B6A64;
  --border:#DCE3E0;
  --shadow:0 10px 30px rgba(31,42,38,.08);
  --img-filter:none;
  --reveal-duration:.9s;
  --reveal-distance:52px;
  --reveal-ease:cubic-bezier(.4,0,0.2,1);
  --radius:14px;
  --radius-sm:10px;
  --header-h:72px;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --accent:#6FBFA6;
    --accent-strong:#8FD2BD;
    --accent-soft:rgba(111,191,166,.13);
    --bg:#1C211F;
    --surface:#242B28;
    --surface-alt:#2A322F;
    --text:#E8EEEB;
    --text-muted:#A3B2AB;
    --border:#373F3B;
    --shadow:0 12px 32px rgba(0,0,0,.35);
    --img-filter:contrast(.85) brightness(.9);
  }
}
:root[data-theme="dark"]{
  --accent:#6FBFA6;
  --accent-strong:#8FD2BD;
  --accent-soft:rgba(111,191,166,.13);
  --bg:#1C211F;
  --surface:#242B28;
  --surface-alt:#2A322F;
  --text:#E8EEEB;
  --text-muted:#A3B2AB;
  --border:#373F3B;
  --shadow:0 12px 32px rgba(0,0,0,.35);
  --img-filter:contrast(.85) brightness(.9);
}

html.theme-transition body,html.theme-transition .site-header,html.theme-transition .main-nav,html.theme-transition .settings-panel,html.theme-transition .site-footer,html.theme-transition .hero,html.theme-transition .page-hero,html.theme-transition .section-alt,html.theme-transition .card,html.theme-transition .price-cat,html.theme-transition .pricing-note,html.theme-transition .person,html.theme-transition .team-card,html.theme-transition .contact-info,html.theme-transition .map-wrap,html.theme-transition .film-stage,html.theme-transition .film-label,html.theme-transition .to-top,html.theme-transition .theme-btn,html.theme-transition .settings-btn,html.theme-transition .nav-burger,html.theme-transition .lang-switch,html.theme-transition .settings-panel .theme-choices button,html.theme-transition .btn{transition-property:background-color,border-color,box-shadow !important;transition-duration:240ms !important;transition-delay:0ms !important;transition-timing-function:ease !important}html.theme-transition .brand img,html.theme-transition .team-photo,html.theme-transition .map-wrap iframe{transition-property:filter !important;transition-duration:240ms !important;transition-delay:0ms !important;transition-timing-function:ease !important}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
[id]{scroll-margin-top:calc(var(--header-h) + 16px)}   /* clear the sticky header when jumping to anchors */
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  font-size:17px;
  min-width:330px;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;height:auto;display:block;filter:var(--img-filter)}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-strong)}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:4px}
.skip-link{
  position:absolute;left:-9999px;top:0;background:var(--accent);color:#fff;
  padding:.7em 1.2em;z-index:200;border-radius:0 0 var(--radius-sm) 0;font-weight:600;
}
.skip-link:focus{left:0;color:#fff}

/* ---------- Typography scale ---------- */
h1,h2,h3{line-height:1.18;letter-spacing:-0.02em;font-weight:750;color:var(--text)}
h1{font-size:clamp(2.4rem,5.2vw,4rem);letter-spacing:-0.03em}
h2{font-size:clamp(1.7rem,3vw,2.4rem)}
h3{font-size:clamp(1.15rem,1.6vw,1.35rem)}
p{color:var(--text-muted)}

.h2-sm{font-size:clamp(1.15rem,1.9vw,1.45rem)}

.eyebrow{
  display:inline-block;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:.78rem;
  font-weight:700;
  color:var(--accent);
  margin-bottom:14px;
}
.section-title{margin-bottom:16px}
.section-intro{max-width:640px}

.container{
  width:min(1140px,100% - 48px);
  margin-inline:auto;
}
.section{padding-block:clamp(64px,9vw,112px)}
.section-alt{background:var(--surface)}
.flex-row{display:flex;flex-wrap:wrap;gap:28px}

.center{text-align:center}
.center .section-intro{margin-inline:auto}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  padding:.85em 1.7em;
  border-radius:var(--radius-sm);
  font-weight:650;font-size:1rem;line-height:1.2;
  border:2px solid transparent;
  cursor:pointer;text-align:center;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-strong);color:#fff;transform:translateY(-2px);box-shadow:var(--shadow)}
.btn-secondary{border-color:var(--accent);color:var(--accent);background:transparent}
.btn-secondary:hover{background:var(--accent-soft);color:var(--accent-strong);transform:translateY(-2px)}
.btn-row{display:flex;flex-wrap:wrap;gap:16px;margin-top:34px}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .btn-primary{color:#10201B}
}
:root[data-theme="dark"] .btn-primary{color:#10201B}

/* ---------- Header / navigation ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:var(--surface);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;min-height:var(--header-h);
}
.brand{display:flex;align-items:center;gap:12px;color:var(--text)}

.brand img{width:68px;height:auto;border-radius:14px}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .brand img{filter:invert(1)}
}
:root[data-theme="dark"] .brand img{filter:invert(1)}
.brand-name{font-weight:800;font-size:1.25rem;letter-spacing:-0.02em}
.brand-name span{color:var(--accent)}

.header-phones{display:none;align-items:center;gap:8px}
.header-phones-icon{
  width:18px;height:18px;flex:0 0 18px;
  stroke:var(--accent);fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
}
.header-phones-list{display:flex;flex-direction:column;line-height:1.25}
.header-phones-list a{
  color:var(--text);font-weight:600;font-size:.9rem;
  text-decoration:none;white-space:nowrap;
}
.header-phones-list a:hover{color:var(--accent)}
@media (min-width: 601px){
  .header-phones{display:flex}
}
.main-nav ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none}
.main-nav a{
  display:block;padding:.55em 1em;border-radius:999px;
  color:var(--text-muted);font-weight:600;font-size:.97rem;
}
.main-nav a:hover{color:var(--accent);background:var(--accent-soft)}
.main-nav a[aria-current="page"]{color:var(--accent);background:var(--accent-soft)}

.nav-phones{display:none}


.header-controls{display:flex;align-items:center;gap:10px}

.header-toggles{display:flex;align-items:center;gap:10px}

.lang-switch{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:2.4em;height:40px;padding:0 .85em;line-height:1;
  border:1px solid var(--border);border-radius:999px;
  font-size:.85rem;font-weight:700;color:var(--text-muted);
  text-decoration:none;
}
.lang-switch:hover{color:var(--accent);border-color:var(--accent)}
.lang-switch--panel{
  display:inline-flex;width:fit-content;height:auto;padding:.55em 1.1em;
  border-radius:var(--radius-sm);font-size:.92rem;
}
.theme-btn{
  width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:1px solid var(--border);border-radius:50%;
  cursor:pointer;color:var(--text-muted);font-size:1.05rem;
}
.theme-btn:hover{color:var(--accent);border-color:var(--accent)}

.theme-btn .theme-icon{display:none;width:18px;height:18px;fill:currentColor;transition:fill .18s ease}
.theme-btn .theme-icon.visible{display:block}
.theme-btn{transition:color .18s ease,border-color .18s ease}

.settings-btn{
  display:none;width:40px;height:40px;
  align-items:center;justify-content:center;
  background:transparent;border:1px solid var(--border);border-radius:50%;
  cursor:pointer;color:var(--text-muted);
  transition:color .18s ease,border-color .18s ease;
}
.settings-btn:hover{color:var(--accent);border-color:var(--accent)}
.settings-btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}


.nav-burger{
  display:none;background:transparent;border:1px solid var(--border);
  border-radius:var(--radius-sm);width:44px;height:44px;cursor:pointer;
  flex-direction:column;align-items:center;justify-content:center;gap:5px;
}
.nav-burger span{
  display:block;width:20px;height:2px;background:var(--text);border-radius:2px;
  transition:transform .2s ease,opacity .2s ease;
}
.nav-open .nav-burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-open .nav-burger span:nth-child(2){opacity:0}
.nav-open .nav-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ---------- Hero (home page) ---------- */
.hero{
  position:relative;overflow:hidden;
  padding-block:clamp(80px,11vw,150px);
  background:
    linear-gradient(var(--accent-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-soft) 1px, transparent 1px),
    var(--bg);
  background-size:72px 72px;
  border-bottom:1px solid var(--border);
}
.hero-inner{position:relative;max-width:720px;margin-inline:auto;width:min(1140px,100% - 48px)}
.hero-figure{
  position:absolute;top:-0.62em;right:-0.08em;z-index:0;
  font-size:clamp(9rem,22vw,19rem);font-weight:800;line-height:1;
  letter-spacing:-0.05em;
  color:transparent;
  -webkit-text-stroke:2px var(--accent-soft);
  user-select:none;pointer-events:none;
}
:root[data-theme="dark"] .hero-figure{-webkit-text-stroke:2px rgba(111,191,166,.16)}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .hero-figure{-webkit-text-stroke:2px rgba(111,191,166,.16)}
}
.hero-content{position:relative;z-index:1}
.hero h1{margin-bottom:8px}
.hero h1 .u{box-shadow:inset 0 -0.18em 0 var(--accent)}  /* accent underline */
.hero-text{font-size:clamp(1.05rem,1.6vw,1.25rem);max-width:560px;margin-top:22px}

.page-hero{
  padding-block:clamp(56px,7vw,88px);
  background:
    linear-gradient(var(--accent-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-soft) 1px, transparent 1px),
    var(--bg);
  background-size:72px 72px;
  border-bottom:1px solid var(--border);
}

.card-grid{align-items:stretch}
.card{
  flex:1 1 240px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:30px 28px;
  box-shadow:var(--shadow);
  transition:transform .18s ease;
}
.card:hover{transform:translateY(-4px)}
.section-alt .card{background:var(--bg);box-shadow:none}
.card h3{margin-bottom:10px}
.card p{font-size:.97rem}
.card-link{display:block;color:inherit}
.card-link:hover{color:inherit;text-decoration:none}
.card-cta{
  display:inline-block;margin-top:18px;font-weight:700;font-size:.92rem;color:var(--accent);
}

.card-media{
  margin:-30px -28px 24px; 
  line-height:0;
  border-radius:var(--radius) var(--radius) 0 0;
  overflow:hidden;
}
.card-media img{
  width:100%;height:170px;
  object-fit:cover;
  filter:grayscale(.75) var(--img-filter);
  transition:filter .45s ease;
}
.card-link:hover .card-media img,
.card-link:focus-visible .card-media img{filter:var(--img-filter)}
.card-media-top img{object-position:50% 0}


/* ---------- Services layout ---------- */
.services-layout{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}
.services-feature{flex:1 1 46%;min-height:600px;margin:0;overflow:hidden;background:var(--surface-alt);border-radius:var(--radius)}
.services-feature img{width:100%;height:100%;object-fit:cover}
.services-grid{flex:1 1 48%;display:flex;flex-wrap:wrap;align-content:stretch;gap:12px}
.services-grid .card{flex:1 1 calc(50% - 6px);min-width:0;padding:24px;border-radius:var(--radius);box-shadow:none}
.services-grid .icon-circle{width:46px;height:46px;margin-bottom:14px}
.services-grid .icon-circle svg{width:23px;height:23px}
.services-grid .card h3{margin-bottom:8px}
.services-grid .card p{font-size:.92rem}
.services-grid .card-cta{margin-top:14px}
@media (max-width:900px){.services-feature{flex-basis:100%;min-height:clamp(260px,52vw,460px)}.services-grid{flex-basis:100%}}
@media (max-width:570px){.services-layout,.services-grid{gap:10px}.services-grid .card{flex-basis:100%;padding:22px 20px}}

/* ---------- Where next section (home page) ---------- */
.pb-0{padding-bottom:0}
.filmstrip{height:calc(7 * 65vh + 100vh)}
.film-stage{position:relative}
.film-frame{position:relative;width:min(1040px,100% - 48px);margin:20px auto}
.film-frame img{width:100%;height:auto;display:block;border-radius:var(--radius)}

.film-labels{width:min(1040px,100% - 48px);margin:0 auto 24px}
.film-label{padding:clamp(20px,4vw,40px);background:rgba(10,14,13,.55);border-radius:var(--radius);margin-top:12px}
.film-label h3{color:#fff;font-size:clamp(1.5rem,3vw,2.2rem);margin-bottom:6px}
.film-label p{color:rgba(255,255,255,.86);max-width:560px}
.film-label .btn{margin-top:16px}

.film-on .film-stage{
  position:sticky;top:0;
  height:100vh;height:100svh;
  overflow:hidden;background:var(--surface);
}
.film-on .film-frame{
  position:absolute;inset:0;margin:0;width:auto;
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;
  transition:opacity .45s ease, visibility 0s linear .9s;
}
.film-on .film-frame.is-active{
  opacity:1;visibility:visible;
  transition:opacity .9s ease;
}

.film-on .film-frame img{
  width:min(1040px,calc(100% - 48px));
  height:clamp(200px,48vw,520px);
  object-fit:cover;
  object-position:50% 22%;
}
.film-on .film-labels{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(1040px,calc(100% - 48px));height:clamp(200px,48vw,520px);margin:0;
  pointer-events:none;
}
.film-on .film-label{
  position:absolute;left:0;right:0;bottom:0;margin:0;
  padding:clamp(20px,4vw,40px);
  background:linear-gradient(to top,rgba(10,14,13,.9) 0%,rgba(10,14,13,.55) 55%,rgba(10,14,13,0) 100%);
  border-radius:0 0 var(--radius) var(--radius);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .45s ease, visibility 0s linear .45s;
}
.film-on .film-label.is-active{
  opacity:1;visibility:visible;pointer-events:auto;
  transition:opacity .45s ease;
}

.film-progress{display:none}
.film-on .film-progress{
  display:block;
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:min(1040px,calc(100% - 48px));
  height:clamp(200px,48vw,520px);
  overflow:visible;
  pointer-events:none;
}
.film-bar-track,
.film-bar-fill{
  fill:none;
  stroke-width:3;
  stroke-linecap:round;
}
.film-bar-track{stroke:rgba(255,255,255,.28)}
.film-bar-fill{stroke:var(--accent);stroke-dasharray:100 102;stroke-dashoffset:100.02}
@media (max-width:840px){
  .film-label{padding:16px 20px}
  .film-label h3{font-size:1.25rem;margin-bottom:3px}
  .film-label p{font-size:.9rem;line-height:1.45}
  .film-label .btn{margin-top:10px;padding:.55em 1.1em;font-size:.85rem}
}
@media (max-width:560px){
  .card-media img{height:140px}
  .film-label{padding:10px 12px}
  .film-label h3{font-size:1.05rem;margin-bottom:2px}
  .film-label p{font-size:.78rem;line-height:1.35}
  .film-label .btn{margin-top:6px;padding:.42em .95em;font-size:.8rem}
}
.icon-circle{
  width:54px;height:54px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--accent-soft);color:var(--accent);
  margin-bottom:20px;
}
.icon-circle svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- Why medident  ---------- */

.why-slider{
  position:relative;
  overflow:hidden;
  margin-top:clamp(28px,4vw,44px);
}
.why-track{
  display:flex;
  gap:24px;
  transition:transform .5s cubic-bezier(.4,0,.2,1);
  will-change:transform;
}

.why-card{
  flex:0 0 var(--why-card-w,calc((100% - 48px) / 3));
  position:relative;
  aspect-ratio:3/4;
  border-radius:var(--radius);
  border:1px solid var(--border);
  overflow:hidden;
  background:var(--surface-alt);
  filter:var(--img-filter);
}

.why-cardbody{
  position:absolute;
  left:0;right:0;bottom:0;
  z-index:2;
  padding:clamp(20px,2.4vw,32px);
  display:flex;flex-direction:column;gap:8px;
  background: linear-gradient(
    to bottom,
    rgb(from var(--surface) r g b / 0.0) 0%,
    rgb(from var(--surface) r g b / 0.5) 19%,
    rgb(from var(--surface) r g b / 0.65) 34%,
    rgb(from var(--surface) r g b / 0.8) 50%,
    rgb(from var(--surface) r g b / 0.9) 67%,
    rgb(from var(--surface) r g b / 0.99) 85%,
    var(--surface) 100%
    
  );
  border-radius:var(--radius);
}
.why-card-img{
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
  border-radius:var(--radius);
  border:1px solid var(--border);
}
.why-cardbody .why-label{
  margin:0;
  text-transform:uppercase;letter-spacing:.16em;
  font-size:.78rem;font-weight:700;color:var(--accent);

}
.why-cardbody h3{
  color:var(--text);
  font-size:clamp(1.15rem,1.6vw,1.45rem);
  line-height:1.25;
  margin:0;
}
.why-cardbody p{
  color:var(--text-muted);
  font-size:clamp(.88rem,1.05vw,.98rem);
  line-height:1.55;
  margin:0;
}

.why-controls{
  display:flex;justify-content:center;
  margin-top:clamp(24px,3vw,36px);
}
.why-arrows{
  display:inline-flex;align-items:center;gap:10px;
}

.why-arrow{
  width:44px;height:44px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:50%;
  cursor:pointer;
  color:var(--text);
  transition:color .18s ease,border-color .18s ease,background .18s ease,transform .12s ease;
}
.why-arrow:hover{
  color:var(--accent);
  border-color:var(--accent);
  background:var(--accent-soft);
}
.why-arrow:active{transform:scale(.95)}
.why-arrow:disabled{
  opacity:.4;cursor:not-allowed;color:var(--text-muted);border-color:var(--border);background:var(--surface);
}
.why-arrow svg{
  width:20px;height:20px;
  stroke:currentColor;fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
}
@media (max-width: 1100px) {
  .why-card {
    flex: 0 0 calc((100% - 24px) / 2);
    aspect-ratio: 5/6;
  }

  .why-cardbody {
    padding: clamp(16px, 2.6vw, 24px);
  }

  .why-cardbody h3 {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  }
}

@media (max-width: 640px) {
  .why-card {
    flex: 0 0 100%;
    aspect-ratio: 8/9;
  }
}

/* ---------- About ---------- */
.about-row{display:flex;flex-wrap:wrap;gap:clamp(32px,5vw,72px);align-items:center}
.about-text{flex:1 1 420px}
.about-media{flex:0 1 460px;min-width:280px}
.about-media img{border-radius:var(--radius);box-shadow:var(--shadow)}
.stats-row{display:flex;flex-wrap:wrap;gap:clamp(28px,4vw,56px);margin-top:34px}
.stat b{display:block;font-size:2rem;font-weight:800;color:var(--accent);letter-spacing:-0.03em;line-height:1.1}
.stat span{font-size:.88rem;color:var(--text-muted)}

/* ---------- Pricing ---------- */
.price-grid{align-items:stretch}
.price-cat{
  flex:1 1 460px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:30px clamp(22px,3vw,34px);
}
.section-alt .price-cat{background:var(--bg)}
.price-cat h2{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  padding-bottom:14px;margin-bottom:8px;border-bottom:2px solid var(--accent);
}
.price-cat h2 small{font-weight:600;font-size:.85rem;color:var(--text-muted);letter-spacing:.02em}
.price-row{
  display:flex;align-items:baseline;gap:12px;
  padding:11px 0;border-bottom:1px dashed var(--border);
}
.price-row:last-child{border-bottom:0}
.price-name{flex:1 1 auto;color:var(--text);font-size:.97rem}

.price-value{font-weight:750;color:var(--accent);white-space:nowrap;font-variant-numeric:tabular-nums}
.pricing-note{
  margin-top:44px;padding:26px 30px;
  border-left:4px solid var(--accent);
  background:var(--surface);
  border-radius:0 var(--radius) var(--radius) 0;
}
.section-alt .pricing-note{background:var(--bg)}

.price-row--group{
  display:block;
  margin-top:14px;
  padding:14px 0 6px;
  border-bottom:1px dashed var(--border);
}
.price-row--group .price-name{
  font-weight:700;
  font-size:.98rem;
  letter-spacing:.005em;
  color:var(--text);
}
.price-row--group:first-child{margin-top:0}

.price-children{
  margin:6px 0 4px;
  padding:0;
  list-style:none;
}

.price-row--child{
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 0 7px 20px;
  border-bottom:1px dashed var(--border);
  position:relative;
  font-size:.94rem;
}
.price-row--child:last-child{border-bottom:0}
.price-row--child::before{
  content:"";
  display:block;
  flex:0 0 auto;
  width:5px;
  height:5px;
  border-radius:50%;
  background-color:var(--accent);
  margin-left:-4px;
}

.price-row--child .price-name{
  flex:1 1 auto;
  color:var(--text);
}
.price-row--child .price-value{
  font-weight:700;
  color:var(--accent);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

/* ---------- Team ---------- */
.unit-note{
  font-size:.9rem;font-weight:600;color:var(--accent);
  text-transform:uppercase;letter-spacing:.1em;
  margin-top:18px;padding-left:16px;border-left:3px solid var(--accent);
}
.person{
  flex:1 1 340px;
  display:flex;gap:22px;align-items:flex-start;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:24px;
}
.section-alt .person{background:var(--bg)}
.person-photo{
  flex:0 0 108px;width:108px;height:132px;
  object-fit:cover;border-radius:var(--radius-sm);
  background:var(--surface-alt);
}
.person h2{font-size:1.05rem;line-height:1.35}
.person-role{
  display:inline-block;font-size:.78rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.12em;color:var(--accent);margin-bottom:6px;
}
.person p{font-size:.92rem;margin-top:8px}

/* ---------- Team cards ---------- */
.team-row{
  --team-gap:28px;
  display:flex;
  gap:var(--team-gap);
  align-items:stretch;
}
.team-row + .team-row{margin-top:32px}
.team-card{
  flex:1 1 0;
  min-width:0;
  display:flex;
  align-items:stretch;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;            
}
.team-body{
  flex:1 1 50%;
  min-width:0;
  padding:clamp(24px,3.5vw,44px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.team-photo{
  flex:0 0 50%;
  aspect-ratio:3/4;               
  background-color:var(--surface-alt);   
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
  align-self:stretch;               
  filter:var(--img-filter);
}
.team-body h2{font-size:clamp(1.25rem,2vw,1.6rem);line-height:1.3;margin-top:2px}
.team-body .person-role{font-size:.8rem}
.team-body p:not(.person-role){font-size:.98rem;margin-top:12px;max-width:46ch}

@media (prefers-reduced-motion: reduce){
  .team-card{transform:none;transition:none}
}

@media (max-width: 1200px){
  .team-row{flex-direction:column}
  .team-row + .team-row{margin-top:24px}
  .team-card{flex:0 0 auto}
}
@media (max-width: 700px){
  .team-row{flex-direction:column}
  .team-row + .team-row{margin-top:24px}
  .team-card{flex-direction:column;flex:0 0 auto}
  .team-card.doctor .team-photo,
  .team-card.assistant .team-photo{
    order:-1;
    flex:0 0 auto;
    width:100%;
  }
}

/* ---------- Contact ---------- */
.contact-cols{align-items:stretch}
.contact-info{flex:1 1 340px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:clamp(24px,3vw,36px);box-shadow:var(--shadow)}
.contact-info h2,.contact-hours h2{display:flex;gap:12px;padding-bottom:14px;margin-bottom:8px;border-bottom:2px solid var(--accent);}
.contact-hours{flex:1 1 340px}
@media (max-width: 840px){
  .contact-cols .contact-info{flex-basis:100%}
}

.hours-list{list-style:none;margin-top:18px}
.hours-list li{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px dashed var(--border);
  font-size:.97rem;
}
.hours-list li:last-child{border-bottom:0}
.hours-list li > span:first-child{font-weight:650;color:var(--text)}
.hours-list li > span:last-child{color:var(--text-muted);font-variant-numeric:tabular-nums}
.contact-line{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:10px 0;
  border-bottom:1px dashed var(--border);
  font-size:.97rem;
}

.contact-line svg{width:20px;height:20px;flex:0 0 20px;margin-top:3px;stroke:var(--accent);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.contact-line a{color:var(--text);font-weight:600}
.contact-line a:hover{color:var(--accent)}
.contact-line:last-child{border-bottom:0}
.map-wrap{
  flex:0 0 100%;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow);
  overflow:hidden;line-height:0;
}
.map-wrap iframe{width:100%;height:460px;border:0;display:block}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .map-wrap iframe{
    filter: invert(.92) hue-rotate(180deg);
  }
}
:root[data-theme="dark"] .map-wrap iframe{
  filter: invert(.92) hue-rotate(180deg);
}

/* ---------- Legal pages ---------- */
.legal-body{max-width:760px;overflow-wrap:anywhere}
.legal-body h2{margin:0 0 8px}
.legal-body p{margin-bottom:0}
.legal-section{margin-bottom:20px}
.legal-section h2{scroll-margin-top:110px}
.legal-page-compact .page-hero{padding-block:32px 20px}
.legal-page-compact > .section{padding-block:12px 36px}
.legal-page-compact .legal-meta{margin:24px 0 0;font-size:.82rem}
.cookie-table caption{text-align:left;padding:12px 14px;font-weight:650;color:var(--text)}
.table-wrap{overflow-x:auto;margin:18px 0 24px;border:1px solid var(--border);border-radius:var(--radius-sm)}
.cookie-table{width:100%;border-collapse:collapse;font-size:.92rem;line-height:1.5}
.cookie-table th,.cookie-table td{padding:12px 14px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
.cookie-table th{background:var(--surface-alt);color:var(--text);font-size:.88rem;text-transform:uppercase;letter-spacing:.04em}
.cookie-table tr:last-child td{border-bottom:0}
.cookie-table code{white-space:nowrap}
@media (max-width:760px){
  .cookie-table th,.cookie-table td{padding:10px 12px}
}
.legal-meta{font-size:.88rem;color:var(--text-muted);margin-bottom:34px}

/* ---------- Footer ---------- */
.site-footer{background:var(--surface);border-top:1px solid var(--border);padding-block:56px 32px}
:root[data-theme="dark"] .site-footer{background:#161A18}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .site-footer{background:#161A18}
}
.footer-grid{display:flex;flex-wrap:wrap;gap:40px}
.footer-col,
.footer-brand{flex:0 0 calc(33.333% - 27px)}
.footer-col a,
.footer-col span{overflow-wrap:anywhere} 
@media (max-width: 840px){
  .footer-grid{gap:26px;justify-content:space-between}
  .footer-brand{display:none}
  .footer-col{flex:0 0 auto}
}
.footer-col h2,.footer-col p.brand-name{font-size:1rem;margin-bottom:14px}
.footer-col ul{list-style:none}
.footer-col li{margin-bottom:8px}
.footer-col a{color:var(--text-muted);font-size:.94rem}
.footer-col a:hover{color:var(--accent)}
.footer-col a[aria-current="page"]{
  color:var(--accent);
  font-weight:600;
  background:var(--accent-soft);
  border-radius:6px;
  padding:1px 6px;
  margin:-1px -6px;
}
.footer-bottom a[aria-current="page"]{
  color:var(--accent);
  font-weight:600;
  background:var(--accent-soft);
  border-radius:6px;
  padding:1px 6px;
  margin:-1px -6px;
}
@media (max-width: 470px){
  .footer-grid{justify-content:center}
  .footer-grid>nav.footer-col h2{display:none}
  .footer-grid>nav.footer-col ul{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:4px 8px; 
  }
  .footer-grid>nav.footer-col li{
    margin-bottom:0;
    display:flex;
    align-items:center;
  }
  .footer-grid>nav.footer-col li+li::before{
    content:"·";
    color:var(--text-muted);
    margin-right:8px;
    opacity:.55;
  }

  .footer-grid>.footer-col:last-child{text-align:center}
  .footer-grid>.footer-col:last-child ul{justify-content:center}
}
.footer-col a svg{width:15px;height:15px;margin-right:7px;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.footer-bottom{
  margin-top:44px;padding-top:22px;border-top:1px solid var(--border);
  display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;
  font-size:.85rem;color:var(--text-muted);
}
@media (max-width: 840px){
  .footer-bottom{flex-direction:column;align-items:center;gap:10px}
  .footer-bottom>span{width:100%;text-align:center}
  .footer-bottom>span:nth-child(2){order:1}
  .footer-bottom>span:nth-child(3){order:3}
  .footer-bottom>span:nth-child(1){order:2}


}
.footer-bottom a{color:inherit}
.footer-bottom a:hover{color:var(--accent)}
.footer-bottom>span:nth-child(2){display:inline-flex;align-items:center;gap:12px;justify-content:center}


/* ---------- Scroll-to-top button ---------- */
.to-top{
  position:fixed;right:24px;bottom:24px;z-index:150;
  width:48px;height:48px;border-radius:50%;
  border:1px solid var(--border);
  background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:var(--shadow);
  opacity:0;visibility:hidden;
  transition:opacity 200ms ease, visibility 200ms ease, transform .15s ease;
}
.to-top.visible{opacity:1;visibility:visible}
.to-top:hover{transform:translateY(-3px)}
.to-top svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .to-top{color:#10201B}
}
:root[data-theme="dark"] .to-top{color:#10201B}

/* ---------- Compact cookie consent ---------- */
.cookie-banner{
  position:fixed;inset:auto 0 0;z-index:400;
  max-height:100vh;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;
  padding:12px 16px max(12px,env(safe-area-inset-bottom));background:rgba(18,25,22,.72);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
.cookie-banner[hidden]{display:none}
.cookie-banner-inner{
  width:min(1180px,100%);margin-inline:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 16px;
  padding:14px 18px;background:var(--surface);color:var(--text);
  border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);
}
.cookie-banner-copy{margin:0;font-size:.95rem;line-height:1.45;text-align:center;overflow-wrap:anywhere}
.cookie-banner-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%}
.cookie-banner-actions .btn{min-width:0;min-height:44px;white-space:normal;padding:9px 13px;font-size:.88rem}
.cookie-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cookie-banner-links{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2px;margin:2px 0 0;font-size:.86rem;color:var(--text-muted)}
.cookie-banner-links a{color:var(--text-muted);text-decoration:underline;text-underline-offset:2px}
.cookie-banner-links a:hover{color:var(--accent)}
.cookie-banner-links span{padding-inline:7px}
.cookie-settings-button{
  position:fixed;left:18px;bottom:18px;z-index:145;
  width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:1px solid var(--border);border-radius:50%;cursor:pointer;
  color:var(--text-muted);
  transition:color .18s ease,border-color .18s ease;
}
.cookie-settings-button:hover{color:var(--accent);border-color:var(--accent)}
.cookie-settings-button svg{width:18px;height:18px;fill:currentColor}
.cookie-settings-button[hidden]{display:none}
.cookie-banner :is(a,button):focus-visible,.cookie-settings-button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media (max-width:960px){
  .cookie-banner{padding:10px 10px max(10px,env(safe-area-inset-bottom))}
  .cookie-banner-inner{grid-template-columns:minmax(0,1fr);align-items:start;gap:10px;padding:13px 15px}
  .cookie-banner-actions{justify-content:center}
  .cookie-banner-actions .btn{flex:1 1 0}
  .cookie-banner-links{width:100%;margin-top:2px}
  .cookie-settings-button{left:12px;bottom:12px}
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .cookie-banner-inner{background:#1D2421}
}
:root[data-theme="dark"] .cookie-banner-inner{background:#1D2421}
@media (max-width: 995px){
  .about-media{flex-basis:100%;order:-1}
}

@media (max-width: 960px){
  .main-nav{
    position:absolute;top:100%;left:0;right:0;
    background:var(--surface);border-bottom:1px solid var(--border);
    display:none;padding:16px 24px 24px;
    box-shadow:var(--shadow);
  }
  .nav-open .main-nav{display:block}
  .main-nav ul{flex-direction:column;gap:4px}
  .main-nav a{padding:.8em 1em;font-size:1.05rem}
  .nav-burger{display:inline-flex}
  .settings-btn{display:inline-flex}
  .header-toggles{
    position:absolute;top:100%;right:16px;
    background:var(--surface);border:1px solid var(--border);
    border-radius:var(--radius);box-shadow:var(--shadow);
    padding:14px 16px;display:none;align-items:center;gap:10px;
  }
  .settings-open .header-toggles{display:flex}
}
@media (max-width: 820px){
  .hero-figure{opacity:.55}
}
@media (max-width: 560px){
  body{font-size:16px}
  .header-controls{gap:6px}
  .brand-name{font-size:1.08rem}
  .person{flex-direction:column}
  .person-photo{width:100%;height:200px;flex-basis:auto}
  .btn-row .btn{flex:1 1 100%}
  .map-wrap iframe{height:320px}
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none !important;animation:none !important}
  .theme-transition,.theme-transition *,
  .theme-transition *::before,.theme-transition *::after{transition:none !important}
}

@media (max-width: 600px){
  .nav-phones{
    display:flex;flex-direction:column;gap:6px;
    margin-top:10px;padding:14px 0 0 1em;
    border-top:1px solid var(--border);
  }
  .nav-phones a{
    display:inline-flex;align-items:center;gap:10px;
    color:var(--text);font-weight:600;font-size:1rem;
    text-decoration:none;white-space:nowrap;
  }
  .nav-phones a:hover{color:var(--accent);background:transparent}
  .nav-phones-icon{
    width:18px;height:18px;flex:0 0 18px;
    stroke:var(--accent);fill:none;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;
  }
}


/* ---------- Reveal on scroll ---------- */
.reveal-on [data-reveal]{opacity:0;visibility:hidden;transform:translate3d(0,var(--reveal-distance),0);transition:opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay,0s),transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay,0s);will-change:opacity,transform}
.reveal-on [data-reveal="left"]{transform:translate3d(calc(-1 * var(--reveal-distance)),0,0)}
.reveal-on [data-reveal="right"]{transform:translate3d(var(--reveal-distance),0,0)}
.reveal-on [data-reveal="fade"]{transform:none}
.reveal-on [data-reveal].is-visible{opacity:1;visibility:visible;transform:translate3d(0,0,0)}