/* ===== Variables ===== */
:root {
  --color-navy: #0f5c56;
  --color-navy-dark: #0a3f3b;
  --color-accent: #2bb3a3;
  /* Тёмный акцент подтянут с #1f8f82: им набран текст (роль врача,
     ссылки, теги), а на белом он давал 3.96 при норме 4.5.
     #127066 даёт 5.94 на белом и 5.55 на фоне страницы. */
  --color-accent-dark: #127066;
  /* Акцент для тёмных блоков: на #0f5c56 даёт 4.94,
     тогда как фирменный #2bb3a3 — только 3.01. */
  --color-accent-light: #7fded1;
  --color-bg: #f4f8f7;
  --color-white: #ffffff;
  --color-text: #1c2422;
  --color-text-muted: #5c6b68;
  --color-border: #e0e8e6;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(15, 92, 86, 0.08);
  --container: 1160px;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Шапка липкая (position: sticky), поэтому без отступа цель якоря
   и цель skip-ссылки оказываются под ней. Высоту шапки считает
   скрипт: она разная на разных ширинах (89 при 900, 79 при 375).
   Число в запасном значении — на случай, если скрипт не загрузился. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h, 90px) + 12px); }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

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

h1, h2, h3, h4 { font-weight: 800; line-height: 1.25; color: var(--color-navy); }

h2.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 12px;
}

.section-lead {
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 620px;
  margin-bottom: 40px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--color-white); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 12px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--accent {
  background: var(--color-accent);
  /* Белым по бирюзовому — 2.60. Тёмная надпись на том же фоне даёт
     6.10 и сохраняет фирменный цвет кнопки. */
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(43, 179, 163, 0.35);
}
/* Наведение только притемняет фон: надпись остаётся тёмной, 5.21. */
.btn--accent:hover { background: #25a596; }

.btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--color-white);
}
.btn--outline:hover { border-color: var(--color-white); }
/* Часть кнопок несёт оба модификатора сразу. Побеждает .btn--ghost,
   он идёт ниже и красит текст в тёмно-зелёный. На белых карточках
   это верно, а на тёмных блоках надпись сливалась с фоном: на
   главной «Смотреть каталог услуг» давал 1.00. Красим по
   контейнеру, а не по набору классов кнопки. */
.hero .btn--ghost,
.page-header .btn--ghost,
.cta-banner .btn--ghost,
.emergency-cta .btn--ghost,
.split-media .btn--ghost,
.footer .btn--ghost {
  color: var(--color-white);
  border-color: rgba(255,255,255,0.35);
}
.hero .btn--ghost:hover,
.page-header .btn--ghost:hover,
.cta-banner .btn--ghost:hover,
.emergency-cta .btn--ghost:hover,
.split-media .btn--ghost:hover,
.footer .btn--ghost:hover { border-color: var(--color-white); }

.btn--navy { background: var(--color-navy); color: var(--color-white); }
.btn--navy:hover { background: var(--color-navy-dark); }

.btn--block { width: 100%; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--color-navy);
  flex-shrink: 0;
}

.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo__mark svg { width: 22px; height: 22px; }

.logo__text span { display: block; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }

.nav { display: flex; align-items: center; gap: 30px; }

.nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a.is-active { color: var(--color-accent-dark); border-color: var(--color-accent); }

.nav-item-mega { position: relative; display: flex; align-items: center; }
.nav-mega-trigger { display: flex; align-items: center; }
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(15, 92, 86, 0.16);
  padding: 20px 28px 28px;
  width: min(980px, 90vw);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}
.nav-item-mega:hover .mega-menu,
.nav-item-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-menu__col .mega-menu__title {
  /* Заголовок колонки — span: без display: block у него не работают
     ни нижний отступ, ни отбивка, ни разделитель. */
  display: block;
  font-weight: 800;
  line-height: 1.25;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.mega-menu__col ul li { margin-bottom: 9px; }
.mega-menu__col ul li a { font-size: 13px; color: var(--color-text-muted); line-height: 1.4; }
.mega-menu__col ul li a:hover { color: var(--color-accent-dark); }
.mega-menu__col .mega-more { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--color-accent-dark); }
.mega-menu__col--all {
  background: var(--color-bg);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mega-menu__col--all p { font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; }
.mega-menu__col--all .btn { padding: 10px 16px; font-size: 13.5px; }

@media (max-width: 1200px) { .mega-menu { grid-template-columns: repeat(4, 1fr); width: min(860px, 92vw);} }
@media (max-width: 1000px) { .mega-menu { grid-template-columns: repeat(3, 1fr); } }

.header__actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }

.header__phone { font-weight: 800; font-size: 16px; color: var(--color-navy); white-space: nowrap; }
.header__phone span { display: block; font-size: 12px; font-weight: 500; color: var(--color-text-muted); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-navy); border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,179,163,0.30) 0%, rgba(43,179,163,0) 70%);
}
.hero__inner {
  padding: 88px 0 76px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  position: relative;
}
.hero h1 { color: var(--color-white); font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 20px; }
.hero p { color: rgba(255,255,255,0.78); font-size: 17px; max-width: 520px; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, auto); gap: 32px; }
.hero__stats div b { display: block; font-size: 28px; color: var(--color-white); }
/* 0.65 давало 4.32 на светлом конце градиента. */
.hero__stats div span { font-size: 13px; color: rgba(255,255,255,0.72); }
.hero__panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(6px);
}
/* В разметке панели стоит h2 (чтобы не рвать уровни заголовков),
   а покрашен был только h3 — h2 брал общий тёмный цвет заголовков. */
.hero__panel h2,
.hero__panel h3 { color: var(--color-white); font-size: 19px; margin-bottom: 18px; }
.hero__panel-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.82);
  font-size: 14.5px;
}
.hero__panel-list li:first-child { border-top: none; }
.hero__panel-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--color-accent-light); }

