/* ==========================================================================
   SpineWell — main stylesheet
   Tailwind (loaded in each page) handles layout, grid, spacing and responsive
   utilities. This file holds design tokens, reusable components and animation.
   Contents
   01 Tokens            08 Info strip & lists     15 Call to action
   02 Reset & base      09 Service cards          16 Accordion
   03 Typography        10 Posture comparison     17 Forms
   04 Buttons & links   11 Treatment process      18 Modal & toast
   05 Header & nav      12 Statistics             19 Footer & back to top
   06 Hero              13 Doctor cards & filter  20 Page banner, 404, coming soon
   07 Scroll reveal     14 Testimonial slider     21 Keyframes & reduced motion
   ========================================================================== */

/* 01 Tokens --------------------------------------------------------------- */
:root {
  --c-bg: #f4f8f6;
  --c-surface: #ffffff;
  --c-surface-2: #e6f0ec;
  --c-ink: #12302f;
  --c-muted: #4d6866;
  --c-line: #d5e2dd;
  --c-brand: #14716c;
  --c-brand-strong: #0f5b57;
  --c-on-brand: #ffffff;
  --c-soft: #d6ebe6;
  --c-accent: #e0a33a;
  --c-accent-ink: #855600;
  --c-on-accent: #2b1d00;
  --c-deep: #0c3f3d;
  --c-deep-2: #105250;
  --c-on-deep: #f2f8f6;
  --c-on-deep-muted: #b5d2cc;
  --c-danger: #b3261e;
  --c-ring: rgba(20, 113, 108, 0.22);
  --c-backdrop: rgba(8, 34, 33, 0.62);
  --header-bg: rgba(244, 248, 246, 0.86);

  --shadow-sm: 0 1px 2px rgba(12, 63, 61, 0.06), 0 6px 18px rgba(12, 63, 61, 0.06);
  --shadow-md: 0 18px 40px -18px rgba(12, 63, 61, 0.28);
  --shadow-lg: 0 34px 70px -28px rgba(12, 63, 61, 0.4);

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  /* Direction helpers. rtl.css flips these so animations mirror correctly. */
  --dir: 1;
  --start: left;
  --end: right;
}

/* 02 Reset & base (Tailwind preflight is disabled, this replaces it) ------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--c-line); }
html { background: var(--c-bg); color: var(--c-ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; overflow-x: clip; /* clip keeps body from becoming a scroll container, which would break the sticky header */
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  background: var(--c-bg); color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
section[id], [id="book"] { scroll-margin-top: 96px; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--c-brand); color: var(--c-on-brand); }

.wrap { width: min(100% - 2.5rem, 1240px); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 7rem); position: relative; }
.section-tint { background: var(--c-surface-2); }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.ltr-text { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 200; background: var(--c-deep); color: var(--c-on-deep); padding: 0.7rem 1rem; border-radius: var(--r-sm); transition: top 0.3s var(--ease); }
.skip-link:focus { top: 1rem; }

/* Smooth colour change when the theme is toggled (class added briefly by JS) */
.theme-transition, .theme-transition *, .theme-transition *::before, .theme-transition *::after {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease !important;
}

/* 03 Typography ------------------------------------------------------------ */
.display, .h2, .h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.display { font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.1; }
.h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.06rem, 1.4vw, 1.22rem); color: var(--c-muted); max-width: 58ch; }
.muted { color: var(--c-muted); }
/* Small label used only where it carries information (section context) */
.kicker { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.95rem; color: var(--c-brand); }
.kicker::before { content: ""; width: 22px; height: 8px; border-radius: 4px; background: var(--c-accent); }
.on-deep .kicker { color: var(--c-accent); }

/* 04 Buttons & links -------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; border-radius: 999px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--c-brand); color: var(--c-on-brand); overflow: hidden; isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
/* Fill sweeps in from the start side on hover */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c-brand-strong);
  transform: scaleX(0); transform-origin: var(--start) center; transition: transform 0.45s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: translateY(0); }
.btn .icon { transition: transform 0.35s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(calc(var(--dir) * 4px)); }
.btn-accent { background: var(--c-accent); color: var(--c-on-accent); }
.btn-accent::before { background: #f0b85a; }
.btn-outline { background: transparent; color: var(--c-ink); border: 1.5px solid var(--c-ink); }
.btn-outline::before { background: var(--c-ink); }
.btn-outline:hover { color: var(--c-bg); }
.btn-light { background: var(--c-on-deep); color: var(--c-deep); }
.btn-light::before { background: #ffffff; }
.btn-ghost-light { background: transparent; color: var(--c-on-deep); border: 1.5px solid rgba(255, 255, 255, 0.45); }
.btn-ghost-light::before { background: rgba(255, 255, 255, 0.14); }
.btn-sm { padding: 0.65rem 1.05rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.icon-arrow { transition: transform 0.35s var(--ease); }

.link-arrow { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--c-brand); position: relative; padding-block: 0.2rem; }
.link-arrow::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: var(--start) center; transition: transform 0.4s var(--ease); }
.link-arrow:hover::after, .link-arrow:focus-visible::after { transform: scaleX(1); }
.link-arrow:hover .icon-arrow { transform: translateX(calc(var(--dir) * 5px)); }
.text-link { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color 0.3s; }
.text-link:hover { color: var(--c-brand); }

.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); transition: transform 0.35s var(--ease), background-color 0.35s, color 0.35s, border-color 0.35s; }
.icon-btn:hover { background: var(--c-brand); color: var(--c-on-brand); border-color: var(--c-brand); transform: translateY(-2px); }
.icon-btn .icon { width: 20px; height: 20px; }
/* Theme toggle swaps sun/moon with a small rotation */
.theme-toggle .icon { grid-area: 1 / 1; transition: transform 0.5s var(--ease), opacity 0.35s; }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.dir-toggle { width: auto; padding-inline: 0.85rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; gap: 0.35rem; display: inline-flex; align-items: center; }

.social { display: flex; gap: 0.5rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; transition: transform 0.35s var(--ease), background-color 0.35s, color 0.35s; }
.social a:hover { transform: translateY(-3px) rotate(-6deg); background: var(--c-accent); color: var(--c-on-accent); }

/* 05 Header & navigation --------------------------------------------------- */
.topbar { background: var(--c-deep); color: var(--c-on-deep-muted); font-size: 0.9rem; }
.topbar a { transition: color 0.3s; }
.topbar a:hover { color: var(--c-accent); }
.topbar .social a { width: 30px; height: 30px; }
.topbar .icon { color: var(--c-accent); }

