/* ============================================================
   СТОМ «Пехра» — единый стилевой файл
   Палитра: mypalette.png (Gradients.app)
   #065fda primary · #1caffb accent · #172957 text/dark
   #f0f2f8 bg · #b9d1ec line · #88b1db muted-decor
   тёплые: #eebaa2 #d79e87 #bb856e #906557
   ⚠️ На #1caffb белым текстом писать НЕЛЬЗЯ (низкий контраст) —
   только декор и hover-состояния.
   ============================================================ */

/* --- Локальные шрифты (woff2, без CDN) --- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/montserrat-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/montserrat-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/montserrat-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/montserrat-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}

/* --- Дизайн-токены --- */
:root {
  --color-bg: #f0f2f8;
  --color-surface: #ffffff;
  --color-primary: #065fda;
  --color-primary-hover: #1caffb; /* только декор/hover, НЕ фон для белого текста */
  --color-text: #172957;
  --color-text-muted: #52648c; /* производный от #172957 + #88b1db, контраст ≥ 4.5:1 */
  --color-decor: #88b1db;
  --color-line: #b9d1ec;
  --color-warm: #eebaa2;
  --color-warm-deep: #d79e87;
  --color-warm-dark: #906557;
  --gradient-brand: linear-gradient(135deg, #065fda 0%, #1caffb 100%);
  --font-head: 'Montserrat', 'Arial', sans-serif;
  --font-body: 'Inter', 'Arial', sans-serif;
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --shadow-s: 0 2px 10px rgba(23, 41, 87, 0.06);
  --shadow-m: 0 10px 30px rgba(23, 41, 87, 0.10);
  --shadow-l: 0 20px 50px rgba(6, 95, 218, 0.16);
  --container: 1200px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

h1 { font-size: clamp(1.9rem, 5.2vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--color-primary); text-decoration: none; }

ul, ol { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--color-primary-hover);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section--surface { background: var(--color-surface); }

.section__over {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(28, 175, 251, 0.14);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.section__head { max-width: 720px; margin-bottom: 36px; }
.section__head p { color: var(--color-text-muted); font-size: 1.05rem; }

.text-accent { color: var(--color-primary); }

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(6, 95, 218, 0.35);
}
.btn--primary .btn__icon { color: #fff; }

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-line);
}
.btn--ghost .btn__icon { color: var(--color-primary); }

.btn--light {
  background: #fff;
  color: var(--color-primary);
}
.btn--light .btn__icon { color: var(--color-primary); }

.btn__icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* hover — только на устройствах с hover, против «залипания» на тачах */
@media (hover: hover) {
  .btn--primary:hover { background: var(--color-primary-hover); color: var(--color-text); box-shadow: 0 10px 26px rgba(28, 175, 251, 0.45); transform: translateY(-2px); }
  .btn--primary:hover .btn__icon { color: var(--color-text); }
  .btn--ghost:hover { border-color: var(--color-primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-s); }
  .btn--light:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18); }
}

.btn:active { transform: translateY(0); }

/* --- Шапка --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.logo__mark { width: 38px; height: 38px; flex: 0 0 auto; }
.logo__sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.nav { margin-left: auto; }

.nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: block;
  padding: 9px 11px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--color-text);
  transition: background 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .nav__link:hover { background: rgba(28, 175, 251, 0.14); color: var(--color-primary); }
}

.nav__link.active {
  background: var(--color-primary);
  color: #fff;
}

.header__contacts {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.header__phone {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--color-text);
}

.header__cta { padding: 11px 16px; font-size: 0.82rem; white-space: nowrap; }

/* Бургер */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Круглая кнопка звонка — только в мобильной шапке (< 1280px), слева от бургера */
.header__call { display: none; }
@media (max-width: 1279px) {
  .header__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    margin-left: auto;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }
  .header__call svg { width: 21px; height: 21px; }
  .header__call:active { background: var(--color-primary); color: #fff; }
  .burger { margin-left: 10px; }
}
@media (hover: hover) and (max-width: 1279px) {
  .header__call:hover { background: rgba(28, 175, 251, 0.14); }
}