/* ===== Page header ===== */
.page-header {
  background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: var(--color-white);
  padding: 56px 0;
}
.page-header .eyebrow,
.hero .eyebrow,
.cta-banner .eyebrow,
.split-media .eyebrow { color: var(--color-accent-light); }
/* Одиночные .accordion__item без обёртки .accordion встречаются
   на 14 страницах — даём им ту же рамку, иначе вопрос выглядит
   голой строкой. */
.accordion__item:not(.accordion .accordion__item) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  margin-bottom: 10px;
}
.emergency-cta .eyebrow,
.emergency-cta__label { color: #d0f0eb; }
.page-header h1 { color: var(--color-white); font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 10px; }
.page-header p { color: rgba(255,255,255,0.75); max-width: 620px; }
/* 0.55 давало 3.57 на светлом конце градиента. */
.breadcrumbs { font-size: 13px; color: rgba(255,255,255,0.72); margin-bottom: 16px; }
.breadcrumbs a { color: rgba(255,255,255,0.8); }

/* ===== Advantages ===== */
.advantages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.advantage-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.advantage-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.advantage-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(43,179,163,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.advantage-card__icon svg { width: 24px; height: 24px; color: var(--color-accent-dark); }
.advantage-card h3 { font-size: 17px; margin-bottom: 8px; }
.advantage-card p { color: var(--color-text-muted); font-size: 14.5px; }

/* ===== Services grid ===== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card__head {
  padding: 22px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--color-border);
}
.service-card__head .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-card__head .icon svg { width: 22px; height: 22px; color: var(--color-white); }
.service-card__head h3 { font-size: 16.5px; }
.service-card ul { padding: 18px 24px 22px; flex-grow: 1; }
.service-card li { font-size: 14px; color: var(--color-text-muted); padding: 6px 0; padding-left: 18px; position: relative; }
.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.service-card li a { color: inherit; transition: color 0.15s ease; }
.service-card li a:hover { color: var(--color-accent-dark); text-decoration: underline; }
.service-card__footer { padding: 0 24px 22px; }

/* ===== Process steps ===== */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.step { position: relative; padding-top: 8px; }
/* Номер шага — не водяной знак: при 0.12 контраст 1.21 при норме 3.0
   для крупного текста. 0.65 даёт 3.24 и остаётся приглушённым. */
.step__num { font-size: 32px; font-weight: 800; color: rgba(15,92,86,0.65); margin-bottom: 6px; }
.step h4 { font-size: 15.5px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--color-text-muted); }

/* ===== Reviews ===== */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 26px; }
/* Класс есть в разметке трёх страниц и не был описан: якорная
   навигация выглядела сплошной строкой ссылок. */
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-filter span a {
  display: inline-block; background: var(--color-white);
  border: 1px solid var(--color-border); border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; font-weight: 700;
  color: var(--color-navy); transition: border-color .15s ease, color .15s ease;
}
.blog-filter span a:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.review-card__stars { color: var(--color-accent-dark); font-size: 14px; margin-bottom: 12px; letter-spacing: 2px; }
.review-card p { font-size: 14.5px; color: var(--color-text); margin-bottom: 18px; }
.review-card__author { display: flex; align-items: center; gap: 12px; }
.review-card__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-navy); color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.review-card__author b { font-size: 14px; display: block; }
.review-card__author span { font-size: 12.5px; color: var(--color-text-muted); }

/* ===== CTA banner ===== */
.cta-banner {
  background: var(--color-navy);
  border-radius: 18px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: var(--color-white);
  flex-wrap: wrap;
}
.cta-banner h3 { color: var(--color-white); font-size: 24px; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.72); font-size: 14.5px; }

/* ===== About preview / split ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-navy), #17756c);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.split-media svg { width: 40%; height: 40%; color: rgba(255,255,255,0.18); }
.split-media__badge {
  position: absolute; bottom: 20px; left: 20px;
  background: var(--color-white); border-radius: 12px;
  padding: 14px 18px; box-shadow: var(--shadow);
}
.split-media__badge b { display: block; font-size: 22px; color: var(--color-navy); }
.split-media__badge span { font-size: 12px; color: var(--color-text-muted); }
.checklist li { display: flex; gap: 12px; padding: 10px 0; font-size: 15px; }
.checklist svg { width: 20px; height: 20px; color: var(--color-accent-dark); flex-shrink: 0; margin-top: 1px; }

/* ===== Stats bar ===== */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; background: var(--color-navy); border-radius: 16px; padding: 40px; color: var(--color-white); }
.stats-bar div { text-align: center; }
.stats-bar b { display: block; font-size: 32px; }
/* 0.65 на --color-navy давало 4.32. */
.stats-bar span { font-size: 13.5px; color: rgba(255,255,255,0.72); }

/* ===== Team ===== */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 26px 22px; text-align: center; }
.team-card__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(43,179,163,0.12); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.team-card__avatar svg { width: 34px; height: 34px; color: var(--color-accent-dark); }
.team-card h4 { font-size: 15.5px; margin-bottom: 4px; }
.team-card span { font-size: 13px; color: var(--color-text-muted); }

