/* ==========================================================================
   Громик Людмила Олегівна — стилі сайту (v2)
   Структура: 1. Шрифт  2. Токени  3. База  4. Компоненти  5. Розділи
              6. Модальне вікно  7. Рух  8. Адаптивність  9. Спецрежими
   ========================================================================== */

/* 1. Шрифт Manrope (OFL), локально, змінна вага 200–800 ----------------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations"),
       url("assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Резервний шрифт з підігнаними метриками: заміна шрифту не зсуває макет. */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103.3%;
  ascent-override: 103.2%;
  descent-override: 29%;
  line-gap-override: 0%;
}

/* 2. Токени -------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Палітра бренду */
  --navy: #2F3F55;
  --navy-700: #26364A;
  --navy-900: #1E2B3C;
  --blue: #95C3ED;
  --blue-300: #BBD8F3;
  --blue-200: #D6E7F7;
  --blue-100: #E9F2FB;
  --blue-50: #F4F8FC;
  --white: #FFFFFF;

  /* Текст (усі пари ≥ 4.5:1 на білому і на --blue-50) */
  --ink: var(--navy);
  --ink-2: #4A5A6E;
  --ink-3: #55657A;
  --accent: #3D6B93;
  --on-dark: #C9D6E4;
  --on-dark-accent: #A9CFF0;
  --star: #B4791A;
  --focus: #2F6FB0;

  /* Лінії */
  --line: #E3EAF1;
  --line-strong: #CBDAE8;

  /* Типографіка */
  --font: "Manrope", "Manrope Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-label: 0.8125rem;                                   /* 13px — eyebrow, мітки */
  --fs-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);    /* 14–15 */
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);     /* 16–17 */
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);     /* 17–20 */
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);    /* 19–22 */
  --fs-h2: clamp(2rem, 1.45rem + 2.4vw, 3.5rem);           /* 32–56 */
  --fs-h1: clamp(3rem, 1.9rem + 5.1vw, 6rem);              /* 48–96 */

  /* Відступи (шкала 4px) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 56px; --sp-10: 72px;
  --section-y: clamp(72px, 4.5rem + 4vw, 136px);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;

  /* Радіуси, тіні, рух */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 43, 60, .05), 0 4px 12px -4px rgba(30, 43, 60, .06);
  --shadow-md: 0 18px 40px -18px rgba(30, 43, 60, .22);
  --shadow-lg: 0 40px 80px -30px rgba(30, 43, 60, .30);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .28s;

  --header-h: 76px;
  --sticky-h: 0px;
}

/* 3. База ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--sticky-h);
}
body.locked { overflow: hidden; }

h1, h2, h3, p, blockquote { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: var(--fs-h2); font-weight: 750; }
h2 em, h1 em { font-style: normal; color: var(--accent); }
h3 { font-size: var(--fs-h3); font-weight: 750; letter-spacing: -0.025em; }
p { color: var(--ink-2); text-wrap: pretty; }
strong { font-weight: 750; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }

svg.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--blue-300); color: var(--navy-900); }

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: fixed; z-index: 300; left: 16px; top: 12px;
  padding: 12px 20px; border-radius: var(--r-sm);
  background: var(--navy); color: var(--white); font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: none; }
.skip-link:focus-visible { outline-color: var(--blue); }

/* 4. Компоненти ---------------------------------------------------------- */

/* Eyebrow-підпис над заголовком */
.eyebrow {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--accent);
  font-size: var(--fs-label); font-weight: 750;
  letter-spacing: .16em; line-height: 1.5; text-transform: uppercase;
}
.eyebrow-line {
  display: inline-block; flex: none;
  width: 28px; height: 1.5px; border-radius: 2px;
  background: currentColor; opacity: .7;
}
.eyebrow-light { color: var(--on-dark-accent); }

/* Кнопки */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 14px 26px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: 0.9375rem; font-weight: 750; line-height: 1.25; text-align: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--navy); color: var(--white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 12px 26px -12px rgba(30, 43, 60, .55);
}
.btn-primary:hover { background: var(--navy-700); box-shadow: 0 18px 34px -14px rgba(30, 43, 60, .6); }

.btn-outline { background: rgba(255, 255, 255, .7); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); background: var(--white); }

.btn-light { background: var(--white); color: var(--ink); box-shadow: 0 16px 34px -16px rgba(30, 43, 60, .45); }
.btn-light:hover { background: var(--blue-50); }