.site-header { position: sticky; top: 0; z-index: 60; background: transparent; transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.site-header .bar { display: flex; align-items: center; gap: 1rem; height: 78px; transition: height 0.4s var(--ease); }
.site-header.is-scrolled, .site-header.menu-open { background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--c-line), var(--shadow-sm); }
.site-header.menu-open { background: var(--c-surface); }
.site-header.is-scrolled .bar { height: 66px; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.03em; color: var(--c-ink); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-mark rect { transition: transform 0.5s var(--ease); }
.logo:hover .logo-mark .v2 { transform: translateX(-5px); }
.logo:hover .logo-mark .v1, .logo:hover .logo-mark .v3 { transform: translateX(3px); }
.logo b { font-weight: 700; color: var(--c-brand); }
.on-deep .logo { color: var(--c-on-deep); }
.on-deep .logo b { color: var(--c-accent); }

.nav-link { position: relative; padding-block: 0.4rem; font-weight: 600; color: var(--c-ink); transition: color 0.3s; }
.nav-link::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--c-accent); transform: scaleX(0); transform-origin: var(--start) center; transition: transform 0.4s var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--c-brand); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

.burger { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--c-line); background: var(--c-surface); }
.burger-lines { position: relative; width: 18px; height: 12px; }
.burger-lines span { position: absolute; inset-inline: 0; height: 2px; border-radius: 2px; background: var(--c-ink); transition: transform 0.4s var(--ease), opacity 0.25s, top 0.4s var(--ease); }
.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 5px; }
.burger-lines span:nth-child(3) { top: 10px; }
.burger[aria-expanded="true"] .burger-lines span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] .burger-lines span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.mobile-menu {
  position: absolute; top: 100%; inset-inline: 0; background: var(--c-surface); border-top: 1px solid var(--c-line);
  box-shadow: var(--shadow-md); max-height: calc(100vh - 66px); overflow-y: auto;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.5s var(--ease), visibility 0s linear 0.5s;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.5s var(--ease), visibility 0s; }
.mobile-menu li { opacity: 0; transform: translateY(12px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.mobile-menu.is-open li { opacity: 1; transform: none; transition-delay: calc(var(--i) * 60ms + 120ms); }
.mobile-menu .m-link { display: flex; justify-content: space-between; align-items: center; padding: 0.95rem 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; border-bottom: 1px solid var(--c-line); }
.mobile-menu .m-link[aria-current="page"] { color: var(--c-brand); }

/* 06 Hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding-block: clamp(2rem, 5vw, 4rem) clamp(5rem, 9vw, 8rem); margin-top: -78px; padding-top: calc(78px + clamp(2rem, 5vw, 4rem)); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at calc(50% + var(--dir) * 30%) 30%, var(--c-soft), transparent 70%); pointer-events: none; }
.hero-in { animation: rise 0.9s var(--ease) both; animation-delay: var(--d, 0ms); }
.hero-visual { position: relative; width: min(100%, 500px); margin-inline: auto; aspect-ratio: 5 / 6; }
.hero-ring { position: absolute; inset: 6% -4% auto; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--c-brand); opacity: 0.35; animation: spin 80s linear infinite; }
.hero-arch { position: absolute; inset: 0 9%; border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden; background: var(--c-soft); box-shadow: var(--shadow-lg); animation: archReveal 1.3s var(--ease) 0.2s both; }
.hero-arch img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.6s var(--ease) 0.2s both; }
.hero-spine { position: absolute; inset-inline-end: -3%; top: 14%; width: 15%; color: var(--c-accent); }
.hero-dot { position: absolute; border-radius: 50%; background: var(--c-brand); opacity: 0.16; }
.parallax { transform: translate3d(calc(var(--px, 0) * var(--depth, 0) * 1px), calc(var(--py, 0) * var(--depth, 0) * 1px), 0); transition: transform 0.3s ease-out; will-change: transform; }
.float { animation: float 7s ease-in-out infinite; }
.float-slow { animation: float 11s ease-in-out -3s infinite; }
.badge-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 1rem; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--shadow-md); animation: pop 0.8s var(--ease) both; animation-delay: var(--d, 0.9s); }
.badge-float strong { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.badge-float span { font-size: 0.82rem; color: var(--c-muted); line-height: 1.25; display: block; }
.badge-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--c-soft); color: var(--c-brand); flex: none; }
.badge-icon.is-accent { background: var(--c-accent); color: var(--c-on-accent); }
.avatar-stack { display: flex; }
.avatar-stack img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--c-surface); object-fit: cover; margin-inline-start: -10px; }
.avatar-stack img:first-child { margin-inline-start: 0; }

/* 07 Scroll reveal (only active when JS is available: html.js) -------------- */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal="up"] { transform: translateY(32px); }
.js [data-reveal="left"] { transform: translateX(calc(var(--dir) * -48px)); }
.js [data-reveal="right"] { transform: translateX(calc(var(--dir) * 48px)); }
.js [data-reveal="scale"] { transform: scale(0.9); }
/* Image reveal: the frame stays in place and the picture wipes in behind a mask.
   The mask sits on the <img>, not the observed element, so IntersectionObserver
   can still see the frame. */
.js [data-reveal="image"] { opacity: 1; }
.js [data-reveal="image"] img { clip-path: inset(0 100% 0 0); transform: scale(1.18); transition: clip-path 1.1s var(--ease), transform 1.5s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal="image"].is-visible img { clip-path: inset(0 0 0 0); transform: none; }

/* 08 Info strip, check lists, condition grid -------------------------------- */
.info-strip { position: relative; z-index: 3; margin-top: clamp(-4.5rem, -6vw, -3rem); background: var(--c-deep); color: var(--c-on-deep); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.6rem 1.75rem; transition: background-color 0.4s var(--ease); }
.info-item:hover { background: var(--c-deep-2); }
.info-item + .info-item { border-top: 1px solid rgba(255, 255, 255, 0.12); }
@media (min-width: 768px) { .info-item + .info-item { border-top: 0; border-inline-start: 1px solid rgba(255, 255, 255, 0.12); } }
.info-item .icon { width: 28px; height: 28px; color: var(--c-accent); margin-top: 0.2rem; transition: transform 0.5s var(--ease); }
.info-item:hover .icon { transform: rotate(-10deg) scale(1.1); }
.info-item p { color: var(--c-on-deep-muted); font-size: 0.97rem; }
.info-item strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; display: block; }

.check-list li { display: flex; gap: 0.8rem; align-items: flex-start; padding-block: 0.55rem; }
.check-list .tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-soft); color: var(--c-brand); flex: none; margin-top: 0.15rem; }
.check-list .tick .icon { width: 15px; height: 15px; stroke-width: 2.4; }

.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--c-soft); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.note-card { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 1.1rem 1.25rem; }

