:root {
  color-scheme: light;
  --color-page: #f4f8fc;
  --color-surface: #ffffff;
  --color-ink: #10345d;
  --color-muted: #566d85;
  --color-blue: #12639c;
  --color-blue-deep: #0b3b70;
  --color-blue-bright: #1687c3;
  --color-blue-soft: #e7f2fa;
  --color-border: #dce8f1;
  --color-shadow: rgba(9, 54, 99, .1);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-control: .75rem;
  --radius-card: 1.125rem;
  --radius-hero: 1.5rem;
  --sidebar-width: 16.125rem;
  --page-gutter: clamp(1.25rem, 4vw, 3.75rem);
  --section-gap: clamp(1.25rem, 2.5vw, 1.75rem);
  --shadow-card: 0 8px 26px rgba(9, 54, 99, .06);
  --shadow-float: 0 18px 48px rgba(9, 54, 99, .14);

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: radial-gradient(ellipse at 91% 2%, #e3f1fa 0, transparent 31%), var(--color-page);
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.6;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #48a9dd; outline-offset: 3px; }
.page:focus, .page:focus-visible, .main:focus, .main:focus-visible { outline: none; }

.shell {
  display: block;
  min-height: 100vh;
  padding-top: var(--nav-h);
}
:root { --nav-h: 4.5rem; }

/* ---------- Top navbar (the element keeps the .sidebar class: app.js relies on it) ---------- */
.sidebar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--nav-h);
  padding: 0 var(--page-gutter);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.sidebar.is-scrolled {
  background: rgba(255, 255, 255, .9);
  border-bottom-color: var(--color-border);
  box-shadow: 0 10px 30px rgba(9, 54, 99, .08);
}
.nav-progress {
  position: absolute;
  right: 0; bottom: -1px; left: 0;
  height: 2px;
  background: linear-gradient(90deg, #48a9dd, #138bc4 50%, #0b3b70);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.brand-logo {
  display: block;
  width: auto;
  height: 3.25rem;
  max-width: none;
  transition: transform .25s ease, filter .25s ease;
}
.brand:hover .brand-logo { transform: translateY(-1px); filter: drop-shadow(0 4px 10px rgba(19, 139, 196, .25)); }
.mobile-panel { display: contents; }
.mobile-menu-toggle { display: none; }
.mobile-panel-head { display: none; }
.nav-label { display: none; }

/* Pill with a sliding active indicator */
.nav {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid rgba(220, 232, 241, .9);
  border-radius: 999px;
  background: rgba(237, 244, 248, .7);
}
.nav-indicator {
  position: absolute;
  top: 4px; bottom: 4px; left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b3b70, #12639c);
  box-shadow: 0 6px 16px rgba(11, 59, 112, .28);
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), width .38s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.nav-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  color: #536c84;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
  transition: color .25s ease, background-color .2s ease;
}
.nav-link:hover { color: #0a4278; background: rgba(255, 255, 255, .7); }
.nav-link[aria-current="page"] { color: #fff; background: transparent; }
.nav-icon { display: none; }

.sidebar-bottom { display: flex; flex: 0 0 auto; align-items: center; gap: var(--space-3); }
.language { margin: 0; padding: 0; }
.language-label { display: none; }
.language-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #edf4f8;
}
.language-switch button {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 2.25rem;
  padding: var(--space-1) var(--space-3);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #536c84;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 650;
}
.language-switch button[aria-pressed="true"] {
  background: var(--color-surface);
  box-shadow: 0 1px 4px rgba(9, 54, 99, .12);
  color: var(--color-blue-deep);
}
.book {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-5);
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d78b0, #0b3b70);
  box-shadow: 0 8px 20px rgba(11, 59, 112, .25);
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}
.book::after { /* light sweep on hover */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.book:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11, 59, 112, .32); }
.book:hover::after { transform: translateX(100%); }
.whatsapp-icon { flex: 0 0 1.0625rem; width: 1.0625rem; height: 1.0625rem; }