.btn-small { min-height: 46px; padding: 10px 20px; font-size: 0.875rem; border-radius: 12px; }

/* Текстове посилання зі стрілкою */
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: var(--accent); font-size: 0.9375rem; font-weight: 750;
  text-decoration: underline; text-decoration-thickness: 1.5px;
  text-decoration-color: var(--blue); text-underline-offset: 7px;
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.text-link .icon { width: 18px; height: 18px; }
.text-link:hover { color: var(--navy); gap: 14px; text-decoration-color: var(--navy); }

/* Секції та заголовки секцій */
.section { padding-block: var(--section-y); }
.section-intro h2, .section-head h2, .education-intro h2 { margin-top: var(--sp-5); }
.section-head { margin-bottom: clamp(36px, 4vw, 56px); }
.section-head-split {
  display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(24px, 6vw, 80px);
}
.section-head-split > p { max-width: 380px; padding-bottom: 6px; font-size: var(--fs-base); line-height: 1.75; }

/* 5. Розділи ------------------------------------------------------------- */

/* 5.1 Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -18px rgba(30, 43, 60, .25); }
.nav-shell { display: flex; align-items: center; gap: var(--sp-6); height: 100%; }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; min-height: 44px; border-radius: 12px; }
.brand-mark {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--navy); color: var(--white);
  font-size: 1.0625rem; font-weight: 800; letter-spacing: -.06em; line-height: 1; white-space: nowrap;
  box-shadow: 0 8px 18px -10px rgba(30, 43, 60, .7);
}
.brand-mark > span { margin: 0 1px; color: var(--blue); }
.brand-lines { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.brand-lines strong { font-size: 1rem; font-weight: 800; letter-spacing: -.03em; }
.brand-lines small { color: var(--ink-3); font-size: 0.75rem; font-weight: 600; letter-spacing: .005em; }

.nav-panel { display: flex; align-items: center; gap: clamp(12px, 2vw, 32px); margin-left: auto; }
.main-nav { display: flex; align-items: center; gap: clamp(0px, .6vw, 8px); }
.main-nav a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 clamp(6px, .8vw, 12px);
  color: var(--ink-2); font-size: 0.9375rem; font-weight: 650; white-space: nowrap;
  border-radius: 10px;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 6px;
  width: 18px; height: 2px; margin-left: -9px; border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0); transition: transform var(--dur) var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-4); }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  font-size: 0.9375rem; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums;
  border-radius: 10px; transition: color var(--dur) var(--ease);
}
.header-phone .icon { width: 18px; height: 18px; color: var(--accent); }
.header-phone:hover { color: var(--accent); }
.desktop-book { white-space: nowrap; }

.mobile-menu-toggle {
  display: none; place-items: center; flex: none;
  width: 48px; height: 48px; margin-left: auto;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--white); color: var(--ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.mobile-menu-toggle:hover { background: var(--blue-50); }
.mobile-menu-toggle .icon { width: 22px; height: 22px; }
.menu-hidden { display: none !important; }
.mobile-menu-toggle.is-open .menu-visible { display: none !important; }
.mobile-menu-toggle.is-open .menu-hidden { display: block !important; }

/* 5.2 Перший екран */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(40px, 5vw, 80px) clamp(64px, 7vw, 104px);
  background:
    radial-gradient(60% 70% at 88% 30%, rgba(149, 195, 237, .22), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(149, 195, 237, .14), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--blue-50) 100%);
}
.hero-decoration { position: absolute; z-index: -1; pointer-events: none; }
.hero-decoration-left {
  left: -420px; bottom: -420px; width: 640px; height: 640px; border-radius: 50%;
  border: 1px solid rgba(149, 195, 237, .35);
  box-shadow: 0 0 0 90px rgba(233, 242, 251, .35), 0 0 0 190px rgba(233, 242, 251, .2);
}
.hero-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(32px, 6vw, 104px);
  min-height: min(640px, calc(100svh - var(--header-h) - 120px));
}
.hero-content { position: relative; z-index: 2; }
.hero-content h1 {
  margin: var(--sp-6) 0 var(--sp-6);
  font-size: var(--fs-h1); font-weight: 800; line-height: 1.02; letter-spacing: -0.055em;
}
.hero-content h1 span { color: var(--accent); }
.hero-lead { max-width: 30em; color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.7; font-weight: 550; }