/* Мобильное меню */
@media (max-width: 1279px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-m);
    padding: 12px 20px 20px;
    opacity: 0;
    transform: translateY(-10px);
    transform-origin: top center;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .nav--open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
  }
  .nav__list { flex-direction: column; gap: 2px; }
  .nav__link { padding: 14px 16px; font-size: 1.05rem; }
}

@media (min-width: 1280px) {
  .burger { display: none; }
  .header__contacts { display: flex; }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 48px 0 0;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 36px;
  align-items: center;
  padding-bottom: 90px;
}

.hero__title { margin-bottom: 18px; }

.hero__text {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  max-width: 34em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 22px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow-s);
}

.hero__badges svg { width: 16px; height: 16px; color: var(--color-primary); }

.hero__media {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  border: 6px solid #fff;
}

.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 95, 218, 0) 55%, rgba(6, 95, 218, 0.35) 100%);
}

.hero__wave { display: block; width: 100%; height: auto; margin-bottom: -2px; }

/* Точечный декор из фирменного стиля */
.dots {
  position: absolute;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(var(--color-decor) 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero { padding-top: 64px; }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; padding-bottom: 120px; }
  .hero__media { min-height: 480px; }
}

/* --- Карточки-сетки --- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  padding: 26px;
  box-shadow: var(--shadow-s);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: var(--color-primary-hover); }
}

.card__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(28, 175, 251, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; color: var(--color-primary); }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-text-muted); font-size: 0.95rem; flex: 1; }

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--color-line);
}

.card__price {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--color-primary);
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}
.card__more svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
@media (hover: hover) {
  .card__more:hover svg { transform: translateX(4px); }
}

/* --- Особенности (плашки) --- */
.feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  padding: 20px;
  box-shadow: var(--shadow-s);
}
.feature__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature__icon svg { width: 24px; height: 24px; color: #fff; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); }

/* --- Врачи --- */
.doctor {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
@media (hover: hover) {
  .doctor:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); }
}
.doctor__photo { aspect-ratio: 4 / 4.6; overflow: hidden; background: linear-gradient(180deg, #eaf3fd 0%, #d6e7f9 100%); }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doctor__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.doctor__spec {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.doctor__name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; margin-bottom: 8px; }
.doctor__exp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.doctor__exp svg { width: 15px; height: 15px; color: var(--color-primary); }
.doctor__edu { font-size: 0.88rem; color: var(--color-text-muted); margin-top: 10px; }

/* --- Бонусная программа --- */
.bonus {
  position: relative;
  border-radius: var(--radius-l);
  background: var(--gradient-brand);
  color: #fff;
  padding: 44px 28px;
  overflow: hidden;
}
.bonus::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(238, 186, 162, 0.35); /* тёплый акцент палитры */
}
.bonus::after {
  content: '';
  position: absolute;
  right: 40px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.bonus h2 { color: #fff; }
.bonus p { color: rgba(255, 255, 255, 0.9); max-width: 46em; }
.bonus__grid {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .bonus__grid { grid-template-columns: repeat(3, 1fr); } }
.bonus__item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-m);
  padding: 22px;
  backdrop-filter: blur(4px);
}
.bonus__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 8px;
}
.bonus__item p { margin: 0; font-size: 0.92rem; }

