/* ===== Шрифт Gilroy ===== */
@font-face { font-family: "Gilroy"; font-weight: 400; font-style: normal;
  src: url("/static/fonts/Gilroy-Regular.woff2") format("woff2"), url("/static/fonts/Gilroy-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Gilroy"; font-weight: 400; font-style: italic;
  src: url("/static/fonts/Gilroy-RegularItalic.woff2") format("woff2"), url("/static/fonts/Gilroy-RegularItalic.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Gilroy"; font-weight: 500; font-style: normal;
  src: url("/static/fonts/Gilroy-Medium.woff2") format("woff2"), url("/static/fonts/Gilroy-Medium.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Gilroy"; font-weight: 600; font-style: normal;
  src: url("/static/fonts/Gilroy-Semibold.woff2") format("woff2"), url("/static/fonts/Gilroy-Semibold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Gilroy"; font-weight: 700; font-style: normal;
  src: url("/static/fonts/Gilroy-Bold.woff2") format("woff2"), url("/static/fonts/Gilroy-Bold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Gilroy"; font-weight: 800; font-style: normal;
  src: url("/static/fonts/Gilroy-Extrabold.woff2") format("woff2"), url("/static/fonts/Gilroy-Extrabold.woff") format("woff"); font-display: swap; }

/* ===== Дизайн-токены (из site-analysis.md) ===== */
:root {
  --text: #243747;
  --text-muted: #596e7f;
  --accent: #2ea8e5;
  --accent-dark: #2e6199;
  --blue-2: #26517f;
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --bg-blue: #e6f0fa;
  --border: #c8d0d8;
  --danger: #f60022;

  --radius-btn: 28px;
  --radius-card: 12px;
  --shadow-card: 0 15px 30px rgba(0, 28, 128, 0.08);
  --shadow-hover: 0 20px 30px rgba(0, 64, 128, 0.15);
  --container: 1280px;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Gilroy", system-ui, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { color: var(--text); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 54px; }
h2 { font-size: 44px; }
h3 { font-size: 24px; }
@media (max-width: 992px) { h1 { font-size: 34px; } h2 { font-size: 28px; } }
@media (max-width: 767px) { h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 20px; } }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.section__title { margin-bottom: 32px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1;
  padding: 16px 24px; border-radius: var(--radius-btn);
  color: #fff; background: var(--accent); transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--accent-dark); box-shadow: inset 0 0 0 2px var(--accent); }
.btn--outline:hover { background: var(--accent); color: #fff; box-shadow: none; }
@media (max-width: 767px) { .btn { font-size: 14px; padding: 12px 20px; border-radius: 21px; } }

/* ===== Шапка (как в оригинале: белая слева + синяя скруглённая панель справа) ===== */
.header { position: sticky; top: 0; background: #fff; z-index: 50; }
.header__row { display: flex; align-items: center; gap: 22px; padding: 0 0 0 40px; min-height: 96px; }
.header__logo { flex: 0 0 auto; }
.header__logo svg, .header__logo img { height: 46px; width: auto; display: block; }

.nav { display: flex; gap: 20px; flex: 1; align-items: center; }
.nav__item { position: relative; }
.nav__link { color: var(--text); font-weight: 600; font-size: 16px; padding: 12px 0; display: inline-flex; align-items: center; gap: 6px; }
.nav__item--has-sub > .nav__link::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.nav__item--has-sub:hover > .nav__link::after { transform: rotate(225deg); margin-top: 2px; }
.nav__link:hover { color: var(--accent); }
.nav__sub { position: absolute; top: 100%; left: -14px; min-width: 250px; background: #fff;
  box-shadow: var(--shadow-card); border-radius: var(--radius-card); padding: 10px 0; display: none; }
.nav__item:hover .nav__sub { display: block; }
.nav__sub a { display: block; padding: 10px 20px; color: var(--text); font-size: 15px; }
.nav__sub a:hover { background: var(--bg-blue); color: var(--accent-dark); }

/* Кнопка-пилюля «Записаться на прием» */
.header__cta { flex: 0 0 auto; background: linear-gradient(180deg, #4cc2f0, var(--accent));
  color: #fff; font-weight: 600; font-size: 16px; padding: 16px 30px; border-radius: 28px; white-space: nowrap; }
.header__cta:hover { background: var(--accent-dark); color: #fff; }

/* Синяя скруглённая панель справа */
.header__side { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; gap: 20px;
  background: var(--blue-2); padding: 0 40px 0 60px; border-bottom-left-radius: 90px; color: #fff; }
.header__icon { position: relative; display: inline-flex; }
.header__icon img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.header__cart-count { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; }
.header__phones { display: flex; flex-direction: column; line-height: 1.25; }
.header__phones a { color: #fff; font-weight: 700; font-size: 18px; white-space: nowrap; }
.header__phones a:hover { color: #cfe6f7; }

.header__burger { display: none; background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--text); }

@media (max-width: 1200px) {
  .header__cta { padding: 14px 22px; font-size: 14px; }
  .header__phones a { font-size: 15px; }
  .header__side { padding: 0 24px 0 40px; border-bottom-left-radius: 70px; gap: 14px; }
}
@media (max-width: 992px) {
  .header__row { padding-left: 20px; min-height: 72px; gap: 14px; }
  .nav { display: none; }
  .header__cta, .header__side { display: none; }
  .header__burger { display: block; margin-left: auto; }
  .nav.is-open { display: flex; flex-direction: column; align-items: flex-start; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 16px 20px; box-shadow: var(--shadow-card); z-index: 60; }
  .nav.is-open .nav__sub { position: static; display: block; box-shadow: none; padding: 4px 0 4px 14px; min-width: 0; }
  .nav.is-open .nav__item--has-sub > .nav__link::after { display: none; }
}

/* ===== Hero / баннер ===== */
/* Hero / главный слайдер */
.hero { background: #1e3347; }
.hero-swiper { --swiper-theme-color: #fff; --swiper-navigation-size: 28px; }

.hero-slide {
  position: relative;
  overflow: hidden;
}
.hero-slide__bg {
  display: block !important;
  width: 100%;
  height: auto;
  min-height: 520px;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 992px) {
  .hero-slide__bg { min-height: 380px; max-height: 380px; }
}
@media (max-width: 600px) {
  .hero-slide__bg { min-height: 260px; max-height: 260px; }
}

.hero-slide__overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90.08deg, rgba(42,56,68,.82) -27%, rgba(36,55,71,.45) 55%, transparent 90%);
}

.hero__title { margin-bottom: 16px; color: #fff; font-size: 44px; text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.hero__subtitle { font-size: 18px; color: #d4e8f7; margin-bottom: 32px; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
@media (max-width: 992px) { .hero__title { font-size: 32px; } .hero__subtitle { font-size: 16px; } }
@media (max-width: 600px) { .hero__title { font-size: 22px; } .hero__subtitle { font-size: 14px; margin-bottom: 18px; } }

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next { color: #fff; opacity: .85; }
.hero-swiper .swiper-pagination { bottom: 20px; }
.hero-swiper .swiper-pagination-bullet { background: #fff; opacity: .55; width: 12px; height: 12px; }
.hero-swiper .swiper-pagination-bullet-active { opacity: 1; }
.clients-swiper__slide { display: flex; align-items: center; justify-content: center; height: 80px; }
.clients-swiper__slide img { height: 56px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .7; }
.clients-swiper__slide img:hover { filter: none; opacity: 1; }

/* ===== Сетка категорий исследований (главная) ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .research-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .research-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .research-grid { grid-template-columns: 1fr; } }

.research-item {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 20px 20px 16px;
  transition: box-shadow .2s, transform .2s; color: var(--text);
}
.research-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--text); }
.research-item__title { font-weight: 600; font-size: 15px; line-height: 1.3; flex: 1; }
.research-item__img { margin: 12px 0 8px; display: flex; align-items: flex-end; min-height: 110px; }
.research-item__img img { max-height: 110px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.research-item__link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 8px;
}
.research-item__link::after { content: "→"; }

/* ===== Сетки карточек ===== */
.grid { display: grid; gap: 24px; }
.grid--cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 992px) { .grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--cards { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--bg-blue); border-radius: var(--radius-card);
  padding: 24px; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card__title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.card__text { color: var(--text-muted); font-size: 14px; }
.card__meta { margin-top: auto; padding-top: 14px; color: var(--accent-dark); font-weight: 600; font-size: 14px; }

/* ===== Логотипы клиентов ===== */
.clients { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; }
.clients img { height: 48px; filter: grayscale(1); opacity: .7; }
.clients img:hover { filter: none; opacity: 1; }

/* ===== Хлебные крошки ===== */
.crumbs { padding: 22px 0 8px; font-size: 13px; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }

/* ===== Каталог ===== */
.catalog__h1 { margin: 6px 0 24px; }
.catalog__search { display: flex; gap: 12px; margin-bottom: 28px; }
.catalog__search input { flex: 1; padding: 14px 18px; font-family: inherit; font-size: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-btn); }
.catalog__search input:focus { outline: none; border-color: var(--accent); }
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding-bottom: 40px; }
.catalog__side-title { font-weight: 700; margin-bottom: 12px; }
.catalog__cat { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text);
  font-size: 14px; margin-bottom: 4px; }
.catalog__cat:hover { background: var(--bg-blue); color: var(--accent-dark); }
.catalog__cat.is-active { background: var(--accent); color: #fff; }
.catalog__count { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.card__code { font-size: 12px; color: var(--accent-dark); font-weight: 600; margin-bottom: 6px; }
@media (max-width: 767px) {
  .catalog { grid-template-columns: 1fr; }
  .catalog__side { display: flex; flex-wrap: wrap; gap: 6px; }
  .catalog__side-title { width: 100%; }
}

/* ===== Детальная карточка анализа ===== */
.detail { padding-bottom: 48px; }
.detail__head { background: var(--bg-soft); border-radius: var(--radius-card); padding: 32px; margin-bottom: 28px; }
.detail__code { color: var(--accent-dark); font-weight: 600; font-size: 14px; }
.detail__title { margin: 8px 0; font-size: 32px; }
.detail__cat { color: var(--text-muted); font-size: 14px; }
.detail__meta { display: flex; gap: 28px; flex-wrap: wrap; margin: 16px 0; font-size: 15px; }
.detail__buy { display: flex; align-items: center; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.detail__price { font-size: 28px; font-weight: 700; color: var(--text); }

/* ===== Вкладки ===== */
.tabs__nav { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid var(--bg-blue); margin-bottom: 22px; }
.tabs__btn { background: none; border: 0; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--text-muted); padding: 12px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tabs__pane { display: none; max-width: 880px; line-height: 1.7; }
.tabs__pane.is-active { display: block; }

/* ===== Текстовый контент ===== */
.prose { max-width: 880px; line-height: 1.75; color: #33454f; }
.prose h3 { margin-top: 28px; }
.tag { display: inline-block; background: var(--bg-blue); color: var(--accent-dark);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin: 0 6px 6px 0; }

/* ===== Карточки врачей ===== */
.doctor-card { background: #fff; border: 1px solid var(--bg-blue); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.doctor-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.doctor-card__photo { display: block; aspect-ratio: 1; background: var(--bg-blue); }
.doctor-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card__noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 700; color: #fff; background: var(--accent); }
.doctor-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.doctor-card__name { font-size: 18px; font-weight: 600; color: var(--text); }
.doctor-card__name:hover { color: var(--accent); }
.doctor-card__spec { color: var(--text-muted); font-size: 14px; }
.doctor-card__degree { color: var(--text-muted); font-size: 13px; }
.doctor-card__exp { font-size: 13px; color: var(--accent-dark); font-weight: 600; }
.doctor-card .btn { margin-top: 10px; align-self: flex-start; }

/* ===== Профиль врача ===== */
.doctor { display: grid; grid-template-columns: 300px 1fr; gap: 40px; padding-bottom: 48px; }
.doctor__photo { width: 100%; border-radius: var(--radius-card); }
.doctor__exp-box { display: flex; align-items: baseline; gap: 8px; margin: 16px 0; }
.doctor__exp-box b { font-size: 40px; color: var(--accent-dark); }
.doctor__exp-box span { color: var(--text-muted); }
.doctor__name { font-size: 34px; margin-bottom: 6px; }
.doctor__spec { font-size: 18px; color: var(--accent-dark); font-weight: 600; }
.doctor__degree { color: var(--text-muted); margin-top: 4px; }
.doctor__dirs { margin: 18px 0; }
@media (max-width: 767px) { .doctor { grid-template-columns: 1fr; } }

/* ===== Контейнеры/контакты ===== */
.container--narrow { max-width: 720px; }
.contacts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.contacts__info p { margin: 0 0 16px; }
.contacts__form { background: var(--bg-soft); border-radius: var(--radius-card); padding: 28px 32px; }
.contacts__map { margin: 8px 0 48px; }
.contacts__map iframe { display: block; width: 100%; border: 0; }
@media (max-width: 767px) { .contacts { grid-template-columns: 1fr; } }

/* ===== Формы ===== */
.form__lead { color: var(--text-muted); margin-bottom: 20px; }
.form__row { margin-bottom: 18px; }
.form__label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form input[type=text], .form input[type=email], .form input[type=date],
.form textarea, .form select {
  width: 100%; padding: 13px 16px; font-family: inherit; font-size: 15px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); }
.form textarea { resize: vertical; }
.form ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.form ul li label { font-weight: 400; font-size: 14px; cursor: pointer; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted);
  margin: 8px 0 20px; cursor: pointer; }
.form__consent input { margin-top: 3px; }
.form__err { color: var(--danger); font-size: 13px; margin-top: 5px; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 15px; }
.alert--success { background: #e6f7ec; color: #1c7c3e; }
.alert--error { background: #fdebed; color: var(--danger); }

/* ===== Статистика ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 8px 0 32px; }
.stats__item { background: var(--bg-blue); border-radius: var(--radius-card); padding: 22px; text-align: center; }
.stats__item b { display: block; font-size: 34px; color: var(--accent-dark); }
.stats__item span { color: var(--text-muted); font-size: 14px; }
@media (max-width: 767px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ===== Галерея ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 767px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ===== Документы ===== */
.docs { display: flex; flex-direction: column; gap: 12px; max-width: 760px; padding-bottom: 40px; }
.docs__item { display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--bg-soft); border: 1px solid var(--bg-blue); border-radius: var(--radius-card); }
.docs__item:hover { box-shadow: var(--shadow-card); }
.docs__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.docs__title { flex: 1; font-weight: 600; color: var(--text); }
.docs__dl { color: var(--accent-dark); font-weight: 600; font-size: 14px; white-space: nowrap; }

/* ===== Подвал ===== */
.footer { background: var(--text); color: #cfd9e2; padding: 48px 0 28px; margin-top: 40px; }
.footer a { color: #cfd9e2; }
.footer a:hover { color: #fff; }
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__logo svg { height: 56px; }
.footer__list { list-style: none; padding: 0; margin: 12px 0 0; }
.footer__list li { margin-bottom: 8px; font-size: 14px; }
.footer__contacts { font-size: 14px; line-height: 1.7; }
.footer__bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: #8ea3b5; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767px) { .footer__cols { grid-template-columns: 1fr; } }