.specializations { display: flex; flex-wrap: wrap; gap: var(--sp-2); max-width: 560px; margin-top: var(--sp-7); }
.specializations span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .75);
  color: var(--ink-2); font-size: 0.8125rem; font-weight: 650; line-height: 1.35;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-7); }
.hero-buttons .btn-primary { min-width: 260px; }

.hero-footnote {
  display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-8);
  color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6;
}
.hero-footnote strong { color: var(--ink); font-weight: 750; }
.soft-icon {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--blue-200); color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.hero-media { position: relative; justify-self: end; width: 100%; max-width: 540px; min-width: 0; padding: 18px 22px 0 14px; }
.hero-photo-background {
  position: absolute; right: -4px; bottom: -22px; width: 92%; height: 90%;
  border-radius: 300px 300px 36px 36px;
  background: linear-gradient(160deg, var(--blue-200), var(--blue-100));
  transform: rotate(3.5deg);
}
.photo-outline {
  position: absolute; top: 0; left: -2px; right: 38px; bottom: 22px; z-index: 0;
  border: 1px solid var(--blue-300);
  border-radius: 300px 300px 36px 36px;
  transform: rotate(-3.5deg);
}
.hero-picture {
  position: relative; z-index: 1; display: block; overflow: hidden;
  aspect-ratio: 0.81;
  border-radius: 280px 280px 28px 28px;
  background: var(--blue-100);
  box-shadow: var(--shadow-lg);
}
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 27%; }

.hero-photo-tag {
  position: absolute; z-index: 2; left: -28px; bottom: 48px;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 14px 20px 14px 14px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.hero-tag-flower {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--blue-100); color: var(--accent);
}
.hero-tag-flower .icon { width: 24px; height: 24px; }
.hero-photo-tag > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.hero-photo-tag strong { font-size: 0.9375rem; }
.hero-photo-tag small { color: var(--ink-3); font-size: 0.8125rem; font-weight: 600; }

.photo-side-caption {
  position: absolute; z-index: 2; right: -30px; bottom: 56px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: var(--ink-3); font-size: 0.75rem; font-weight: 700; letter-spacing: .18em;
}
.hero-bottom-line { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--line); }

/* 5.3 Смуга довіри */
.trust-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-grid > div {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  min-height: 96px; padding: var(--sp-5) var(--sp-4);
  font-size: var(--fs-sm); font-weight: 700; line-height: 1.4;
}
.trust-grid > div + div { border-left: 1px solid var(--line); }
.trust-grid .icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 12px;
  background: var(--blue-100); color: var(--accent); stroke-width: 1.6;
}

/* 5.4 Про лікаря */
.about-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(40px, 8vw, 128px); align-items: start; }
.about-heading { max-width: 520px; }
.section-heading-accent { width: 64px; height: 4px; margin-top: var(--sp-7); border-radius: var(--r-pill); background: var(--blue); }
.about-copy { position: relative; padding-left: clamp(24px, 3.5vw, 48px); border-left: 1px solid var(--line-strong); }
.about-copy p { margin-bottom: var(--sp-5); font-size: var(--fs-base); line-height: 1.85; }
.about-copy .about-first { color: var(--ink); font-size: var(--fs-lead); line-height: 1.65; font-weight: 550; }
.about-copy .about-first strong { font-weight: 800; }

/* 5.5 Напрямки */
.services-section { background: var(--blue-50); }
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); }
.service-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0;
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--blue), transparent);
  opacity: 0; transition: opacity .35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.service-card:hover::before, .service-card:focus-within::before { opacity: 1; }
