/* ДиаЛаб Плюс — фирменные цвета (брендбук):
   основной PANTONE 525 C #2F1946, логотип #645AA1, Cool Gray 11 #4D4D4D,
   доп.: 267 C #64219E, 7441 C #9561CC, 522 C #C1A5E5, 7443 C #DBC4E7 */
:root {
  --primary: #645AA1;        /* фиолетовый логотипа */
  --primary-dark: #2F1946;   /* PANTONE 525 C */
  --accent: #9561CC;         /* PANTONE 7441 C */
  --bg: #F6F4FA;             /* светлая лаванда */
  --text: #3a3742;
  --muted: #4D4D4D;          /* Cool Gray 11 C */
  --border: #DBC4E7;         /* PANTONE 7443 C */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;  /* исключаем фантомную высоту от горизонтального переполнения */
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
/* Свёрнутая шапка при скролле: остаётся только строка меню + лупа */
.header.is-collapsed .header-inner { display: none; }
.nav-search {
  display: none; align-items: center; justify-content: center; margin-left: auto;
  width: 40px; height: 40px; border: 0; background: none; border-radius: 10px;
  color: var(--primary); cursor: pointer; flex-shrink: 0;
}
.nav-search:hover { background: var(--bg); }
.nav-search svg { width: 22px; height: 22px; }
.header.is-collapsed .nav-search { display: flex; }
/* Корзина + лупа при скролле: справа, отступ между ними = как cart↔вход (8px).
   Специфичность .nav a.nav-cart выше, чем .icon-btn и .nav a, иначе они
   перебивают скрытие и фиолетовый цвет */
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav a.nav-cart { display: none; width: 40px; height: 40px; color: var(--primary); }
.header.is-collapsed .nav a.nav-cart { display: flex; }
.ai-mode-on .nav a.nav-cart { display: none !important; }  /* в ИИ-режиме корзина уже в строке слева */

/* Пин региона при скролле: слева от корзины, открывает список городов */
.nav-region { display: none; position: relative; }
.header.is-collapsed .nav-region { display: block; }
.ai-mode-on .nav-region { display: none !important; }
.nav-region ul { right: 0; }

/* Иконки телефона/корзины/входа, перенесённые в строку меню (ИИ-режим,
   мобильная шапка), остаются фиолетовыми — перебиваем .nav a { color: var(--text) } */
.nav a.icon-btn { color: var(--primary); }

/* Общее правило для всех выпадающих списков: не выше 80% экрана, со скроллом */
.dropdown > ul { max-height: 80vh; overflow-y: auto; }

/* ИИ-режим: блок чата под шапкой + минимальная шапка */
.ai-chat { display: none; width: 100%; }
.ai-chat #dialab-chat { height: 100%; }
.ai-mode-on .ai-chat { display: block; min-height: 60vh; }  /* точную высоту ставит JS (экран минус шапка) */
/* В шапке остаётся строка меню: слева телефон/корзина/вход, справа переключатель */
.ai-mode-on .header-inner { display: none; }
.ai-mode-on .nav-burger,
.ai-mode-on .nav-links,
.ai-mode-on .nav .nav-search { display: none !important; }  /* лупа скрыта в ИИ-режиме всегда */
/* Переключатель остаётся слева, телефон/корзина/вход — справа */
.ai-mode-on .nav .header-links { display: flex; margin-left: auto; margin-right: 0; order: 5; }
.header-inner { display: flex; align-items: center; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; }
.logo-img { height: 52px; width: auto; display: block; }
.phone { font-weight: 600; }
.header-links { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.header-links .phone { margin-right: 8px; }

.region-picker { position: relative; }
.region-picker summary { cursor: pointer; list-style: none; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.geo-pin { color: var(--primary); flex-shrink: 0; }
.icon { vertical-align: -3px; color: var(--primary); }
.icon-lg { vertical-align: -4px; }
/* Иконки-кнопки в шапке (корзина, ЛК) — как на ai.dialab.ru */
.icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; color: var(--primary);
}
.icon-btn:hover { background: var(--bg); text-decoration: none; }
.icon-btn svg { width: 26px; height: 26px; }
.cart-badge {
  position: absolute; top: 1px; right: -2px; min-width: 17px; text-align: center;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .7rem; line-height: 1; font-weight: 700; padding: 3px 4px;
}
.phone-btn { display: none; }
.region-name-short { display: none; }

/* Меню пациента (иконка «человека» в шапке): Профиль / Заказы / Выйти */
.user-menu { position: relative; }
.user-menu summary { cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu > ul {
  position: absolute; right: 0; z-index: 10; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; margin: 4px 0 0; list-style: none;
  min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.user-menu li a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); font-weight: 500; }
.user-menu li a:hover { background: var(--bg); text-decoration: none; }
.user-menu-logout {
  display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 6px;
  background: none; text-align: left; cursor: pointer;
  font: inherit; font-weight: 500; color: #c0392b;
}
.user-menu-logout:hover { background: #fdf0ee; }

/* ЛК пациента: вкладки Профиль/Заказы + сетка формы профиля */
.lk-tabs { display: flex; gap: 8px; margin: 0 0 18px; border-bottom: 1px solid var(--border); }
.lk-tab {
  padding: 9px 18px 11px; border-radius: 10px 10px 0 0; margin-bottom: -1px;
  color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent;
}
.lk-tab:hover { color: var(--primary); text-decoration: none; }
.lk-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.lk-profile-form { max-width: 720px; }
.lk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-bottom: 14px; }
@media (max-width: 640px) { .lk-grid { grid-template-columns: 1fr; } }
.lk-order-row { cursor: pointer; }
.lk-order-row:hover td { background: var(--bg); }

/* Бланк предзаказа: страница заказа в ЛК, печать/сохранение в PDF */
.preorder-toolbar { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0 0 14px; }
.preorder-back { font-weight: 600; }
.preorder-logo { height: 48px; flex-shrink: 0; }
.preorder {
  max-width: 860px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 30px;
}
.preorder h1 { font-size: 1.45rem; margin: 0 0 4px; }
.preorder h2 { font-size: 1.05rem; margin: 20px 0 8px; }
.preorder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.preorder-brand { color: var(--primary); text-align: right; line-height: 1.2; white-space: nowrap; }
.preorder-brand strong { display: block; font-size: 1.3rem; letter-spacing: .04em; }
.preorder-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 640px) { .preorder-cols { grid-template-columns: 1fr; } .preorder { padding: 18px 16px; } }
.preorder-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.preorder-dl dt { color: var(--muted); }
.preorder-dl dd { margin: 0; font-weight: 500; }
.preorder-table .preorder-total td { font-weight: 700; border-top: 2px solid var(--border); }
/* Числовые ячейки бланка не переносятся и прижаты к правому краю */
.preorder-table .preorder-num { white-space: nowrap; text-align: right; }
.preorder-table th:nth-child(3) { text-align: right; white-space: nowrap; }
.preorder-table .preorder-nowrap { white-space: nowrap; }
.preorder-note-price { font-size: .84rem; margin-top: 6px; }
.preorder-map { height: 260px; border-radius: 10px; margin-top: 10px; }
.preorder-note {
  margin: 22px 0 0; padding: 12px 16px; border-radius: 10px;
  background: var(--bg); color: var(--text); font-weight: 500;
}

/* Печать: остаётся только бланк, без шапки/подвала/кнопок/карты */
@media print {
  .header, .footer, .toasts, .no-print, .disclaimer { display: none !important; }
  body { background: #fff; }
  main.container { max-width: none; padding: 0; margin: 0; }
  .preorder { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .preorder-note { border: 1px solid #999; background: #fff; }
}

/* Мобильная шапка: номер → иконка трубки, иконки над поиском справа,
   короткое название города; первая строка не переносится */
@media (max-width: 800px) {
  .header-links .phone { display: none; }
  .phone-btn { display: flex; }
  .header-inner .search { order: 5; flex-basis: 100%; max-width: none; }
  .region-name-full { display: none; }
  .region-name-short { display: inline; }
  .header-inner { gap: 10px; }
  .logo-img { height: 42px; }
  .region-picker summary { white-space: nowrap; }
  .region-picker, .logo, .header-links { flex-shrink: 0; }
  .header-links, .nav-actions { gap: 4px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 24px; height: 24px; }
}
.region-picker ul {
  position: absolute; z-index: 10; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; margin: 4px 0 0; list-style: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 2px;
}
/* На узких экранах — одна колонка, чтобы не выходить за край */
@media (max-width: 640px) {
  .region-picker ul { grid-template-columns: 1fr; min-width: 200px; }
}
.region-picker li a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--text); }
.region-picker li a:hover { background: var(--bg); text-decoration: none; }

.search { display: flex; flex: 1; min-width: 220px; max-width: 420px; }
/* font-size 16px — иначе iOS зумит страницу при фокусе на поле */
.search input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px 0 0 8px; font-size: 16px; }
.search button { border: 0; background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 0 8px 8px 0; cursor: pointer; }

.nav { display: flex; gap: 22px; padding: 10px 16px; align-items: center; }
.nav a { font-weight: 600; color: var(--text); }
.nav-links { display: flex; gap: 22px; align-items: center; }

/* Выпадающий список «О компании» (десктоп) */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
  content: ""; width: 5px; height: 5px; margin-top: -2px;
  border-right: 1.6px solid var(--primary); border-bottom: 1.6px solid var(--primary);
  transform: rotate(45deg); transition: transform .15s;
}
.nav-dropdown[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.nav-dropdown ul {
  position: absolute; z-index: 20; right: 0; top: calc(100% + 10px); min-width: 260px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 0; margin: 0; list-style: none; box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.nav-dropdown li a { display: block; padding: 9px 18px; color: var(--text); font-weight: 500; }
.nav-dropdown li a:hover { background: var(--bg); text-decoration: none; }

/* Подраздел «О компании» в мобильном сэндвиче */
.nav-sub { padding: 6px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.nav-sub-title { display: block; padding: 4px 18px; font-weight: 700; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.nav-sub a { display: block; padding: 8px 18px 8px 28px; }

/* Сэндвич-меню (только мобильная версия) */
.nav-burger { display: none; position: relative; }
.nav-burger summary { list-style: none; cursor: pointer; display: flex; align-items: center; color: var(--primary); }
.nav-burger summary::-webkit-details-marker { display: none; }
.nav-burger ul {
  position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); min-width: 220px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 0; margin: 0; list-style: none; box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.nav-burger li a { display: block; padding: 10px 18px; }

/* Переключатель «ИИ-режим» в стиле iOS */
.ai-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; user-select: none; }
.ai-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ai-slider {
  width: 44px; height: 26px; border-radius: 999px; background: #d9d3ea;
  position: relative; flex-shrink: 0; transition: background .2s;
}
.ai-slider::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s;
}
.ai-toggle input:checked + .ai-slider { background: linear-gradient(90deg, var(--accent), var(--primary)); }
.ai-toggle input:checked + .ai-slider::after { transform: translateX(18px); }
.ai-toggle input:focus-visible + .ai-slider { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav { gap: 16px; }
}

/* Layout blocks */
/* main.container — иначе правило перебивает .container (padding: 0 16px) */
main.container { padding: 16px 16px 48px; }
/* Верхний отступ страницы задаёт main; у hero он обнулён, чтобы зазор шапка→баннер не вырос */
.hero { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; padding: 36px; border-radius: 14px; margin: 0 0 8px; }
.hero h1 { margin: 0 0 8px; }
.hero .btn { background: #fff; color: var(--primary); }

/* Слайдер главного баннера */
.hero-slider { margin: 0 0 8px; }
.hero-slider .slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: 14px;
}
.hero-slider .slides::-webkit-scrollbar { display: none; }
.hero-slider .slide {
  flex: 0 0 100%; scroll-snap-align: start; position: relative;
  margin: 0; border-radius: 0; overflow: hidden;
}
.hero-title { font-size: 1.7rem; font-weight: 700; margin: 0 0 8px; line-height: 1.25; }
.hero-slider .slide h1 { font-size: 1.7rem; line-height: 1.25; }
.hero-content { max-width: 62%; position: relative; z-index: 1; }
.hero-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 33.33%;
  display: flex; align-items: center; justify-content: center; padding: 20px 28px;
}
.hero-art svg { max-width: 100%; max-height: 100%; height: auto; }
/* Наведение (:hover) на кнопку баннера — текст становится белым */
.hero .btn:hover, .hero-slider .btn:hover { color: #fff; }

/* Ряд управления слайдером: стрелка слева, точки по центру, стрелка справа */
.slider-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 12px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; }
.slider-dots .dot {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--border); transition: background .15s, transform .15s;
}
.slider-dots .dot.active { background: var(--primary); transform: scale(1.25); }
.slider-arrow {
  background: none; border: 0; padding: 4px 10px; cursor: pointer; color: var(--primary);
  display: inline-flex; align-items: center;
}
.slider-arrow:hover { color: var(--primary-dark); }
#hero-prev { justify-self: start; }
#hero-next { justify-self: end; }
.slider-arrow svg { width: 9px; height: 9px; display: block; }  /* не выше точек */
@media (max-width: 800px) {
  .hero-art { display: none; }
  .hero-content { max-width: none; }
}