/* Conditions: one bordered grid rather than separate floating cards */
.cond-grid { display: grid; border-radius: var(--r-lg); overflow: hidden; background: var(--c-line); gap: 1px; border: 1px solid var(--c-line); }
.cond { position: relative; background: var(--c-surface); padding: 1.6rem 1.5rem 1.7rem; height: 100%; overflow: hidden; transition: color 0.4s var(--ease); }
.cond::before { content: ""; position: absolute; inset: 0; background: var(--c-deep); transform: translateY(101%); transition: transform 0.5s var(--ease); }
.cond > * { position: relative; }
.cond .icon { width: 34px; height: 34px; color: var(--c-brand); margin-bottom: 1rem; transition: transform 0.5s var(--ease), color 0.4s; }
.cond p { color: var(--c-muted); font-size: 0.97rem; margin-top: 0.3rem; transition: color 0.4s; }
.cond:hover { color: var(--c-on-deep); }
.cond:hover::before { transform: none; }
.cond:hover .icon { color: var(--c-accent); transform: translateY(-4px) scale(1.08); }
.cond:hover p { color: var(--c-on-deep-muted); }
.cond-cta { background: var(--c-accent); color: var(--c-on-accent); }
.cond-cta::before { background: #f0b85a; }
.cond-cta p, .cond-cta:hover p { color: var(--c-on-accent); }
.cond-cta:hover { color: var(--c-on-accent); }

/* 09 Service cards ---------------------------------------------------------- */
.svc-card { display: flex; flex-direction: column; height: 100%; background: var(--c-surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.svc-card:hover, .svc-card:focus-within { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.svc-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.svc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--c-deep), transparent 70%); opacity: 0; transition: opacity 0.5s var(--ease); }
.svc-card:hover .svc-media img { transform: scale(1.07); }
.svc-card:hover .svc-media::after { opacity: 0.45; }
.svc-icon { position: absolute; z-index: 1; inset-inline-start: 1.5rem; top: -28px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--c-brand); color: var(--c-on-brand); box-shadow: var(--shadow-md); transition: transform 0.5s var(--ease), background-color 0.4s, color 0.4s, border-radius 0.5s var(--ease); }
.svc-icon .icon { width: 28px; height: 28px; }
.svc-card:hover .svc-icon { transform: translateY(-6px) rotate(-8deg); background: var(--c-accent); color: var(--c-on-accent); border-radius: 50%; }
.svc-body { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 2.6rem 1.5rem 1.5rem; flex: 1; }
.svc-title { transition: color 0.35s; }
.svc-card:hover .svc-title { color: var(--c-brand); }
.svc-body p { color: var(--c-muted); font-size: 0.98rem; }
.svc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-top: 1rem; }

.fact-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--c-soft); color: var(--c-ink); font-weight: 600; font-size: 0.93rem; }
.fact-chip .icon { color: var(--c-brand); }
.panel { background: var(--c-surface); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); }
.step-list { counter-reset: step; }
.step-list li { counter-increment: step; display: flex; gap: 0.9rem; padding-block: 0.6rem; }
.step-list li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); font-weight: 700; font-size: 0.85rem; margin-top: 0.1rem; }

.benefit { display: flex; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--c-line); }
.benefit .b-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--c-brand); color: var(--c-brand); flex: none; transition: background-color 0.4s, color 0.4s, transform 0.5s var(--ease); }
.benefit:hover .b-icon { background: var(--c-brand); color: var(--c-on-brand); transform: rotate(-8deg) scale(1.06); }
.benefit p { color: var(--c-muted); font-size: 0.98rem; }

/* 10 Posture comparison (always LTR: it is an image, not text) -------------- */
.compare { position: relative; direction: ltr; aspect-ratio: 10 / 13; max-width: 440px; margin-inline: auto; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); --pos: 74%; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.compare-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #12302f; font-weight: 700; letter-spacing: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transition: transform 0.3s var(--ease); }
.compare:hover .compare-handle::after, .compare:focus-within .compare-handle::after { transform: translate(-50%, -50%) scale(1.12); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:focus-within { outline: 3px solid var(--c-accent); outline-offset: 4px; }
.compare-label { position: absolute; top: 1rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: rgba(255, 255, 255, 0.92); color: #12302f; pointer-events: none; }
.compare-label.is-before { left: 1rem; }
.compare-label.is-after { right: 1rem; }

/* 11 Treatment process ------------------------------------------------------ */
.process { position: relative; display: grid; gap: 2rem; --progress: 0; }
/* Track and progress line: vertical on small screens, horizontal from lg */
.process::before, .process::after { content: ""; position: absolute; inset-inline-start: 31px; top: 32px; bottom: 32px; width: 2px; border-radius: 2px; }
.process::before { background: var(--c-line); }
.process::after { background: var(--c-brand); transform: scaleY(var(--progress)); transform-origin: center top; }
.process-step { position: relative; z-index: 1; display: grid; grid-template-columns: 64px 1fr; gap: 1.25rem; align-items: start; }
.process-dot { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-line); color: var(--c-muted); transition: background-color 0.5s var(--ease), color 0.5s, border-color 0.5s, transform 0.5s var(--ease), box-shadow 0.5s; }
.process-dot .icon { width: 26px; height: 26px; transition: transform 0.6s var(--ease); }
.process-num { position: absolute; top: -6px; inset-inline-end: -6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); font-size: 0.75rem; font-weight: 700; transform: scale(0); transition: transform 0.5s var(--ease) 0.15s; }
.process-text { opacity: 0.55; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.process-text p { color: var(--c-muted); font-size: 0.98rem; margin-top: 0.35rem; }
.process-step.is-active .process-dot { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); transform: scale(1.06); box-shadow: 0 0 0 8px var(--c-ring); }
.process-step.is-active .process-dot .icon { transform: rotate(360deg); }
.process-step.is-active .process-num { transform: scale(1); }
.process-step.is-active .process-text { opacity: 1; transform: none; }
html:not(.js) .process-text { opacity: 1; transform: none; }
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
  .process::before, .process::after { top: 31px; bottom: auto; inset-inline: 10%; width: auto; height: 2px; }
  .process::after { transform: scaleX(var(--progress)); transform-origin: var(--start) center; }
  .process-step { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* 12 Statistics ------------------------------------------------------------- */
.on-deep { background: var(--c-deep); color: var(--c-on-deep); }
.on-deep .muted, .on-deep .lead { color: var(--c-on-deep-muted); }
.stats { position: relative; overflow: hidden; }
.stats .spine-deco { position: absolute; color: var(--c-on-deep); opacity: 0.07; height: 150%; top: -25%; }
.stat { padding-inline-start: 1.25rem; border-inline-start: 2px solid var(--c-accent); }
.stat-value { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 5.5vw, 4.25rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 0.5em; color: var(--c-accent); margin-inline-start: 0.1em; }
.stat p { color: var(--c-on-deep-muted); margin-top: 0.5rem; }

/* 13 Doctor cards & filter -------------------------------------------------- */
.doc-card { display: flex; flex-direction: column; height: 100%; background: var(--c-surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease); }
.doc-card:hover, .doc-card:focus-within { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.doc-media { position: relative; aspect-ratio: 4 / 4.4; overflow: hidden; }
.doc-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.6s var(--ease); }
.doc-card:hover .doc-media img, .doc-card:focus-within .doc-media img { transform: scale(1.08); }
.doc-social { position: absolute; top: 1rem; inset-inline-end: 1rem; display: grid; gap: 0.45rem; }
.doc-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-sm); transition: transform 0.45s var(--ease), opacity 0.35s, background-color 0.3s, color 0.3s; }
.doc-social a:hover { background: var(--c-brand); color: var(--c-on-brand); }
.doc-social .icon { width: 18px; height: 18px; }
.doc-panel { position: absolute; inset-inline: 1rem; bottom: 1rem; display: grid; gap: 0.5rem; justify-items: start; transition: transform 0.45s var(--ease); }
.doc-tag { padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--c-surface); font-size: 0.85rem; font-weight: 700; color: var(--c-brand); }
.doc-book { width: 100%; }
/* Hover-capable devices: socials slide in, panel shifts up, button fades in.
   Touch devices keep everything visible so nothing is hidden behind hover. */