.service-num {
  position: absolute; top: var(--sp-6); right: var(--sp-6);
  color: var(--ink-3); font-size: 0.8125rem; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.service-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: var(--sp-6);
  border-radius: 16px; background: var(--blue-100); color: var(--accent);
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.service-icon .icon { width: 28px; height: 28px; stroke-width: 1.5; }
.service-card:hover .service-icon { background: var(--navy); color: var(--blue); transform: rotate(-4deg); }
.service-card h3 { font-size: clamp(1.25rem, 1.15rem + .35vw, 1.4375rem); line-height: 1.25; min-height: 2.5em; }
.service-card > p { margin: var(--sp-4) 0 var(--sp-5); font-size: var(--fs-sm); line-height: 1.7; }
.service-card ul {
  display: grid; gap: 2px; width: 100%;
  margin: 0 0 var(--sp-6); padding: var(--sp-4) 0 0; list-style: none;
  border-top: 1px solid var(--line);
  color: var(--ink); font-size: var(--fs-sm); line-height: 1.5;
}
.service-card li { position: relative; padding: 6px 0 6px 20px; }
.service-card li::before {
  content: ""; position: absolute; left: 2px; top: calc(6px + .75em - 3px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 3px var(--blue-100);
}
.service-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: auto; padding: 0;
  border: 0; background: none; color: var(--accent);
  font-size: 0.9375rem; font-weight: 750;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--blue); text-underline-offset: 7px;
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.service-link .icon { width: 17px; height: 17px; }
.service-link:hover { color: var(--navy); gap: 14px; text-decoration-color: var(--navy); }
.services-note {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  margin-top: var(--sp-7); padding: var(--sp-4) var(--sp-5);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.65;
}
.services-note .icon {
  width: 24px; height: 24px; padding: 4px; margin-top: -1px; border-radius: 50%;
  background: var(--blue-100); color: var(--accent); stroke-width: 2;
}

/* 5.6 Освіта */
.education-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(40px, 9vw, 136px); align-items: start; }
.education-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.education-intro > p:not(.eyebrow) { max-width: 30em; margin-top: var(--sp-6); font-size: var(--fs-base); line-height: 1.8; }
.education-seal {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-7); padding: 12px 18px 12px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--blue-50); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; line-height: 1.4;
}
.education-seal .icon { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--white); color: var(--accent); }

.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; top: 12px; bottom: 12px; left: 7px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-200), var(--blue) 70%, var(--blue-200));
}
.timeline-item {
  position: relative;
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--sp-4);
  padding-bottom: var(--sp-7); margin-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -36px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--blue); background: var(--white);
  box-shadow: 0 0 0 5px var(--white);
}
.timeline-year {
  padding-top: 2px; color: var(--accent);
  font-size: var(--fs-sm); font-weight: 800; letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.timeline-content h3 { font-size: clamp(1.125rem, 1.07rem + .25vw, 1.25rem); }
.timeline-content p { margin-top: var(--sp-2); font-size: var(--fs-sm); line-height: 1.75; }
.timeline-highlight::before { background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 5px var(--white), 0 0 0 7px var(--blue-200); }
.timeline-highlight .timeline-content {
  margin-top: -14px; padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(180deg, var(--blue-50), var(--blue-100));
  border: 1px solid var(--blue-200); border-radius: var(--r-md);
}
.timeline-highlight .timeline-content .text-link { margin-top: var(--sp-2); font-size: var(--fs-sm); }
.event-label {
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2);
  color: var(--accent); font-size: 0.75rem; font-weight: 800; letter-spacing: .12em;
}
.event-label .icon { width: 16px; height: 16px; }