/* ===== Prices ===== */
.price-note {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 48px;
}
.price-category { margin-bottom: 44px; }
.price-category h3 { font-size: 19px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.price-category h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
.price-table { width: 100%; border-collapse: collapse; background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.price-table tr { border-top: 1px solid var(--color-border); }
.price-table tr:first-child { border-top: none; }
.price-table td { padding: 14px 22px; font-size: 14.5px; }
.price-table td:last-child { text-align: right; font-weight: 700; color: var(--color-navy); white-space: nowrap; }
.price-table td:first-child { color: var(--color-text); }

/* ===== Contacts ===== */
.contacts-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.contact-info-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 30px; margin-bottom: 20px; }
/* В разметке заголовок карточки — h3; правило для h4 осталось
   от версии, где уровни были другими. */
.contact-info-card h3, .contact-info-card h4 { font-size: 15px; margin-bottom: 4px; }
.contact-info-card p { font-size: 14.5px; color: var(--color-text-muted); }
.contact-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--color-border); }
.contact-row:first-child { border-top: none; padding-top: 0; }
.contact-row .icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(43,179,163,0.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-row .icon svg { width: 18px; height: 18px; color: var(--color-accent-dark); }
.map-placeholder {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background:
    /* Без цвета подложки сквозь прозрачные участки полос просвечивал
       светлый фон страницы: белый текст давал 3.80, иконка — 2.27. */
    linear-gradient(rgba(15,92,86,0.88), rgba(15,92,86,0.88)),
    repeating-linear-gradient(0deg, #17756c 0 2px, transparent 2px 40px),
    repeating-linear-gradient(90deg, #17756c 0 2px, transparent 2px 40px);
  background-color: var(--color-navy-dark);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-white); text-align: center; padding: 24px;
}
.map-placeholder svg { width: 32px; height: 32px; color: var(--color-accent-light); margin-bottom: 12px; }
/* На самом светлом участке подложки 0.85 давало 4.47 — берём чистый белый. */
.map-placeholder p { color: var(--color-white); font-size: 13.5px; margin-top: 6px; }

/* ===== Form ===== */
.form-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 30px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--color-navy); }
.form-row input, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border);
  border-radius: 8px; font-family: inherit; font-size: 14.5px;
  background: var(--color-bg); transition: border-color 0.15s ease;
}
/* Правило специфичнее общего :focus-visible и снимало кольцо
   с полей формы: с клавиатуры было видно только смену цвета рамки
   в один пиксель. */
.form-row input:focus, .form-row textarea:focus,
.form-row select:focus { border-color: var(--color-accent-dark); }
.form-row input:focus-visible, .form-row textarea:focus-visible,
.form-row select:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--color-navy);
}
.form-note { font-size: 12.5px; color: var(--color-text-muted); margin-top: 12px; }
/* Правила display сильнее атрибута hidden, поэтому без этой строки
   скрытые блоки остаются на виду. Нужно всей странице, не только форме. */
[hidden] { display: none !important; }
.form-fail {
  background: #fdecea; border: 1px solid #f3bdb8; color: #8a1f1a;
  padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px;
}
.form-fail a { color: inherit; text-decoration: underline; }
.form-success { display: none; background: #e9f8ee; border: 1px solid #b7e6c6; color: #1e6b3a; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.form-success.is-visible { display: block; }

/* ===== Blog ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.blog-card__tag {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-accent-dark); background: rgba(43,179,163,0.12); padding: 4px 10px; border-radius: 999px;
}
.blog-card__tag--news { color: var(--color-navy); background: rgba(15,92,86,0.08); }
.blog-card__date { font-size: 12.5px; color: var(--color-text-muted); }
.blog-card h3 { font-size: 17px; margin-bottom: 10px; }
.blog-card p { font-size: 14.5px; color: var(--color-text-muted); flex-grow: 1; }

/* ===== Brands strip ===== */
.brands-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.brands-strip span { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 999px; padding: 10px 20px; font-size: 13.5px; font-weight: 700; color: var(--color-text-muted); }

/* ===== Footer ===== */
.footer { background: var(--color-navy-dark); color: rgba(255,255,255,0.65); padding: 56px 0 28px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer .logo { color: var(--color-white); margin-bottom: 14px; }
.footer .logo__mark { background: var(--color-accent); }
.footer p { font-size: 14px; line-height: 1.7; }
.footer .footer__title { font-weight: 800; line-height: 1.25; color: var(--color-white); font-size: 14px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer ul li { margin-bottom: 10px; font-size: 14px; }
.footer ul a:hover { color: var(--color-white); }
.footer__bottom { padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 10px; }

/* ===== Service banner image ===== */
.service-banner {
  width: 100%;
  aspect-ratio: 21 / 6;
  overflow: hidden;
}
.service-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.category-banner {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 6;
  margin-bottom: 16px;
}
.category-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Detail page ===== */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.detail-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.detail-card h2 { font-size: 20px; margin-bottom: 14px; }
.detail-card p { color: var(--color-text-muted); font-size: 15px; margin-bottom: 12px; }
.detail-card ul li { padding: 8px 0 8px 22px; position: relative; font-size: 14.5px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); }
.detail-card ul li:first-child { border-top: none; }
.detail-card ul li::before { content: "✓"; position: absolute; left: 0; top: 8px; color: var(--color-accent-dark); font-weight: 700; }
.detail-sidebar { position: sticky; top: 96px; }
.detail-fact-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.detail-fact-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); margin-bottom: 6px; }
.detail-fact-card .value { font-size: 22px; font-weight: 800; color: var(--color-navy); margin-bottom: 4px; }
.detail-fact-card .value--muted { font-size: 15px; color: var(--color-text-muted); font-weight: 700; }
.detail-fact-row { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.detail-fact-row:first-child { border-top: none; }
.detail-fact-row span:first-child { color: var(--color-text-muted); }
.detail-fact-row span:last-child { font-weight: 700; color: var(--color-navy); }
.related-list li a { display: block; padding: 10px 0; border-top: 1px solid var(--color-border); font-size: 13.5px; color: var(--color-text-muted); }
.related-list li:first-child a { border-top: none; }
.related-list li a:hover { color: var(--color-accent-dark); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 48px; }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

@media (max-width: 720px) {
  .header__bar { gap: 12px; }
  .logo { flex-shrink: 1; min-width: 0; gap: 8px; }
  .logo__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo__text span { display: none; }
  .header__actions { gap: 8px; }
  .header__actions .btn { padding: 10px 14px; font-size: 13.5px; }
  .advantages { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; text-align: center; padding: 36px 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; }
  .hero__stats { grid-template-columns: repeat(3, auto); gap: 20px; }
  .section { padding: 52px 0; }
}

/* =========================================================================
   Дополнения: доступность, выпадающее меню, врачи, FAQ, статьи, цены, формы
   ========================================================================= */

/* ---- Доступность ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--color-navy); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0; font-weight: 700; font-size: 14px;
}
.skip-link:focus { left: 0; }

/* Кольцо фокуса двойное: светлое внутри, тёмное снаружи. Одно
   кольцо любого цвета пропадает либо на белом фоне, либо на тёмном
   градиенте шапки, а прежний #2bb3a3 давал на белом 2.60 при
   норме 3.0 для нетекстовых элементов. */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 0;
  /* Без border-radius: кольцо повторяет форму самого элемента,
     иначе круглая плавающая кнопка при фокусе становится
     почти квадратной. */
  box-shadow: 0 0 0 6px var(--color-navy);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Шапка: телефон-ссылка и выпадающее меню ---- */
a.header__phone { text-decoration: none; }
a.header__phone:hover { color: var(--color-accent-dark); }
.nav-chevron { width: 14px; height: 14px; margin-left: 3px; flex-shrink: 0; }

.nav-item-drop { position: relative; display: flex; align-items: center; }
.nav-drop-trigger { display: flex; align-items: center; }
.drop-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: 0 14px 40px rgba(15,92,86,0.14);
  padding: 12px; min-width: 250px; z-index: 60;
  opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease;
}
.nav-item-drop:hover .drop-menu,
.nav-item-drop:focus-within .drop-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.drop-menu ul li a {
  display: block; padding: 9px 12px; font-size: 14px; border-radius: 6px;
  color: var(--color-text-muted); border: none;
}
.drop-menu ul li a:hover { background: var(--color-bg); color: var(--color-accent-dark); }
.mega-menu__col--all .mega-more { display: block; margin-top: 12px; }