/* --- Отзывы --- */
.review {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  padding: 26px;
  box-shadow: var(--shadow-s);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(238, 186, 162, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.review__mark svg { width: 22px; height: 22px; color: var(--color-warm-dark); }
.review p { margin: 0; font-size: 0.95rem; flex: 1; }
.review__author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.review__author svg { width: 16px; height: 16px; color: var(--color-primary); }

/* --- Аккордеоны цен --- */
.acc {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}
.acc__count {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(28, 175, 251, 0.14);
  border-radius: 100px;
  padding: 5px 12px;
}
.acc__chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  transition: transform 0.3s ease;
}
.acc__btn[aria-expanded="true"] .acc__chevron { transform: rotate(180deg); }
.acc__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.acc__inner { padding: 0 22px 22px; overflow-x: auto; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.95rem;
  vertical-align: top;
}
.price-table th:last-child, .price-table td:last-child {
  text-align: right;
  font-family: var(--font-head);
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-primary);
}
.price-table tr:last-child td { border-bottom: 0; }
.price-table tr.price-subhead td {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  padding-top: 20px;
  background: linear-gradient(0deg, rgba(28, 175, 251, 0.06), rgba(28, 175, 251, 0.06));
  /* перебиваем td:last-child: подзаголовок занимает всю строку (colspan) */
  white-space: normal;
  text-align: left;
}

.price-note {
  margin-top: 26px;
  padding: 18px 22px;
  border-radius: var(--radius-m);
  background: rgba(238, 186, 162, 0.22);
  border: 1px solid var(--color-warm);
  font-size: 0.92rem;
  color: var(--color-text);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.price-note svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--color-warm-dark); margin-top: 2px; }

/* --- Галерея --- */
.gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery a {
  border-radius: var(--radius-s);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  aspect-ratio: 4 / 3;
  display: block;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
@media (hover: hover) {
  .gallery a:hover img { transform: scale(1.06); }
}

/* --- О клинике --- */
.about-split {
  display: grid;
  /* minmax(0, 1fr): без 0 колонка не сужается уже min-content (переполнение на 320px) */
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.about-split > * { min-width: 0; }
@media (min-width: 1024px) { .about-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.about-split__media {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-m);
}
.about-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--color-primary); margin-top: 3px; }

/* --- Контакты / карта --- */
.contacts-grid {
  display: grid;
  /* minmax(0, 1fr): защита от grid blowout на узких экранах */
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.contacts-grid > * { min-width: 0; }
@media (min-width: 1024px) { .contacts-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  padding: 28px;
  box-shadow: var(--shadow-s);
}
.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--color-line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(28, 175, 251, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-row__icon svg { width: 22px; height: 22px; color: var(--color-primary); }
.contact-row b { display: block; font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 2px; }
.contact-row a, .contact-row span { font-size: 1.02rem; font-weight: 500; color: var(--color-text); overflow-wrap: anywhere; }
/* Ссылки в контактах — фирменный синий (кликабельность видна и без наведения, в т.ч. на тачах) */
.contact-row a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: transparent; /* подчёркивание проявляется плавно при наведении */
  text-underline-offset: 3px;
  border-radius: 8px;
  padding: 1px 6px;
  margin: -1px -6px; /* компенсирует padding: подложка не сдвигает вёрстку */
  transition: color 0.2s ease, background 0.2s ease, text-decoration-color 0.2s ease;
}
@media (hover: hover) {
  .contact-row a:hover {
    color: #0550b8;
    background: rgba(28, 175, 251, 0.12);
    text-decoration-color: currentColor;
  }
}

.map-card {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-m);
  background: var(--color-surface);
}
.map-card img { width: 100%; display: block; }
.map-card__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.map-card__bar p { margin: 0; font-size: 0.85rem; color: var(--color-text-muted); }
.map-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- CTA-полоса --- */
.cta-band {
  border-radius: var(--radius-l);
  background: var(--color-text);
  color: #fff;
  padding: 40px 28px;
  display: grid;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(28, 175, 251, 0.25);
}
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: rgba(255, 255, 255, 0.75); margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; position: relative; z-index: 1; }
@media (min-width: 1024px) { .cta-band { grid-template-columns: 1.3fr 1fr; padding: 48px; } }