@media (hover: hover) and (pointer: fine) {
  .doc-social a { opacity: 0; transform: translateX(calc(var(--dir) * 56px)); }
  .doc-social li:nth-child(2) a { transition-delay: 60ms; }
  .doc-social li:nth-child(3) a { transition-delay: 120ms; }
  .doc-card:hover .doc-social a, .doc-card:focus-within .doc-social a { opacity: 1; transform: none; }
  .doc-panel { transform: translateY(52px); }
  .doc-book { opacity: 0; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s; }
  .doc-card:hover .doc-panel, .doc-card:focus-within .doc-panel { transform: none; }
  .doc-card:hover .doc-book, .doc-card:focus-within .doc-book { opacity: 1; }
}
.doc-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.4rem 1.5rem 1.5rem; flex: 1; }
.doc-qual { font-weight: 600; color: var(--c-brand); font-size: 0.95rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.92rem; color: var(--c-muted); }
.doc-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.doc-body .bio { color: var(--c-muted); font-size: 0.97rem; margin-block: 0.4rem 0.9rem; }
.doc-body .link-arrow { margin-top: auto; align-self: flex-start; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filter-btn { padding: 0.6rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--c-line); background: var(--c-surface); font-weight: 600; font-size: 0.95rem; transition: background-color 0.35s var(--ease), color 0.35s, border-color 0.35s, transform 0.35s var(--ease); }
.filter-btn:hover { border-color: var(--c-brand); transform: translateY(-2px); }
.filter-btn[aria-pressed="true"] { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
/* Filter animation states (set by JS) */
.doc-cell { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.doc-cell.is-leaving { opacity: 0; transform: scale(0.92); }
.doc-cell.is-entering { animation: cellIn 0.55s var(--ease) both; animation-delay: var(--delay, 0ms); }

.cert { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.cert .icon { width: 30px; height: 30px; color: var(--c-accent); flex: none; transition: transform 0.5s var(--ease); }
.cert:hover .icon { transform: rotate(-10deg) scale(1.12); }

/* 14 Testimonial slider ----------------------------------------------------- */
.slider-stage { display: grid; }
.slide { grid-area: 1 / 1; display: grid; gap: 2rem; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease), visibility 0s; }
.slide-photo { position: relative; width: min(100%, 300px); aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden; margin-inline: auto; background: var(--c-soft); transform: scale(0.88) translateX(calc(var(--dir) * var(--from, 1) * -40px)); opacity: 0; transition: transform 0.8s var(--ease), opacity 0.6s var(--ease); }
.slide-photo img { width: 100%; height: 100%; object-fit: cover; }
.slide.is-active .slide-photo { transform: none; opacity: 1; }
.slide-quote { transform: translateX(calc(var(--dir) * var(--from, 1) * 48px)); opacity: 0; transition: transform 0.8s var(--ease) 0.1s, opacity 0.7s var(--ease) 0.1s; }
.slide.is-active .slide-quote { transform: none; opacity: 1; }
.slide blockquote { font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.85rem); line-height: 1.35; letter-spacing: -0.015em; font-weight: 500; }
.quote-mark { width: 52px; height: 52px; color: var(--c-accent); margin-bottom: 0.75rem; }
.stars { display: flex; gap: 2px; color: var(--c-accent); }
.stars .icon { width: 18px; height: 18px; }
.slider-dots { display: flex; gap: 0.5rem; align-items: center; }
.slider-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--c-line); transition: width 0.45s var(--ease), background-color 0.35s; }
.slider-dot[aria-current="true"] { width: 34px; background: var(--c-brand); }
@media (min-width: 768px) { .slide { grid-template-columns: 300px 1fr; gap: 3.5rem; } }

/* 15 Call to action ---------------------------------------------------------- */
.cta { position: relative; overflow: hidden; border-radius: clamp(24px, 4vw, 44px); background: var(--c-deep); color: var(--c-on-deep); padding: clamp(2.2rem, 5vw, 4.5rem); padding-bottom: 0; }
.cta::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--c-deep-2); inset-inline-end: -140px; top: -180px; }
.cta > * { position: relative; }
.cta .spine-deco { position: absolute; color: var(--c-accent); opacity: 0.85; width: 54px; inset-inline-end: 44%; top: 12%; }
.cta-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.cta-photo { width: min(100%, 360px); aspect-ratio: 4 / 4.6; border-radius: 999px 999px 0 0; overflow: hidden; margin-inline: auto; background: var(--c-brand); }
.cta-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.8s var(--ease); }
.cta:hover .cta-photo img { transform: scale(1.05); }
.cta-ring { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 2px dashed var(--c-accent); opacity: 0.6; animation: spin 40s linear infinite; }