/* 5.7 Принципи */
.approach-section { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: var(--white); }
.approach-section::before {
  content: ""; position: absolute; z-index: -1; right: -120px; top: -240px; width: 600px; height: 600px; border-radius: 50%;
  border: 1px solid rgba(149, 195, 237, .18);
  box-shadow: 0 0 0 80px rgba(149, 195, 237, .04), 0 0 0 170px rgba(149, 195, 237, .025);
  pointer-events: none;
}
.approach-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 9vw, 152px); align-items: center; }
.approach-wrap h2 { max-width: 15em; margin-top: var(--sp-5); color: var(--white); font-size: clamp(1.875rem, 1.4rem + 2vw, 3.125rem); }
.approach-wrap h2 em { color: var(--on-dark-accent); }
.approach-items > div { display: flex; gap: var(--sp-5); padding: var(--sp-6) 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.approach-items > div:first-child { padding-top: 0; }
.approach-items > div:last-child { border-bottom: 0; padding-bottom: 0; }
.approach-index {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(149, 195, 237, .45); color: var(--on-dark-accent);
  font-size: 0.875rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.approach-items h3 { color: var(--white); font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem); }
.approach-items p { margin-top: var(--sp-2); color: var(--on-dark); font-size: var(--fs-sm); line-height: 1.75; }
.approach-section :focus-visible { outline-color: var(--blue); }

/* 5.8 Відгуки */
.review-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-7); margin-bottom: clamp(32px, 4vw, 48px); }
.review-section-head p:not(.eyebrow) { margin-top: var(--sp-4); font-size: var(--fs-base); }
.review-controls { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.review-count { margin-right: var(--sp-3); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-count strong { color: var(--ink); font-size: 1.125rem; font-weight: 800; }
.round-arrow {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.round-arrow:hover:not([aria-disabled="true"]):not(:disabled) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.round-arrow:active:not([aria-disabled="true"]):not(:disabled) { transform: scale(.95); }
.round-arrow[aria-disabled="true"], .round-arrow:disabled { opacity: .4; cursor: default; }

.reviews-track {
  display: flex; gap: var(--sp-5);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  scrollbar-width: none;
  padding: 4px 2px 20px; margin: -4px -2px 0;
  border-radius: var(--r-lg);
}
.reviews-track::-webkit-scrollbar { display: none; }
.reviews-track:focus-visible { outline-offset: 2px; }
.reviews-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.reviews-track.is-dragging .review-card { pointer-events: none; }

.review-card {
  position: relative; display: flex; flex-direction: column;
  flex: 0 0 calc((100% - 2 * var(--sp-5)) / 3); min-width: 0;
  padding: var(--sp-7);
  background: var(--blue-50); border: 1px solid var(--line); border-radius: var(--r-lg);
  scroll-snap-align: start;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.review-card:hover { background: var(--white); border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.stars { color: var(--star); font-size: 1.125rem; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.review-top time { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-card blockquote { flex: 1; margin-top: var(--sp-6); color: var(--ink); font-size: var(--fs-base); line-height: 1.75; }
.review-foot {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 0.8125rem; font-weight: 700; letter-spacing: .02em;
}
.review-foot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.review-disclaimer { display: flex; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-5); }
.review-disclaimer .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.review-disclaimer p { font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-3); }

/* 5.9 Контакти */
.contact-section { background: var(--blue-50); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.contact-info-block { display: flex; align-items: flex-start; gap: var(--sp-5); padding-bottom: var(--sp-6); margin-bottom: var(--sp-6); border-bottom: 1px solid var(--line-strong); }
.contact-info-icon {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--white); border: 1px solid var(--blue-200); color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.contact-info-icon .icon { width: 24px; height: 24px; }
.contact-label { display: block; margin-bottom: var(--sp-1); color: var(--accent); font-size: 0.75rem; font-weight: 800; letter-spacing: .14em; }
.contact-info-block h3 { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); }
.contact-info-block h3 a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -8px; font-variant-numeric: tabular-nums; transition: color var(--dur) var(--ease); }
.contact-info-block h3 a:hover { color: var(--accent); }
.contact-info-block p { max-width: 26em; margin-top: var(--sp-2); font-size: var(--fs-sm); line-height: 1.7; }
.contact-info-block .text-link { margin-top: var(--sp-2); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); margin-top: var(--sp-2); }
.contact-socials { display: flex; gap: var(--sp-2); }
.contact-socials a {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-md);
  background: var(--white); border: 1px solid var(--line-strong); color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.contact-socials a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); transform: translateY(-2px); }

.map-card {
  display: flex; flex-direction: column; min-height: 500px; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.map-topline, .map-card-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6); font-size: var(--fs-sm); font-weight: 700;
}
.map-topline { border-bottom: 1px solid var(--line); }
.map-topline-location { display: flex; align-items: center; gap: 10px; }
.map-topline-location .icon { width: 18px; height: 18px; color: var(--accent); }
.map-topline-dot { width: 8px; height: 8px; border-radius: 50%; background: #5FAE8A; box-shadow: 0 0 0 5px #E6F4EE; }
.map-frame { position: relative; flex: 1; min-height: 360px; background: var(--blue-100); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }
.map-placeholder { position: relative; display: grid; place-items: center; height: 100%; min-height: 360px; overflow: hidden; }
.map-graphic { position: absolute; inset: 0; background: linear-gradient(135deg, #EEF5FB, #D9E8F5); }
.map-graphic::before {
  content: ""; position: absolute; inset: -120px;
  background:
    repeating-linear-gradient(0deg, transparent 0 50px, rgba(255, 255, 255, .85) 50px 64px, transparent 64px 120px),
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255, 255, 255, .75) 70px 82px, transparent 82px 158px);
  transform: rotate(-15deg);
}
.map-graphic-line { position: absolute; display: block; height: 10px; border-radius: 30px; background: #C5DBEC; transform: rotate(-27deg); }
.map-graphic-line.line-a { left: -10%; top: 40%; width: 70%; }
.map-graphic-line.line-b { right: -5%; bottom: 20%; width: 60%; transform: rotate(43deg); }
.map-graphic-line.line-c { right: -15%; top: 15%; width: 50%; transform: rotate(83deg); }
.map-graphic-pin {
  position: absolute; left: 66%; top: 9%;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--navy); color: var(--white); border: 6px solid var(--white);
  box-shadow: 0 14px 30px -10px rgba(30, 43, 60, .55);
}
.map-graphic-pin::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid rgba(47, 63, 85, .25);
  animation: pin-pulse 2.6s var(--ease) infinite;
}
.map-graphic-pin .icon { width: 24px; height: 24px; }
.map-placeholder-content {
  position: relative; z-index: 1; max-width: 360px; margin: var(--sp-7);
  padding: var(--sp-6); text-align: center;
  background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.map-placeholder-content strong { font-size: 1.0625rem; }
.map-placeholder-content p { margin: var(--sp-1) 0 var(--sp-5); font-size: var(--fs-sm); }
.map-card-bottom { border-top: 1px solid var(--line); color: var(--ink-3); }
.map-card-bottom a {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-strong); color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.map-card-bottom a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* 5.10 Заклик і футер */
.closing-cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(56px, 6vw, 88px);
  background: var(--blue); color: var(--ink);
}
.closing-cta::before {
  content: ""; position: absolute; z-index: -1; left: -160px; bottom: -320px; width: 560px; height: 560px; border-radius: 50%;
  border: 1px solid rgba(47, 63, 85, .14); box-shadow: 0 0 0 70px rgba(255, 255, 255, .1);
}
.closing-wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-7); }
.closing-wrap h2 { margin-top: var(--sp-4); font-size: clamp(1.875rem, 1.45rem + 1.8vw, 2.875rem); }
.closing-wrap h2 em { color: var(--navy); }
.closing-cta .eyebrow-light { color: var(--navy); }
.closing-wrap .btn { flex: none; white-space: nowrap; }
.closing-cta :focus-visible { outline-color: var(--navy); }

