/*
Theme Name: Флеболог Малахов
Theme URI: https://example.com/
Author: Dmitriy
Description: Тема сайта хирурга-флеболога: многостраничная структура, выпадающее и мега-меню с иконками, слайдер акций, прайс с редактированием в админке, форма записи с сохранением заявок, живой поиск. При активации создаёт страницы и меню по структуре сайта («Внешний вид → Структура сайта»).
Version: 1.19.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flebolog
*/
/* compat: old-safari */

/* =========================================================
   Флеболог Малахов — основной стиль
   Шрифт: Manrope. Брейкпоинты: 1200 / 992 / 768 / 480
   ========================================================= */

:root {
  --bg: #F0F5F9;
  --white: #FFFFFF;
  --sky: #CFE3F0;
  --nav: #D5E6F1;
  --ink: #1B232D;
  --ink-2: #3B4653;
  --muted: #6B7785;
  --brand: #306E94;
  --btn: #44698E;
  --btn-hover: #2F5478;
  --pink: #E83B7B;
  --pink-dark: #C92765;
  --green: #1FA27A;
  --line: #DCE6EE;
  --footer: #44678B;
  --footer-dark: #1F3F60;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(40, 80, 120, .08);
  --shadow: 0 10px 30px rgba(40, 80, 120, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --container: 1200px;
  --gutter: 24px;
  --nav-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
body.no-scroll { overflow: hidden; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 28px;
  border-radius: 8px;
  font-weight: 500; font-size: 16px; line-height: 1.2; text-align: center;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative; overflow: hidden;
}
.btn--primary { background: var(--btn); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.btn--primary:hover { background: var(--btn-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47, 84, 120, .35); }
.btn--primary:active { transform: translateY(0); box-shadow: none; }
.btn--light { background: var(--sky); color: var(--ink-2); }
.btn--light:hover { background: #fff; color: var(--pink); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.btn--block { width: 100%; }
/* блик при наведении */
.btn::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn:hover::after { left: 130%; }

/* ---------- Верхний блок ---------- */
.topbar { background: var(--bg); }
.topbar { margin: 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; min-height: 0; }
.logo img { width: 230px; height: auto; transition: transform .3s var(--ease); }
.logo:hover img { transform: scale(1.03); }
.topbar__contacts { display: flex; gap: 40px; }

.contact { display: flex; align-items: flex-start; gap: 10px; }
.contact__icon { width: 42px; height: auto; flex: none; margin-top: 2px; }
.contact__text { display: flex; flex-direction: column; font-size: 15px; line-height: 1.3; }
.contact__addr { color: var(--ink); }
.contact__phone { color: var(--ink); transition: color .2s; font-weight: 500; white-space: nowrap; }
.contact__phone span { color: var(--pink); }
.contact__phone:hover { color: var(--pink); }

/* ---------- Липкое меню ---------- */
.nav {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: var(--nav);
  transition: box-shadow .3s var(--ease), background-color .3s;
}
.nav.is-stuck { box-shadow: 0 6px 20px rgba(30, 70, 110, .14); background: rgba(213, 230, 241, .96); backdrop-filter: saturate(160%) blur(8px); -webkit-backdrop-filter: saturate(160%) blur(8px); }
.nav__inner { display: flex; align-items: center; gap: 20px; height: var(--nav-h); }
.nav__mini-logo { display: block; width: 0; opacity: 0; overflow: hidden; transition: width .35s var(--ease), opacity .3s; flex: none; }
.nav__mini-logo img { width: 150px; height: auto; max-width: none; }
.nav.is-stuck .nav__mini-logo { width: 150px; opacity: 1; }
.nav__list { display: flex; flex-wrap: nowrap; gap: 4px 18px; flex: 1; min-width: 0; align-self: stretch; }
.nav__list > li { display: flex; align-items: center; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 6px 0;
  font-size: 16px; font-weight: 500; white-space: nowrap; color: var(--ink);
  transition: color .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--pink); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link.is-current,
.has-dd:hover > .nav__link, .has-dd:focus-within > .nav__link, .has-dd.is-open > .nav__link { color: var(--pink); }
.nav__link:hover::after, .nav__link.is-current::after,
.has-dd:hover > .nav__link::after, .has-dd.is-open > .nav__link::after { transform: scaleX(1); transform-origin: left; }
.nav__chev { width: 10px; height: 10px; flex: none; opacity: .7; transition: transform .3s var(--ease); }
.has-dd:hover .nav__chev, .has-dd.is-open .nav__chev { transform: rotate(180deg); }
.nav__actions { display: flex; align-items: center; gap: 22px; margin-left: auto; flex: none; }
.search-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; transition: background-color .25s, transform .3s var(--ease); }
.search-btn img { width: 24px; height: 24px; }
.search-btn:hover { background: rgba(255,255,255,.7); transform: rotate(-12deg) scale(1.08); }
.nav__cta { min-height: 40px; padding: 8px 26px; font-weight: 600; font-size: 17px; }

.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 8px; transition: background-color .2s; flex: none; }
.burger:hover { background: rgba(255,255,255,.6); }
.burger span { position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px; background: var(--brand); transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; box-shadow: 0 20px 40px rgba(30, 70, 110, .2);
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  padding: 8px var(--gutter) 24px;
  animation: menuIn .3s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.mobile-menu__contacts { display: grid; gap: 16px; margin-top: 20px; }

/* ---------- Карусель ---------- */
.hero { position: relative; overflow: hidden; background: #cfdce6; height: max(420px, min(42.3vw, 760px)); height: clamp(420px, 42.3vw, 760px); }
.hero__track { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; }
.slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s linear .9s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; z-index: 1; }
.slide__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.slide.is-active .slide__img { transform: scale(1); }

.slide__cap { position: absolute; z-index: 2; }
.cap-line { opacity: 0; transform: translateX(60px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.slide.is-active .cap-line { opacity: 1; transform: none; }
.slide.is-active .cap-line:nth-child(1) { transition-delay: .45s; }
.slide.is-active .cap-line:nth-child(2) { transition-delay: .75s; }
.cap-4 .cap-line { transform: translateX(-60px); }

/* слайд 1 — пляж */
.cap-1 { right: 10.5%; top: 24%; width: min(40%, 580px); }
.cap-1__title { color: #fff; font-size: max(20px, min(2.15vw, 34px)); font-size: clamp(20px, 2.15vw, 34px); font-weight: 300; line-height: 1.3; text-shadow: 0 2px 12px rgba(0,0,0,.2); text-align: right; }
.cap-1__title b { display: block; color: #F7E6C4; font-weight: 700; }
.cap-1__promo {
  margin-top: 16px; padding: 10px 14px;
  background: rgba(226, 55, 120, .82); border-radius: 6px; color: #fff;
  font-size: max(16px, min(1.65vw, 26px)); font-size: clamp(16px, 1.65vw, 26px); line-height: 1.25; font-weight: 300;
  box-shadow: 0 10px 30px rgba(180, 30, 90, .3);
}
.cap-1__promo b { font-weight: 700; }

/* слайд 2 — УЗИ */
.cap-2 { right: 10%; bottom: 4%; width: min(40%, 560px); }
.cap-2 .cap-line:first-child { background: rgba(48, 92, 132, .88); border-radius: 6px 6px 0 0; padding: 14px 24px 0; }
.cap-2 .cap-line:last-child { background: rgba(48, 92, 132, .88); border-radius: 0 0 6px 6px; padding: 12px 24px 16px; }
.cap-2__title { color: #fff; font-size: max(17px, min(1.7vw, 27px)); font-size: clamp(17px, 1.7vw, 27px); line-height: 1.2; font-weight: 500; }
.cap-2__title b { font-weight: 800; font-size: 1.12em; }
.cap-2__sub { color: #F5C28D; font-size: max(15px, min(1.5vw, 23px)); font-size: clamp(15px, 1.5vw, 23px); font-weight: 500; }

/* слайд 3 — операционная */
.cap-3 { right: 10%; top: 19%; width: min(37%, 540px); padding: 20px 22px; background: rgba(226, 238, 247, .72); border-radius: 6px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cap-3__title { color: #3A5877; font-size: max(17px, min(1.6vw, 25px)); font-size: clamp(17px, 1.6vw, 25px); font-weight: 700; line-height: 1.25; }
.cap-3__sub { margin-top: 8px; color: var(--pink); font-size: max(20px, min(2.1vw, 33px)); font-size: clamp(20px, 2.1vw, 33px); font-weight: 400; line-height: 1.2; }

/* слайд 4 — без боли */
.cap-4 { left: 10.5%; top: 37%; width: min(49%, 720px); padding: 14px 24px; background: rgba(240, 246, 250, .7); border-radius: 6px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cap-4__title { color: var(--brand); font-size: max(20px, min(2.2vw, 35px)); font-size: clamp(20px, 2.2vw, 35px); font-weight: 400; line-height: 1.25; }
.cap-4__title b { font-weight: 700; }
.cap-4__sub { color: var(--pink); font-size: max(20px, min(2.2vw, 35px)); font-size: clamp(20px, 2.2vw, 35px); font-weight: 400; line-height: 1.25; text-align: right; }

.hero__arrow {
  position: absolute; top: 50%; z-index: 5; width: 48px; height: 48px; margin-top: -24px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.55); color: var(--brand);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s, background-color .25s, color .25s, transform .25s var(--ease);
}
.hero__arrow--prev { left: 24px; transform: translateX(-10px); }
.hero__arrow--next { right: 24px; transform: translateX(10px); }
.hero:hover .hero__arrow, .hero:focus-within .hero__arrow { opacity: 1; transform: none; }
.hero__arrow:hover { background: var(--pink); color: #fff; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 5; display: flex; justify-content: center; gap: 10px; }
.hero__dot { width: 10px; height: 10px; border-radius: 10px; background: rgba(255,255,255,.65); box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: width .35s var(--ease), background-color .25s; }
.hero__dot:hover { background: #fff; }
.hero__dot.is-active { width: 32px; background: var(--pink); }
.hero__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; background: rgba(255,255,255,.25); }
.hero__progress span { display: block; height: 100%; width: 0; background: var(--pink); }

/* ---------- Секции ---------- */
.section { padding: 80px 0; }
.section--sky { background: var(--sky); }
.section--white { background: #fff; }
.section__title { text-align: center; font-size: max(22px, min(2vw, 28px)); font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.3; margin-bottom: 40px; }
.section__title-light { display: block; font-weight: 400; }
.section__btn { display: flex; justify-content: center; margin-top: 36px; }

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- О докторе ---------- */
.about { padding-top: 70px; padding-bottom: 50px; }
.about__inner { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 48px; align-items: start; max-width: 1080px; }
.about__photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.about__photo img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.about__photo:hover img { transform: scale(1.04); }
.about__body { font-size: 15.5px; color: var(--ink); }
.about__body p + p { margin-top: 18px; }
.about__btn { display: flex; justify-content: center; margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--ink-2); padding: 12px 8px; border-radius: var(--radius); transition: background-color .3s, transform .3s var(--ease); }
.stat__icon { width: 58px; height: 58px; color: #1F3550; transition: transform .4s var(--ease); }
.stat:hover { background: #fff; transform: translateY(-4px); }
.stat:hover .stat__icon { transform: scale(1.12) rotate(-4deg); }

/* ---------- Симптомы ---------- */
.symptoms { padding: 48px 0 40px; }
.symptoms .section__title { font-size: max(19px, min(1.75vw, 24px)); font-size: clamp(19px, 1.75vw, 24px); margin-bottom: 36px; }
.symptoms__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 36px; max-width: 900px; margin: 0 auto; }
.symptom { display: flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.symptom__img { flex: none; width: 110px; height: 108px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.symptom__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .45s var(--ease); }
.symptom span { transition: color .25s; }
.symptom:hover .symptom__img { transform: translateY(-4px); box-shadow: var(--shadow); }
.symptom:hover .symptom__img img { transform: scale(1.08); }
.symptom:hover span { color: var(--brand); }

/* ---------- Услуги ---------- */
.services { padding: 70px 0; }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 40px; max-width: 1000px; margin: 0 auto; }
.service {
  display: flex; flex-direction: column; height: 100%;
  background: #F1F5F9; border: 1px solid #E3EAF0; border-radius: 6px; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.service__img { aspect-ratio: 495 / 343; overflow: hidden; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service__title { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px 12px 12px; font-size: 14.5px; line-height: 1.25; color: #4B6076; transition: color .25s; }
.service:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(40, 80, 120, .2); border-color: transparent; }
.service:hover .service__img img { transform: scale(1.08); }
.service:hover .service__title { color: var(--pink); }

/* ---------- Цены ---------- */
.prices { padding: 40px 0 36px; }
.prices .section__title { margin-bottom: 24px; }
.prices__card { max-width: 760px; margin: 0 auto; background: #F7F9FB; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.prices__head { padding: 16px 18px 20px; text-align: right; font-size: 11px; color: var(--muted); background: #EFF3F6; }
.prices__scroll { max-height: 380px; overflow-y: auto; padding: 8px 20px 20px 18px; scrollbar-width: thin; scrollbar-color: #B8C9D8 transparent; }
.prices__scroll::-webkit-scrollbar { width: 6px; }
.prices__scroll::-webkit-scrollbar-thumb { background: #B8C9D8; border-radius: 6px; }
.prices__group { margin: 18px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.prices__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px; margin: 0 -8px; border-radius: 8px; font-size: 13px; transition: background-color .2s; }
.prices__list li:hover { background: #fff; }
.pill { flex: none; min-width: 64px; padding: 4px 12px; border: 1px solid #9FB3C5; border-radius: 20px; text-align: center; font-size: 11px; font-weight: 600; color: var(--brand); background: #fff; transition: background-color .25s, color .25s, border-color .25s; }
.prices__list li:hover .pill { background: var(--btn); color: #fff; border-color: var(--btn); }

/* ---------- Результаты ---------- */
.results { padding: 44px 0 24px; }
.results .section__title { margin-bottom: 24px; }
.result__pics { display: grid; grid-template-columns: 1fr 1fr; border-radius: 6px; overflow: hidden; aspect-ratio: 232 / 250; box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.result__ph { position: relative; background: linear-gradient(180deg, #C7D6DE 0%, #DAC1B3 55%, #CDB2A4 100%); }
.result__ph + .result__ph { border-left: 1px solid rgba(255,255,255,.6); background: linear-gradient(180deg, #CBD9E0 0%, #E5CDBF 55%, #D8BFB1 100%); }
.result__ph img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; padding: 2px 10px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.tag--before { top: 6px; left: 6px; background: var(--pink); }
.tag--after { bottom: 6px; right: 6px; background: var(--green); }
.result:hover .result__pics { transform: translateY(-4px); box-shadow: var(--shadow); }
.result__title { margin-top: 12px; text-align: center; font-size: 15px; font-weight: 600; transition: color .25s; }
.result:hover .result__title { color: var(--pink); }
.result__text { margin-top: 8px; font-size: 11px; color: var(--ink-2); padding: 0 10px; }

/* ---------- Отзывы ---------- */
.reviews { padding: 56px 0 60px; }
.reviews .section__title { margin-bottom: 32px; }
.review { position: relative; padding: 18px 24px 26px; background: #EFF4F8; border-radius: 4px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s; }
.review::before { content: "“"; position: absolute; right: 18px; top: 6px; font-size: 64px; line-height: 1; color: var(--pink); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease); }
.review:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--shadow); }
.review:hover::before { opacity: .35; transform: none; }
.review__name { font-size: 14px; font-weight: 700; padding-left: 14px; margin-bottom: 24px; }
.review__text { font-size: 14px; line-height: 1.35; color: var(--ink-2); }

/* ---------- Дипломы ---------- */
.certs { padding: 36px 0 36px; }
.certs .section__title { margin-bottom: 36px; }
.cert { flex: none; background: #F2F4F6; padding: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.08), inset 0 0 0 1px #E6EAEE; transition: transform .35s var(--ease), box-shadow .35s var(--ease); cursor: zoom-in; }
.cert__paper { height: 180px; display: grid; place-items: center; background: linear-gradient(135deg, #FDFBF1, #EFF6FB); border: 5px solid #fff; outline: 1px solid #C9D6E2; font-family: Georgia, serif; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #2E4E7D; }
.cert:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow); }

/* ---------- Запись ---------- */
.booking { padding: 36px 0 54px; }
.booking__card { display: grid; grid-template-columns: 1fr 1fr; max-width: 716px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.booking__info { background: #43678A; color: #fff; padding: 30px 34px 40px; }
.booking__title { font-size: 18px; font-weight: 600; line-height: 1.3; margin-bottom: 26px; }
.booking__city + .booking__city { margin-top: 70px; }
.booking__city-name { display: inline-block; font-size: 18px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s; }
.booking__city-name:hover { color: #FFB5CF; }
.booking__addr { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.pin { width: 16px; height: 20px; flex: none; }
.booking__form { background: #F7F8FA; padding: 20px 28px 22px; display: flex; flex-direction: column; gap: 22px; position: relative; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; color: var(--ink-2); }
.field input, .select select {
  width: 100%; height: 34px; padding: 6px 12px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid #D6DEE6; border-radius: 3px;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field input:hover, .select select:hover { border-color: #9FB3C5; }
.field input:focus, .select select:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 3px rgba(68, 105, 142, .18); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232, 59, 123, .12); }
.select { position: relative; display: block; }
.select::after { content: ""; position: absolute; right: 12px; top: 50%; margin-top: -3px; border: 6px solid transparent; border-top: 8px solid var(--brand); border-bottom: 0; pointer-events: none; }
.select select { padding-right: 34px; cursor: pointer; }
.booking__form .btn { min-height: 34px; border-radius: 3px; font-size: 13px; margin-top: 12px; }
.booking__note { font-size: 9.5px; line-height: 1.3; color: var(--ink-2); margin-top: -10px; }
.booking__success { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: #F7F8FA; font-size: 16px; animation: menuIn .4s var(--ease); }
.booking__success b { display: block; font-size: 22px; color: var(--pink); margin-bottom: 6px; }
.booking__success[hidden] { display: none; }

/* ---------- Рейтинги ---------- */
.ratings { padding: 56px 0 50px; }
.ratings__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 27px; }
.ratings__grid > li { flex: 1 1 0; min-width: 0; }
.rating { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; height: 100%; min-height: 113px; padding: 22px 12px 20px; background: #fff; border-radius: 4px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.rating__logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; }
.rating__logo img { width: auto; max-width: 92%; max-height: 100%; object-fit: contain; }
.rating__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1; }
.rating:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* звёзды: серая подложка + цветная заливка по оценке (--r из 5) */
.stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; letter-spacing: 1px; color: #D5DAE0; white-space: nowrap; }
.stars::before, .stars__fill::before { content: "★★★★★"; }
.stars__fill { position: absolute; top: 0; left: 0; bottom: 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; color: var(--star, #F5A623); }

/* фирменные цвета площадок */
.rating__badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; background: #F1F3F5; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.rating__badge-star { color: #F5A623; font-size: 16px; }
.rating--sber .stars { --star: #F26B21; }
.rating--sber .rating__score { font-size: 12px; color: var(--ink-2); }
.rating--krasota .stars { --star: #18938A; font-size: 11px; }
.rating__box { padding: 2px 3px; border: 1px solid #18938A; border-radius: 2px; font-size: 13px; font-weight: 600; color: #18938A; }
.rating--doctu .stars { --star: #F2C12E; font-size: 15px; }
.rating--doctu .rating__score { font-size: 15px; font-weight: 600; color: #2EA84A; }
.rating--callmedic .stars { --star: #FFB800; }
.rating--callmedic .rating__score { font-size: 12px; font-weight: 700; color: var(--ink); }

/* ---------- Подвал ---------- */
.footer { background: var(--footer); color: #fff; }
.footer .container { max-width: calc(1340px + var(--gutter) * 2); }
.footer__inner { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 80px 60px; padding-top: 80px; padding-bottom: 64px; }

/* карточка с логотипом */

/* клиники */
.footer__clinic { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.footer__clinic .contact { min-height: 3.9em; }
.footer .contact__icon { width: 22px; margin-top: 1px; }
.contact--light .contact__addr, .contact--light .contact__phone { color: #fff; font-size: 16px; font-weight: 400; }
.contact--light .contact__phone:hover { color: #FFB5CF; }
.footer .btn--light { min-height: 38px; padding: 8px 16px; font-size: 15px; font-weight: 500; border-radius: 4px; color: var(--ink-2); }
.footer .btn--light:hover { background: #fff; }
.map { position: relative; aspect-ratio: 213 / 118; border-radius: 3px; overflow: hidden; background: #DDE7EE; }
.map iframe { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; border: 0; }
.footer .map { aspect-ratio: 269 / 147; border-radius: 4px; }
/* десктоп: карточка врача и колонки клиник одной высоты — карта растягивается до низа карточки */
@media (min-width: 993px) {
  .footer__inner { align-items: stretch; }
  .footer__clinic .contact { margin-top: -3px; }
  .footer__clinic .map { flex: 1 1 auto; aspect-ratio: auto; min-height: 150px; }
}

/* колонки ссылок */

/* дисклеймер, копирайт, правовые ссылки */
.footer__note { padding-bottom: 14px; font-size: 13px; text-align: center; color: #EAF2F8; }
.footer__note p { max-width: 760px; margin: 0 auto; padding-top: 18px; border-top: 1px solid #90B3CF; }
.footer__bottom { padding: 14px 0 16px; background: #1B4165; font-size: 13px; line-height: 1.45; text-align: center; }
.footer__legal { padding: 12px 0 14px; background: #102947; font-size: 13px; }
.footer__legal ul { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 4px; }
.footer__legal li + li::before { content: "|"; margin: 0 10px; opacity: .7; }
.footer__legal a { color: #fff; transition: color .2s; }
.footer__legal a:hover { color: #FFB5CF; }

/* ---------- Кнопка наверх ---------- */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--btn); color: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease), visibility 0s linear .3s, background-color .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s var(--ease), background-color .2s; }
.to-top:hover { background: var(--pink); transform: translateY(-3px); }

/* ---------- Поиск ---------- */
.search { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search[hidden] { display: none; }
.search__backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: rgba(20, 40, 62, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s ease; }
.search__panel { position: relative; width: 100%; max-width: 640px; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(10, 30, 50, .35); padding: 18px 20px 20px; animation: searchIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes searchIn { from { opacity: 0; transform: translateY(-24px) scale(.98); } to { opacity: 1; transform: none; } }
.search__form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--line); padding-bottom: 12px; transition: border-color .2s; }
.search__form:focus-within { border-color: var(--pink); }
.search__form img { width: 26px; height: 26px; flex: none; }
.search__form input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 20px; color: var(--ink); background: none; }
.search__form input::-webkit-search-cancel-button { display: none; }
.search__close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: background-color .2s, color .2s, transform .3s var(--ease); flex: none; }
.search__close:hover { background: #FCE7EF; color: var(--pink); transform: rotate(90deg); }
.search__hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.chip { padding: 5px 12px; border-radius: 20px; background: var(--bg); font-size: 13px; color: var(--brand); transition: background-color .2s, color .2s; }
.chip:hover { background: var(--pink); color: #fff; }
.search__results { margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.search__results a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; transition: background-color .2s; }
.search__results a:hover, .search__results a.is-active { background: var(--bg); }
.search__results b { font-weight: 600; font-size: 15px; }
.search__results small { color: var(--muted); font-size: 12px; }
.search__results mark { background: #FCE7EF; color: var(--pink); border-radius: 2px; }
.search__empty { padding: 14px 12px; color: var(--muted); font-size: 14px; }

/* =========================================================
   АДАПТИВ
   ========================================================= */

/* большие экраны — чуть крупнее типографика */
@media (min-width: 1600px) {
  .about__body { font-size: 17px; }
  .symptom { font-size: 16px; }
}

/* ≤1200 — ноутбуки */
@media (max-width: 1200px) {
  .nav__list { gap: 4px 16px; }
  .nav__link { font-size: 15px; }
  .nav.is-stuck .nav__mini-logo { width: 0; opacity: 0; }
}

/* ≤1080 — меню в бургер */
@media (max-width: 1080px) {
  .burger { display: block; }
  .nav__list { display: none; }
  .nav.is-stuck .nav__mini-logo { width: 150px; opacity: 1; }
  .nav__inner { gap: 12px; }
}

/* ≤992 — планшеты горизонтально */
@media (max-width: 992px) {
  .section { padding: 60px 0; }
  .topbar__contacts { gap: 24px; }
  .contact__text { font-size: 14px; }
  .logo img { width: 200px; }
  .about__inner { grid-template-columns: 280px 1fr; gap: 32px; }
  .services__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .symptoms__grid { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
  .cap-1 { right: 6%; width: 46%; }
  .cap-2 { right: 5%; width: 52%; }
  .cap-3 { right: 5%; width: 48%; }
  .cap-4 { left: 5%; width: 60%; }
}

/* ≤768 — планшеты вертикально / большие телефоны */
@media (max-width: 768px) {
  :root { --gutter: 16px; --nav-h: 56px; }
  .section { padding: 48px 0; }
  .section__title { margin-bottom: 28px; }

  .topbar__inner { flex-direction: column; align-items: center; gap: 14px; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .topbar__contacts { width: 100%; justify-content: space-between; gap: 12px; }
  .contact__icon { width: 34px; }
  .contact__text { font-size: 13px; }

  .nav__mini-logo img { width: 120px; }
  .nav.is-stuck .nav__mini-logo { width: 120px; }
  .nav__actions { gap: 10px; }
  .nav__cta { padding: 8px 18px; font-size: 15px; }

  /* карусель: картинка выше, подпись прижата к низу */
  .hero { height: min(78vh, 560px); min-height: 440px; }
  .slide--1 .slide__img { object-position: 38% 50%; }
  .slide--2 .slide__img { object-position: 40% 50%; }
  .slide--3 .slide__img { object-position: 30% 50%; }
  .slide--4 .slide__img { object-position: 58% 50%; }
  .slide__cap { left: 16px !important; right: 16px !important; top: auto !important; bottom: 52px !important; width: auto !important; }
  .cap-1 { background: linear-gradient(180deg, transparent, rgba(0,0,0,.18)); border-radius: 8px; }
  .cap-1__title { text-align: left; }
  .cap-4__sub { text-align: left; }
  .cap-line { transform: translateY(24px) !important; }
  .slide.is-active .cap-line { transform: none !important; }
  .hero__arrow { display: none; }

  .about__inner { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; margin: 0 auto; width: 100%; }
  .stats { gap: 8px; }

  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }


  .booking__card { grid-template-columns: 1fr; }
  .booking__info { padding: 24px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .booking__title { grid-column: 1 / -1; margin-bottom: 0; }
  .booking__city + .booking__city { margin-top: 0; }
  .booking__form { padding: 22px; }

  .search { padding-top: 12px; }
  .search__form input { font-size: 17px; }
}

/* ≤560 — телефоны */
@media (max-width: 560px) {
  .topbar__contacts { flex-direction: column; align-items: stretch; gap: 10px; }
  .topbar .contact { justify-content: center; }
  .logo img { width: 190px; }
  .nav__mini-logo { display: none; }
  .nav__cta { margin-left: 0; }
  .symptoms__grid { grid-template-columns: 1fr; gap: 12px; }
  .symptom__img { width: 88px; height: 86px; }
  .stat { font-size: 11px; padding: 8px 2px; }
  .stat__icon { width: 46px; height: 46px; }
  .prices__list li { font-size: 13px; }
  .booking__info { grid-template-columns: 1fr; }
}

/* ≤400 — узкие телефоны */
@media (max-width: 400px) {
  .services__grid { grid-template-columns: 1fr; max-width: 320px; }
  .nav__cta { padding: 8px 14px; }
  .hero { min-height: 480px; }
}

/* устройства без hover — отключаем «прыжки» */
@media (hover: none) {
  .hero__arrow { display: none; }
  .service:hover, .symptom:hover .symptom__img, .result:hover .result__pics, .review:hover, .rating:hover, .cert:hover, .stat:hover { transform: none; }
}

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

/* =========================================================
   МНОГОСТРАНИЧНАЯ ВЕРСИЯ: выпадающее меню, внутренние страницы
   ========================================================= */

/* ---------- Выпадающее меню (десктоп) ---------- */
.has-dd { position: relative; }
.has-dd--mega { position: static; }
.dd {
  position: absolute; top: 100%; left: -24px; z-index: 60;
  background: #fff; border-top: 3px solid var(--pink);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 26px 50px rgba(30, 70, 110, .2);
  opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s var(--ease) .12s, transform .25s var(--ease) .12s, visibility 0s linear .37s;
}
.has-dd:hover > .dd, .has-dd:focus-within > .dd, .has-dd.is-open > .dd {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .25s var(--ease) .06s, transform .3s var(--ease) .06s, visibility 0s;
}
.has-dd.is-closed > .dd { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.dd--mega { left: 0; right: 0; max-height: calc(100vh - var(--nav-h) - 16px); overflow-y: auto; overscroll-behavior: contain; }

/* общий вид пунктов */
.dd__link { display: block; padding: 5px 0; font-size: 14px; line-height: 1.3; color: var(--ink-2); transition: color .2s, transform .25s var(--ease); }
.dd__link:hover, .dd__link.is-current { color: var(--pink); transform: translateX(4px); }
.dd__link.is-current { font-weight: 600; }

/* «О докторе»: карточка врача + список */
.dd--doctor { display: grid; grid-template-columns: 210px 1fr; width: 560px; overflow: hidden; }
.dd-doc { display: flex; flex-direction: column; gap: 4px; padding: 0 0 20px; background: var(--bg); transition: background-color .25s; }
.dd-doc__photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 10px; }
.dd-doc__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform .6s var(--ease); }
.dd-doc__label { padding: 0 18px; font-size: 15px; font-weight: 700; color: var(--pink); }
.dd-doc__text { padding: 0 18px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.dd-doc__text b { color: var(--ink); font-weight: 700; }
.dd-doc:hover { background: var(--sky); }
.dd-doc:hover img { transform: scale(1.05); }
.dd--doctor .dd__list { padding: 18px 24px 20px 26px; display: flex; flex-direction: column; justify-content: center; }
.dd--doctor .dd__link { padding: 7px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.dd--doctor li:last-child .dd__link { border-bottom: 0; }

/* мега-меню «Лечение» / «Варикоз» */
.dd__grid { display: grid; gap: 26px 34px; padding: 26px 0 18px; }
.dd__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dd__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dd__head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--brand); transition: color .2s; }
.dd__icon { width: 40px; height: 40px; flex: none; padding: 5px; border-radius: 10px; background: var(--bg); color: #1F3550; transition: background-color .25s, transform .35s var(--ease); }
.dd__head:hover, .dd__head.is-current { color: var(--pink); }
.dd__head:hover .dd__icon { background: #FCE7EF; transform: rotate(-6deg) scale(1.06); }
.dd__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0 20px; border-top: 1px solid var(--line); }
.dd__all { font-size: 14px; font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.dd__all:hover { color: var(--pink); }
.dd__articles { min-height: 40px; padding: 8px 26px; font-weight: 600; }

/* ---------- Мобильное меню: аккордеон ---------- */
.m-item { border-bottom: 1px solid var(--line); }
.m-row { display: flex; align-items: center; }
.m-link { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; font-size: 18px; font-weight: 500; transition: color .2s, padding .2s; }
.m-link--plain::after { content: "›"; color: var(--pink); font-size: 22px; line-height: 1; }
.m-link:hover, .m-link.is-current { color: var(--pink); }
.m-link--plain:hover { padding-left: 10px; }
.m-toggle { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--pink); transition: background-color .2s; }
.m-toggle:hover { background: var(--bg); }
.m-toggle svg { transition: transform .3s var(--ease); }
.m-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.m-sub { padding: 0 0 10px 12px; animation: menuIn .3s var(--ease); }
.m-sub[hidden] { display: none; }
.m-sublink { display: block; padding: 9px 4px; font-size: 16px; color: var(--ink-2); transition: color .2s; }
.m-sublink:hover, .m-sublink.is-current { color: var(--pink); }
.m-group + .m-group { border-top: 1px solid var(--line); }
.m-grouplink { flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 16px; font-weight: 600; color: var(--brand); }
.m-grouplink.is-current { color: var(--pink); }
.m-icon { width: 34px; height: 34px; flex: none; padding: 4px; border-radius: 9px; background: var(--bg); color: #1F3550; }
.m-sub--3 { padding: 0 0 8px 44px; }
.m-sublink--3 { padding: 7px 4px; font-size: 15px; }
.m-articles { padding: 12px 4px 6px 0; }

/* ---------- Заголовок внутренней страницы ---------- */
.page-head { position: relative; overflow: hidden; padding: 30px 0 36px; background: linear-gradient(100deg, #fff 50%, #E6F0F7 100%); border-bottom: 1px solid var(--line); }
.page-head::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; border: 40px solid rgba(232, 59, 123, .05); pointer-events: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--brand); transition: color .2s; }
.crumbs a:hover { color: var(--pink); }
.crumbs > span[aria-hidden] { color: var(--pink); }
.page-title { position: relative; z-index: 1; max-width: 900px; font-size: max(26px, min(2.7vw, 38px)); font-size: clamp(26px, 2.7vw, 38px); font-weight: 700; line-height: 1.2; }
.page-lead { position: relative; z-index: 1; max-width: 760px; margin-top: 12px; font-size: 16px; color: var(--ink-2); }

/* ---------- Каркас страницы: контент + меню раздела ---------- */
.page { padding: 50px 0 70px; }
.page__inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.page__content { min-width: 0; font-size: 15.5px; }
.page__content > * + * { margin-top: 28px; }
.page__figure { margin: 0; max-width: 560px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.page__figure img { width: 100%; height: auto; }
.page-sub { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.placeholder { padding: 26px 28px; border: 2px dashed #B8C9D8; border-radius: var(--radius); background: #fff; color: var(--muted); }
.placeholder b { color: var(--ink-2); }
.placeholder p + p { margin-top: 8px; }

.page-prices { padding: 22px 24px 20px; background: #F7F9FB; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.page-prices .prices__group:first-of-type { margin-top: 8px; }
.page-prices__more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.page-prices__more:hover { color: var(--pink); }

.page-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: var(--radius); background: #43678A; color: #fff; }
.page-cta__text { max-width: 480px; font-size: 15px; line-height: 1.4; }
.page-cta__text b { display: block; font-size: 18px; margin-bottom: 4px; }
.page-cta .btn { flex: none; }

/* меню раздела сбоку */
.aside-nav { position: -webkit-sticky; position: sticky; top: calc(var(--nav-h) + 20px); max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; padding: 0 0 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); scrollbar-width: thin; scrollbar-color: #B8C9D8 transparent; }
.aside-nav__title { display: block; padding: 16px 20px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; color: var(--brand); transition: color .2s; }
.aside-nav__title:hover { color: var(--pink); }
.aside-nav__group { display: flex; align-items: center; gap: 10px; padding: 12px 20px 4px; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--ink); transition: color .2s; }
.aside-nav__group:hover, .aside-nav__group.is-current { color: var(--pink); }
.aside-nav__icon { width: 30px; height: 30px; flex: none; padding: 3px; border-radius: 8px; background: var(--bg); color: #1F3550; }
.aside-nav__link { display: block; padding: 6px 20px 6px 17px; border-left: 3px solid transparent; font-size: 14px; line-height: 1.3; color: var(--ink-2); transition: color .2s, background-color .2s, border-color .2s; }
.aside-nav__group + ul .aside-nav__link { padding-left: 57px; }
.aside-nav__link:hover { color: var(--pink); background: var(--bg); }
.aside-nav__link.is-current { color: var(--pink); font-weight: 600; border-left-color: var(--pink); background: #FCF1F5; }
.aside-nav__foot { padding: 14px 20px 4px; }

/* ---------- Подразделы (карточки групп) ---------- */
.groups { padding: 56px 0 70px; }
.groups__grid { display: grid; gap: 24px; max-width: 1080px; margin: 0 auto; }
.groups__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.groups__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.group-card { padding: 22px 22px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease); }
.group-card:hover { box-shadow: var(--shadow); }
.group-card__head { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--brand); transition: color .2s; }
.group-card__head:hover { color: var(--pink); }
.group-card__icon { width: 48px; height: 48px; flex: none; padding: 6px; border-radius: 12px; background: var(--bg); color: #1F3550; transition: background-color .25s; }
.group-card__head:hover .group-card__icon { background: #FCE7EF; }
.group-card__text { margin: 12px 0 10px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.group-card__list { border-top: 1px solid var(--line); padding-top: 6px; }
.group-card__list a { display: block; padding: 5px 0; font-size: 14px; line-height: 1.3; color: var(--ink-2); transition: color .2s, transform .25s var(--ease); }
.group-card__list a:hover { color: var(--pink); transform: translateX(4px); }

.group-intro { display: flex; align-items: center; gap: 18px; padding: 20px 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.group-intro__icon { width: 64px; height: 64px; flex: none; padding: 8px; border-radius: 14px; background: var(--bg); color: #1F3550; }
.link-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 16px 20px; background: #fff; border: 1px solid #E3EAF0; border-radius: 8px; font-size: 15px; font-weight: 600; line-height: 1.3; transition: color .25s, border-color .25s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.link-card::after { content: "›"; flex: none; color: var(--pink); font-size: 24px; line-height: 1; transition: transform .25s var(--ease); }
.link-card:hover { color: var(--pink); border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow); }
.link-card:hover::after { transform: translateX(4px); }

/* ---------- Цены на отдельной странице ---------- */
.prices__card--full .prices__scroll { max-height: none; overflow: visible; padding-top: 4px; }
.prices__card--full .prices__list li { font-size: 14px; }
.prices__card--full .pill { font-size: 12px; }

/* ---------- Акции ---------- */
.promos { padding: 50px 0 70px; }
.promos__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; max-width: 1000px; margin: 0 auto; }
.promo { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease); }
.promo:hover { box-shadow: var(--shadow); }
.promo__img { aspect-ratio: 2 / 1; overflow: hidden; }
.promo__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.promo:hover .promo__img img { transform: scale(1.05); }
.promo__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 24px 24px; }
.promo__tag { padding: 2px 10px; border-radius: 3px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; }
.promo__title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.promo__text { flex: 1; font-size: 14.5px; color: var(--ink-2); }
.promo .btn { margin-top: 6px; }

/* ---------- Контакты ---------- */
.contacts { padding: 50px 0 60px; }
.contacts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; max-width: 900px; }
.contact-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-card__city { font-size: 22px; font-weight: 700; color: var(--brand); }
.contact-card .contact__text { font-size: 16px; }
.contact-card .map { aspect-ratio: 16 / 10; border-radius: var(--radius); }

/* на внутренних страницах блок «О докторе» идёт сразу под заголовком */
.inner .about { padding-top: 50px; }

/* ---------- Адаптив для новых блоков ---------- */
@media (max-width: 1200px) {
  .dd__grid { gap: 22px 24px; }
  .dd__head { font-size: 14px; }
  .dd__icon { width: 36px; height: 36px; }
  .groups__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (max-width: 992px) {
  .page__inner { grid-template-columns: 1fr; gap: 36px; }
  .aside-nav { position: static; max-height: none; }
  .groups__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (max-width: 768px) {
  .page-head { padding: 22px 0 26px; }
  .page { padding: 36px 0 50px; }
  .page-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .link-cards { grid-template-columns: 1fr; }
  .promos__grid, .contacts__grid { grid-template-columns: 1fr; }
  .groups__grid--4, .groups__grid--3 { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 560px) {
  .group-intro { flex-direction: column; align-items: flex-start; }
  .page-prices { padding: 18px 16px; }
  .prices__list li { align-items: flex-start; }
}
@media (hover: none) {
  .link-card:hover, .dd__link:hover, .group-card__list a:hover { transform: none; }
}


/* в закреплённом меню появляется мини-логотип — немного уплотняем пункты, чтобы всё помещалось */
@media (min-width: 1201px) {
  .nav.is-stuck .nav__list { gap: 4px 14px; }
  .nav.is-stuck .nav__inner { gap: 16px; }
  .nav.is-stuck .nav__actions { gap: 14px; }
}


/* ---------- Подвал: адаптив ---------- */
@media (max-width: 1200px) {
  .footer__inner { column-gap: 40px; }
}
@media (max-width: 992px) {
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; padding-top: 56px; padding-bottom: 48px; }
}
@media (max-width: 600px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 40px; }
  .footer__clinic .contact { min-height: 0; }
  .footer .btn--light { min-height: 44px; }
  .footer__legal li + li::before { margin: 0 8px; }
}
@media (max-width: 600px) {
  .footer__legal ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; text-align: center; }
  .footer__legal li + li::before { content: none; }
}

/* рейтинги: 3 в ряд на планшете, 2 на телефоне */
@media (max-width: 992px) {
  .ratings__grid { gap: 16px; }
  .ratings__grid > li { flex: 0 0 calc((100% - 32px) / 3); }
}
@media (max-width: 560px) {
  .ratings__grid > li { flex: 0 0 calc((100% - 16px) / 2); }
}


/* =========================================================
   КАРУСЕЛИ: результаты, отзывы, сертификаты
   ========================================================= */
.carousel { position: relative; --gap: 24px; --per: 3; --edge: 8px; }
.carousel__track {
  position: relative; display: flex; gap: var(--gap);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  /* запас под тень и подъём карточек при наведении */
  padding: 10px var(--edge) 26px; margin: -10px calc(var(--edge) * -1) -26px;
  scroll-padding-inline: var(--edge);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--btn); outline-offset: -2px; border-radius: 6px; }
.carousel__track > * { flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); min-width: 0; scroll-snap-align: start; }
.carousel__track img { -webkit-user-drag: none; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .carousel[data-carousel] .carousel__track { cursor: grab; }
}
.carousel__track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.carousel__track.is-dragging > * { pointer-events: none; }

/* стрелки */
.carousel__arrow {
  position: absolute; top: var(--arrow-top, 50%); z-index: 2; width: 44px; height: 44px; margin-top: -22px;
  display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--pink);
  box-shadow: 0 6px 18px rgba(30, 70, 110, .16);
  transition: background-color .25s, color .25s, transform .3s var(--ease), opacity .25s;
}
.carousel__arrow--prev { left: -66px; }
.carousel__arrow--next { right: -66px; }
.carousel__arrow:hover { background: var(--pink); color: #fff; }
.carousel__arrow--prev:hover { transform: translateX(-3px); }
.carousel__arrow--next:hover { transform: translateX(3px); }
.carousel__arrow:active { transform: scale(.94); }

/* точки */
.carousel__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; min-height: 8px; }
.carousel__dot { width: 8px; height: 8px; padding: 0; border-radius: 8px; background: #C3D2DE; transition: width .35s var(--ease), background-color .25s; }
.carousel__dot:hover { background: #9DB4C6; }
.carousel__dot.is-active { width: 26px; background: var(--pink); }
.carousel.is-static .carousel__arrow, .carousel.is-static .carousel__dots { display: none; }

/* виды каруселей */
.carousel--results { --per: 3; --gap: 36px; --arrow-top: 42%; max-width: 900px; margin: 0 auto; }
.carousel--reviews { --per: 2; --gap: 24px; max-width: 780px; margin: 0 auto; }
.carousel--reviews .carousel__track > * { display: flex; flex-direction: column; }
.carousel--certs { --gap: 14px; --arrow-top: calc(50% - 4px); max-width: 900px; margin: 0 auto; }
.carousel--certs .carousel__track { align-items: stretch; }
.carousel--certs .carousel__track > .cert--wide { flex: 0 0 272px; }
.carousel--certs .carousel__track > .cert--tall { flex: 0 0 157px; }

/* на отдельных страницах — всё сеткой, без прокрутки */
.carousel--grid .carousel__track { flex-wrap: wrap; justify-content: center; overflow: visible; scroll-snap-type: none; padding: 0; margin: 0; row-gap: calc(var(--gap) + 8px); }

@media (max-width: 1100px) {
  .carousel__arrow--prev { left: -18px; }
  .carousel__arrow--next { right: -18px; }
}
@media (max-width: 992px) {
  .carousel--results { --per: 2; --gap: 24px; max-width: 620px; }
}
@media (max-width: 768px) {
  .carousel__arrow { display: none; }
  /* на телефоне лента идёт от края до края экрана, следующая карточка выглядывает */
  .carousel { --edge: var(--gutter); }
  .carousel--grid { --edge: 0px; }
  .carousel--reviews { --per: 1.12; --gap: 16px; }
  .carousel--certs .carousel__track > .cert--wide { flex-basis: 72%; }
  .carousel--certs .carousel__track > .cert--tall { flex-basis: 46%; }
}
@media (max-width: 600px) {
  .carousel--results { --per: 1.2; --gap: 16px; max-width: none; }
  .carousel--grid.carousel--results { --per: 1; max-width: 360px; }
  .carousel--grid.carousel--reviews { --per: 1; }
}
@media (max-width: 560px) {
  .carousel--certs .carousel__track > .cert--wide { flex-basis: 84%; }
  .carousel--certs .carousel__track > .cert--tall { flex-basis: 58%; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel__track { scroll-behavior: auto; }
}


/* ---------- Подвал v3: карточка с фото врача, колонки «меню / диагностика / симптомы» ---------- */
.footer__about { display: flex; flex-direction: column; padding: 24px 22px 34px 24px; background: var(--sky); border-radius: 6px; color: var(--ink); }
.footer__doc { display: flex; align-items: flex-start; gap: 24px; border-radius: 6px; transition: opacity .25s; }
.footer__doc:hover { opacity: .9; }
.footer__photo { flex: none; width: 160px; height: 160px; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 18px rgba(30, 70, 110, .18); }
.footer__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.footer__doc:hover .footer__photo img { transform: scale(1.05); }
.footer__doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.footer__logo { width: 330px; max-width: 100%; height: auto; }
.footer__name { margin-top: 38px; font-size: 18px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.footer__slogan { margin-top: 2px; font-size: 16px; line-height: 1.25; color: var(--pink); }
.footer__doc:hover .footer__name { color: var(--brand); }
.footer__links { margin-top: 28px; }
.footer__links a { font-size: 16px; line-height: 1.25; color: var(--ink); transition: color .2s; }
.footer__links a:hover { color: var(--pink); }

.footer__pair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; min-width: 0; }
.footer__col { min-width: 0; }
.footer__col--symptoms { grid-column: span 2; }
.footer__title { margin-bottom: 18px; font-size: 16px; font-weight: 600; }
.footer__list a { font-size: 16px; line-height: 1.25; color: #E4EDF5; transition: color .2s; }
.footer__list a:hover { color: #FFB5CF; }
.footer__menu a { font-size: 16px; font-weight: 600; line-height: 1.25; color: #fff; transition: color .2s; }
.footer__menu a:hover { color: #FFB5CF; }

@media (max-width: 992px) {
  .footer__about, .footer__pair, .footer__col--symptoms { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer__about { padding: 20px 18px 24px; }
  .footer__doc { flex-direction: column; align-items: center; gap: 16px; }
  .footer__doc-info { align-items: center; text-align: center; }
  .footer__photo { width: 130px; height: 130px; }
  .footer__logo { width: 240px; }
  .footer__name { margin-top: 14px; }
  .footer__links { margin-top: 18px; }
  .footer__pair { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer__links li + li, .footer__list li + li { margin-top: 6px; }
  .footer__menu li + li { margin-top: 4px; }
}

/* ---------- Контакты: клиники одна под другой, крупные карточки с большой картой ---------- */
.contacts__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: none; }
.contact-card { padding: 32px; gap: 22px; }
.contact-card__city { font-size: 32px; line-height: 1.15; }
.contact-card__lines { display: grid; gap: 14px; }
.contact-card__lines li { display: flex; align-items: center; gap: 14px; font-size: 19px; line-height: 1.3; color: var(--ink); }
.contact-card__lines img { flex: none; width: 30px; height: 30px; object-fit: contain; }
.contact-card__lines a { font-size: 24px; font-weight: 600; white-space: nowrap; transition: color .2s; }
.contact-card__lines a:hover { color: var(--pink); }
.contact-card .btn { min-height: 52px; font-size: 17px; }
.contact-card .map { aspect-ratio: 16 / 9; }

/* страница «Контакты»: слева информация (по центру по высоте), справа большая карта */
.contacts .contact-card {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr; column-gap: 48px; row-gap: 26px; padding: 40px;
}
.contacts .contact-card__city { grid-column: 1; grid-row: 2; }
.contacts .contact-card__lines { grid-column: 1; grid-row: 3; }
.contacts .contact-card .btn { grid-column: 1; grid-row: 4; justify-self: start; padding-left: 34px; padding-right: 34px; }
.contacts .contact-card .map { grid-column: 2; grid-row: 1 / -1; aspect-ratio: auto; height: 440px; }

@media (max-width: 992px) {
  .contacts .contact-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 22px; padding: 28px; }
  .contacts .contact-card > * { grid-column: 1 !important; grid-row: auto !important; }
  .contacts .contact-card .map { height: auto; aspect-ratio: 4 / 3; }
  .contacts .contact-card .btn { justify-self: stretch; }
}
@media (max-width: 600px) {
  .contact-card, .contacts .contact-card { padding: 20px; }
  .contact-card__city { font-size: 26px; }
  .contact-card__lines li { font-size: 17px; }
  .contact-card__lines a { font-size: 20px; }
  .contact-card .map, .contacts .contact-card .map { aspect-ratio: 1 / 1; }
}

/* =========================================================
   КОНТЕНТ ИЗ ДОКУМЕНТОВ: статьи, FAQ, хронология, цены, отзывы, сертификаты
   ========================================================= */

/* ---------- Текст статьи ---------- */
.prose { font-size: 16px; line-height: 1.65; color: var(--ink); max-width: 820px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 44px; font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--ink); scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h3 { margin-top: 30px; font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--brand); scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--pink); font-weight: 600; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.prose a:hover { color: var(--pink); }
.prose strong { font-weight: 700; }
.prose > :first-child { margin-top: 0; }
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; max-width: 640px; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* оглавление */
.toc { padding: 22px 26px 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border-left: 4px solid var(--pink); }
.toc__title { font-size: 13px; font-weight: 700; color: var(--muted); }
.prose .toc ol { margin-top: 10px; padding-left: 22px; }
.prose .toc li + li { margin-top: 6px; }
.prose .toc a { text-decoration: none; color: var(--brand); font-weight: 500; }
.prose .toc a:hover { color: var(--pink); text-decoration: underline; }

/* важное */
.note-box { padding: 20px 24px; background: #FDF0F5; border-radius: var(--radius); border: 1px solid #F6CADB; }
.note-box__title { font-weight: 700; color: var(--pink-dark); }
.prose .note-box ul { margin-top: 10px; }

/* вопросы и ответы */
.faq { display: grid; gap: 10px; }
.prose .faq { margin-top: 20px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .3s var(--ease); }
.faq details[open] { border-color: transparent; box-shadow: var(--shadow); }
.faq summary {
  position: relative; display: block; padding: 18px 56px 18px 22px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--ink); transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--pink); border-bottom: 2px solid var(--pink); transform: rotate(45deg); transition: transform .3s var(--ease), margin .3s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--pink); }
.faq summary:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; border-radius: var(--radius); }
.faq__answer { padding: 0 22px 20px; color: var(--ink-2); }
.faq__answer > * + * { margin-top: 12px; }

/* хронология образования и список конференций */
.prose .timeline { list-style: none; padding-left: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.prose .timeline li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 0 0 0 22px; }
.prose .timeline li + li { margin-top: 14px; }
.prose .timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); }
.prose .timeline b { font-weight: 700; color: var(--brand); }
.prose .events { list-style: none; padding-left: 0; display: grid; gap: 8px; }
.prose .events li { margin: 0; padding: 12px 16px; background: #fff; border-radius: 8px; font-size: 15px; line-height: 1.45; box-shadow: 0 1px 3px rgba(40, 80, 120, .06); }

/* ---------- Цены: цена / акция, примечания ---------- */
.prices__legend { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 6px 0 2px; font-size: 12px; color: var(--muted); }
.prices__legend s { color: var(--muted); }
.prices__list li { align-items: center; }
.prices__name { min-width: 0; }
.prices__name small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.prices__val { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.prices__val s { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill { white-space: nowrap; }
.pill--promo { border-color: var(--pink); color: var(--pink); }
.prices__list li:hover .pill--promo { background: var(--pink); border-color: var(--pink); color: #fff; }
.pill--free { border-color: var(--green); color: var(--green); }
.prices__list li:hover .pill--free { background: var(--green); border-color: var(--green); color: #fff; }
.page-prices--inline { margin-top: 18px; }
.prose .page-prices ul { list-style: none; padding-left: 0; }
.prose .page-prices li + li { margin-top: 0; }
.prose .page-prices .prices__group { margin-top: 18px; }
.prices__intro { max-width: 900px; margin: 0 auto 40px; }
.prices__card--full .prices__list li { font-size: 14.5px; }

/* ---------- Отзывы ---------- */
.review { display: flex; flex-direction: column; }
.review__name { margin-bottom: 4px; padding-left: 0; font-size: 16px; }
.review__meta { margin-bottom: 14px; font-size: 12.5px; line-height: 1.4; color: var(--brand); }
.review__text { position: relative; max-height: 10.8em; overflow: hidden; font-size: 14px; line-height: 1.5; color: var(--ink-2); transition: max-height .4s var(--ease); }
.review__text p + p { margin-top: 8px; }
.review__text.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(239, 244, 248, 0), #EFF4F8); transition: opacity .3s; }
.review:hover .review__text.is-clamped::after { background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.review__text.is-open { max-height: 100em; }
.review__text.is-open::after { opacity: 0; }
.review__more { align-self: flex-start; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.review__more:hover { color: var(--pink); }
.carousel--grid.carousel--reviews { max-width: 1000px; }
.carousel--grid.carousel--reviews .carousel__track { --per: 2; align-items: start; }

/* ---------- Сертификаты: настоящие сканы ---------- */
.cert { padding: 8px; cursor: zoom-in; }
.cert__link { display: block; height: 100%; }
.cert img { display: block; height: 190px; width: auto; max-width: none; margin: 0 auto; }
.carousel--certs .carousel__track > .cert--wide, .carousel--certs .carousel__track > .cert--tall { flex: 0 0 auto; }
.carousel--certs .carousel__track { align-items: center; }
.carousel--grid.carousel--certs { max-width: 1200px; }
.carousel--grid.carousel--certs .carousel__track { gap: 18px; row-gap: 22px; }
.carousel--grid.carousel--certs .cert img { height: 210px; }
@media (max-width: 768px) {
  .carousel--certs .carousel__track > .cert--wide, .carousel--certs .carousel__track > .cert--tall { flex: 0 0 auto; }
  .cert img { height: 170px; }
  .carousel--grid.carousel--certs .cert img { height: auto; width: 100%; }
  .carousel--grid.carousel--certs .carousel__track > .cert { flex: 0 0 calc(50% - 9px); }
}

/* ---------- Просмотр сертификата ---------- */
.lightbox { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 56px 72px; background: rgba(14, 30, 48, .9); animation: fadeIn .2s ease; }
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); background: #fff; }
.lightbox__caption { color: #fff; font-size: 14px; text-align: center; }
.lightbox__count { color: rgba(255, 255, 255, .6); font-size: 12px; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; transition: background-color .2s; }
.lightbox__btn:hover { background: var(--pink); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 14px; top: 50%; margin-top: -24px; }
.lightbox__next { right: 14px; top: 50%; margin-top: -24px; }
@media (max-width: 600px) {
  .lightbox { padding: 60px 10px 80px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; margin-top: 0; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
}

/* ---------- «Ваш врач»: длинный текст и плитки подразделов ---------- */
.about--full .about__inner { max-width: 1140px; }
.about--full .about__photo { position: -webkit-sticky; position: sticky; top: calc(var(--nav-h) + 20px); }
.about__prose { max-width: none; font-size: 16px; }
.about--full .stats { margin-top: 36px; }
.doc-tiles { padding: 30px 0 70px; }
.doc-tiles__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 1040px; margin: 0 auto; }
.doc-tile { display: flex; align-items: center; gap: 22px; height: 100%; padding: 28px 28px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.doc-tile:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.doc-tile__icon { flex: none; width: 72px; height: 72px; padding: 10px; border-radius: 18px; background: var(--bg); color: #1F3550; transition: background-color .25s; }
.doc-tile:hover .doc-tile__icon { background: #FCE7EF; }
.doc-tile__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.doc-tile__title { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--brand); transition: color .2s; }
.doc-tile:hover .doc-tile__title { color: var(--pink); }
.doc-tile__text { font-size: 14px; line-height: 1.45; color: var(--muted); }
.doc-tile__arrow { flex: none; font-size: 36px; line-height: 1; color: var(--pink); transition: transform .3s var(--ease); }
.doc-tile:hover .doc-tile__arrow { transform: translateX(5px); }

@media (max-width: 992px) {
  .about--full .about__photo { position: static; }
}
@media (max-width: 768px) {
  .doc-tiles__grid { grid-template-columns: minmax(0, 1fr); }
  .doc-tile { padding: 20px; gap: 16px; }
  .doc-tile__icon { width: 56px; height: 56px; }
  .doc-tile__title { font-size: 18px; }
  .prose h2 { font-size: 21px; }
  .prose .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .faq summary { font-size: 16px; padding: 16px 48px 16px 18px; }
  .prices__list li { flex-wrap: wrap; gap: 8px; }
  .prices__val { margin-left: auto; }
}
@media (hover: none) { .doc-tile:hover { transform: none; } }
.prose .prices__group { margin: 22px 0 6px; padding-bottom: 10px; font-size: 11px; font-weight: 700; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.prose .prices__list li { font-size: 14px; line-height: 1.4; }
.carousel--grid .review__text { max-height: none; }
.carousel--grid .review__text::after { display: none; }

/* ---------- До и после: настоящие фото ---------- */
.result__pics { position: relative; cursor: zoom-in; }
.result__ph { display: block; }
.result__ph img { display: block; }
.result__count { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 3px 10px; border-radius: 20px; background: rgba(20, 40, 62, .72); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.result__title { font-size: 14.5px; line-height: 1.35; padding: 0 6px; }
.results__legend { max-width: 720px; margin: -16px auto 28px; text-align: center; font-size: 13px; color: var(--muted); }
.carousel--grid.carousel--results { max-width: 1000px; }
.lightbox__img { max-height: calc(100vh - 150px); }

.result__ph--wide { grid-column: 1 / -1; }
.result__ph--wide img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   WORDPRESS
   ========================================================= */

/* панель администратора */
body.admin-bar .nav { top: 32px; }
body.admin-bar .topbar { margin-top: 0; padding-top: 0; }
body.admin-bar .mobile-menu { max-height: calc(100vh - var(--nav-h) - 32px); }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .nav { top: 0; } }

/* простое выпадающее меню (пункт без класса mega/dd-doctor) */
.dd--simple { min-width: 260px; }
.dd--simple .dd__list { padding: 12px 22px 14px; }
.dd--simple .dd__link { padding: 7px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.dd--simple li:last-child .dd__link { border-bottom: 0; }

/* страница без бокового меню */
.page__inner--full { grid-template-columns: minmax(0, 1fr); max-width: calc(860px + var(--gutter) * 2); }
.page__figure--wide { max-width: none; }
.page-meta { position: relative; z-index: 1; margin-top: 10px; font-size: 14px; color: var(--muted); }

.page-text { padding: 44px 0 0; }
.page-text .prose { max-width: 860px; margin: 0 auto; }
.alignleft { float: left; margin: 4px 20px 12px 0; }
.alignright { float: right; margin: 4px 0 12px 20px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* форма записи */
.booking__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.booking__error { margin-top: -10px; font-size: 13px; color: var(--pink-dark); }
.booking__error[hidden] { display: none; }
.booking__form .btn:disabled { opacity: .6; cursor: wait; }

/* записи: ссылки в карточках */
.promo__img { display: block; }
.promo__title a { transition: color .2s; }
.promo__title a:hover { color: var(--pink); }
.empty-note { max-width: 640px; margin: 0 auto; padding: 26px 28px; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink-2); }

/* пагинация */
.pager { margin-top: 36px; }
.pager ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; background: #fff; font-weight: 600; color: var(--brand); box-shadow: var(--shadow-sm); transition: background-color .2s, color .2s; }
.pager a:hover, .pager .current { background: var(--btn); color: #fff; }

/* поиск на странице результатов */
.search-page { display: flex; gap: 12px; margin-bottom: 28px; }
.search-page input { flex: 1; min-width: 0; height: 44px; padding: 8px 14px; font: inherit; font-size: 16px; border: 1px solid #D6DEE6; border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.search-page input:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 3px rgba(68, 105, 142, .18); }
.search-list { display: grid; gap: 12px; }
.search-list__item { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: #fff; border: 1px solid #E3EAF0; border-radius: 8px; transition: border-color .25s, box-shadow .3s var(--ease); }
.search-list__item b { font-size: 16px; font-weight: 600; transition: color .2s; }
.search-list__item small { font-size: 13.5px; color: var(--muted); }
.search-list__item:hover { border-color: transparent; box-shadow: var(--shadow); }
.search-list__item:hover b { color: var(--pink); }
.booking__note a { text-decoration: underline; text-underline-offset: 2px; transition: color .2s; }
.booking__note a:hover { color: var(--pink); }

/* элементы, которые добавляют в редакторе WordPress */
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose blockquote { margin: 20px 0; padding: 16px 22px; border-left: 3px solid var(--pink); background: #fff; border-radius: 0 var(--radius) var(--radius) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose .wp-block-image, .prose figure { margin: 24px 0; }
.prose figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Согласие на cookie ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.cookie[hidden] { display: none; }
.cookie__inner { pointer-events: auto; width: 100%; max-width: 980px; display: flex; align-items: center; gap: 28px; padding: 20px 24px; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 14px 44px rgba(30, 60, 95, .22); border-top: 3px solid var(--pink); animation: cookieIn .45s var(--ease); }
.cookie__text { flex: 1; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.cookie__text p + p { margin-top: 4px; }
.cookie__text a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; transition: color .2s; }
.cookie__text a:hover { color: var(--pink); }
.cookie__actions { display: flex; gap: 10px; flex: none; }
.cookie__actions .btn { min-height: 42px; padding: 0 18px; font-size: 14px; white-space: nowrap; }
.btn--outline { background: transparent; color: var(--btn); box-shadow: inset 0 0 0 1.5px var(--btn); }
.btn--outline:hover { background: var(--btn); color: #fff; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .cookie { left: 10px; right: 10px; bottom: 10px; }
  .cookie__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cookie__text { font-size: 13px; }
  .cookie__actions { flex-direction: column; }
  .cookie__actions .btn { width: 100%; }
}
body.has-cookie .to-top { bottom: 150px; }
@media (max-width: 760px) { body.has-cookie .to-top { bottom: 230px; } }

/* Шапка прилегает к верху, подвал — к низу: убираем отступы, который добавляют сторонние плагины или расширения браузера */
html body { margin-top: 0 !important; padding-top: 0 !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }

/* лайтбокс: стрелки и счётчик скрыты, если фото в группе одно */
.lightbox__btn[hidden], .lightbox__count[hidden] { display: none; }

/* лайтбокс: пока новое фото грузится, старое не показывается — только индикатор загрузки */
.lightbox.is-loading .lightbox__img { visibility: hidden; }
.lightbox.is-loading .lightbox__figure::before { content: ""; position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: lbSpin .8s linear infinite; }
@keyframes lbSpin { to { transform: rotate(360deg); } }

/* ---------- Статьи: оглавление, галереи, видео, цитата, вопросы ---------- */
.article-toc { margin: 26px 0 8px; padding: 18px 22px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border-left: 3px solid var(--brand); }
.article-toc__title { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.prose .article-toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.prose .article-toc li { break-inside: avoid; margin: 0 0 6px; font-size: 14.5px; line-height: 1.4; }
.prose .article-toc a { text-decoration: none; color: var(--ink); }
.prose .article-toc a:hover { color: var(--pink); }
.prose .article-figure, .prose .article-gallery { margin: 24px 0; }
.article-figure a, .article-gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: zoom-in; }
.article-figure img { display: block; width: 100%; max-width: 640px; height: auto; }
.article-gallery { display: grid; gap: 10px; align-items: start; }
.article-gallery--2 { grid-template-columns: repeat(2, 1fr); }
.article-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.article-gallery--4 { grid-template-columns: repeat(4, 1fr); }
.article-gallery img { display: block; width: 100%; height: auto; transition: transform .35s var(--ease); }
.article-gallery a:hover img, .article-figure a:hover img { transform: scale(1.03); }
.article-video { margin: 24px 0; text-align: center; }
.article-video video { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: var(--radius); background: #000; box-shadow: var(--shadow-sm); }
.prose .article-quote { margin: 18px 0 22px; padding: 14px 22px; font-style: italic; font-size: 17px; color: var(--ink-2); }
.prose .article-quote p { margin: 0; }
.prose .article-quote cite { display: block; margin-top: 6px; font-size: 13.5px; font-style: normal; color: var(--muted); }
.prose h3.article-q { position: relative; padding-left: 30px; color: var(--ink); font-size: 18px; }
.prose h3.article-q::before { content: "?"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }
.prose .page-prices--inline ul { list-style: none; padding-left: 0; }
.prose .page-prices--inline li + li { margin-top: 0; }
@media (max-width: 760px) {
  .prose .article-toc ol { columns: 1; }
  .article-gallery--3, .article-gallery--4 { grid-template-columns: repeat(2, 1fr); }
}

.article-figure a { display: inline-block; max-width: 100%; vertical-align: top; }
.article-figure img { max-height: 620px; width: auto; max-width: 100%; }
.article-gallery img { aspect-ratio: 3 / 4; object-fit: cover; }

/* =========================================================
   ПЛАНШЕТЫ
   Вертикально: iPad mini 744/768, iPad 810/820, iPad Air/Pro 11" 820/834,
   Android-планшеты 600–800. Горизонтально: 1024–1366 (iPad, iPad Pro 12.9", Galaxy Tab).
   ========================================================= */

/* высота экрана без панелей браузера (iPad/iPhone Safari) */
@supports (height: 100dvh) {
  .mobile-menu { max-height: calc(100dvh - var(--nav-h)); }
  .lightbox__img { max-height: calc(100dvh - 140px); }
}

/* вертикальные планшеты: 600–991 */
@media (min-width: 600px) and (max-width: 991px) {
  :root { --gutter: 24px; }

  /* шапка: логотип сверху по центру, адреса — по краям в одну строку */
  .topbar__inner { flex-direction: column; align-items: center; gap: 14px; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .topbar__contacts { width: 100%; justify-content: space-between; gap: 16px; }
  .contact__text { font-size: 14px; white-space: nowrap; }
  .contact__icon { width: 36px; }

  /* «О докторе»: фото слева, текст справа */
  .about__inner { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 32px; }
  .about__photo { max-width: none; margin: 0; }
  .about__body { font-size: 15px; }
  .about--full .about__photo { position: -webkit-sticky; position: sticky; top: calc(var(--nav-h) + 16px); }
  .stats { gap: 10px; }
  .stat { font-size: 12px; }

  /* цены: название слева, цена справа в той же строке */
  .prices__list li { flex-wrap: nowrap; gap: 14px; align-items: center; }

  /* карточки и списки — в две колонки, а не в одну на всю ширину */
  .link-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .groups__grid--4, .groups__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
  .doc-tiles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .doc-tile { padding: 20px; gap: 14px; }
  .doc-tile__icon { width: 52px; height: 52px; }
  .doc-tile__title { font-size: 17px; }
  .page-cta { flex-direction: row; align-items: center; }

  /* отзывы — по две карточки */
  .carousel--reviews { --per: 2; --gap: 16px; }
}

/* услуги на главной: 4 в ряд (8 карточек = 2 ровных ряда) */
@media (min-width: 700px) and (max-width: 991px) {
  .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .service__title { font-size: 13px; }
}

/* узкие вертикальные планшеты 600–699: фото доктора чуть меньше */
@media (min-width: 600px) and (max-width: 699px) {
  .about__inner { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 24px; }
  .about__body { font-size: 14px; }
}

/* горизонтальные планшеты и небольшие ноутбуки: 992–1280 */
@media (min-width: 992px) and (max-width: 1280px) {
  .footer__inner { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .page__inner { gap: 32px; grid-template-columns: minmax(0, 1fr) 270px; }
  .footer__pair { grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: 24px; }
}

/* сенсорные экраны: без «залипающих» эффектов наведения, удобные зоны нажатия */
@media (hover: none) {
  a, button, summary, label { -webkit-tap-highlight-color: transparent; }
  .btn:hover, .btn--primary:hover, .btn--light:hover, .doc-tile:hover, .group-card:hover, .promo:hover, .about__photo:hover img,
  .service:hover .service__img img, .symptom:hover .symptom__img img { transform: none; }
  .btn:hover::after { left: -80%; }
  .aside-nav__link { padding-top: 8px; padding-bottom: 8px; }
}

/* старый Safari без gap во flex: стрелка в карточке-ссылке нарисована псевдоэлементом */
.no-flexgap .link-card::after { margin-left: 12px; }
/* кнопка «наверх»: стрелка строго по центру и в старом Safari (там grid внутри <button> не центрирует) */
.to-top svg { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -12px 0 0 -11px; }
/* плитки «Когда нужен флеболог» — ссылки на статьи о симптомах */
.symptom__link { display: flex; align-items: center; gap: 16px; width: 100%; color: inherit; }
.symptom__img { display: block; }
.symptom__link:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 6px; }
@media (max-width: 560px) { .symptom__link { gap: 14px; } }
/* «Содержание», размеченное вручную в редакторе (стиль «Содержание статьи»): первая строка — заголовок, список — маркированный или нумерованный */
.article-toc > p:first-child { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.prose .article-toc ul { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.prose .article-toc ul li { break-inside: avoid; margin: 0 0 6px; font-size: 14.5px; line-height: 1.4; }
@media (max-width: 768px) { .prose .article-toc ul { columns: 1; } }
.prose [id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
/* плавное увеличение при наведении: одиночные фото статей — так же, как фото в галереях */
.article-figure img, .article-gallery img { transition: transform .5s var(--ease); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.article-gallery a, .article-figure a { -webkit-transform: translateZ(0); transform: translateZ(0); }
@media (hover: none) { .article-gallery a:hover img, .article-figure a:hover img { transform: none; } }