/* 16 Accordion --------------------------------------------------------------- */
.acc-item { border-bottom: 1px solid var(--c-line); }
.acc-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.3rem 0; text-align: start; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; transition: color 0.3s; }
.acc-btn:hover { color: var(--c-brand); }
.acc-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--c-soft); color: var(--c-brand); transition: transform 0.45s var(--ease), background-color 0.35s, color 0.35s; }
.acc-btn[aria-expanded="true"] .acc-icon { transform: rotate(135deg); background: var(--c-brand); color: var(--c-on-brand); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.acc-panel > div { overflow: hidden; visibility: hidden; transition: visibility 0s linear 0.45s; }
.acc-panel p { padding-bottom: 1.4rem; color: var(--c-muted); max-width: 62ch; opacity: 0; transform: translateY(-6px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-item.is-open .acc-panel > div { visibility: visible; transition: visibility 0s; }
.acc-item.is-open .acc-panel p { opacity: 1; transform: none; transition-delay: 0.12s; }

/* 17 Forms ------------------------------------------------------------------- */
.field { position: relative; }
.field-input { display: block; width: 100%; padding: 1.5rem 1rem 0.55rem; border: 1.5px solid var(--c-line); border-radius: 14px; background: var(--c-surface); color: var(--c-ink); line-height: 1.4; appearance: none; -webkit-appearance: none; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s; }
.field-input:hover { border-color: var(--c-muted); }
.field-input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 4px var(--c-ring); }
textarea.field-input { min-height: 132px; resize: vertical; }
select.field-input { padding-inline-end: 2.75rem; cursor: pointer; }
.field-label { position: absolute; top: 1.02rem; inset-inline-start: 1.05rem; color: var(--c-muted); pointer-events: none; transform-origin: var(--start) top; transition: transform 0.3s var(--ease), color 0.3s; }
.field-input:focus ~ .field-label, .field-input:not(:placeholder-shown) ~ .field-label, .field.is-static .field-label { transform: translateY(-0.68rem) scale(0.78); }
.field-input:focus ~ .field-label { color: var(--c-brand); }
.field-chevron { position: absolute; top: 1.15rem; inset-inline-end: 1rem; color: var(--c-muted); pointer-events: none; transition: transform 0.35s var(--ease), color 0.3s; }
.field:focus-within .field-chevron { transform: rotate(180deg); color: var(--c-brand); }
.field-error { font-size: 0.88rem; font-weight: 600; color: var(--c-danger); max-height: 0; opacity: 0; overflow: hidden; transform: translateY(-4px); transition: max-height 0.35s var(--ease), opacity 0.35s, transform 0.35s var(--ease), margin 0.35s; }
.has-error .field-error { max-height: 4rem; opacity: 1; transform: none; margin-top: 0.4rem; }
.has-error .field-input { border-color: var(--c-danger); animation: shake 0.4s var(--ease); }
.has-error .field-label { color: var(--c-danger); }

.slots { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.slot span { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1rem; border-radius: 999px; border: 1.5px solid var(--c-line); background: var(--c-surface); font-weight: 600; font-size: 0.93rem; transition: background-color 0.3s var(--ease), color 0.3s, border-color 0.3s, transform 0.3s var(--ease); }
.slot:hover span { border-color: var(--c-brand); transform: translateY(-2px); }
.slot input:checked + span { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); animation: pick 0.4s var(--ease); }
.slot input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.has-error .slot span { border-color: var(--c-danger); }

.check { display: flex; gap: 0.8rem; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check-box { display: grid; place-items: center; width: 24px; height: 24px; flex: none; margin-top: 0.15rem; border-radius: 7px; border: 1.5px solid var(--c-muted); background: var(--c-surface); color: var(--c-on-brand); transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease); }
.check-box .icon { width: 15px; height: 15px; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.35s var(--ease) 0.05s; }
.check input:checked + .check-box { background: var(--c-brand); border-color: var(--c-brand); transform: scale(1.06); }
.check input:checked + .check-box .icon { stroke-dashoffset: 0; }
.check input:focus-visible + .check-box { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.has-error .check-box { border-color: var(--c-danger); }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: spin 0.7s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .icon { display: none; }

.inline-form { display: flex; gap: 0.5rem; padding: 0.35rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 255, 255, 0.22); transition: border-color 0.3s, box-shadow 0.3s; }
.inline-form:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(224, 163, 58, 0.25); }
.inline-form input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0.55rem 0.9rem; color: inherit; }
.inline-form input::placeholder { color: var(--c-on-deep-muted); }
.inline-form input:focus { outline: none; }
.inline-form.is-light { background: var(--c-surface); border-color: var(--c-line); }
.inline-form.is-light input::placeholder { color: var(--c-muted); }
.inline-form.is-light:focus-within { border-color: var(--c-brand); box-shadow: 0 0 0 4px var(--c-ring); }

.info-card { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; padding: 1.6rem; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.info-card .ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--c-soft); color: var(--c-brand); margin-bottom: 0.5rem; transition: background-color 0.4s, color 0.4s, transform 0.5s var(--ease); }
.info-card:hover .ic { background: var(--c-brand); color: var(--c-on-brand); transform: rotate(-8deg); }
.info-card .ic .icon { width: 26px; height: 26px; }

.hours-table th, .hours-table td { padding: 0.8rem 0; border-bottom: 1px solid var(--c-line); text-align: start; font-weight: 500; }
.hours-table td { text-align: end; color: var(--c-muted); }
.hours-table tr.is-today th, .hours-table tr.is-today td { color: var(--c-brand); font-weight: 700; }
.hours-table tr.is-today th::after { content: "Today"; margin-inline-start: 0.6rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--c-accent); color: var(--c-on-accent); font-size: 0.72rem; }
.on-deep .hours-table th, .on-deep .hours-table td { border-color: rgba(255, 255, 255, 0.14); color: var(--c-on-deep-muted); padding: 0.4rem 0; font-size: 0.95rem; }

.map { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--c-soft); }
.map img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.map:hover img { transform: scale(1.05); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-pin { position: absolute; left: 38%; top: 41%; transform: translate(-50%, -100%); color: var(--c-danger); }
.map-pin .icon { width: 46px; height: 46px; fill: var(--c-surface); animation: float 3.5s ease-in-out infinite; }
.map-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--c-brand); opacity: 0.5; animation: pulse 2.2s ease-out infinite; }
.map-card { position: absolute; inset-inline-start: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); }

.booking-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px dashed var(--c-line); }
.booking-row dt { color: var(--c-muted); }
.booking-row dd { font-weight: 600; text-align: end; }