/* ---- Подвал ---- */
/* Номер лицензии — не декор: его читают. 0.5 давало 4.17. */
.footer__license { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,0.62); line-height: 1.5; }
.footer__bottom a { text-decoration: underline; text-underline-offset: 2px; }
.footer__bottom a:hover { color: var(--color-accent); }
/* Колонки подвала были h5 без класса, поэтому написанное для них
   правило .footer .footer__title никогда не применялось. Уровень
   подняли до h2, класс вернули — оформление стало тем, что задумано. */

/* ---- Общие мелочи ---- */
.btn--sm { padding: 10px 16px; font-size: 13.5px; }
.section-more { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.link-arrow {
  display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700;
  color: var(--color-accent-dark);
}
.link-arrow:hover { color: var(--color-navy); }
.blog-card__footer { margin-top: 16px; }
.checklist--minus li svg { display: none; }
.checklist--minus li { padding-left: 22px; position: relative; }
.checklist--minus li::before {
  content: "—"; position: absolute; left: 0; top: 10px;
  color: var(--color-text-muted); font-weight: 700;
}

/* ---- Врачи ---- */
.doctors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.doctors-grid--4 { grid-template-columns: repeat(4, 1fr); }
.doctor-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.doctor-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.doctor-card__photo {
  display: flex; align-items: center; justify-content: center;
  /* Светлый конец градиента давал инициалам 2.37. */
  aspect-ratio: 4/3; background: linear-gradient(135deg, #0a3f3b 0%, #17796e 100%);
}
.doctor-card--compact .doctor-card__photo { aspect-ratio: 3/2; }
.doctor-card__initials {
  font-size: 40px; font-weight: 800; color: var(--color-white); letter-spacing: 1px;
}
.doctor-card__body { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.doctor-card__body h3 { font-size: 16.5px; margin-bottom: 4px; }
.doctor-card__body h3 a:hover { color: var(--color-accent-dark); }
.doctor-card__role { font-size: 13.5px; color: var(--color-accent-dark); font-weight: 700; }
.doctor-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0;
  font-size: 12.5px; color: var(--color-text-muted);
}
.doctor-card__body p { font-size: 14px; color: var(--color-text-muted); flex-grow: 1; }

.doctor-hero { display: grid; grid-template-columns: 160px 1fr; gap: 24px; margin-bottom: 24px; align-items: center; }
.doctor-hero__photo {
  aspect-ratio: 1; border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center;
  /* Светлый конец градиента давал инициалам 2.42 при норме 3.0. */
  background: linear-gradient(135deg, #0a3f3b 0%, #17796e 100%);
}
.doctor-hero__photo span { font-size: 46px; font-weight: 800; color: var(--color-white); }
.doctor-quote {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent); border-radius: var(--radius);
  padding: 22px 24px; font-size: 15px; line-height: 1.65; color: var(--color-text);
  font-style: italic;
}
.related-list--rich li a { display: block; padding: 4px 0; }
.related-list--rich li a span { display: block; font-size: 12.5px; color: var(--color-text-muted); font-style: normal; }

.doctor-mini__row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.doctor-mini__avatar {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-navy); color: #fff; font-weight: 800; font-size: 14px;
}
.doctor-mini__text b { display: block; font-size: 14px; color: var(--color-navy); }
.doctor-mini__text > span { font-size: 12.5px; color: var(--color-text-muted); }

/* ---- Аккордеон / FAQ ---- */
/* overflow: hidden срезал внешнее кольцо фокуса на summary.
   clip скругление всё равно не даст, поэтому убираем его
   и скругляем крайние элементы по отдельности. */
.accordion { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-white); }
.accordion > .accordion__item:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.accordion > .accordion__item:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.accordion--wide { max-width: 860px; }
.accordion__item { border-top: 1px solid var(--color-border); }
.accordion__item:first-child { border-top: none; }
.accordion__item > summary {
  list-style: none; cursor: pointer; padding: 18px 48px 18px 22px;
  font-weight: 700; font-size: 15px; color: var(--color-navy); position: relative;
}
.accordion__item > summary::-webkit-details-marker { display: none; }
.accordion__item > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--color-accent-dark);
  border-bottom: 2px solid var(--color-accent-dark);
  transform: rotate(45deg); transition: transform .18s ease;
}
.accordion__item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.accordion__item > summary:hover { background: var(--color-bg); }
.accordion__body { padding: 0 22px 20px; }
.accordion__body p { font-size: 14.5px; color: var(--color-text-muted); line-height: 1.7; }