/* --- Подвал --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 64px;
}
.footer__grid {
  display: grid;
  gap: 32px;
  padding: 52px 0 36px;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1.2fr; } }
.footer .logo { color: #fff; }
.footer__slogan { font-size: 0.9rem; margin-top: 14px; max-width: 24em; }
.footer h3 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer__menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__menu a { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; transition: color 0.2s ease; }
@media (hover: hover) { .footer__menu a:hover { color: var(--color-primary-hover); } }
.footer__contact { display: grid; gap: 12px; font-size: 0.95rem; }
.footer__contact a { color: #fff; font-weight: 600; }
.footer__social { display: flex; gap: 12px; margin-top: 16px; }
.footer__social a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .footer__social a:hover { background: var(--color-primary); transform: translateY(-3px); }
}
.footer__social svg { width: 22px; height: 22px; color: #fff; }
.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer__legal a { color: rgba(255, 255, 255, 0.75); }

.hidden { display: none !important; } /* утилита: иконка MAX до получения ссылки */

/* --- Утилитарные классы (вместо inline-стилей) --- */
.section--flush { padding-top: 0; }
.section__over--light { background: rgba(255, 255, 255, 0.18); color: #fff; }
.logo__sub--light { color: #1caffb; }
.dots--hero { top: 60px; right: 8%; }
.doctor__photo--wide { aspect-ratio: 4 / 3.4; }
.mt-26 { margin-top: 26px; }
/* Утилита для заготовок: скрытый блок (например, кнопка Telegram-бота до появления ссылки) */
.hidden { display: none !important; }
.price-note--spaced { margin-top: 36px; }
.acc h2 { margin: 0; }

/* Узкие экраны: компактнее таблица цен */
@media (max-width: 480px) {
  .acc__inner { padding: 0 14px 16px; }
  .price-table th, .price-table td { padding: 10px 6px; font-size: 0.88rem; }
}

/* --- Кнопка «Наверх» --- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-m);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 90;
}
.to-top svg { width: 22px; height: 22px; }
.to-top--visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- Страница политики --- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.3rem; margin-top: 36px; }
.prose p, .prose li { color: var(--color-text-muted); font-size: 0.98rem; }

/* --- Хлебные крошки / заголовок внутренней страницы --- */
.page-head { padding: 40px 0 0; }
.page-head p { color: var(--color-text-muted); max-width: 46em; font-size: 1.05rem; }

/* Уменьшение анимаций по системной настройке */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Карусель фирменных карточек команды (главная) */
.cards { position: relative; }
.cards__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 14px;
}
.cards__track::-webkit-scrollbar { display: none; }
.cards__item {
  flex: 0 0 min(300px, 76vw);
  scroll-snap-align: center;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-m);
  background: #eaf3fd;
}
.cards__item img { width: 100%; height: auto; display: block; }
.cards__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-m);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.cards__btn:hover { background: var(--color-primary-hover); }
.cards__btn svg { width: 20px; height: 20px; }
.cards__btn--prev { left: -10px; }
.cards__btn--next { right: -10px; }

/* Карусель акций: карточки-ссылки 9:16 */
.cards__item--promo { display: block; flex-basis: min(320px, 78vw); color: inherit; text-decoration: none; }
.cards__item--promo img { width: 100%; height: auto; display: block; }

/* Логотип-надпись (как на фирменных карточках): СТ + контур зуба + М, снизу ПЕХРА */
.logo__sign { height: 38px; width: auto; display: block; }
.logo__t { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 30px; }
.logo__pekhra { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 9.5px; letter-spacing: 0.36em; }
.footer .logo__sign { height: 44px; }

/* Адрес в шапке рядом с логотипом */
.header__addr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.header__addr svg { width: 15px; height: 15px; color: var(--color-primary); flex: none; }
.header__addr:hover { color: var(--color-primary); }
.header__addr-full { display: none; }
@media (max-width: 480px) {
  .header__addr { font-size: 0.78rem; margin-left: 8px; gap: 5px; }
  .logo__sign { height: 34px; }
}

/* Главная «Почему мы»: вытянутая нижняя карточка (бонусная программа) */
.feature--wide { grid-column: 1 / -1; align-items: center; }
.feature--wide .feature__icon { flex: none; }