/* 18 Modal & toast ----------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; visibility: hidden; opacity: 0; background: var(--c-backdrop); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s; }
.modal.is-open { visibility: visible; opacity: 1; transition: opacity 0.35s var(--ease), visibility 0s; }
.modal-panel { position: relative; width: min(100%, 720px); max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.5rem); transform: translateY(26px) scale(0.96); transition: transform 0.45s var(--ease); }
.modal.is-open .modal-panel { transform: none; }
.modal-close { position: absolute; top: 1rem; inset-inline-end: 1rem; z-index: 2; }
.modal-photo { width: 120px; aspect-ratio: 1; border-radius: 28px; overflow: hidden; flex: none; background: var(--c-soft); }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal h3.sub { font-weight: 700; font-size: 0.95rem; color: var(--c-brand); margin-bottom: 0.4rem; }
.day-pill { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--c-surface-2); font-size: 0.88rem; font-weight: 600; color: var(--c-muted); }
.day-pill.is-on { background: var(--c-brand); color: var(--c-on-brand); }
.success-mark { width: 84px; height: 84px; margin-inline: auto; color: var(--c-brand); }
.success-mark circle { stroke-dasharray: 240; stroke-dashoffset: 240; }
.success-mark path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.modal.is-open .success-mark circle { animation: draw 0.8s var(--ease) 0.15s forwards; }
.modal.is-open .success-mark path { animation: draw 0.5s var(--ease) 0.75s forwards; }

.toast-region { position: fixed; z-index: 120; bottom: 1.25rem; inset-inline-end: 1.25rem; display: grid; gap: 0.6rem; width: min(360px, calc(100vw - 2.5rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--r-md); background: var(--c-deep); color: var(--c-on-deep); box-shadow: var(--shadow-lg); border-inline-start: 4px solid var(--c-accent); transform: translateX(calc(var(--dir) * 120%)); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.4s; }
.toast.is-in { transform: none; opacity: 1; }
.toast .icon { color: var(--c-accent); margin-top: 0.15rem; }
.toast.is-error { border-color: #ff8a7a; }
.toast.is-error .icon { color: #ff8a7a; }

/* 19 Footer & back to top ---------------------------------------------------- */
.site-footer { background: var(--c-deep); color: var(--c-on-deep-muted); position: relative; overflow: hidden; }
.site-footer h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--c-on-deep); margin-bottom: 1rem; }
.site-footer .f-link { display: inline-block; padding-block: 0.3rem; transition: color 0.3s, transform 0.35s var(--ease); }
.site-footer .f-link:hover { color: var(--c-accent); transform: translateX(calc(var(--dir) * 5px)); }
/* Contact links keep icon and text on one line (must beat .f-link's inline-block) */
.site-footer .f-link.inline-flex { display: inline-flex; align-items: center; }
.site-footer li.flex > .icon { margin-top: 0.2rem; }
.site-footer .social a { background: rgba(255, 255, 255, 0.08); color: var(--c-on-deep); }
.site-footer .spine-deco { position: absolute; inset-inline-end: 3%; bottom: -10%; height: 120%; color: var(--c-on-deep); opacity: 0.05; pointer-events: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.92rem; }

.to-top { position: fixed; z-index: 55; bottom: 1.25rem; inset-inline-start: 1.25rem; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--c-brand); color: var(--c-on-brand); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s, background-color 0.3s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s, background-color 0.3s; }
.to-top:hover { background: var(--c-accent); color: var(--c-on-accent); transform: translateY(-4px); }
.to-top .icon { transform: rotate(-90deg); }

/* 20 Page banner, 404, coming soon ------------------------------------------- */
.banner { position: relative; overflow: hidden; margin-top: -78px; padding: calc(78px + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3rem, 6vw, 5rem); background: var(--c-surface-2); }
.banner::after { content: ""; position: absolute; inset-inline-end: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: var(--c-soft); }
.banner > .wrap { position: relative; z-index: 1; }
.banner .spine-deco { position: absolute; z-index: 1; inset-inline-end: 9%; top: 18%; height: 78%; color: var(--c-brand); opacity: 0.22; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.5rem; color: var(--c-accent-ink); }
.crumbs a { color: var(--c-muted); transition: color 0.3s; }
.crumbs a:hover { color: var(--c-brand); }
.crumbs [aria-current] { color: var(--c-brand); }

.err-code { display: flex; align-items: center; justify-content: center; gap: clamp(0.25rem, 2vw, 1.25rem); font-family: var(--font-display); font-weight: 700; font-size: clamp(6.5rem, 27vw, 17rem); line-height: 0.9; letter-spacing: -0.06em; color: var(--c-brand); }
.err-zero { width: 0.78em; height: 0.78em; color: var(--c-accent); animation: spin 36s linear infinite; }
.err-code span:first-child { animation: tilt 6s ease-in-out infinite; transform-origin: bottom center; }
.err-code span:last-child { animation: tilt 6s ease-in-out -3s infinite reverse; transform-origin: bottom center; }

.soon { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.soon-blob { position: absolute; border-radius: 50%; background: var(--c-soft); }
.count-unit { min-width: clamp(64px, 20vw, 120px); padding: 1.1rem 0.5rem; text-align: center; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.count-unit strong { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--c-brand); }
.count-unit strong.tick { animation: tick 0.5s var(--ease); }
.count-unit span { font-size: 0.85rem; color: var(--c-muted); font-weight: 600; }

/* 21 Keyframes & reduced motion ---------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes archReveal { from { clip-path: inset(100% 0 0 0 round 999px 999px 28px 28px); } to { clip-path: inset(0 0 0 0 round 999px 999px 28px 28px); } }
@keyframes settle { from { transform: scale(1.2); } to { transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tilt { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes pick { 0% { transform: scale(0.92); } 60% { transform: scale(1.06); } 100% { transform: none; } }
@keyframes pulse { from { transform: scale(0.6); opacity: 0.6; } to { transform: scale(3.2); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes cellIn { from { opacity: 0; transform: translateY(22px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes tick { from { opacity: 0.2; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal="image"] img { opacity: 1; transform: none; clip-path: none; }
  .parallax { transform: none; }
  .process-text { opacity: 1; transform: none; }
}

/* 22 Small component refinements ---------------------------------------------- */
.logo-mark .v1, .logo-mark .v3 { fill: var(--c-brand); }
.logo-mark .v2 { fill: var(--c-accent); }
.on-deep .logo-mark .v1, .on-deep .logo-mark .v3 { fill: var(--c-on-deep); }
.spine-deco { display: block; }
.cta .spine-deco { position: static; width: 54px; }
.badge-float { position: relative; }
.to-top .icon { transform: rotate(180deg); }
.slider-btn.is-prev .icon { transform: scaleX(-1); }
.doc-book { white-space: normal; text-align: center; }
.site-footer.on-deep { color: var(--c-on-deep-muted); }
@media (max-width: 400px) { .logo { font-size: 1.25rem; } .logo-mark { width: 30px; height: 30px; } }
/* Off-canvas start positions of reveal and slider animations must never create a horizontal scrollbar */
main, .soon { overflow-x: hidden; overflow-x: clip; }
.badge-icon .icon { width: 22px; height: 22px; }
.cond-cta .icon, .cond-cta:hover .icon { color: var(--c-on-accent); }
.stat .stat-value { color: var(--c-on-deep); margin: 0; }
.slider-dot { position: relative; background: var(--c-muted); opacity: 0.4; }
.slider-dot[aria-current="true"] { opacity: 1; }
.slider-dot::after { content: ""; position: absolute; inset: -12px -4px; } /* larger tap target */
/* clip (not hidden) so focus or anchor jumps can never scroll a decorative container */
.hero, .banner, .cta, .stats, .site-footer, .info-strip { overflow: clip; }
@media (min-width: 480px) { .hours-table th, .hours-table td { white-space: nowrap; } }

/* 23 Header dropdown, Home 2, login and register ------------------------------ */
/* Icons in the top bar take the hover colour of their link (fixes amber-on-amber) */
.topbar .social a:hover .icon { color: var(--c-on-accent); }

.nav-drop { position: relative; }
.drop-chevron { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.nav-drop:hover .drop-chevron, .nav-drop:focus-within .drop-chevron { transform: rotate(180deg); }
.drop-menu { position: absolute; top: 100%; inset-inline-start: -1rem; min-width: 190px; padding: 0.5rem; margin-top: 0.6rem; background: var(--c-surface); border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--c-line), var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s; }
.drop-menu::before { content: ""; position: absolute; inset-inline: 0; top: -0.7rem; height: 0.7rem; } /* hover bridge */
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s; }
.drop-link { display: block; padding: 0.6rem 0.85rem; border-radius: var(--r-sm); font-weight: 600; transition: background-color 0.3s, color 0.3s, padding 0.3s var(--ease); }
.drop-link:hover, .drop-link[aria-current="page"] { background: var(--c-soft); color: var(--c-brand); }
.drop-link:hover { padding-inline-start: 1.15rem; }