.faq-wrap { max-width: 880px; }
.faq-group { margin-bottom: 40px; scroll-margin-top: 100px; }
.faq-group__title { font-size: 21px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.faq-group__title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }

/* ---- Цены ---- */
.price-table thead th {
  text-align: left; padding: 14px 22px; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-text-muted); background: var(--color-bg);
  font-weight: 700; border-bottom: 1px solid var(--color-border);
}
.price-table thead th:last-child { text-align: right; }
.price-table--3col td:last-child, .price-table--3col thead th:last-child { text-align: left; }
.price-table--3col td:nth-child(2) { font-weight: 700; color: var(--color-navy); white-space: nowrap; }
.price-table .td-note { font-size: 13px; color: var(--color-text-muted); font-weight: 500; }
.price-category { scroll-margin-top: 100px; }

.price-highlights {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 36px;
}
.price-highlights div {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 24px 22px;
}
.price-highlights b { display: block; font-size: 26px; color: var(--color-navy); margin-bottom: 6px; }
.price-highlights span { font-size: 13.5px; color: var(--color-text-muted); line-height: 1.5; }
.price-note a { color: var(--color-accent-dark); font-weight: 700; }

/* ---- Страница услуги: новые блоки ---- */
.detail-card--intro { background: var(--color-bg); border-style: dashed; }
.detail-card--intro p { color: var(--color-text); font-size: 15.5px; margin-bottom: 0; }
.detail-card--warn { border-left: 4px solid #e0a800; }
.detail-note { font-size: 13.5px; color: var(--color-text-muted); margin-top: 14px; margin-bottom: 0; }
.detail-card ul.list-minus li::before { content: "!"; color: #c99400; }

.steps-list { counter-reset: st; }
.steps-list li {
  position: relative; padding: 14px 0 14px 46px; counter-increment: st;
  border-top: 1px solid var(--color-border); list-style: none;
}
.steps-list li:first-child { border-top: none; }
.steps-list li::before {
  content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--color-bg);
  color: var(--color-navy); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.steps-list li b { display: block; font-size: 15px; color: var(--color-navy); margin-bottom: 3px; }
.steps-list li span { font-size: 14.5px; color: var(--color-text-muted); line-height: 1.6; }

.detail-fact-card--price { border-color: var(--color-accent); }
.detail-fact-card--price .value { color: var(--color-accent-dark); }
.value-sub { font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 10px; }
.price-hint { font-size: 13px; color: var(--color-text-muted); margin: 10px 0 16px; line-height: 1.55; }
.detail-fact-card--links .related-list li a { font-weight: 700; }

.side-article { display: block; padding: 4px 0; }
.side-article b { display: block; font-size: 14.5px; color: var(--color-navy); margin-bottom: 6px; line-height: 1.4; }
.side-article span { font-size: 13px; color: var(--color-text-muted); line-height: 1.55; }
.side-article:hover b { color: var(--color-accent-dark); }

/* ---- Статьи блога ---- */
.article-body { max-width: 760px; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px;
  font-size: 13.5px; color: var(--color-text-muted);
  padding-bottom: 18px; border-bottom: 1px solid var(--color-border);
}
.article-meta a { color: var(--color-accent-dark); font-weight: 700; }
.article-body h2 { font-size: 23px; margin: 36px 0 14px; }
.article-body p { font-size: 16px; line-height: 1.75; color: var(--color-text); margin-bottom: 16px; }
.article-list { margin: 0 0 20px; }
.article-list li {
  position: relative; padding: 8px 0 8px 24px; font-size: 15.5px;
  line-height: 1.7; color: var(--color-text);
}
.article-list li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent);
}
.callout {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent); border-radius: var(--radius);
  padding: 20px 24px; margin: 24px 0; font-size: 15px; line-height: 1.7;
  color: var(--color-text);
}
.article-disclaimer {
  margin-top: 32px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--color-bg); border: 1px solid var(--color-border);
  font-size: 13px; color: var(--color-text-muted); line-height: 1.6;
}

/* ---- Отзывы ---- */
.reviews-grid--wide { grid-template-columns: repeat(3, 1fr); }
.review-card--full p { font-size: 15px; line-height: 1.7; }

/* ---- Документы ---- */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.doc-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 26px;
}
.doc-card h3 { font-size: 16px; margin-bottom: 10px; }
.doc-card p { font-size: 14px; color: var(--color-text-muted); line-height: 1.65; }

/* ---- Правовые страницы ---- */
.legal-wrap { max-width: 820px; }
.legal-block { margin-bottom: 32px; }
.legal-block h2 { font-size: 19px; margin-bottom: 12px; }
.legal-block p { font-size: 15px; line-height: 1.75; color: var(--color-text-muted); margin-bottom: 10px; }