.main {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  width: min(100%, 80rem);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-8) var(--page-gutter) var(--space-6);
}
.page { display: none; min-width: 0; }
.page.active {
  display: grid;
  align-content: start;
  gap: var(--section-gap);
  animation: page-enter .22s ease both;
}
@keyframes page-enter {
  from { opacity: .35; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(17rem, .78fr);
  align-items: center;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  min-height: 29rem;
  padding: clamp(var(--space-6), 4.5vw, var(--space-12));
  overflow: hidden;
  border-radius: var(--radius-hero);
  background: linear-gradient(118deg, #082e5c 0%, #0b4778 62%, #137db0 100%);
  box-shadow: 0 24px 60px rgba(11, 59, 112, .17);
}
.hero::before {
  position: absolute;
  z-index: 0;
  inset: 0 42% 0 0;
  background: linear-gradient(90deg, #082e5c 0%, rgba(8, 46, 92, .92) 65%, transparent 100%);
  content: "";
  pointer-events: none;
}
.hero::after {
  position: absolute;
  z-index: 0;
  right: 39%;
  bottom: -12rem;
  width: 26rem;
  aspect-ratio: 1;
  border: 1px solid rgba(105, 201, 239, .3);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(105, 201, 239, .06), 0 0 0 4.5rem rgba(105, 201, 239, .04);
  content: "";
  pointer-events: none;
}
.hero-content {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
}
.hero-art {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  aspect-ratio: .72;
  max-height: 27rem;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 38px rgba(3, 27, 53, .22);
}
.hero-art {
  background: radial-gradient(circle at 50% 46%, rgba(72, 169, 221, .34), transparent 64%), linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
}
/* Logo shown until the 3D knee has loaded, or if the device has no WebGL */
.hero-fallback {
  position: absolute;
  top: 50%; left: 50%;
  width: 46%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: brightness(0) invert(1);
  opacity: .8;
  animation: hero-breathe 3.2s ease-in-out infinite;
}
@keyframes hero-breathe { 50% { opacity: .45; transform: translate(-50%, -50%) scale(.96); } }
.hero-art.is-ready .hero-fallback { display: none; }
.hero-art .x3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}
.hero-rom {
  position: absolute;
  z-index: 2;
  top: var(--space-3);
  left: var(--space-3);
  display: grid;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: .9rem;
  background: rgba(8, 46, 92, .78);
  color: #fff;
  opacity: 0;
  transition: opacity .5s ease;
}
.hero-art.is-ready .hero-rom { opacity: 1; }
.hero-rom-label { color: #9fd2f0; font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hero-rom-row { display: flex; align-items: center; gap: var(--space-3); }
.hero-rom-deg { min-width: 2.6ch; font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero-rom-bar { display: block; width: 4.5rem; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.hero-rom-bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #48a9dd, #8fe0ff); transform: scaleX(0); transform-origin: 0 50%; }
.hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 46, 92, .08), transparent 45%, rgba(8, 46, 92, .3));
  content: "";
  pointer-events: none;
}
.art-tag {
  position: absolute;
  z-index: 2;
  right: var(--space-3);
  bottom: var(--space-3);
  max-width: calc(100% - 2 * var(--space-3));
  padding: var(--space-2) var(--space-3);
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 999px;
  background: #0b4778;
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.3;
}
.eyebrow, .section-label {
  color: #12639c;
  font-size: .6875rem;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.hero .eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); color: #84d7f5; }
.hero .eyebrow::before {
  flex: 0 0 .4375rem;
  width: .4375rem;
  height: .4375rem;
  border-radius: 50%;
  background: #2ca6dc;
  box-shadow: 0 0 0 4px rgba(44, 166, 220, .18);
  content: "";
}
.hero h1 {
  max-width: 35rem;
  margin: var(--space-4) 0 var(--space-5);
  color: #fff;
  font-size: clamp(2.5rem, 4.6vw, 4.125rem);
  letter-spacing: -.055em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}
.hero p {
  max-width: 31rem;
  margin: 0 0 var(--space-6);
  color: #d5e2ed;
  font-size: clamp(.9375rem, 1.3vw, 1.0625rem);
  line-height: 1.55;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.875rem;
  max-width: 100%;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-control);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.button.primary { background: #0d78b0; color: #fff; }
.button.primary:hover { transform: translateY(-1px); background: #0a6798; }
.button.secondary {
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.button.secondary:hover { background: rgba(255, 255, 255, .2); }
.button:focus-visible, .book:focus-visible, .nav-link:focus-visible,
.mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible,
.language-switch button:focus-visible, a:focus-visible {
  outline: 3px solid #55b6e2;
  outline-offset: 3px;
}

.rehab-highlight {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
  min-width: 0;
  padding: clamp(var(--space-5), 3.5vw, var(--space-10));
  overflow: hidden;
  border: 1px solid #d7e6f0;
  border-radius: var(--radius-hero);
  background: linear-gradient(135deg, #fff 0%, #edf6fb 100%);
  box-shadow: var(--shadow-card);
}
.rehab-highlight::after {
  position: absolute;
  top: -8rem;
  right: -8rem;
  width: 15rem;
  aspect-ratio: 1;
  border: 1px solid rgba(99, 175, 212, .38);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5rem rgba(99, 175, 212, .07), 0 0 0 3.5rem rgba(99, 175, 212, .04);
  content: "";
  pointer-events: none;
}
.rehab-intro, .rehab-list { position: relative; z-index: 1; min-width: 0; }
.rehab-intro h2 {
  max-width: 29rem;
  margin: var(--space-3) 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -.045em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.rehab-intro p { max-width: 27rem; margin: 0 0 var(--space-5); color: var(--color-muted); font-size: .875rem; }
.text-link { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-blue); font-size: .8125rem; font-weight: 750; }
.text-link span:last-child { font-size: 1.0625rem; transition: transform .2s ease; }
.text-link:hover span:last-child { transform: translate(3px, -3px); }
.rehab-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.rehab-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  min-height: 3.375rem;
  padding: var(--space-3);
  border: 1px solid #deebf3;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, .76);
  color: #284c6d;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.rehab-check {
  display: grid;
  flex: 0 0 1.8125rem;
  width: 1.8125rem;
  height: 1.8125rem;
  place-items: center;
  border-radius: .625rem;
  background: #e4f1fa;
  color: var(--color-blue);
  font-size: .9375rem;
  font-weight: 800;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--section-gap);
}
.feature {
  display: block;
  min-width: 0;
  min-height: 9rem;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature:hover {
  border-color: #c1d9e9;
  box-shadow: var(--shadow-float);
}
.feature-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: .875rem;
  background: #e7f2fa;
  color: #12588d;
  font-size: 1.0625rem;
}
.feature h2 { margin: var(--space-4) 0 var(--space-1); font-size: 1rem; letter-spacing: -.02em; }
.feature h2::after { color: var(--color-blue); content: " →"; font-weight: 700; }
.feature p { margin: 0; color: var(--color-muted); font-size: .8125rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--section-gap); }
.service-card, .content-card, .location-card, .step {
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.service-card, .content-card, .step { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.service-num {
  display: grid;
  width: 2.125rem;
  height: 2.125rem;
  margin-bottom: var(--space-4);
  place-items: center;
  border-radius: .75rem;
  background: #e7f2fa;
  color: #12588d;
  font-size: .6875rem;
  font-weight: 750;
}
.service-card h2, .content-card h2, .about-note h2, .step h2 { margin: 0 0 var(--space-2); font-size: 1.1875rem; letter-spacing: -.025em; line-height: 1.25; }
.service-card p, .content-card p, .step p, .about-note p { margin: 0; color: var(--color-muted); font-size: .875rem; overflow-wrap: anywhere; }
.content-card p + p { margin-top: var(--space-4); }
.about-layout, .location-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--section-gap); }
.about-note {
  min-width: 0;
  padding: var(--space-8);
  border: 1px solid #d4e5f0;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, #e7f2fa, #e1eef8);
}
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--section-gap); }
.step-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--space-4);
  place-items: center;
  border-radius: 50%;
  background: #e7f2fa;
  color: #12588d;
  font-size: .75rem;
  font-weight: 750;
}
.page-heading {
  min-width: 0;
  padding: 0 0 var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.page-heading h1 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: clamp(2.125rem, 4vw, 3.375rem);
  letter-spacing: -.05em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.page-heading p { max-width: 40rem; margin: 0; color: var(--color-muted); }
.location-card { display: grid; align-content: start; }
.detail { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.detail:first-child { padding-top: 0; }
.detail:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-label { color: var(--color-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.detail-value { margin-top: var(--space-1); font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }
.phone-link.button { text-decoration: none; }
.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: .75rem;
}
.footer-note { max-width: 38rem; }
.footer-contact { display: flex; flex-wrap: wrap; gap: var(--space-2); white-space: nowrap; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.motion-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(.625rem);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .75, .25, 1);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.motion-ready .home-grid [data-reveal]:nth-child(2),
.motion-ready .steps [data-reveal]:nth-child(2) { transition-delay: 90ms; }
.motion-ready .home-grid [data-reveal]:nth-child(3),
.motion-ready .steps [data-reveal]:nth-child(3) { transition-delay: 180ms; }

@media (min-width: 961px) and (max-width: 1180px) {
  .sidebar { gap: var(--space-4); }
  .nav-link { padding-inline: var(--space-3); }
  .book { width: 2.75rem; padding: 0; }
  .book .book-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (max-width: 1100px) {
  .main { padding-block: var(--space-6); }
  .hero { gap: var(--space-6); padding: var(--space-8); }
  .hero h1 { font-size: clamp(2.375rem, 4.7vw, 3.625rem); }
  .home-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .hero::before { inset: 0; background: linear-gradient(180deg, #082e5c 0%, rgba(8, 46, 92, .86) 52%, transparent 100%); }
  .hero::after { right: -10rem; bottom: 6rem; }
  .hero-content { grid-column: 1; grid-row: 1; }
  .hero-art { grid-column: 1; grid-row: 2; width: 100%; max-width: 26rem; max-height: none; aspect-ratio: 1 / 1; justify-self: center; }
  .home-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .rehab-highlight, .about-layout, .location-layout { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { display: block; padding-top: calc(var(--space-3) * 2 + 2.75rem + 1px); }
  body.menu-open { overflow: hidden; }
  .sidebar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 30;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
    min-height: 0;
    padding: var(--space-3) var(--page-gutter);
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    height: auto;
    background: #fff;
    box-shadow: 0 4px 16px rgba(9, 54, 99, .06);
    /* backdrop-filter would trap the full-screen menu inside the bar */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .brand { display: flex; flex: 1 1 auto; width: auto; gap: var(--space-3); padding: 0; }
  .brand-logo { height: 2.75rem; }
  .mobile-menu-toggle {
    display: grid;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    background: #f5f9fc;
    color: var(--color-blue-deep);
    cursor: pointer;
  }
  .hamburger-lines { display: grid; width: 1.125rem; gap: 5px; }
  .hamburger-lines i { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: max(var(--space-5), env(safe-area-inset-top)) var(--page-gutter) max(var(--space-5), env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    background: radial-gradient(ellipse at 100% 0%, #e3f2fb 0%, transparent 36%), linear-gradient(180deg, #fff, #f4f8fc);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -1.25rem, 0);
    transition: transform .28s cubic-bezier(.2, .75, .25, 1), opacity .2s ease, visibility 0s linear .28s;
  }
  .sidebar.menu-open .mobile-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate3d(0, 0, 0); transition-delay: 0s; }
  .mobile-panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .mobile-panel-title { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--color-ink); font-size: 1rem; font-weight: 750; letter-spacing: -.025em; }
  .mobile-panel-mark { display: block; width: auto; height: 2.25rem; }
  .mobile-menu-close { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: #f5f9fc; color: var(--color-blue-deep); font-size: 1.5625rem; line-height: 1; cursor: pointer; }
  .nav-label { position: relative; z-index: 1; display: block; margin: 0 0 var(--space-2); padding-left: 2.8125rem; }
  .nav { position: relative; z-index: 1; display: grid; flex: 1 1 auto; align-content: start; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); min-height: 0; margin: 0; padding: 0; overflow-y: auto; }
  .nav-link { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 3.375rem; padding: var(--space-3); border-radius: var(--radius-control); font-size: .9375rem; }
  .nav-icon { display: grid; flex: 0 0 1.3125rem; width: 1.3125rem; place-items: center; font-size: 1.0625rem; }
  .sidebar-bottom { position: relative; z-index: 1; display: block; flex: 0 0 auto; margin: auto 0 0; padding-top: var(--space-5); }
  .language { width: 100%; margin: 0 0 var(--space-3); padding: var(--space-4) 0; border-top: 1px solid var(--color-border); }
  .language-label { display: block; margin-bottom: var(--space-2); }
  .language-switch { width: 100%; max-width: none; min-height: 3rem; }
  .language-switch button { min-height: 2.625rem; padding: var(--space-2) var(--space-3); }
  .sidebar-bottom > .book { display: flex; width: 100%; min-height: 3.125rem; }
  .sidebar.menu-open .mobile-menu-toggle { visibility: hidden; }
  .nav { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
  .nav-indicator { display: none; }
  .nav-link { color: #536c84; white-space: normal; }
  .nav-link:hover { background: #eef6fb; }
  .nav-link[aria-current="page"] { background: #e6f2fa; box-shadow: inset 3px 0 var(--color-blue-bright); color: #0a4278; font-weight: 750; }
  .sidebar-bottom > .book { border-radius: var(--radius-control); }
  .language-switch { border-radius: .7rem; }
  .language-switch button { border-radius: .55rem; }
  body.menu-open .nav-progress { opacity: 0; }
  /* no blur on small screens, so keep the bar fully solid once scrolled */
  .sidebar.is-scrolled { background: #fff; }
  .nav-label { color: #71869a; font-size: .625rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
  .language-label { margin: 0 0 var(--space-2); color: var(--color-muted); font-size: .7rem; }
}
@media (max-width: 760px) {
  :root { --page-gutter: clamp(1rem, 5vw, 1.5rem); --section-gap: 1.25rem; }
  .main { grid-column: auto; justify-self: stretch; width: 100%; max-width: none; margin: 0; padding: var(--space-5) var(--page-gutter) var(--space-6); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); min-height: 0; padding: var(--space-5); border-radius: var(--radius-card); }
  .hero::before { inset: 0; background: linear-gradient(180deg, #082e5c 0%, #082e5c 38%, rgba(8, 46, 92, .86) 58%, transparent 100%); }
  .hero::after { right: -12rem; bottom: 4rem; width: 20rem; }
  .hero-content { grid-column: 1; grid-row: 1; padding: 0; }
  .hero h1 { max-width: 34rem; margin: var(--space-3) 0 var(--space-4); font-size: clamp(2.125rem, 8.5vw, 3rem); }
  .hero p { max-width: 38rem; margin-bottom: var(--space-5); font-size: .9375rem; }
  .hero-art { grid-column: 1; grid-row: 2; width: 100%; max-width: none; min-height: 0; max-height: none; aspect-ratio: 1 / 1; border-radius: var(--radius-control); }
  .art-tag { right: var(--space-2); bottom: var(--space-2); max-width: calc(100% - 1rem); font-size: .625rem; }
  .hero-rom { top: var(--space-2); left: var(--space-2); }
  .actions { align-items: stretch; gap: var(--space-2); }
  .actions .button { flex: 1 1 auto; }
  .rehab-highlight { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: var(--space-5); border-radius: var(--radius-card); }
  .rehab-intro h2 { font-size: clamp(1.625rem, 7vw, 2rem); }
  .rehab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .rehab-list li { gap: var(--space-2); min-height: 3.25rem; padding: var(--space-2); font-size: .6875rem; }
  .rehab-check { flex-basis: 1.625rem; width: 1.625rem; height: 1.625rem; font-size: .875rem; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { min-height: 0; padding: var(--space-5); }
  .page-heading { padding-bottom: var(--space-4); }
  .page-heading h1 { font-size: clamp(2rem, 8vw, 2.625rem); }
  .cards, .about-layout, .location-layout, .steps { grid-template-columns: minmax(0, 1fr); }
  .service-card, .content-card, .location-card, .step, .about-note { padding: var(--space-5); }
  .footer { flex-direction: column; gap: var(--space-4); margin: 0; padding-top: var(--space-4); }
  .footer-note { max-width: none; }
  .footer-contact { white-space: normal; }
}

@media (max-width: 520px) {
  .hero { padding: var(--space-4); }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .rehab-list { grid-template-columns: minmax(0, 1fr); }
  .rehab-list li { min-height: 3rem; padding: var(--space-2) var(--space-3); font-size: .75rem; }
  .footer-contact { gap: var(--space-2); }
}
@media (max-width: 360px) {
  .mobile-panel-title { font-size: .9375rem; }
  .language-switch button { padding-inline: var(--space-2); font-size: .6875rem; }
}


/* ---------- Buttons on light backgrounds ---------- */
.button.outline { border: 1px solid var(--color-border); background: #fff; color: var(--color-blue-deep); }
.button.outline:hover { border-color: #b9d4e7; background: #f5f9fc; }
.button .whatsapp-icon, .book .whatsapp-icon { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; }

/* ---------- Open / closed status ---------- */
.open-status { display: inline-flex; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; font-size: .8125rem; font-weight: 650; color: #8a4b12; }
.open-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #d9822b; }
.open-status.is-open { color: #146c43; }
.open-status.is-open::before { background: #22a06b; }
.hero-status { margin-top: var(--space-4); color: #ffd9b0; }
.hero-status.is-open { color: #b7f0d2; }
.open-status[hidden] { display: none; }

/* ---------- Services ---------- */
.service-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section-gap); }
.service-detail {
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 6rem;
}
.service-detail h2 { margin: 0 0 var(--space-4); font-size: 1.375rem; letter-spacing: -.025em; line-height: 1.2; }
.service-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin: 0 0 var(--space-5); }
.service-facts dt { margin-bottom: var(--space-1); color: var(--color-blue); font-size: .6875rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.service-facts dd { margin: 0; color: var(--color-muted); font-size: .875rem; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--section-gap); }
.team-card { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.team-photo { flex: 0 0 6rem; width: 6rem; height: 6rem; border-radius: 1rem; object-fit: cover; background: var(--color-blue-soft); }
.team-initials { display: grid; place-items: center; color: var(--color-blue); font-size: 1.75rem; font-weight: 750; }
.team-card h3 { margin: 0 0 var(--space-1); font-size: 1.0625rem; }
.team-card p { margin: 0; color: var(--color-muted); font-size: .8125rem; }
.team-card .team-role { color: var(--color-blue); font-weight: 650; }
.team-licence { margin-top: var(--space-2) !important; font-size: .75rem !important; }

/* ---------- About ---------- */
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-control); background: #fff; }
.faq-item + .faq-item { margin-top: var(--space-2); }
.faq-item summary { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); font-weight: 650; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--color-blue); font-size: 1.25rem; line-height: 1; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 var(--space-4) var(--space-4); color: var(--color-muted); font-size: .875rem; }
.reviews { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-blue-soft); }
.reviews h2 { margin: 0 0 var(--space-1); font-size: 1.1875rem; }
.reviews p { margin: 0; color: var(--color-muted); font-size: .875rem; }

/* ---------- Location ---------- */
.hours-list { display: grid; gap: var(--space-1); margin: var(--space-2) 0 0; padding: 0; list-style: none; font-size: .875rem; }
.hours-list li { display: flex; justify-content: space-between; gap: var(--space-4); }
.hours-list li span:last-child { font-weight: 650; font-variant-numeric: tabular-nums; }
.phone-number { color: var(--color-blue); text-decoration: underline; text-underline-offset: 3px; }
.location-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.location-actions .button { flex: 1 1 10rem; }
.map-box { position: relative; min-width: 0; min-height: 20rem; overflow: hidden; border: 1px solid #1d4f7c; border-radius: var(--radius-card); background: #0b2f55; box-shadow: var(--shadow-card); }
.map-consent {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  padding: var(--space-6); text-align: center; color: #fff;
  background: radial-gradient(circle at 50% 38%, rgba(72, 169, 221, .38), transparent 62%), linear-gradient(160deg, #0f4a80, #082e5c);
}
.map-consent[hidden] { display: none; }
.map-consent-pin { font-size: 2.25rem; line-height: 1; color: #8fe0ff; }
.map-consent-address { margin: 0; font-size: 1rem; font-weight: 700; }
.map-consent-note { max-width: 24rem; margin: 0; color: #cfe5f5; font-size: .75rem; line-height: 1.5; }
.map-load { margin-top: var(--space-1); }
.map-frame { display: block; width: 100%; height: 100%; min-height: 20rem; border: 0; }
.map-frame[hidden] { display: none; }

@media (max-width: 760px) {
  .service-facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .service-detail .button { width: 100%; }
  .team-photo { flex-basis: 4.5rem; width: 4.5rem; height: 4.5rem; }
}
@media (max-width: 360px) {
  .brand-logo { height: 2.375rem; }
}


/* ---------- 3D explainers (knee, spine) ---------- */
.x3d-promo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border: 1px solid #cfe3f1;
  border-radius: var(--radius-card);
  background: linear-gradient(120deg, #ffffff 0%, #eaf5fc 100%);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.x3d-promo:hover { box-shadow: var(--shadow-float); }
.x3d-promo-badge {
  display: grid; flex: 0 0 3rem; width: 3rem; height: 3rem; place-items: center;
  border-radius: .9rem; background: var(--color-blue-deep); color: #fff; font-size: .9375rem; font-weight: 800; letter-spacing: .02em;
}
.x3d-promo-text { display: grid; gap: 2px; min-width: 0; }
.x3d-promo-text strong { color: var(--color-ink); font-size: 1rem; }
.x3d-promo-text span { color: var(--color-muted); font-size: .8125rem; }
.x3d-promo-arrow { margin-left: auto; color: var(--color-blue); font-size: 1.25rem; font-weight: 700; }

.x3d {
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 6rem;
}
.x3d-head h2 { margin: var(--space-1) 0 var(--space-2); font-size: 1.375rem; letter-spacing: -.025em; line-height: 1.2; }
.x3d-head p { max-width: 40rem; margin: 0 0 var(--space-5); color: var(--color-muted); font-size: .875rem; }
.x3d-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; }

.x3d-stage {
  position: relative;
  min-width: 0;
  height: 26rem;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #e6f2fa 55%, #d6e9f6 100%);
  touch-action: pan-y;
}
.x3d-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.x3d-canvas:active { cursor: grabbing; }
.x3d-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--color-muted); font-size: .8125rem; }
.x3d-stage.is-ready .x3d-loading { display: none; }
.x3d-hint, .x3d-reset {
  position: absolute; z-index: 2; bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px; font-size: .75rem; font-weight: 650;
}
.x3d-hint { left: var(--space-3); background: rgba(255,255,255,.8); color: var(--color-muted); pointer-events: none; transition: opacity .3s ease; }
.x3d-touched .x3d-hint { opacity: 0; }
.x3d-reset { right: var(--space-3); border: 1px solid var(--color-border); background: #fff; color: var(--color-blue-deep); cursor: pointer; }
.x3d-stage:not(.is-ready) .x3d-hint, .x3d-stage:not(.is-ready) .x3d-reset { display: none; }

.x3d-dot {
  position: absolute; top: 0; left: 0; z-index: 1;
  display: grid; width: 1.75rem; height: 1.75rem; place-items: center; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: var(--color-blue-deep); color: #fff; font-size: .75rem; font-weight: 800;
  box-shadow: 0 0 0 4px rgba(22, 135, 195, .25), 0 4px 10px rgba(9, 54, 99, .25);
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}
.x3d-dot::after { content: ""; position: absolute; inset: -8px; } /* bigger tap target */
.x3d-dot.is-active { background: #0d78b0; box-shadow: 0 0 0 6px rgba(19, 139, 196, .35), 0 4px 10px rgba(9, 54, 99, .25); }
.x3d-dot.is-behind { opacity: .3; }

.x3d-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.x3d-chips button {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 2.5rem; padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: 1px solid var(--color-border); border-radius: 999px;
  background: #fff; color: var(--color-ink); font-size: .8125rem; font-weight: 650; cursor: pointer;
}
.x3d-chips button:hover { border-color: #b9d4e7; background: #f5f9fc; }
.x3d-chips button[aria-pressed="true"] { border-color: var(--color-blue-deep); background: var(--color-blue-deep); color: #fff; }
.x3d-chip-num {
  display: grid; width: 1.75rem; height: 1.75rem; place-items: center;
  border-radius: 50%; background: var(--color-blue-soft); color: var(--color-blue); font-size: .75rem; font-weight: 800;
}
.x3d-chips button[aria-pressed="true"] .x3d-chip-num { background: #fff; color: var(--color-blue-deep); }

.x3d-panel { min-height: 8rem; padding: var(--space-5); border-radius: var(--radius-card); background: #f5f9fc; }
.x3d-empty { margin: 0; color: var(--color-muted); font-size: .875rem; }
.x3d-info-title { margin: 0 0 var(--space-3); font-size: 1.125rem; letter-spacing: -.02em; }
.x3d-facts { display: grid; gap: var(--space-3); margin: 0 0 var(--space-4); }
.x3d-facts dt { margin-bottom: 2px; color: var(--color-blue); font-size: .6875rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.x3d-facts dd { margin: 0; color: var(--color-muted); font-size: .875rem; }
.x3d-note { margin: var(--space-3) 0 0; color: var(--color-muted); font-size: .75rem; }

/* No WebGL: keep the list + explanations, drop the 3D stage */
.x3d-no3d .x3d-body { grid-template-columns: minmax(0, 1fr); }
.x3d-no3d .x3d-stage { display: none; }

@media (max-width: 900px) {
  .x3d-body { grid-template-columns: minmax(0, 1fr); }
  .x3d-stage { height: 22rem; }
}
@media (max-width: 520px) {
  .x3d { padding: var(--space-4); }
  .x3d-stage { height: 19rem; }
  .x3d-panel { padding: var(--space-4); }
  .x3d-info .button { width: 100%; }
  .x3d-promo { padding: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .x3d-promo:hover { transform: none; }
  html { scroll-behavior: auto; }
  .page.active, .hero-content { animation: none; }
  .feature:hover, .service-card:hover, .content-card:hover, .step:hover { transform: none; }
  .motion-ready [data-reveal]:not(.is-visible) { opacity: 1; transform: none; transition: none; }
  .motion-ready [data-reveal].is-visible { transition: none; }
  .hero-fallback { animation: none; }
  .text-link span:last-child, .nav-link, .book, .button, .mobile-panel, .hamburger-lines i, .faq-item summary::after, .nav-indicator, .brand-logo { transition: none; }
  .book::after { display: none; }
}

/* Keeps the full-screen menu full-size if the mobile header fix (app.js) has moved the header. */
.sidebar.menu-open { transform: none !important; }

/* ---------- Consistent vertical rhythm ----------
   Sections on a page are spaced by the page grid (--section-gap) and nothing else.
   Small section labels stay close to the content they introduce. */
.team-section .section-label, .faq .section-label { margin: 0 0 var(--space-3); }
.page > .section-label { margin-bottom: calc(var(--space-3) - var(--section-gap)); }

/* ---------- Icons inside buttons ---------- */
.btn-icon { flex: 0 0 auto; width: 1.375rem; height: 1.375rem; }
.reviews-link .btn-icon { width: 1.25rem; height: 1.25rem; }

/* Anything marked hidden must really be hidden, even if its class sets a display value */
[hidden] { display: none !important; }

/* ---------- Legal pages (privacy policy, terms) ---------- */
html[lang="sq"] [data-only="en"], html[lang="en"] [data-only="sq"] { display: none !important; }
.nav-indicator { transition: transform .38s cubic-bezier(.2, .8, .2, 1), width .38s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
.legal-wrap { min-width: 0; padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.legal { max-width: 46rem; }
.legal h2 { margin: var(--space-6) 0 var(--space-2); font-size: 1.1875rem; letter-spacing: -.02em; line-height: 1.3; }
.legal h3 { margin: var(--space-4) 0 var(--space-1); font-size: 1rem; }
.legal p, .legal li { color: var(--color-muted); font-size: .9375rem; overflow-wrap: anywhere; }
.legal p { margin: 0 0 var(--space-3); }
.legal ul { margin: 0 0 var(--space-3); padding-left: 1.25rem; }
.legal li + li { margin-top: var(--space-1); }
.legal strong { color: var(--color-ink); }
.legal a:not(.button) { color: var(--color-blue); text-decoration: underline; text-underline-offset: 3px; }
.legal .legal-updated { margin-bottom: var(--space-4); font-size: .8125rem; }
.legal-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.footer-legal a { font-weight: 650; }

/* Skip link for keyboard users */
.skip-link { position: fixed; z-index: 100; top: -5rem; left: var(--space-3); padding: var(--space-2) var(--space-4); border-radius: var(--radius-control); background: var(--color-blue-deep); color: #fff; font-size: .875rem; font-weight: 700; transition: top .15s ease; }
.skip-link:focus { top: var(--space-3); }
@media (max-width: 760px) { .legal-wrap { padding: var(--space-5); } }

/* keep pages clear of the fixed navbar when scrolled to by the skip link */
.page { scroll-margin-top: calc(var(--nav-h) + var(--space-4)); }

/* =====================================================================
   Page-coloured layout: no cards. Each page sets its own background on
   <body data-page="…"> and its content sits directly on it, separated
   by space and hairlines. (app.js sets data-page in navigate().)
   ===================================================================== */
body { transition: background-color .45s ease; }

/* ---------- Home (dashboard): deep clinic blue ---------- */
body[data-page] {
  background-color: #082e5c;
  background-image: radial-gradient(ellipse 60% 38% at 88% 0%, rgba(40, 150, 205, .38), transparent 70%),
                    radial-gradient(ellipse 50% 30% at 0% 62%, rgba(19, 125, 176, .16), transparent 70%);
  background-attachment: fixed;
}
body[data-page] .main {
  --color-ink: #f2f8fd;
  --color-muted: #a9c6dd;
  --color-blue: #7fd0f3;
  --color-border: rgba(159, 210, 240, .2);
  gap: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-ink);
}
body[data-page] .main .page.active { gap: clamp(2rem, 5vw, 3.5rem); }
body[data-page] .main .eyebrow,
body[data-page] .main .section-label { color: #84d7f5; }

/* Hero: no panel, just content on the page */
body[data-page] .hero {
  min-height: 0;
  padding: clamp(var(--space-4), 3vw, var(--space-8)) 0;
  overflow: visible;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body[data-page] .hero::before,
body[data-page] .hero::after { display: none; }
body[data-page] .hero-art {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: radial-gradient(circle at 50% 46%, rgba(72, 169, 221, .28), transparent 66%);
}
body[data-page] .hero-art::after { display: none; }

/* Rehab block: a section, not a card */
body[data-page] .rehab-highlight {
  padding: clamp(var(--space-6), 4vw, var(--space-10)) 0 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body[data-page] .rehab-highlight::after { display: none; }
body[data-page] .rehab-list { gap: 0 var(--space-8); }
body[data-page] .rehab-list li {
  min-height: 3.5rem;
  padding: var(--space-3) 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: none;
  color: #dcecf8;
  font-size: .875rem;
}
body[data-page] .rehab-check {
  background: rgba(127, 208, 243, .16);
  color: #8fdcff;
}

/* 3D promo: a ruled row */
body[data-page] .x3d-promo {
  padding: var(--space-5) 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body[data-page] .x3d-promo:hover { box-shadow: none; }
body[data-page] .x3d-promo:hover .x3d-promo-arrow { transform: translateX(4px); }
body[data-page] .x3d-promo-arrow { transition: transform .2s ease; }
body[data-page] .x3d-promo-badge { background: #12639c; box-shadow: 0 0 0 5px rgba(127, 208, 243, .12); }

/* Feature links: open columns divided by hairlines */
body[data-page] .home-grid { gap: 0; }
body[data-page] .feature {
  min-height: 0;
  padding: var(--space-6) var(--space-6) var(--space-6) 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body[data-page] .feature + .feature { padding-left: var(--space-6); border-left: 1px solid var(--color-border); }
body[data-page] .feature-icon { background: rgba(127, 208, 243, .14); color: #8fdcff; }
body[data-page] .feature h2::after { display: inline-block; transition: transform .2s ease; }
body[data-page] .feature:hover h2::after { transform: translateX(4px); }

/* Footer */
body[data-page] .footer { border-top-color: var(--color-border); color: var(--color-muted); }

@media (max-width: 900px) {
  body[data-page] .feature,
  body[data-page] .feature + .feature { padding: var(--space-5) 0; border-left: 0; border-top: 1px solid var(--color-border); }
  body[data-page] .feature:first-child { border-top: 0; }
}
@media (max-width: 760px) {
  body[data-page] .rehab-highlight { padding: var(--space-5) 0 0; }
  body[data-page] .rehab-list li { padding: var(--space-3) 0; }
}

/* ---------- All other pages: same blue, same section structure ----------
   Every section = hairline on top + title in a left column + content on the right.
   Pages are separated by one consistent rhythm (--sec-gap / --sec-pad). */
body[data-page] .main {
  --sec-gap: clamp(2.25rem, 5vw, 3.5rem);
  --sec-pad: clamp(1.5rem, 3vw, 2.25rem);
  --side-col: 15rem;
  --side-gap: var(--space-8);
}
body[data-page="services"] .main .page.active,
body[data-page="about"] .main .page.active,
body[data-page="location"] .main .page.active,
body[data-page="privacy"] .main .page.active,
body[data-page="terms"] .main .page.active { gap: var(--sec-gap); }

/* page heading: big title, then a heavier rule that starts the content */
body[data-page] .page-heading { padding-bottom: 0; border-bottom: 0; }
body[data-page] .page-heading p { color: var(--color-muted); }

/* strip every remaining card surface */
body[data-page] .service-detail, body[data-page] .x3d, body[data-page] .step,
body[data-page] .team-card, body[data-page] .reviews, body[data-page] .location-card,
body[data-page] .legal-wrap, body[data-page] .faq-item, body[data-page] .about-note {
  border: 0; border-radius: 0; background: none; box-shadow: none;
}

/* ---- the shared section shape ---- */
body[data-page="services"] .service-detail,
body[data-page="services"] .x3d,
body[data-page="about"] .about-note,
body[data-page="about"] .team-section,
body[data-page="about"] .faq,
body[data-page="about"] .reviews,
body[data-page="location"] .location-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--side-col)) minmax(0, 1fr);
  column-gap: var(--side-gap);
  row-gap: var(--space-4);
  align-items: start;
  padding: var(--sec-pad) 0 0;
  border-top: 1px solid var(--color-border);
}

/* Services -------------------------------------------------------- */
body[data-page="services"] .service-list { gap: var(--sec-gap); }
body[data-page="services"] .service-num { grid-column: 1; grid-row: 1; margin: 0; background: rgba(127, 208, 243, .16); color: #8fdcff; }
body[data-page="services"] .service-detail h2 { grid-column: 1; grid-row: 2; margin: 0; font-size: 1.5rem; }
body[data-page="services"] .service-facts { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
body[data-page="services"] .service-detail > .button { grid-column: 2; grid-row: 3; justify-self: start; }
body[data-page="services"] .x3d-head { grid-column: 1; grid-row: 1; }
body[data-page="services"] .x3d-head h2 { font-size: 1.5rem; }
body[data-page="services"] .x3d-head p { margin-bottom: 0; }
body[data-page="services"] .x3d-body { grid-column: 2; grid-row: 1; }
body[data-page="services"] .x3d-stage { border-radius: 0; background: radial-gradient(circle at 50% 42%, rgba(231, 244, 252, .92) 0%, rgba(150, 205, 236, .35) 55%, transparent 76%); }
body[data-page="services"] .x3d-hint { background: rgba(8, 46, 92, .72); color: #cfe5f5; }
body[data-page="services"] .x3d-reset { border-color: rgba(159, 210, 240, .4); background: rgba(8, 46, 92, .8); color: #fff; }
body[data-page="services"] .x3d-chips button { border-color: var(--color-border); background: rgba(255, 255, 255, .06); color: var(--color-ink); }
body[data-page="services"] .x3d-chips button:hover { border-color: rgba(159, 210, 240, .5); background: rgba(255, 255, 255, .13); }
body[data-page="services"] .x3d-chips button[aria-pressed="true"] { border-color: #1687c3; background: #1687c3; color: #fff; }
body[data-page="services"] .x3d-chip-num { background: rgba(127, 208, 243, .18); color: #8fdcff; }
body[data-page="services"] .x3d-chips button[aria-pressed="true"] .x3d-chip-num { background: #fff; color: #0b3b70; }
body[data-page="services"] .x3d-panel { padding: 0 0 0 var(--space-5); border-left: 3px solid rgba(127, 208, 243, .45); border-radius: 0; background: none; }
body[data-page="services"] .x3d-info-title { color: var(--color-ink); }

/* About ----------------------------------------------------------- */
body[data-page="about"] .main .page.active { grid-template-columns: minmax(0, var(--side-col)) minmax(0, 1fr); column-gap: var(--side-gap); }
body[data-page="about"] .page.active > * { grid-column: 1 / -1; }
body[data-page="about"] .about-note h2,
body[data-page="about"] .team-section > .section-label,
body[data-page="about"] .faq > .section-label,
body[data-page="about"] .reviews > div:first-child h2 { grid-column: 1; grid-row: 1; margin: 0; }
body[data-page="about"] .about-note h2 { font-size: 1.5rem; }
body[data-page="about"] .about-note p { grid-column: 2; grid-row: 1; max-width: 40rem; font-size: 1rem; }
body[data-page="about"] .team { grid-column: 2; grid-row: 1; }
body[data-page="about"] .team-card { padding: 0; }
body[data-page="about"] .faq { row-gap: 0; }
body[data-page="about"] .faq-item { grid-column: 2; border-bottom: 1px solid var(--color-border); }
body[data-page="about"] .faq-item:first-of-type { padding-top: 0; }
body[data-page="about"] .faq-item + .faq-item { margin-top: 0; }
body[data-page="about"] .faq-item summary { padding: var(--space-4) 0; }
body[data-page="about"] .faq-item p { padding: 0 0 var(--space-4); }
body[data-page="about"] .faq-item:last-of-type { border-bottom: 0; }
/* "next steps": label + steps share one row, with one hairline across both */
body[data-page="about"] .page.active > .section-label { grid-column: 1; align-self: start; margin: 0 calc(var(--side-gap) * -1) 0 0; padding-top: var(--sec-pad); border-top: 1px solid var(--color-border); }
body[data-page="about"] .page.active > .steps { grid-column: 2; gap: var(--space-6); padding-top: var(--sec-pad); border-top: 1px solid var(--color-border); }
body[data-page="about"] .step { padding: 0; }
body[data-page="about"] .step-number { background: rgba(127, 208, 243, .16); color: #8fdcff; }
body[data-page="about"] .reviews { grid-template-columns: minmax(0, var(--side-col)) minmax(0, 1fr); }
body[data-page="about"] .reviews > div:first-child { display: contents; }
body[data-page="about"] .reviews p { grid-column: 2; grid-row: 1; }
body[data-page="about"] .reviews .button { grid-column: 2; grid-row: 2; justify-self: start; }
body[data-page="about"] .team-initials, body[data-page="about"] .team-photo { background: rgba(127, 208, 243, .14); color: #8fdcff; }

/* Location -------------------------------------------------------- */
body[data-page="location"] .location-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
body[data-page="location"] .location-card { padding: 0; }
body[data-page="location"] .map-box { border-color: rgba(159, 210, 240, .25); box-shadow: none; }

/* Legal ----------------------------------------------------------- */
body[data-page="privacy"] .legal-wrap, body[data-page="terms"] .legal-wrap { padding: var(--sec-pad) 0 0; border-top: 1px solid var(--color-border); }

/* Shared controls on the dark page --------------------------------- */
body[data-page] .button.outline { border-color: rgba(159, 210, 240, .38); background: rgba(255, 255, 255, .06); color: #eaf5fc; }
body[data-page] .button.outline:hover { border-color: rgba(159, 210, 240, .65); background: rgba(255, 255, 255, .13); }
body[data-page] .open-status { color: #f2b36b; }
body[data-page] .open-status.is-open { color: #6fe0ae; }
body[data-page] .detail-value { color: var(--color-ink); }
body[data-page] .legal a:not(.button) { color: #7fd0f3; }

@media (max-width: 900px) {
  body[data-page] .main { --side-gap: 0; }
  body[data-page="services"] .service-detail,
  body[data-page="services"] .x3d,
  body[data-page="about"] .about-note,
  body[data-page="about"] .team-section,
  body[data-page="about"] .faq,
  body[data-page="about"] .reviews,
  body[data-page="location"] .location-layout { grid-template-columns: minmax(0, 1fr); }
  body[data-page="services"] .service-num, body[data-page="services"] .service-detail h2,
  body[data-page="services"] .service-facts, body[data-page="services"] .service-detail > .button,
  body[data-page="services"] .x3d-head, body[data-page="services"] .x3d-body,
  body[data-page="about"] .about-note h2, body[data-page="about"] .about-note p,
  body[data-page="about"] .team-section > .section-label, body[data-page="about"] .team,
  body[data-page="about"] .faq > .section-label, body[data-page="about"] .faq-item,
  body[data-page="about"] .reviews > div:first-child h2, body[data-page="about"] .reviews p,
  body[data-page="about"] .reviews .button { grid-column: 1; grid-row: auto; }
  body[data-page="about"] .faq > .section-label, body[data-page="about"] .team-section > .section-label { margin-bottom: var(--space-3); }
  body[data-page="about"] .page.active { grid-template-columns: minmax(0, 1fr); }
  body[data-page="about"] .page.active > .section-label { border-top: 1px solid var(--color-border); padding-bottom: var(--space-3); }
  body[data-page="about"] .page.active > .steps { grid-column: 1; border-top: 0; padding-top: 0; grid-template-columns: minmax(0, 1fr); margin-top: calc(var(--sec-gap) * -.5); }
  body[data-page="services"] .service-facts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 3D explainers: fixed height, the explanation scrolls ----------
   The side column is always as tall as the 3D stage, so choosing a part never
   changes the page height. Only the text panel scrolls. */
.x3d { --x3d-h: 26rem; }
.x3d-stage { height: var(--x3d-h); }
.x3d-side { display: flex; flex-direction: column; height: var(--x3d-h); min-height: 0; }
.x3d-chips, .x3d-note { flex: 0 0 auto; }
.x3d-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 208, 243, .5) transparent;
}
.x3d-panel::-webkit-scrollbar { width: 6px; }
.x3d-panel::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(127, 208, 243, .45); }
.x3d-panel::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 900px) { .x3d { --x3d-h: 22rem; } .x3d-side { height: 28rem; } }
@media (max-width: 520px) { .x3d { --x3d-h: 19rem; } .x3d-side { height: 30rem; } }

/* ---------- Mobile menu: frosted white tinted with the page blue ----------
   Mostly white, but translucent, so the deep blue of the page shows through. */
@media (max-width: 960px) {
  .mobile-panel {
    background: rgba(226, 240, 250, .86);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    backdrop-filter: blur(22px) saturate(1.4);
  }
  .mobile-panel-head, .language { border-color: rgba(11, 59, 112, .16); }
  .mobile-menu-close { background: rgba(255, 255, 255, .6); border-color: rgba(11, 59, 112, .16); }
  .nav-link:hover { background: rgba(255, 255, 255, .55); }
  .nav-link[aria-current="page"] { background: rgba(255, 255, 255, .72); box-shadow: inset 3px 0 var(--color-blue-bright), 0 2px 10px rgba(8, 46, 92, .08); }
  .language-switch { background: rgba(255, 255, 255, .5); }
  .nav-label { color: #4d6a85; }
}

/* Mobile menu items: flat, square rows separated by hairlines.
   The current page is marked by a straight accent bar and bold deep-blue text, not a rounded card. */
@media (max-width: 960px) {
  .nav { gap: 0; }
  .nav-link {
    min-height: 3.5rem;
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
    border-radius: 0;
    border-bottom: 1px solid rgba(11, 59, 112, .12);
  }
  .nav-link:last-child { border-bottom: 0; }
  .nav-link:hover { background: rgba(11, 59, 112, .05); }
  .nav-link[aria-current="page"] {
    background: rgba(11, 59, 112, .07);
    box-shadow: inset 4px 0 0 var(--color-blue-bright);
    color: #0a3a6b;
    font-weight: 750;
  }
  .nav-link[aria-current="page"] .nav-icon { color: var(--color-blue-bright); }
  .nav-label { padding-left: var(--space-4); }
}

/* Line icons (SVG) for the menu and the home links */
.nav-icon svg { width: 1.25rem; height: 1.25rem; }
.feature-icon svg { width: 1.25rem; height: 1.25rem; }

/* Mobile menu header: same height and padding as the top bar, everything centred,
   and a plain X (no button box). */
@media (max-width: 960px) {
  .mobile-panel { padding-top: max(var(--space-3), env(safe-area-inset-top)); }
  .mobile-panel-head {
    align-items: center;
    min-height: 2.75rem;
    margin-bottom: var(--space-5);
    padding: 0 0 var(--space-3);
    box-sizing: content-box;
  }
  .mobile-panel-title { align-items: center; line-height: 1; }
  .mobile-panel-title span { display: block; line-height: 1; }
  .mobile-panel-mark { height: 2.5rem; width: auto; }
  .mobile-menu-close {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -.625rem; /* optical: the X lines up with the page gutter */
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #0a3a6b;
    transition: opacity .15s ease, transform .15s ease;
  }
  .mobile-menu-close svg { display: block; width: 1.5rem; height: 1.5rem; }
  .mobile-menu-close:hover { opacity: .65; }
  .mobile-menu-close:active { transform: scale(.92); }
  .hamburger-lines { place-self: center; }
}

/* Mobile menu header = the normal white header: same logo, same bordered button, X instead of the hamburger. */
@media (max-width: 960px) {
  .mobile-panel { padding-top: 0; }
  .mobile-panel-head {
    min-height: 0;
    margin: 0 calc(var(--page-gutter) * -1) var(--space-5);
    padding: var(--space-3) var(--page-gutter);
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    box-shadow: 0 4px 16px rgba(9, 54, 99, .06);
  }
  .mobile-panel-title .brand-logo { height: 2.75rem; width: auto; max-width: none; }
  .mobile-menu-close {
    margin-right: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    background: #f5f9fc;
    color: var(--color-blue-deep);
  }
  .mobile-menu-close:hover { opacity: 1; background: #eaf3f9; }
}

/* FINAL mobile menu header: the real header bar stays put, so it is identical to the closed state.
   The hamburger turns into an X, and the menu panel starts right below the bar. */
@media (max-width: 960px) {
  .mobile-panel { inset: calc(var(--space-3) * 2 + 2.75rem + 1px) 0 0 0; padding-top: var(--space-4); }
  .mobile-panel-head { display: none; }
  .sidebar.menu-open .mobile-menu-toggle { visibility: visible; }
  .sidebar.menu-open .hamburger-lines i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sidebar.menu-open .hamburger-lines i:nth-child(2) { opacity: 0; }
  .sidebar.menu-open .hamburger-lines i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Open menu: fade in place (no slide, which overlapped the bottom of the header) and keep the progress line,
   so the header looks exactly the same open and closed. */
@media (max-width: 960px) {
  .mobile-panel, .sidebar.menu-open .mobile-panel { transform: none; }
  .sidebar.menu-open { box-shadow: 0 4px 16px rgba(9, 54, 99, .06); }
}

/* Header never moves on mobile: app.js's visual-viewport fix sets an inline translate on .sidebar,
   which made the closed header sit lower than the open one (the open state already forced transform: none). */
@media (max-width: 960px) {
  .sidebar, .sidebar.menu-open { transform: none !important; }
  /* app.js sets --vv-top (how far the visible area is pushed down, e.g. while the browser toolbar collapses)
     so the header keeps its full height and the menu stays attached to it. */
  .sidebar { top: var(--vv-top, 0px); }
  .mobile-panel { top: calc(var(--vv-top, 0px) + var(--space-3) * 2 + 2.75rem + 1px); }
}

/* Mobile: one divider between the benefits list and the 3D promo, not two. */
@media (max-width: 900px) {
  body[data-page] .rehab-list li:last-child { border-bottom: 0; }
}

/* Mobile: the three home links become compact tappable rows (icon · title + text · arrow). */
@media (max-width: 900px) {
  body[data-page] .home-grid { border-top: 1px solid var(--color-border); }
  body[data-page] .feature,
  body[data-page] .feature + .feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: var(--space-4);
    align-items: center;
    padding: var(--space-4) var(--space-2);
    margin: 0 calc(var(--space-2) * -1);
    border: 0;
    border-bottom: 1px solid var(--color-border);
    transition: background-color .18s ease;
  }
  body[data-page] .feature:first-child { border-top: 0; }
  body[data-page] .feature:last-child { border-bottom: 0; }
  body[data-page] .feature:active { background: rgba(127, 208, 243, .1); }
  body[data-page] .feature-icon { grid-row: 1 / span 2; width: 2.5rem; height: 2.5rem; border-radius: .75rem; }
  body[data-page] .feature h2 { grid-column: 2; margin: 0; font-size: 1rem; line-height: 1.3; }
  body[data-page] .feature h2::after { display: none; }
  body[data-page] .feature p { grid-column: 2; margin: 2px 0 0; font-size: .8125rem; line-height: 1.4; }
  body[data-page] .feature::after {
    content: "→";
    grid-column: 3;
    grid-row: 1 / span 2;
    color: var(--color-blue);
    font-size: 1.25rem;
    font-weight: 700;
    transition: transform .18s ease;
  }
  body[data-page] .feature:active::after { transform: translateX(4px); }
}

/* Mobile: no extra line above the three links (the 3D row already has one below), and rows line up with the other dividers. */
@media (max-width: 900px) {
  body[data-page] .home-grid { border-top: 0; }
  body[data-page] .feature,
  body[data-page] .feature + .feature { margin: 0; padding-inline: 0; }
}