/* Home 2 hero */
.hero2-section { padding-top: 1rem; }
.hero2 { position: relative; overflow: clip; border-radius: clamp(24px, 4vw, 44px); padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3.5rem) 0; }
.hero2::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: var(--c-deep-2); inset-inline-start: 50%; top: -260px; margin-inline-start: -280px; }
.hero2 > * { position: relative; }
.hero2-copy { padding-bottom: clamp(5rem, 9vw, 7.5rem); }
.hero2-copy .icon { color: var(--c-accent); }
.hero2-copy li { color: var(--c-on-deep-muted); font-size: 0.97rem; }
.hero2-arch { aspect-ratio: 4 / 5.4; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--c-brand); }
.hero2-arch img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.quick-book { position: relative; z-index: 2; display: grid; gap: 0.9rem; width: min(100% - 2rem, 900px); margin: -3.2rem auto 0; padding: 1rem; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
@media (min-width: 768px) { .quick-book { grid-template-columns: 1fr 1fr auto; align-items: center; } }

/* Conditions marquee */
.marquee { display: flex; gap: 2.5rem; overflow: hidden; padding-block: 1.6rem; margin-top: clamp(2.5rem, 5vw, 4rem); border-block: 1px solid var(--c-line); }
.marquee-track { display: flex; flex: none; gap: 2.5rem; min-width: 100%; justify-content: space-around; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee li { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; white-space: nowrap; }
.marquee .icon { color: var(--c-brand); width: 26px; height: 26px; }
@keyframes marquee { to { transform: translateX(calc(var(--dir) * (-100% - 2.5rem))); } }

.stats-panel { position: relative; border-radius: var(--r-lg); padding: clamp(1.75rem, 4vw, 3rem); }

/* Service rows */
.svc-rows { border-top: 1px solid var(--c-line); }
.svc-row { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.25rem; width: 100%; padding: 1.4rem 0.5rem; text-align: start; border-bottom: 1px solid var(--c-line); border-radius: 0; transition: padding 0.45s var(--ease), background-color 0.45s var(--ease), border-radius 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.svc-row:hover, .svc-row:focus-visible { background: var(--c-surface); padding-inline: 1.5rem; border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.svc-row-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--c-soft); color: var(--c-brand); transition: background-color 0.4s, color 0.4s, transform 0.5s var(--ease), border-radius 0.5s var(--ease); }
.svc-row-icon .icon { width: 28px; height: 28px; }
.svc-row:hover .svc-row-icon { background: var(--c-brand); color: var(--c-on-brand); transform: rotate(-8deg); border-radius: 50%; }
.svc-row-main { display: grid; gap: 0.15rem; }
.svc-row-main .muted { font-size: 0.97rem; }
.svc-row:hover .svc-row-main strong { color: var(--c-brand); }
.svc-row-time { display: none; }
.svc-row-go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--c-line); transition: background-color 0.4s, color 0.4s, border-color 0.4s; }
.svc-row:hover .svc-row-go { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.svc-row:hover .icon-arrow { transform: translateX(calc(var(--dir) * 4px)); }
@media (min-width: 900px) { .svc-row { grid-template-columns: auto 1fr auto auto; } .svc-row-time { display: inline-flex; } }

/* Login and register */
.auth { display: grid; min-height: 100vh; }
/* Brand panel: compact banner on mobile and tablet, full-height column from 1024px */
.auth-side { position: relative; overflow: clip; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem 1.25rem; padding: 1.25rem clamp(1.25rem, 5vw, 4rem); }
.auth-side::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--c-deep-2); inset-inline-start: -180px; bottom: -200px; }
.auth-side > * { position: relative; }
.auth-brand { grid-column: 1 / -1; }
.auth-art { width: clamp(92px, 24vw, 170px); aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r-md) var(--r-md); overflow: hidden; background: var(--c-brand); box-shadow: var(--shadow-lg); }
.auth-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.auth-title { font-size: clamp(1.25rem, 4.6vw, 2.3rem); }
.auth-copy .muted { font-size: 0.95rem; }
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 1.25rem clamp(1.25rem, 5vw, 4rem) 1.5rem; }
.auth-box { width: min(100%, 440px); margin: auto; padding-block: 2.5rem; }
.icon-back { transform: scaleX(-1); }
.link-arrow:hover .icon-back { transform: scaleX(-1) translateX(5px); }
@media (max-width: 479px) { .auth-copy .muted { display: none; } }
/* Mobile: dark mode and RTL toggles sit on the same row as the SpineWell logo */
@media (max-width: 639px) {
  .auth { position: relative; }
  .auth-main > header > div { position: absolute; z-index: 5; top: 1rem; inset-inline-end: clamp(1.25rem, 5vw, 4rem); gap: 0.4rem; }
  .auth-main .icon-btn { width: 38px; height: 38px; }
  .auth-main .dir-toggle { width: auto; padding-inline: 0.7rem; }
}
@media (max-width: 379px) { .auth-main .dir-toggle [data-dir-label] { display: none; } .auth-main .dir-toggle { padding-inline: 0; width: 38px; justify-content: center; } }
/* Split layout from 640px (tablet and up): login has the image on the left, register on the right */
@media (min-width: 640px) {
  .auth { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .auth-side { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem; padding: clamp(1.25rem, 4vw, 3.5rem); }
  .auth-art { width: min(70%, 330px); margin-inline: auto; border-radius: 999px 999px var(--r-lg) var(--r-lg); }
  .auth-copy .muted { display: block; font-size: 0.9rem; }
  .auth-title { font-size: clamp(1.1rem, 2.6vw, 2.3rem); }
  .auth--image-right .auth-side { order: 2; }
  .auth--image-right .auth-main { order: 1; }
  .auth--image-right .auth-side::before { inset-inline-start: auto; inset-inline-end: -180px; }
}
.field-toggle { position: absolute; top: 0.95rem; inset-inline-end: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; color: var(--c-brand); transition: background-color 0.3s; }
.field-toggle:hover { background: var(--c-soft); }
.field:has(.field-toggle) .field-input { padding-inline-end: 4.2rem; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 0.6rem; }
.meter span { height: 5px; border-radius: 3px; background: var(--c-line); transition: background-color 0.4s var(--ease), transform 0.4s var(--ease); transform-origin: var(--start) center; }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--c-danger); }
.meter[data-score="2"] span:nth-child(-n+2) { background: var(--c-accent); }
.meter[data-score="3"] span:nth-child(-n+3) { background: var(--c-brand); }
.meter[data-score="4"] span { background: var(--c-brand); }
.hero2 > .cta-ring, .auth-side > .cta-ring { position: absolute; }