/* Пояснения на странице цен */
.page-head__note {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 14px 0 0;
}
.text-note { color: var(--color-text-muted); font-size: 0.92rem; margin: 0 0 18px; }
/* Сноска прямо под строкой прайса (переопределяет стили последней ячейки таблицы) */
.price-table tr.price-hint td,
.price-table tr.price-hint td:last-child {
  padding-top: 0;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: normal;
}
/* Строка со сноской: без нижней границы — сливается со сноской визуально */
.price-table tr.price-noted td { border-bottom: 0; }

/* Страница «Акции и публикации» */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.promo {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.promo__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.promo__visual {
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #065fda 0%, #1caffb 100%);
  color: #fff;
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
}
.promo__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.promo__badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  background: #e3eefc;
  border-radius: 999px;
  padding: 4px 12px;
}
.promo__title { margin: 0; font-size: 1.15rem; }
.promo__text { color: var(--color-text-muted); font-size: 0.95rem; margin: 0; flex: 1; }

/* Горизонтальная полоса соцсетей (страница «Акции») */
.social-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  padding: 26px 30px;
}
.social-strip__text h2 { margin: 10px 0 8px; font-size: 1.3rem; }
.social-strip__text p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; max-width: 560px; }
.social-strip__actions { display: flex; gap: 10px; flex: 0 0 auto; }
@media (max-width: 720px) {
  .social-strip { flex-direction: column; align-items: flex-start; }
  .social-strip__actions { flex-wrap: wrap; }
}
/* Совсем узкие экраны: кнопки соцполосы — стопкой на всю ширину карточки */
@media (max-width: 420px) {
  .social-strip__actions { flex-direction: column; width: 100%; }
  .social-strip__actions .btn { width: 100%; justify-content: center; }
  /* Длинные кнопки («Познакомиться с врачами») переносят текст, иначе не влезают в 320px */
  .about-split .btn { white-space: normal; max-width: 100%; }
}

/* Карусель публикаций: карточка = картинка + текст, листается целиком */
.cards__track--posts { align-items: stretch; }
.post {
  display: flex;
  flex-direction: column;
  flex-basis: min(340px, 82vw);
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}
.post__img {
  width: 100%;
  aspect-ratio: 500 / 267;
  object-fit: cover;
  display: block;
}
.post__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}
.post__title { margin: 0; font-size: 1.05rem; }
.post__text { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.5; }
.post__more {
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 0 0;
  border: none;
  background: none;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
@media (hover: hover) {
  .post__more:hover { text-decoration: underline; }
}

/* Модальное окно полного текста публикации */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300; /* выше шапки (100) и skip-link (200) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 41, 87, 0.55);
}
.modal__dialog {
  position: relative;
  width: min(640px, 100%);
  /* dvh — динамическая высота вьюпорта: учитывает панели Safari на iOS (фолбэк — vh) */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-m);
  box-shadow: 0 24px 60px rgba(23, 41, 87, 0.35);
}
.modal__img {
  width: 100%;
  aspect-ratio: 500 / 267;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}
/* Скроллится только текст: фото и крестик остаются на месте; overscroll-behavior — прокрутка «в упор» не уходит на страницу */
.modal__body {
  padding: 20px 24px 26px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal__title { margin: 0 44px 10px 0; font-size: 1.25rem; }
/* pre-line: в текстах публикаций из posts.js есть абзацы и списки (\n) — сохраняем их в окне */
.modal__text { margin: 0; color: var(--color-text-muted); font-size: 1rem; line-height: 1.6; white-space: pre-line; }
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-m);
  transition: transform 0.2s ease;
}
.modal__close svg { width: 18px; height: 18px; }

/* Телефон: окно во весь экран — тексту больше места, крестик всегда виден */
@media (max-width: 720px) {
  .modal { padding: 0; }
  .modal__dialog {
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
}
@media (hover: hover) {
  .modal__close:hover { transform: scale(1.08); }
}