.site-footer { background: var(--white); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-7); padding-block: var(--sp-8); border-bottom: 1px solid var(--line); }
.footer-top > p { margin-left: auto; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.7; text-align: right; }
.footer-top-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 750;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-top-link .icon { width: 17px; height: 17px; }
.footer-top-link:hover { background: var(--blue-50); border-color: var(--navy); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); padding-block: var(--sp-6); color: var(--ink-3); font-size: 0.8125rem; font-weight: 600; }

/* Липка мобільна кнопка запису (показується лише на вузьких екранах) */
.mobile-sticky-action { display: none; }

/* 6. Модальне вікно запису ----------------------------------------------- */
.booking-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--sp-4); visibility: hidden; pointer-events: none; transition: visibility 0s linear .3s; }
.booking-modal.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.booking-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 31, 46, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.booking-modal.is-open .booking-backdrop { opacity: 1; }
.booking-dialog {
  position: relative; width: min(520px, 100%); max-height: min(92svh, 800px); overflow: auto; overscroll-behavior: contain;
  padding: clamp(28px, 4vw, 44px);
  background: var(--white); border-radius: var(--r-xl);
  box-shadow: 0 40px 120px -20px rgba(20, 31, 46, .45);
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  outline: none;
}
.booking-modal.is-open .booking-dialog { opacity: 1; transform: none; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.modal-close:hover { background: var(--blue-50); transform: rotate(90deg); }
.modal-close .icon { width: 18px; height: 18px; }
.modal-overline {
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-5); padding-right: 52px;
  color: var(--accent); font-size: 0.75rem; font-weight: 800; letter-spacing: .14em;
}
.modal-overline .icon { width: 18px; height: 18px; }
.booking-dialog h2 { max-width: 13em; font-size: clamp(1.75rem, 1.5rem + 1vw, 2.125rem); }
.booking-dialog > p { margin: var(--sp-4) 0 var(--sp-6); font-size: var(--fs-base); line-height: 1.7; }
.booking-options { display: grid; gap: var(--sp-2); }
.booking-option {
  display: flex; align-items: center; gap: var(--sp-4); min-height: 72px; padding: var(--sp-3) var(--sp-4);
  background: var(--blue-50); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.booking-option:hover { background: var(--white); border-color: var(--blue-300); box-shadow: var(--shadow-sm); transform: translateX(3px); }
.option-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--white); border: 1px solid var(--blue-200); color: var(--accent); }
.option-icon .icon { width: 22px; height: 22px; }
.option-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.option-copy strong { font-size: 1rem; }
.option-copy small { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.option-arrow { width: 18px !important; height: 18px !important; color: var(--accent); transition: transform var(--dur) var(--ease); }
.booking-option:hover .option-arrow { transform: translate(2px, -2px); }
.modal-note { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-6); color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.6; }
.modal-note .icon { width: 18px; height: 18px; color: var(--accent); }