/* Три блока под баннером */
.feature-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 800px) { .feature-links { grid-template-columns: 1fr; } }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 4px; color: var(--text);
}
.feature-card:hover { border-color: var(--primary); text-decoration: none; }
.feature-card svg { width: 26px; height: 26px; color: var(--primary); margin-bottom: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.card-link { color: var(--text); }
.card-link:hover { border-color: var(--primary); text-decoration: none; }
/* Вся карточка анализа ведёт на его страницу (кроме кнопки «В корзину») */
.card .card-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .price-row form { position: relative; z-index: 2; }
.card:has(.card-cover):hover { border-color: var(--primary); }

.code { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); font-size: .9rem; }
.price { color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
.price-big { font-size: 1.8rem; }
/* Скидка: старая цена зачёркнута рядом с текущей */
.price-old { color: var(--muted); font-weight: 400; text-decoration: line-through; white-space: nowrap; font-size: .9em; margin-right: 6px; }
.price-big .price-old, .price-old.price-old-big { font-size: 1.1rem; display: block; margin: 0 0 -4px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

/* Buttons */
.btn {
  display: inline-block; background: var(--primary); color: #fff; border: 0;
  padding: 8px 18px; border-radius: 8px; cursor: pointer; font-size: .95rem; font-weight: 600;
  white-space: nowrap;
}
.service-row .btn { flex-shrink: 0; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-lg { padding: 12px 26px; font-size: 1.05rem; }
.btn-sm { padding: 5px 12px; font-size: .85rem; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
/* «В корзине» — светло-фиолетовая с белым текстом (услуга уже добавлена) */
.btn-in-cart { background: var(--accent); color: #fff; }
.btn-in-cart:hover { background: var(--primary); color: #fff; text-decoration: none; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-size: 1rem; }

/* Catalog */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
@media (max-width: 800px) { .catalog-layout { grid-template-columns: 1fr; } }
.sidebar { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; align-self: start; }
/* На десктопе — статичный заголовок, на мобильных — раскрывающийся список */
.cat-details summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 1.05rem; pointer-events: none; margin-bottom: 10px;
}
.cat-details summary::-webkit-details-marker { display: none; }
.cat-details summary::after {
  content: ""; width: 8px; height: 8px; margin: -2px 6px 0;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(45deg); transition: transform .15s; display: none;
}
.cat-details[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
@media (max-width: 800px) {
  .cat-details summary { pointer-events: auto; cursor: pointer; margin-bottom: 0; }
  .cat-details summary::after { display: block; }
  .cat-details[open] summary { margin-bottom: 10px; }
}
.cat-tree { list-style: none; padding: 0; margin: 0; }
.cat-tree ul { list-style: none; padding-left: 14px; }
.cat-tree a { display: block; padding: 4px 0; color: var(--text); }
.cat-tree a.active { color: var(--primary); font-weight: 700; }

.service-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
  position: relative; cursor: pointer;
}
.service-row:hover { border-color: var(--primary); }
/* Вся карточка ведёт на страницу анализа (растянутая ссылка), кроме кнопки «В корзину» */
.service-row .card-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.service-row .price-row form { position: relative; z-index: 2; }
.pagination { display: flex; gap: 16px; margin: 20px 0; align-items: center; }
/* Мета услуги: биоматериал · срок. На мобильных срок с новой строки */
.service-meta .bio + .term::before { content: "· "; }
@media (max-width: 800px) {
  .service-meta .bio { display: block; }
  .service-meta .term { display: block; }
  .service-meta .bio + .term::before { content: ""; }
}

/* Service detail */
.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.service-title { margin-bottom: 4px; }
.service-code { margin: 0 0 20px; }
.service-card { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
@media (max-width: 800px) {
  .service-card { grid-template-columns: 1fr; }
  .service-side { order: -1; }  /* цена над описанием */
}
/* Верхний паддинг подобран так, чтобы «Описание» визуально начиналось как цена в соседнем блоке */
.service-main { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px 20px; }
.service-main > h2:first-child { margin-top: 0; }
/* Свёрнутый доп. текст раздела под кнопкой «Ещё» */
.more-block { margin: 6px 0 4px; }
.more-block > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: var(--primary); font-weight: 600; font-size: .95rem; user-select: none;
}
.more-block > summary::-webkit-details-marker { display: none; }
.more-block > summary::after {
  content: ""; width: 7px; height: 7px; border: 2px solid currentColor;
  border-left: 0; border-top: 0; transform: rotate(45deg); margin-top: -3px; transition: transform .15s;
}
.more-block[open] > summary::after { transform: rotate(-135deg); margin-top: 2px; }
.more-block[open] > summary { margin-bottom: 8px; }
.more-block > div { color: var(--text); }
.service-side { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; align-self: start; }

/* Tables & forms */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); }

.form p { margin: 0 0 14px; }
.form label { display: block; font-weight: 600; margin-bottom: 4px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem;
}
.form-narrow { max-width: 420px; }
/* Согласие под кнопкой отправки: мелко и приглушённо, ссылка подчёркнута */
.form-consent { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.form-consent a { color: inherit; text-decoration: underline; }
.form-consent a:hover { color: var(--primary-dark); }

/* Вкладки на странице входа: Пациент / Корпоративный клиент */
.login-tabs { display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.login-tab { border: 0; background: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text); }
.login-tab.active { background: var(--primary); color: #fff; }
.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }
@media (max-width: 800px) { .checkout-layout { grid-template-columns: 1fr; } }
.cart-total { display: flex; justify-content: flex-end; align-items: center; gap: 24px; margin-top: 18px; font-size: 1.15rem; flex-wrap: wrap; }

/* Корзина: адаптивные строки вместо таблицы (влезают в мобильный экран) */
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
}
.cart-item-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-item-main a { word-break: break-word; }
.cart-item-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cart-unavailable { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; text-align: right; }
@media (max-width: 560px) {
  .cart-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .cart-item-side { justify-content: space-between; }
}

/* Misc */
/* Всплывающие уведомления справа сверху */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(340px, calc(100vw - 32px)); }
.toast {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 40px 14px 18px; box-shadow: 0 8px 28px rgba(47,25,70,.18);
  animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s;
}
.toast-error { border-color: #f5c6c0; }
.toast-hide { opacity: 0; transform: translateX(20px); }
.toast-close {
  position: absolute; top: 8px; right: 10px; background: none; border: 0; cursor: pointer;
  font-size: 1.15rem; line-height: 1; color: var(--muted); padding: 2px;
}
.toast-close:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* Кнопка «Очистить корзину» справа над таблицей */
.cart-clear { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.seo-text { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-top: 24px; }
/* Свёртка SEO-текста: весь текст в DOM (индексируется), визуально ограничен по высоте */
.seo-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.seo-body { position: relative; max-height: 50vh; overflow: hidden; }
.seo-body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(rgba(255,255,255,0), #fff); pointer-events: none;
}
.seo-toggle-input:checked ~ .seo-body { max-height: none; }
.seo-toggle-input:checked ~ .seo-body::after { display: none; }
.seo-toggle {
  display: inline-block; margin-top: 14px; cursor: pointer;
  color: var(--primary); font-weight: 600;
}
.seo-toggle::after { content: "Показать ещё ▾"; }
.seo-toggle-input:checked ~ .seo-toggle::after { content: "Свернуть ▴"; }
.seo-toggle:hover { text-decoration: underline; }
.seo-toggle-input:focus-visible ~ .seo-toggle { outline: 2px solid var(--accent); outline-offset: 3px; }
.centers-list { padding-left: 18px; }

/* Карта Яндекс с точками центров */
.cmap { width: 100%; height: 100%; min-height: 260px; border-radius: 12px; overflow: hidden; background: #e7e0f2; }
/* Однотонная (обесцвеченная) карта: фильтр только на слой тайлов, пины остаются цветными */
.cmap [class*="ground-pane"] { filter: grayscale(1); }
.home-map { height: 420px; margin-bottom: 10px; }

/* Страница центров: список слева, карта справа; на мобильных карта сверху */
.centers-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 12px; }
.centers-layout.no-map { grid-template-columns: 1fr; }
.centers-col { display: grid; grid-template-columns: 1fr; gap: 12px; }
.centers-layout.no-map .centers-col { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.centers-map-wrap { position: sticky; top: 80px; height: min(600px, 80vh); }
@media (max-width: 800px) {
  .centers-layout { grid-template-columns: 1fr; }
  .centers-map-wrap { order: -1; position: static; height: auto; aspect-ratio: 1 / 1; }
}
.errorlist { color: #c0392b; margin: 0 0 6px; padding-left: 18px; }

/* Выезд на дом: карта зон во всю ширину + условия поверх + форма заявки */
.visit-map-wrap { position: relative; margin: 18px calc(50% - 50vw) 8px; }
.visit-map { height: min(432px, 59vh); min-height: 342px; border-radius: 0; }
.visit-terms {
  position: absolute; top: 24px; right: max(24px, calc(50vw - 550px)); z-index: 5;
  width: 340px; max-width: calc(100% - 48px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 8px 28px rgba(47,25,70,.14);
}
.visit-terms.no-map { position: static; width: auto; max-width: 560px; margin: 0 calc(50vw - 50%); box-shadow: none; }
.visit-terms h2 { margin: 0 0 10px; font-size: 1.15rem; }
.visit-terms-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.visit-terms-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px 6px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.visit-terms-table td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--border); }
.visit-terms-table td + td, .visit-terms-table th + th { white-space: nowrap; }
.visit-terms-table tr:last-child td { border-bottom: 0; }
/* Таблица с одной колонкой значений (Грозный): широкая «Локация»,
   значения переносятся на две строки вместо распирания карточки */
.visit-terms-single { table-layout: fixed; }
.visit-terms-single th:first-child { width: 54%; }
.visit-terms-single td + td, .visit-terms-single th + th { white-space: normal; }
.visit-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }
.visit-dot-inner { background: var(--primary); }
.visit-dot-outer { background: var(--accent); opacity: .55; }
.visit-note { font-size: .84rem; color: var(--muted); margin: 10px 0 0; }
/* Десктоп: карта и карточка условий в одной grid-ячейке — высота карты
   растягивается под карточку, и та никогда не вылезает за нижний край */
@media (min-width: 801px) {
  .visit-map-wrap:has(> .visit-map) { display: grid; }
  .visit-map-wrap:has(> .visit-map) > .visit-map { grid-area: 1 / 1; height: auto; min-height: max(342px, min(432px, 59vh)); }
  .visit-map-wrap:has(> .visit-map) > .visit-terms {
    grid-area: 1 / 1; position: static; justify-self: end; align-self: start;
    margin: 24px max(24px, calc(50vw - 550px)) 24px 24px;
  }
}
@media (max-width: 800px) {
  .visit-map { height: 54vh; min-height: 290px; }
  .visit-terms { position: static; width: auto; max-width: none; margin: 12px 16px 0; box-shadow: none; }
}

.visit-form-section { max-width: 860px; }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.visit-grid .corp-field { min-width: 0; }
.visit-wide { grid-column: 1 / -1; }
.visit-form .corp-field input, .visit-form .corp-field textarea {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff;
}
.date-wrap { position: relative; display: block; }
.date-wrap .js-date-mask { padding-right: 42px; }
.date-pick { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--primary); padding: 6px; border-radius: 8px; display: flex; align-items: center;
  pointer-events: none; }
/* Настоящий date-input прозрачно поверх иконки: тап открывает нативный пикер */
.visit-form .date-overlay { position: absolute; right: 0; top: 0; width: 46px; height: 100%;
  min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; }
.visit-form .corp-field select { width: 100%; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit;
  background: #fff; }
.visit-form .corp-field select:focus { outline: none; border-color: var(--primary); }
.visit-form .corp-field input:focus, .visit-form .corp-field textarea:focus { outline: none; border-color: var(--primary); }
.visit-info { background: #EFE7F7; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
.visit-form .visit-consent { display: flex; gap: 10px; align-items: center; margin: 12px 0 16px; cursor: pointer; }
.visit-form .visit-consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; cursor: pointer;
  width: 20px; height: 20px; margin: 0; padding: 0;
  border: 2px solid var(--primary); border-radius: 50%; background: #fff; position: relative;
}
.visit-form .visit-consent input[type="checkbox"]:checked::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.visit-form .visit-consent input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visit-form button[type="submit"] { margin-top: 16px; }
.visit-sent { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px; max-width: 560px; }
.visit-sent strong { color: var(--primary-dark); display: block; margin-bottom: 6px; }
.visit-sent p { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .visit-grid { grid-template-columns: 1fr; } }

/* Запись к врачу: фильтры, сетка слотов, модалка */
.bk-filters { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr 1.3fr; gap: 12px; margin: 18px 0 14px; }
.bk-filter span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.bk-filter select { width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff; }
.bk-filter select:focus { outline: none; border-color: var(--primary); }

/* Единый вид выпадающих списков во всех браузерах: Safari без appearance:none
   рисует системные контролы. Свой шеврон — фоном, фирменный фиолетовый. */
.form select,
.visit-form .corp-field select,
.bk-filter select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23645AA1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;  /* iOS: не зумить страницу при фокусе */
}
.form select::-ms-expand { display: none; }
@media (max-width: 800px) { .bk-filters { grid-template-columns: 1fr; } }

.bk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bk-period { font-weight: 700; }
.btn-mini { border: 1px solid var(--border); background: #fff; border-radius: 9px;
  padding: 6px 12px; cursor: pointer; font: inherit; }
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.bk-legend { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) {
  .bk-toolbar { gap: 7px; row-gap: 10px; }
  .bk-toolbar .btn-mini { padding: 6px 7px; font-size: .85rem; }
  .bk-period { font-size: .9rem; margin: 0; }
  .bk-free-toggle { flex-basis: 100%; order: 5; }   /* тумблер с новой строки */
  .bk-legend { display: none; }                      /* легенде на мобильном тесно */
}

.bk-status { background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 12px; }
.bk-status.error { border-color: #e4b6b6; background: #fdf3f3; color: #9c3c3c; }

.bk-table { background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow-x: auto; }
.bk-row { display: grid; grid-template-columns: 180px repeat(7, minmax(96px, 1fr)); min-width: 860px; }
.bk-row + .bk-row { border-top: 1px solid var(--border); }
.bk-head { background: var(--bg); font-size: .85rem; color: var(--muted); font-weight: 600; }
.bk-cell { padding: 8px; border-left: 1px solid var(--border); min-width: 0; }
.bk-cell:first-child { border-left: 0; }
.bk-doc-col strong { font-size: .92rem; display: block; }
.bk-doc-col small { color: var(--muted); font-size: .78rem; }
.bk-slots { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.bk-chip { font: inherit; font-size: .8rem; padding: 3px 8px; border-radius: 7px; border: 1px solid transparent; }
.bk-chip.free { background: var(--primary); color: #fff; cursor: pointer; border: 0; }
.bk-chip.free:hover { background: var(--primary-dark); }
.bk-chip.busy { background: #ececf0; color: #9a97a3; text-decoration: line-through; cursor: default; }
.bk-chip.demo { pointer-events: none; }

/* Режим «Только доступные слоты»: список врач → дни → время */
.bk-free-toggle { font-size: .92rem; }
.bk-list { display: flex; flex-direction: column; gap: 12px; }
.bk-clinic-sep.bk-list-sep { border-radius: 10px; min-width: 0; }
.bk-doc-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.bk-doc-head { margin-bottom: 8px; }
.bk-doc-head strong { display: block; font-size: 1rem; }
.bk-doc-head small { color: var(--muted); font-size: .82rem; }
.bk-day-row { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid #f0edf6; }
.bk-day-label { flex: none; width: 92px; font-weight: 600; font-size: .88rem; }
.bk-day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 600px) {
  .bk-day-row { flex-direction: column; gap: 4px; }
  .bk-day-label { width: auto; }
}

/* Комбобокс услуги: поле с поиском и выпадающим списком */
.bk-combo { position: relative; }
.bk-combo input { width: 100%; min-width: 0; padding: 9px 36px 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 16px; font-family: inherit; background: #fff; }
.bk-combo input:focus { outline: none; border-color: var(--primary); }
.bk-combo-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.bk-combo-clear:hover { color: var(--primary); background: var(--bg); }
.bk-combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(47,25,70,.14); max-height: 340px; overflow-y: auto; }
.bk-combo-group { position: sticky; top: 0; background: var(--bg); color: var(--muted);
  font-size: .78rem; font-weight: 700; padding: 6px 12px; text-transform: uppercase; letter-spacing: .02em; }
.bk-combo-item { padding: 8px 12px; cursor: pointer; font-size: .92rem; }
.bk-combo-item:hover { background: var(--bg); }
.bk-combo-item.selected { background: var(--primary); color: #fff; }
.bk-combo-empty { padding: 10px 12px; color: var(--muted); font-size: .88rem; }

/* Разделитель клиник в календаре (когда слоты из нескольких клиник) */
.bk-clinic-sep { background: var(--primary); color: #fff; font-weight: 600;
  padding: 7px 12px; font-size: .9rem; min-width: 860px; }

.bk-modal { position: fixed; inset: 0; background: rgba(20,16,40,.45); display: none;
  align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.bk-modal.open { display: flex; }
.bk-dialog { background: #fff; border-radius: 16px; max-width: 520px; width: 100%;
  padding: 22px; max-height: 92vh; overflow: auto; }
.bk-dialog h3 { margin: 0 0 4px; }
.bk-dialog .visit-grid { margin-top: 12px; }
.bk-dialog input, .bk-dialog textarea { width: 100%; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.bk-dialog input:focus, .bk-dialog textarea:focus { outline: none; border-color: var(--primary); }
.bk-dialog .visit-consent { display: flex; gap: 10px; align-items: center; margin: 12px 0; cursor: pointer; }
.bk-dialog .visit-consent input { appearance: none; -webkit-appearance: none; flex: none; cursor: pointer;
  width: 20px; height: 20px; margin: 0; padding: 0; border: 2px solid var(--primary);
  border-radius: 50%; background: #fff; position: relative; }
.bk-dialog .visit-consent input:checked::after { content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--primary); }
.bk-error { background: #fdf3f3; border: 1px solid #e4b6b6; color: #9c3c3c;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: .92rem; }
.bk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bk-done-dialog { text-align: center; max-width: 440px; }

/* Выезд на дом: заглушка для регионов без услуги */
.visit-stub { background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 40px 28px; margin-top: 22px; max-width: 640px; text-align: center; }
.visit-stub svg { width: 56px; height: 56px; color: var(--primary); margin-bottom: 14px; }
.visit-stub-text { font-size: 1.15rem; font-weight: 600; color: var(--primary-dark); margin: 0 0 8px; }
.visit-stub-sub { color: var(--muted); margin: 0 0 22px; }
.visit-stub-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Оформление заказа: выбор пункта приёма (список + карта) */
.center-select { margin: 24px 0 16px; }
.center-select-title { display: block; font-weight: 600; margin-bottom: 8px; }
.center-select-layout { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: stretch; }
.center-select-layout.no-map { grid-template-columns: 1fr; }
.center-options { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.center-option { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.center-option:hover { border-color: var(--primary); }
.center-option input { margin-top: 3px; width: auto; accent-color: var(--primary); flex: none; }
.center-option-body { display: flex; flex-direction: column; gap: 2px; }
.center-option-body .muted { font-size: .9rem; }
.center-option.selected,
.center-option:has(input[name="center"]:checked) { border-color: var(--primary); background: var(--bg); box-shadow: 0 0 0 1px var(--primary) inset; }
.center-select-map { height: min(520px, 70vh); }
@media (max-width: 800px) {
  .center-select-layout { grid-template-columns: 1fr; }
  .center-select-map { order: -1; height: auto; aspect-ratio: 1 / 1; }
}

/* Блок фактов (после категорий, без заголовка) */
.section-more { display: inline-block; margin-top: 14px; font-weight: 600; }

/* Главная: поиск под каруселью вместо поля в шапке */
.home-page .header-inner .search { display: none; }

/* Белая зона под каруселью и поиском (на всю ширину экрана) — только десктоп; ниже — обычный фон */
@media (min-width: 701px) {
  .home-page { overflow-x: hidden; }  /* full-bleed через 100vw не должен давать горизонтальный скролл */
  .home-top { background: #fff; margin: -16px calc(50% - 50vw) 0; padding: 16px calc(50vw - 50%) 1px; }
  .home-page .feature-links { margin-top: 36px; }  /* воздух между белой зоной и карточками */
  .home-page .home-search-field { background: #FAF9FD; }  /* светло-лавандовая строка поиска — контраст с белой зоной */
}
.home-search { margin: 30px 0 44px; }
@media (min-width: 701px) { .home-search { margin-bottom: 72px; } }
.home-search-title { font-size: 1.65rem; font-weight: 700; line-height: 1.3; color: var(--primary-dark); margin: 0 0 18px; }
.home-search-row { display: flex; gap: 12px; align-items: stretch; }
.home-search-field { flex: 1; display: flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding-right: 12px; min-width: 0; }
.home-search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.home-search-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 14px; font-size: 16px; outline: none; }
.home-search-ai { flex: none; gap: 6px; color: var(--primary); border-left: 1px solid var(--border); padding-left: 12px; }
.btn-dark { background: var(--primary-dark); color: #fff; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-dark:hover { background: var(--primary); }
@media (max-width: 700px) {
  .home-search-title { font-size: 1.2rem; }
  .home-search-row { flex-wrap: wrap; }
  .home-search-field { flex-basis: 100%; }
  .home-search-row .btn { flex: 1; justify-content: center; text-align: center; }
}

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 8px; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .facts { grid-template-columns: 1fr; } }
.fact {
  background: linear-gradient(150deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.fact-num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.fact-text { font-size: .95rem; opacity: .9; }

/* Подвал — светло-фиолетовый, со структурой сайта и контактами */
/* Оборудование лаборатории */
.equip-group { margin-top: 8px; }
.equip-group h2 { margin-bottom: 12px; }
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 8px; }
.equip-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.equip-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(47,25,70,.08); }
.equip-photo { height: 170px; display: flex; align-items: center; justify-content: center; padding: 16px; background: #fff; }
.equip-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.equip-placeholder { width: 68px; height: 68px; color: var(--border); }
.equip-body { padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.equip-body h3 { margin: 0 0 6px; font-size: 1rem; color: var(--primary-dark); }
.equip-body p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.45; }

/* Корпоративным клиентам */
.corp-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 14px; padding: 32px; margin: 0 0 8px; }
.corp-hero-main h1 { margin: 0 0 10px; }
.corp-hero-lead { opacity: .92; margin: 0 0 20px; max-width: 640px; }
.corp-form { background: #fff; color: var(--text); border-radius: 12px; padding: 20px; }
.corp-form-title { font-weight: 700; font-size: 1.1rem; margin: 0 0 14px; color: var(--primary-dark); }
.corp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.corp-field { display: flex; flex-direction: column; gap: 4px; }
.corp-field > span { font-weight: 600; font-size: .9rem; }
.corp-field i { color: #d33; font-style: normal; margin-left: 2px; }
.corp-field-wide { grid-column: 1 / -1; }
.corp-form input, .corp-form textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.corp-form input:focus, .corp-form textarea:focus { outline: none; border-color: var(--primary); }
.corp-form textarea { resize: vertical; }
.corp-err { color: #d33; font-size: .82rem; font-style: normal; }
.corp-form-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
/* В мелкой серой строке ссылка без подчёркивания неотличима от текста */
.corp-form-note a { color: inherit; text-decoration: underline; }
.corp-form-note a:hover { color: var(--primary-dark); }
.corp-form-done { background: #fff; color: var(--text); border-radius: 12px; padding: 24px; }
.corp-form-done strong { color: var(--primary-dark); font-size: 1.15rem; display: block; margin-bottom: 6px; }
.corp-form-done p { margin: 0; color: var(--muted); }
.corp-hero-stats { display: flex; flex-direction: column; gap: 12px; }
.corp-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 14px 16px; }
.corp-stat-num { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.corp-stat-text { display: block; font-size: .85rem; opacity: .9; margin-top: 2px; }
@media (max-width: 860px) {
  .corp-hero { grid-template-columns: 1fr; padding: 22px; }
  .corp-form-grid { grid-template-columns: 1fr; }
  .corp-hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
}

.corp-adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.corp-adv-card { background: linear-gradient(150deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.corp-adv-card svg { width: 30px; height: 30px; color: #fff; margin-bottom: 4px; }
.corp-adv-card strong { font-size: 1.02rem; }
.corp-adv-card .muted { color: rgba(255,255,255,.82); font-size: .9rem; line-height: 1.45; }
@media (max-width: 800px) { .corp-adv { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .corp-adv { grid-template-columns: 1fr; } }

.corp-tech { margin-top: 2rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 26px; }
.corp-tech-text h2 { margin-top: 0; }
.corp-tech-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-presentation { background: var(--primary); color: #fff; }
.btn-presentation:hover { background: var(--border); color: var(--primary-dark); }
.corp-tech-text p { color: var(--muted); }
.corp-tech-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.corp-tech-list li { position: relative; padding-left: 30px; font-weight: 500; }
.corp-tech-list li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); }
.corp-tech-list li::after { content: ""; position: absolute; left: 7px; top: 5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 800px) { .corp-tech { grid-template-columns: 1fr; } }

.corp-caps { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 14px; }
.corp-cap { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.corp-cap svg { width: 28px; height: 28px; color: var(--primary); margin-bottom: 4px; }
.corp-cap strong { font-size: 1.02rem; }
.corp-cap .muted { font-size: .9rem; line-height: 1.45; }
.corp-cap-btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 800px) { .corp-caps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .corp-caps { grid-template-columns: 1fr; } }

.corp-integration-text { color: var(--muted); max-width: 780px; }
.logo-marquee { overflow: hidden; margin-top: 18px; padding: 6px 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.logo-track { display: flex; align-items: center; gap: 56px; width: max-content; animation: logo-scroll 28s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-item { flex: none; height: 46px; display: flex; align-items: center; }
.logo-item img { height: 100%; width: auto; max-width: 190px; object-fit: contain; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 40px; }
}

.corp-cta { margin-top: 2rem; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 14px; padding: 26px 30px; }
.corp-cta h2 { margin: 0 0 6px; }
.corp-cta p { margin: 0; opacity: .9; }
.corp-cta-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.corp-cta .btn { background: #fff; color: var(--primary); }
.corp-cta .btn:hover { color: #fff; }
.corp-cta-phone { color: #fff; font-weight: 700; font-size: 1.3rem; white-space: nowrap; }

.footer { background: #ece4f6; border-top: 1px solid var(--border); padding: 32px 0 20px; margin-top: 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (max-width: 460px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { margin: 0 0 4px; font-size: 1rem; color: var(--primary-dark); }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--primary); }
.footer-brand .logo-img { height: 48px; }
.footer-brand p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.footer-phone { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark) !important; }
.footer .disclaimer { margin: 10px 0 0; color: var(--muted); font-size: .8rem; letter-spacing: .03em; }
/* Подвал: описание лаборатории + сертификаты */
.footer-about {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px 32px; align-items: start;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(47, 25, 70, .12);
}
@media (max-width: 800px) { .footer-about { grid-template-columns: 1fr; gap: 16px; } }
.footer-about-text { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.footer-cert {
  display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(47, 25, 70, .10); border-radius: 12px; padding: 14px 16px;
  color: var(--text); font-size: .85rem; line-height: 1.5;
}
.footer-cert svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--primary); margin-top: 1px; }
.footer-cert strong { white-space: nowrap; }
.footer-offer { margin: 22px 0 0; color: var(--muted); font-size: .82rem; }

/* Раздел «Образование» (/dpo.html): преимущества, программы, вебинары, документы */
.edu-section { margin: 34px 0 0; }
.edu-section > h2 { font-size: 1.35rem; margin: 0 0 16px; }
.edu-lead { font-size: 1.05rem; color: var(--text); max-width: 760px; }
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.edu-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .edu-grid, .edu-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .edu-grid, .edu-grid.cols-2 { grid-template-columns: 1fr; } }
.edu-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px;
}
.edu-card h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--primary-dark); }
.edu-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.edu-card .edu-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 4px; }
/* «Преимущества обучения» — фирменный градиент + иконки по смыслу */
.edu-adv-card {
  background: linear-gradient(150deg, var(--primary), var(--primary-dark));
  border: 0; color: #fff;
}
.edu-adv-card h3 { color: #fff; }
.edu-adv-card p { color: rgba(255, 255, 255, .9); }
.edu-adv-card .edu-num { color: #fff; }
.edu-ic {
  display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(255, 255, 255, .16); margin-bottom: 14px;
}
.edu-ic svg { width: 22px; height: 22px; }
.edu-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.edu-docs li a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 500;
}
.edu-docs li a:hover { background: var(--bg); text-decoration: none; }
.edu-docs li a::before {
  content: ""; flex: 0 0 auto; width: 16px; height: 20px; border-radius: 2px;
  background: var(--primary); mask: none; opacity: .85;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%);
}
.edu-cta {
  margin: 34px 0 0; padding: 26px 24px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.edu-cta h2 { margin: 0 0 8px; color: #fff; font-size: 1.3rem; }
.edu-cta p { margin: 0 0 14px; opacity: .92; }
.edu-cta .edu-contacts { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 1.05rem; font-weight: 600; }
.edu-cta a { color: #fff; text-decoration: underline; }

/* Honeypot антиспам-поля — скрыты от людей, видны ботам */
.antispam-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* Партнёры: сетка карточек с фото (/partners.html) */
.partners-intro { max-width: 760px; }
.partner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 900px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; text-align: center; color: var(--text);
}
a.partner-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(47,25,70,.10); text-decoration: none; }
.partner-photo {
  height: 130px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 10px; overflow: hidden; margin-bottom: 12px;
}
.partner-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.partner-photo svg { width: 46px; height: 46px; color: var(--border); }
.partner-name { font-size: .92rem; font-weight: 600; line-height: 1.3; }

/* Лицензии/сертификаты: карточки документов с превью (/license.html) */
.license-intro { max-width: 760px; }
.license-section { margin-top: 30px; }
.license-section > h2 { font-size: 1.2rem; margin: 0 0 14px; }
.doc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
.doc-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; color: var(--text);
}
a.doc-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(47,25,70,.10); text-decoration: none; }
.doc-preview {
  position: relative; height: 240px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}
.doc-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-preview svg { width: 54px; height: 54px; color: var(--border); }
.doc-badge {
  position: absolute; top: 8px; right: 8px; background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px;
}
.doc-title { font-size: .88rem; font-weight: 600; line-height: 1.35; }

/* Новости: сетка карточек + страница новости */
.news-intro { max-width: 760px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
.news-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; color: var(--text);
}
.news-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(47,25,70,.10); text-decoration: none; }
.news-cover {
  height: 180px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); overflow: hidden;
}
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cover svg { width: 48px; height: 48px; color: var(--border); }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.news-date { font-size: .82rem; color: var(--muted); }
.news-title { font-size: .98rem; font-weight: 700; line-height: 1.35; }
.news-summary { font-size: .88rem; color: var(--muted); line-height: 1.4; }
/* Страница новости */
.news-article { max-width: 800px; }
.news-date-big { color: var(--muted); margin: -6px 0 18px; }
.news-content { line-height: 1.65; }
.news-content p { margin: 0 0 14px; }
.news-content img {
  max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0;
}
.news-other { margin-top: 40px; }
.news-other > h2 { font-size: 1.2rem; margin-bottom: 4px; }

/* Страница партнёра */
.partner-page { max-width: 820px; }
.partner-content { line-height: 1.65; }
.partner-content p { margin: 0 0 14px; }
.partner-content ul { margin: 0 0 14px; padding-left: 20px; }
.partner-content li { margin-bottom: 4px; }
.partner-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 6px 0 16px; }
.partner-content hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.partner-other { margin-top: 40px; }
.partner-other > h2 { font-size: 1.2rem; margin-bottom: 4px; }

/* Статьи и правила подготовки */
.art-intro { max-width: 760px; }
.art-section { margin-top: 30px; }
.art-section > h2 { font-size: 1.2rem; margin: 0 0 14px; }
.art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .art-grid { grid-template-columns: 1fr; } }
.art-card {
  display: flex; gap: 14px; align-items: flex-start; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; padding: 16px; color: var(--text);
}
.art-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(47,25,70,.10); text-decoration: none; }
.art-ic {
  flex: 0 0 auto; width: 42px; height: 42px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 11px; background: var(--bg); color: var(--primary);
}
.art-ic svg { width: 21px; height: 21px; }
.art-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.art-title { font-size: .96rem; font-weight: 700; line-height: 1.35; }
.art-summary { font-size: .87rem; color: var(--muted); line-height: 1.45; }
/* Страница статьи */
.art-page { max-width: 820px; }
.art-content { line-height: 1.7; }
.art-content p { margin: 0 0 14px; }
.art-content h2 { font-size: 1.2rem; margin: 26px 0 10px; }
.art-content h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.art-content ul, .art-content ol { margin: 0 0 14px; padding-left: 22px; }
.art-content li { margin-bottom: 6px; }
.art-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0 16px; }
.art-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .93rem; }
.art-content th, .art-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.art-content th { background: var(--bg); font-weight: 600; }
.art-content hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.art-other { margin-top: 40px; }
.art-other > h2 { font-size: 1.2rem; margin-bottom: 14px; }

/* Карточка категории: описание сворачивается, полный текст — по «Ещё» */
.cat-card .card-cover strong { display: block; }
.cat-card .cat-more { position: relative; z-index: 2; margin-top: 2px; }
/* Только стрелка, без слова: область нажатия удобна для касания */
.cat-card .cat-more > summary { gap: 0; padding: 8px 16px; margin-left: -16px; min-height: 30px; }
.cat-card .cat-more > summary::after { width: 8px; height: 8px; margin-top: -4px; }
.cat-card .cat-more[open] > summary::after { margin-top: 1px; }
/* Когда развернули — короткий вариант прячем, чтобы текст не дублировался */
.cat-card:has(.cat-more[open]) .cat-short { display: none; }

/* Страница медицинского офиса */
.office-title { margin-bottom: 4px; }
.office-sub { margin: 0 0 20px; }
.office-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .office-layout { grid-template-columns: 1fr; } }
.office-main { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.office-content { line-height: 1.6; }
.office-content p { margin: 0 0 12px; }
.office-content h3 { font-size: 1.05rem; margin: 20px 0 10px; }
.office-content table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: .93rem; }
.office-content th, .office-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.office-content thead td { background: var(--bg); font-weight: 600; }
.office-content i { color: var(--muted); font-size: .9rem; }
/* Услуги процедурного кабинета из старого сайта */
.office-content .row-results { display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  border-bottom: 1px solid var(--border); padding: 9px 0; }
.office-content .row-results:last-child { border-bottom: 0; }
.office-content .row-results h6 { margin: 0; font-size: .95rem; font-weight: 500; }
.office-content .row-results-price { font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.office-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.office-map-wrap .cmap { height: 420px; border-radius: 14px; }
.office-other { margin-top: 36px; }
.office-other > h2 { font-size: 1.2rem; }
.center-more { display: inline-block; margin-top: 6px; font-weight: 600; font-size: .9rem; position: relative; z-index: 2; }
/* Услуги процедурного кабинета на странице офиса */
.office-services { display: grid; gap: 0; margin: 0 0 6px; }
.office-service {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.office-service:last-child { border-bottom: 0; }
.office-service b { color: var(--primary-dark); white-space: nowrap; }

/* Офис: адрес текстом + лёгкая таблица графика */
/* Блок собирается из отдельных полей — каждая часть со своей строки */
.office-addr { font-size: 1rem; line-height: 1.65; margin-bottom: 18px; }
.office-addr strong,
.office-addr .office-addr-line,
.office-addr .office-addr-phone { display: block; }
.office-addr strong { color: var(--primary-dark); }
.office-addr i,
.office-addr .office-note { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; font-style: italic; }
.office-content h3 { font-size: 1.02rem; margin: 22px 0 10px; }
.office-hours { width: auto; min-width: 260px; border-collapse: collapse; font-size: .95rem; }
.office-hours td { border: 0; border-bottom: 1px solid var(--border); padding: 9px 26px 9px 0; }
.office-hours tr:last-child td { border-bottom: 0; }
.office-hours td:first-child { color: var(--muted); white-space: nowrap; }
.office-hours td:last-child { font-weight: 600; padding-right: 0; }