/* ---- Формы ---- */
.form-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--color-text-muted); }
.form-consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.form-consent input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--color-accent-dark); }
.form-consent label { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.55; }
.form-consent label a { color: var(--color-accent-dark); font-weight: 700; text-decoration: underline; }
.form-row input[aria-invalid="true"], .form-row textarea[aria-invalid="true"] { border-color: #d9534f; }
.form-error { display: block; margin-top: 6px; font-size: 12.5px; color: #c9302c; }
.contact-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---- 404 ---- */
.notfound { max-width: 620px; margin: 0 auto; text-align: center; padding: 40px 0 60px; }
.notfound__code { font-size: 96px; font-weight: 800; color: var(--color-navy); line-height: 1; margin-bottom: 12px; }
.notfound h1 { font-size: 30px; margin-bottom: 12px; }
.notfound p { color: var(--color-text-muted); font-size: 16px; }
.notfound__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 32px; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; }
.notfound__links a { font-size: 14px; color: var(--color-accent-dark); font-weight: 700; }

/* ---- Адаптив для новых блоков ---- */
@media (max-width: 1100px) {
  .nav { gap: 18px; }
  .nav a { font-size: 14px; }
}
@media (max-width: 980px) {
  .doctors-grid, .doctors-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .price-highlights { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid--wide { grid-template-columns: repeat(2, 1fr); }
  .article-body { max-width: none; }
  .doctor-hero { grid-template-columns: 120px 1fr; }
}
@media (max-width: 720px) {
  .doctors-grid, .doctors-grid--4 { grid-template-columns: 1fr 1fr; }
  .doctor-card__body { padding: 16px; }
  .doctor-card__body h3 { font-size: 15px; }
  .doctor-card__initials { font-size: 30px; }
  .price-highlights { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .reviews-grid--wide { grid-template-columns: 1fr; }
  .doctor-hero { grid-template-columns: 1fr; }
  .doctor-hero__photo { max-width: 140px; }
  .notfound__code { font-size: 68px; }
  .article-body h2 { font-size: 20px; }
  .article-body p { font-size: 15.5px; }
  .price-table td, .price-table thead th { padding: 12px 14px; font-size: 13.5px; }
  .price-table--3col .td-note { display: none; }
  .price-table--3col thead th:last-child { display: none; }
  .accordion__item > summary { font-size: 14.5px; padding: 16px 42px 16px 16px; }
  .accordion__body { padding: 0 16px 18px; }

}
@media (max-width: 480px) {
  .doctors-grid, .doctors-grid--4 { grid-template-columns: 1fr; }
}

/* ---- Мега-меню: привязка к контейнеру шапки, чтобы не выходило за экран ---- */
@media (min-width: 1025px) {
  .header__bar { position: relative; }
  .header .nav-item-mega { position: static; }
  .header .nav-item-mega .mega-menu {
    left: 0; right: 0; width: auto; max-width: none;
    top: calc(100% + 10px);
    transform: translateY(6px);
    grid-template-columns: repeat(6, 1fr);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .header .nav-item-mega .mega-menu__col ul li { margin-bottom: 7px; }
  .header .nav-item-mega .mega-menu__col ul li a { font-size: 12.5px; }
  .header .nav-item-mega:hover .mega-menu,
  .header .nav-item-mega:focus-within .mega-menu { transform: translateY(0); }
}

/* ---- Незаполненные цены (прайс ещё не опубликован) ---- */
.price-table td.price-tbd { color: var(--color-text-muted); font-weight: 500; }

/* Неразрывная последняя колонка не давала таблице ужиматься: на 320px
   страница контактов уезжала вправо на 42 пикселя из-за таблицы
   реквизитов, цены и каталог — на 12. Перенос лучше, чем
   горизонтальная прокрутка всей страницы. */
@media (max-width: 480px) {
  .price-table td:last-child,
  .price-table--3col td:nth-child(2) { white-space: normal; }
  .price-table td, .price-table thead th { padding: 10px; }
  /* Длинные неразрывные названия вроде «металлокерамическая» держали
     таблицу шире экрана даже после переноса цены. */
  .price-table td:first-child, .price-table thead th:first-child {
    hyphens: auto; overflow-wrap: break-word;
  }
}
.detail-fact-card--price .value--tbd { color: var(--color-text-muted); min-height: 28px; }

/* =========================================================================
   Неотложная помощь, бренды, работы, виджет связи
   ========================================================================= */

/* ---- Кнопка «острая боль» в шапке ---- */
.header__urgent {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  color: #b3261e; background: #fdecea; border: 1px solid #f5c6c2;
  white-space: nowrap;
}
.header__urgent > span[aria-hidden] {
  width: 17px; height: 17px; border-radius: 50%; background: #b3261e; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}
.header__urgent:hover { background: #fbdedb; color: #8f1d17; }
.mega-more--urgent { color: #b3261e !important; }

/* ---- Блок вызова на странице неотложной помощи ---- */
.emergency-cta {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f5c56 0%, #14746c 100%);
  border-radius: 16px; padding: 36px 40px; color: #fff;
}
.emergency-cta__label {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  /* Градиент блока светлее остальных тёмных (до #14746c), поэтому
     здесь нужен более светлый акцент: #9fdcd3 давал 3.65. */
  color: #d0f0eb; margin-bottom: 8px;
}
.emergency-cta__phone {
  display: block; font-size: clamp(28px, 4.4vw, 40px); font-weight: 800;
  line-height: 1.1; color: #fff; margin-bottom: 8px;
}
.emergency-cta__phone:hover { color: #d0f0eb; }
/* 0.75 на светлом конце градиента давало 3.90. */
.emergency-cta p { font-size: 14.5px; color: rgba(255,255,255,0.88); margin: 0; }
.emergency-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.emergency-cta__actions .btn--outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.emergency-cta__actions .btn--outline:hover {
  background: rgba(255,255,255,0.12); border-color: #fff;
}

/* ---- Бренды ---- */
.brands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.brand-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.brand-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.brand-card__logo {
  display: flex; align-items: center; justify-content: center; padding: 26px 20px;
  background: var(--color-bg); border-bottom: 1px solid var(--color-border);
}
.brand-card__logo span {
  font-size: 21px; font-weight: 800; letter-spacing: .02em; color: var(--color-navy);
}
.brand-card__body { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.brand-card__body h3 { font-size: 16.5px; margin-bottom: 8px; }
.brand-card__body h3 a:hover { color: var(--color-accent-dark); }
.brand-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px;
  font-size: 12.5px; color: var(--color-text-muted);
}
.brand-card__body p { font-size: 14px; color: var(--color-text-muted); flex-grow: 1; line-height: 1.6; }

/* ---- Работы до/после ---- */
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.case-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden;
}
.case-card__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--color-border); }
.case-card__pair figure { position: relative; margin: 0; background: var(--color-bg); }
.case-card__pair img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.case-card__pair figcaption {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(15,92,86,0.85); color: #fff; font-size: 11.5px; font-weight: 700;
}
.case-card__body { padding: 24px; }
.case-card__body h3 { font-size: 17px; margin-bottom: 8px; }
.case-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px;
  font-size: 12.5px; color: var(--color-text-muted);
}
.case-card__body p { font-size: 14.5px; color: var(--color-text-muted); line-height: 1.65; margin-bottom: 10px; }
.case-card__body p b { color: var(--color-navy); }

.empty-state {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: var(--color-white); border: 1px dashed var(--color-border);
  border-radius: var(--radius); padding: 48px 32px;
}
.empty-state h2 { font-size: 22px; margin-bottom: 14px; }
.empty-state p { font-size: 15px; color: var(--color-text-muted); line-height: 1.7; margin-bottom: 12px; }

/* ---- Плавающая кнопка связи ---- */
.contact-fab { position: fixed; right: 20px; bottom: 20px; z-index: 300; }
.contact-fab__btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  /* Белый значок на бирюзовом — 2.60 при норме 3.0 для графики. */
  background: var(--color-accent); color: var(--color-text);
  box-shadow: 0 8px 24px rgba(15,92,86,0.32);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
/* Значок тёмный, поэтому при наведении фон только притемняется:
   с --color-accent-dark выходило 2.67 при норме 3.0 для графики. */
.contact-fab__btn:hover { background: #25a596; transform: scale(1.05); }
.contact-fab__btn svg { width: 24px; height: 24px; }
.contact-fab__menu {
  position: absolute; right: 0; bottom: 68px; width: 258px;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(15,92,86,0.18);
  padding: 8px; overflow: hidden;
}
.contact-fab__item { display: block; padding: 11px 14px; border-radius: 8px; }
.contact-fab__item:hover { background: var(--color-bg); }
.contact-fab__item b { display: block; font-size: 14px; color: var(--color-navy); }
.contact-fab__item span { font-size: 12.5px; color: var(--color-text-muted); }

@media print { .contact-fab, .header__urgent { display: none !important; } }

/* ---- Адаптив ---- */
/* Шапка плотная: 7 пунктов меню + телефон + две кнопки легко переполняют строку */
@media (max-width: 1499px) {
  .header__bar { gap: 14px; }
  .nav { gap: 20px; }
  /* Оставляем только значок: подпись съедает около 90px */
  .header__urgent { padding: 8px; gap: 0; }
  .header__urgent-text { display: none; }
}
@media (max-width: 1000px) {
  .header__urgent { display: none; }
}
@media (max-width: 980px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
  .emergency-cta { padding: 30px 26px; }
}
@media (max-width: 720px) {
  .brands-grid { grid-template-columns: 1fr; }
  .emergency-cta { flex-direction: column; align-items: flex-start; gap: 20px; }
  .emergency-cta__actions { width: 100%; }
  .emergency-cta__actions .btn { flex: 1 1 auto; text-align: center; }
  .contact-fab { right: 14px; bottom: 14px; }
  .contact-fab__menu { width: min(280px, calc(100vw - 28px)); }
  .empty-state { padding: 34px 22px; }
  .case-card__body { padding: 18px; }
}

/* ---- Навигация: 7 пунктов + телефон + две кнопки не помещаются в строку
   уже около 1250px, поэтому на планшетах и ниже уходим в бургер-меню ---- */
@media (max-width: 1024px) {
  .nav {
    /* Было жёстко 73px, а шапка выше: верх панели уходил под неё. */
    position: fixed; top: var(--header-h, 73px); left: 0; right: 0; bottom: 0;
    background: var(--color-white); flex-direction: column; align-items: flex-start;
    padding: 24px; gap: 4px; transform: translateX(-100%);
    /* visibility убирает ссылки закрытого меню из обхода клавиатурой:
       один сдвиг оставлял их фокусируемыми за краем экрана. */
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s ease;
    overflow-y: auto; z-index: 90;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .nav-toggle { display: flex; flex-shrink: 0; }
  .nav-item-mega { width: 100%; }
  .header__phone { display: none; }
  /* Мобильное меню: раскрывающиеся подпункты вместо мега-меню */
  .nav-item-drop { width: 100%; flex-wrap: wrap; }
  .nav-mega-trigger, .nav-drop-trigger { width: 100%; justify-content: space-between; }
  .nav-chevron { transition: transform .18s ease; }
  .nav-item-mega.is-expanded .nav-chevron,
  .nav-item-drop.is-expanded .nav-chevron { transform: rotate(180deg); }

  .drop-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: none; border-radius: 0; padding: 0 0 8px 12px;
    min-width: 0; width: 100%; display: none;
  }
  .nav-item-drop.is-expanded .drop-menu { display: block; }
  .nav-item-drop:hover .drop-menu, .nav-item-drop:focus-within .drop-menu { transform: none; }
  .drop-menu ul li a { border-bottom: none; padding: 10px 8px; }

  .mega-menu {
    display: none; position: static; transform: none; opacity: 1; visibility: visible;
    width: 100%; box-shadow: none; border: none; border-radius: 0;
    padding: 0 0 8px 12px; grid-template-columns: 1fr; gap: 0;
  }
  .nav-item-mega.is-expanded .mega-menu { display: block !important; }
  .mega-menu__col { margin-bottom: 0; }
  .mega-menu__col .mega-menu__title { font-size: 14px; margin: 0; border-bottom: none; }
  .mega-menu__col .mega-menu__title a { display: block; padding: 10px 8px; font-weight: 700; border-bottom: none; }
  .mega-menu__col ul { display: none; }
  .mega-menu__col .mega-more { display: none; }
  .mega-menu__col--all { background: none; padding: 8px 0 0; }
  .mega-menu__col--all p { display: none; }
  .mega-menu__col--all .mega-menu__title { display: none; }
}

/* ---- Акции ---- */
.promos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.promo-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 28px;
}
.promo-card__head {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  justify-content: space-between; margin-bottom: 12px;
}
.promo-card__head h3 { font-size: 18px; }
.promo-card__until {
  font-size: 12.5px; font-weight: 700; color: var(--color-accent-dark);
  background: var(--color-bg); border-radius: 999px; padding: 4px 12px;
  white-space: nowrap;
}
.promo-card__short { font-size: 15px; color: var(--color-text); margin-bottom: 18px; }
.promo-card h4 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-muted); margin: 18px 0 8px;
}
.promo-card__conditions li {
  position: relative; padding: 7px 0 7px 22px; font-size: 14px;
  color: var(--color-text-muted); line-height: 1.6;
}
.promo-card__conditions li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent);
}
.promo-card .btn { margin-top: 18px; }