/* 7. Рух: scroll-reveal (класи додає script.js лише для елементів нижче першого екрана) */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes pin-pulse {
  0% { transform: scale(.7); opacity: .9; }
  80%, 100% { transform: scale(1.35); opacity: 0; }
}

/* 8. Адаптивність -------------------------------------------------------- */
@media (max-width: 1199px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card h3 { min-height: 0; }
  .review-card { flex-basis: calc((100% - var(--sp-5)) / 2); }
  .header-phone span { font-size: 0.875rem; }
}

/* Компактна шапка для 1001–1199px: усе в один рядок без прихованих елементів */
@media (min-width: 1001px) and (max-width: 1199px) {
  .nav-shell { gap: var(--sp-4); }
  .brand-lines small { max-width: 14em; }
  .nav-panel { gap: 14px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 0 6px; font-size: 0.875rem; }
  .header-phone { font-size: 0.875rem; }
  .desktop-book { padding-inline: 16px; }
}

/* Мобільне меню: навігація й дії шапки — у розкривній панелі */
@media (max-width: 1000px) {
  :root { --header-h: 68px; }
  .mobile-menu-toggle { display: grid; }
  .nav-panel {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--sp-5);
    max-height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    padding: var(--sp-2) var(--gutter) var(--sp-6);
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -30px rgba(30, 43, 60, .35);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
  }
  .nav-panel.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s; }
  .main-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { min-height: 54px; padding: 0 var(--sp-2); font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a::after { left: auto; right: var(--sp-2); bottom: 50%; width: 8px; height: 8px; margin: 0 0 -4px; border-radius: 50%; }
  .main-nav a.active { color: var(--accent); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .header-phone { justify-content: center; min-height: 54px; border: 1px solid var(--line-strong); border-radius: var(--r-md); font-size: 1.0625rem; }
  .header-phone span { font-size: inherit; }
  .desktop-book { min-height: 54px; font-size: 1rem; }

  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); min-height: 0; }
  .hero-photo-tag { left: -16px; bottom: 28px; }

  /* Підпис фото стає горизонтальним рядком над фото (нічого не ховаємо) */
  .hero-media { padding-top: 52px; }
  .hero-photo-background { top: 84px; bottom: -16px; height: auto; }
  .photo-outline { top: 40px; }
  .photo-side-caption {
    top: 0; left: 0; right: 0; bottom: auto;
    writing-mode: horizontal-tb; transform: none;
    text-align: center; font-size: 0.75rem; letter-spacing: .12em; line-height: 1.5;
  }
}

@media (max-width: 900px) {
  .about-grid, .education-grid, .approach-wrap, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .education-intro { position: static; }
  .about-heading, .education-intro h2 { max-width: 640px; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid > div { justify-content: flex-start; min-height: 76px; }
  .trust-grid > div + div { border-left: 0; }
  .trust-grid > div:nth-child(even) { border-left: 1px solid var(--line); }
  .trust-grid > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .contact-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-7); }
  .contact-info-block:first-child, .contact-actions { grid-column: 1 / -1; }
  .map-card { min-height: 440px; }
  .footer-top { flex-wrap: wrap; }
  .footer-top > p { margin-left: 0; text-align: left; order: 3; width: 100%; }
}