/* 24 Responsive hardening, autofill, scroll lock, service details ---------------- */
/* Grid and flex children may shrink below their content width. Without this a long
   table row or a form control stretches the whole column past a 320px screen. */
[class*="grid"] > *, .flex > *, .wrap > * { min-width: 0; }
.inline-form input { width: 0; }
.field-input { min-width: 0; max-width: 100%; }
h1, h2, h3, p, a, dd, td, th { overflow-wrap: break-word; }
@media (max-width: 479px) {
  .hours-table th, .hours-table td { font-size: 0.95rem; }
  .booking-row { flex-wrap: wrap; }
  .inline-form .btn { padding-inline: 0.9rem; }
}
@media (max-width: 359px) {
  .wrap { width: calc(100% - 2rem); }
  .panel { padding: 1.15rem; }
  .btn { padding-inline: 1.15rem; }
  .display { font-size: 2.15rem; }
  .cta, .hero2 { padding-inline: 1.15rem; }
  .badge-float { padding: 0.55rem 0.7rem; gap: 0.5rem; }
  .badge-float strong { font-size: 1.1rem; }
  .badge-icon { width: 34px; height: 34px; }
}
/* Browser autofill: float the label so it never sits on top of the filled value */
.field-input:-webkit-autofill ~ .field-label { transform: translateY(-0.68rem) scale(0.78); }
.field-input:autofill ~ .field-label { transform: translateY(-0.68rem) scale(0.78); }
/* Background does not scroll while the mobile menu is open */
html.no-scroll { overflow: hidden; }
.mobile-menu { overscroll-behavior: contain; max-height: calc(100vh - 78px); max-height: calc(100dvh - 78px); }
/* Mobile / tablet "Home" dropdown */
.m-drop-btn { width: 100%; background: none; text-align: start; cursor: pointer; color: inherit; }
.m-drop-btn[aria-current="page"], .m-drop-btn[aria-expanded="true"] { color: var(--c-brand); }
.m-chevron { transition: transform 0.35s var(--ease); }
.m-drop-btn[aria-expanded="true"] .m-chevron { transform: rotate(180deg); }
.m-sub { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height 0.35s var(--ease), visibility 0s linear 0.35s; }
.m-drop-btn[aria-expanded="true"] + .m-sub { max-height: 200px; visibility: visible; transition: max-height 0.35s var(--ease), visibility 0s; }
.mobile-menu .m-sub li { opacity: 1; transform: none; }
.m-sublink { display: block; padding: 0.75rem 0 0.75rem 1.1rem; font-weight: 600; font-size: 1.1rem; color: var(--c-muted); border-bottom: 1px solid var(--c-line); }
.m-sublink:hover, .m-sublink[aria-current="page"] { color: var(--c-brand); }
[dir="rtl"] .m-sublink { padding: 0.75rem 1.1rem 0.75rem 0; }
/* Burger and mobile menu are desktop-hidden even if the Tailwind CDN fails to load */
@media (min-width: 1024px) { .burger, .mobile-menu { display: none !important; } }
/* Keep the back-to-top button clear of footer content on phones */
@media (max-width: 767px) { .to-top { width: 44px; height: 44px; bottom: 1rem; inset-inline-start: auto; inset-inline-end: 1rem; } }

/* Service details */
@media (min-width: 1024px) { .sd-aside { position: sticky; top: 96px; } }
.sd-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--c-line); font-weight: 600; border-radius: var(--r-sm); transition: background-color 0.3s, color 0.3s, padding 0.35s var(--ease); }
.sd-nav li:last-child .sd-link { border-bottom: 0; }
.sd-link .icon { color: var(--c-brand); }
.sd-link .icon-arrow { opacity: 0; transition: opacity 0.3s, transform 0.35s var(--ease); }
.sd-link:hover, .sd-link[aria-current="page"] { background: var(--c-soft); color: var(--c-brand); padding-inline: 0.9rem; }
.sd-link:hover .icon-arrow, .sd-link[aria-current="page"] .icon-arrow { opacity: 1; }
.sd-book { background: var(--c-deep); }
.sd-book-icon { width: 34px; height: 34px; color: var(--c-accent); }
/* Phone-sized login/register banner: drop the decorations so they never sit on the text */
@media (max-width: 639px) { .auth-side .cta-ring, .auth-side .float-slow { display: none; } }

/* Related doctors in profile modal */
.related-docs { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; list-style: none; padding: 0; margin: .5rem 0 0; }
.related-docs li { display: flex; }
.related-doc { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .6rem; width: 100%; height: 100%; padding: .75rem .5rem; border: 1px solid var(--c-line, #e3e8e6); border-radius: 16px; background: transparent; color: inherit; text-align: center; cursor: pointer; }
.related-doc:hover, .related-doc:focus-visible { background: var(--c-soft); }
.related-doc img { width: 64px; height: 64px; min-width: 64px; border-radius: 16px; object-fit: cover; object-position: top center; flex: none; display: block; }
.related-doc span { display: grid; gap: .15rem; line-height: 1.3; min-width: 0; }
.related-doc strong { font-size: .95rem; }
.related-doc small { opacity: .7; font-size: .8rem; }
@media (max-width: 520px) { .related-docs { grid-template-columns: 1fr; } .related-doc { flex-direction: row; text-align: start; } }

/* Profile modal actions: let long "Book with ..." labels wrap and stay centred; stack full-width on phones */
.modal .btn { white-space: normal; text-align: center; }
@media (max-width: 520px) {
  .modal .btn { width: 100%; }
  .modal .btn-outline { width: auto; min-width: 8rem; }
}