@media (max-width: 980px) { .promos-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Уровни заголовков, вынесенные инлайн-стили, страницы разделов каталога
   ========================================================================= */

/* ---- h4 в шагах и сайдбаре заменены на h3: пропуск уровня h2→h4 ломал
   иерархию заголовков на 60 с лишним страницах ---- */
.step h3 {
  font-size: 15.5px; margin-bottom: 6px;
}
.detail-fact-card h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-muted); margin-bottom: 6px; font-weight: 800;
}
.promo-card__label {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-muted); margin: 18px 0 8px; font-weight: 800;
}

/* ---- Вынесенные инлайн-стили: 336 атрибутов style в разметке
   не кэшируются и раздували каждую страницу ---- */
.btn--ghost {
  color: var(--color-navy);
  border-color: var(--color-border);
}
.btn--stacked { margin-top: 8px; }
.link-plain { color: inherit; }
.card-note {
  font-size: 14px; color: var(--color-text-muted); margin: 8px 0 14px;
}
.card-note--tight { margin: 0 0 14px; }
.section-title--flush { margin-bottom: 16px; }
.lead--flush { margin-bottom: 16px; }
.note--top { margin-top: 8px; }
.note--gap { margin-top: 20px; }
.note--gap-lg { margin-top: 32px; }
.category-banner--wide { aspect-ratio: 21/5; }
.split-note { color: var(--color-text-muted); font-size: 15px; margin-top: 16px; }
.page-top { padding-top: 96px; }