/* Телефони і малі планшети */
@media (max-width: 760px) {
  :root { --sticky-h: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .section-head-split { display: block; }
  .section-head-split > p { max-width: 34em; margin-top: var(--sp-5); padding: 0; }

  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-9); }
  .hero-content h1 { margin: var(--sp-5) 0; }
  .hero-buttons .btn { flex: 1 1 220px; min-width: 0; }
  .hero-buttons .btn-primary { min-width: 0; }
  .hero-footnote { margin-top: var(--sp-7); }
  .hero-media { justify-self: center; width: min(100%, 460px); margin-inline: auto; padding-inline: 12px; }
  .hero-picture { aspect-ratio: .86; border-radius: 230px 230px 26px 26px; }
  .hero-picture img { object-position: 50% 22%; }
  .hero-photo-background { right: 0; }
  .photo-outline { right: 24px; }
  .hero-photo-tag { left: -4px; bottom: 28px; }

  .services-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .service-card { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
  .service-num { top: var(--sp-5); right: var(--sp-5); }
  .service-icon { width: 52px; height: 52px; margin-bottom: var(--sp-5); }

  .timeline { padding-left: 30px; }
  .timeline::before { left: 6px; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding-bottom: var(--sp-6); margin-bottom: var(--sp-6); }
  .timeline-item::before { left: -30px; top: 4px; }
  .timeline-year { padding-top: 0; }
  .timeline-highlight .timeline-content { margin-top: var(--sp-1); padding: var(--sp-4) var(--sp-5); }

  .review-section-head { flex-direction: column; align-items: stretch; gap: var(--sp-6); }
  .review-controls { justify-content: flex-end; }
  .review-count { margin-right: auto; }
  .review-card { flex-basis: min(86%, 420px); padding: var(--sp-6); }

  .contact-info { display: block; }
  .contact-actions > .btn { flex: 1 1 100%; }
  .map-card { min-height: 420px; border-radius: var(--r-lg); }
  .map-topline, .map-card-bottom { padding-inline: var(--sp-5); }

  .closing-wrap { flex-direction: column; align-items: flex-start; }
  .closing-wrap .btn { white-space: normal; }

  .footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-5); padding-block: var(--sp-7) var(--sp-6); }
  .footer-top > p { grid-column: 1 / -1; grid-row: 2; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }

  .mobile-sticky-action {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: block;
    padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px -18px rgba(30, 43, 60, .35);
  }
  .mobile-sticky-action .btn { width: 100%; min-height: 54px; gap: 10px; padding-inline: 16px; font-size: 1rem; }

  /* Модалка як нижній аркуш */
  .booking-modal { place-items: end center; padding: 0; }
  .booking-dialog {
    width: 100%; max-height: 92svh;
    padding: var(--sp-7) var(--sp-5) max(var(--sp-6), env(safe-area-inset-bottom));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    transform: translateY(40px);
  }
}

@media (max-width: 400px) {
  .brand { gap: 10px; }
  .brand-mark { width: 40px; height: 40px; font-size: 1rem; border-radius: 12px; }
  .brand-lines strong { font-size: 0.9375rem; }
  .nav-shell { gap: var(--sp-3); }
  .mobile-sticky-action .btn { gap: 8px; padding-inline: 12px; font-size: 0.9375rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { flex: none; width: 100%; }
  .review-controls { gap: 6px; }
  .round-arrow { width: 48px; height: 48px; }
  .contact-info-block { gap: var(--sp-4); }
  .contact-info-icon { width: 46px; height: 46px; }
}

/* 9. Спецрежими ---------------------------------------------------------- */

/* Без JavaScript: меню розгорнуте у звичайному потоці. */
@media (scripting: none) and (max-width: 1000px) {
  .site-header { position: relative; height: auto; }
  .nav-shell { flex-wrap: wrap; min-height: var(--header-h); padding-block: var(--sp-3); }
  .mobile-menu-toggle { display: none; }
  .nav-panel { position: static; width: 100%; padding: 0 0 var(--sp-2); visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .map-graphic-pin::after { display: none; }
}

@media (forced-colors: active) {
  .btn, .round-arrow, .booking-option, .service-card, .review-card, .map-card { border: 1px solid CanvasText; }
  .eyebrow-line, .section-heading-accent { background: CanvasText; }
}

@media print {
  .site-header { position: static; }
  .mobile-sticky-action, .booking-modal, .round-arrow, .map-graphic { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { padding: 0; }
  .reviews-track { flex-wrap: wrap; overflow: visible; }
  .review-card { flex-basis: 100%; break-inside: avoid; }
}