/* ---- Страницы разделов каталога ---- */
.cat-head {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 36px;
}
.cat-head > div { max-width: 660px; }
.cat-head__doctor {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 14px 18px; flex-shrink: 0;
}
.cat-head__doctor:hover { box-shadow: var(--shadow); }

.cat-group { margin-bottom: 36px; scroll-margin-top: 100px; }
.cat-group h3 {
  font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.cat-group h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent);
}
.cat-group h3 i {
  font-style: normal; font-size: 12.5px; font-weight: 700;
  color: var(--color-text-muted); background: var(--color-bg);
  border-radius: 999px; padding: 2px 10px;
}
.cat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-list li a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px;
  align-items: baseline;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 16px 20px; height: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cat-list li a:hover { border-color: var(--color-accent); box-shadow: var(--shadow); }
.cat-list li a b { font-size: 15px; color: var(--color-navy); }
.cat-list li a em {
  font-style: normal; font-size: 13.5px; font-weight: 700;
  color: var(--color-text-muted); white-space: nowrap;
}
.cat-list li a span {
  grid-column: 1 / -1; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.55;
}

.cat-others { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-others li a {
  display: block; background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 16px 20px; font-size: 15px;
  font-weight: 700; color: var(--color-navy);
}
.cat-others li a:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.cat-others li a span {
  display: block; font-size: 12.5px; font-weight: 500; color: var(--color-text-muted);
  margin-top: 2px;
}

@media (max-width: 980px) {
  .cat-others { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .cat-list { grid-template-columns: 1fr; }
  .cat-others { grid-template-columns: 1fr; }
  .cat-head { flex-direction: column; }
  .cat-head__doctor { width: 100%; }
}

/* ---- Картинки карточек: размеры заданы атрибутами, пропорции — стилем ---- */
.card-img { width: 100%; height: auto; aspect-ratio: 16/7; object-fit: cover; }
.split-img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Мелкая подпись над блоком (или под ним, с модификатором) ---- */
.demo-note { font-size: 12.5px; color: var(--color-text-muted); margin: 0 0 14px; }
.demo-note--after { margin: 12px 0 0; }

/* ---- Пример приёма на странице услуги ---- */
.visit-example { border-left: 4px solid var(--color-accent); }
.visit-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.visit-facts div { background: var(--color-bg); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.visit-facts span { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 2px; }
.visit-facts b { display: block; font-size: 15px; color: var(--color-navy); line-height: 1.35; overflow-wrap: anywhere; }

/* ---- Форма записи в конце страницы услуги ---- */
.booking-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.booking-grid > div { min-width: 0; }
.booking__service { font-size: 16px; color: var(--color-text); margin-bottom: 18px; }
.booking__points { margin-bottom: 18px; }
.booking__points li {
  position: relative; padding: 10px 0 10px 26px; font-size: 14.5px;
  color: var(--color-text-muted); border-top: 1px solid var(--color-border);
}
.booking__points li:first-child { border-top: none; }
.booking__points li::before {
  content: "✓"; position: absolute; left: 0; top: 10px;
  color: var(--color-accent-dark); font-weight: 700;
}
.booking__phone { font-size: 14.5px; color: var(--color-text-muted); margin-top: 16px; }
.booking__phone a { color: var(--color-navy); font-weight: 800; white-space: nowrap; }
.booking-grid .form-card { background: var(--color-bg); }

/* ---- Полоса показателей из двух ячеек (страница отзывов) ---- */
.stats-bar--pair { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 980px) {
  .booking-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .visit-facts { grid-template-columns: 1fr; }
  .booking-grid .form-card { padding: 22px 18px; }
}
