/* ============================================================
   Евромедсервис — хирургический центр
   Фирменный стиль: медицинский красный + графит + белый,
   градиентный акцент из логотипа (красный→фиолетовый→синий).
   ============================================================ */

:root {
  /* Brand palette (из логотипа и темы сайта) */
  --red:        #af2828;   /* основной бренд-цвет */
  --red-700:    #8f1f1f;
  --red-600:    #9e2323;
  --red-050:    #faecec;   /* светлый тинт */
  --ink:        #222327;   /* заголовки */
  --ink-text:   #333333;   /* текст (как в логотипе) */
  --ink-soft:   #5c616b;
  --bg:         #ffffff;
  --bg-soft:    #f4f6f8;   /* светло-серые секции */
  --bg-soft-2:  #eef1f4;
  --line:       #e4e7ec;
  --line-dark:  rgba(255,255,255,.14);
  --dark:       #191b20;   /* тёмные секции */
  --dark-2:     #212429;
  /* фирменный градиент знака */
  --grad: linear-gradient(135deg, #A21B1F 0%, #4837AB 52%, #168DE2 100%);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "PT Serif", "Times New Roman", Georgia, serif;

  --radius: 3px;
  --radius-lg: 4px;
  --container: 1220px;
  --section-y: clamp(3.25rem, 7vw, 6.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-sm: 0 1px 2px rgba(25,27,32,.05);
  --shadow-md: 0 10px 26px -18px rgba(25,27,32,.3);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--ink-text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.14; letter-spacing: -.01em; color: var(--ink); }
em { font-style: normal; color: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); border-radius: 2px; }
.eyebrow--light { color: #ff9a9a; }
.eyebrow--light::before { background: #ff9a9a; }

.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section__title { font-size: clamp(1.85rem, 4.5vw, 3rem); }
.section__title--light { color: #fff; }
.section__sub { margin-top: .9rem; color: var(--ink-soft); font-size: 1.08rem; max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--red); --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .92rem 1.7rem; border-radius: 2px; border: 1.5px solid transparent;
  background: var(--_bg); color: var(--_fg);
  font-weight: 600; font-size: .98rem;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(175,40,40,.55); }
.btn:active { transform: translateY(0); }
.btn--accent { --_bg: var(--red); }
.btn--accent:hover { background: var(--red-700); }
.btn--ghost { --_bg: transparent; --_fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-soft); border-color: #cfd4db; box-shadow: none; }
.btn--sm { padding: .6rem 1.2rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 38px; width: auto; }
/* текстовый fallback-бренд (если логотип не используется) */
.brand__text { display: none; }

.nav { display: flex; gap: clamp(.9rem, 1.6vw, 1.5rem); margin-inline: auto; }
.nav a {
  font-size: .95rem; font-weight: 500; color: var(--ink-text); white-space: nowrap;
  position: relative; padding-block: .3rem; transition: color .25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--red); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--red); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 1.1rem; }
.header__phone { display: flex; flex-direction: column; text-align: right; line-height: 1.15; white-space: nowrap; }
.header__phone-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); white-space: nowrap; }
.header__phone-num { font-weight: 700; color: var(--ink); font-size: 1.02rem; white-space: nowrap; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: none; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: .2rem;
  padding: 1rem clamp(1.1rem, 4vw, 2.5rem) 2rem;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; animation: slideDown .35s var(--ease); }
.mobile-nav a { padding: .85rem .2rem; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border: none; }
.mobile-nav__phone { color: var(--red) !important; font-weight: 700 !important; }
.mobile-nav .btn { margin-top: .8rem; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); position: relative; background: var(--bg); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(45% 55% at 100% 0%, rgba(175,40,40,.06), transparent 70%),
    radial-gradient(40% 45% at 0% 100%, rgba(72,55,171,.05), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; margin-bottom: 1.4rem; }
.hero__lead { font-size: 1.16rem; color: var(--ink-soft); max-width: 47ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }
.hero__chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.hero__chips li {
  font-size: .85rem; font-weight: 500; color: var(--ink);
  padding: .45rem .95rem; border: 1px solid var(--line); border-radius: 2px; background: #fff;
}
.hero__chips li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .5rem; border-radius: 50%; background: var(--grad); vertical-align: middle; }

.hero__visual { position: relative; min-height: 440px; }
.hero__card { position: absolute; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); z-index: 4; }

/* ---------- Hero-слайдер ---------- */
.hero-slider {
  position: absolute; inset: 0; overflow: hidden; z-index: 1;
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.hero-slider::before {
  content: ""; position: absolute; left: 0; top: 0; z-index: 3; width: 100%; height: 5px; background: var(--grad);
}
.hero-slider__track { display: flex; height: 100%; width: 100%; transition: transform .6s var(--ease); }
.hero-slide {
  position: relative; flex: 0 0 100%; min-width: 100%; height: 100%; margin: 0;
  background-size: cover; background-position: center;
}
/* Запасное <img> для случая отключённого JS (единственный статичный слайд) */
.hero-slide--static .hero-slide__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--ink); border: 1px solid var(--line);
  border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background .25s var(--ease), transform .25s var(--ease);
}
.hero-slider__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.hero-slider__arrow--prev { left: .6rem; }
.hero-slider__arrow--next { right: .6rem; }
.hero-slider__dots { position: absolute; left: 0; right: 0; bottom: .9rem; z-index: 5; display: flex; justify-content: center; gap: .4rem; }
.hero-slider__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); border: none; cursor: pointer; padding: 0; transition: background .25s var(--ease), transform .25s var(--ease); }
.hero-slider__dot.is-active { background: #fff; transform: scale(1.25); }

.hero__card[hidden] { display: none !important; }
.hero__card { transition: opacity .2s var(--ease), transform .2s var(--ease); }
.hero__card.is-swapping { opacity: 0; transform: translateY(6px); }
.hero__card--rating {
  left: -1.5rem; bottom: 2rem; background: #fff; padding: 1rem 1.3rem; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .1rem; border-radius: var(--radius);
}
.hero__card--rating strong { font-size: 1.45rem; color: var(--ink); font-weight: 700; }
.hero__card--rating span { font-size: .82rem; color: var(--ink-soft); }
.hero__card--badge {
  right: -1rem; top: 1.8rem; background: var(--red); color: #fff;
  padding: 1rem 1.25rem; border-radius: var(--radius); text-align: center; line-height: 1.2;
  display: flex; flex-direction: column; gap: .2rem;
}
.hero__badge-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.hero__card--badge span:last-child { font-size: .78rem; opacity: .92; }
.rating-stars { color: #f5a623; letter-spacing: 2px; font-size: 1rem; }

/* ============================================================
   STATS
   ============================================================ */
.stats { background: var(--dark); color: #fff; padding-block: clamp(2rem, 4vw, 3.2rem); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; display: flex; flex-direction: column; gap: .3rem; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -.75rem; top: 15%; height: 70%; width: 1px; background: var(--line-dark); }
.stat__num { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; color: #fff; font-weight: 700; }
.stat__num::after { content: ""; display: block; width: 34px; height: 3px; margin: .55rem auto 0; background: var(--grad); border-radius: 3px; }
.stat__label { font-size: .92rem; color: rgba(255,255,255,.66); }

/* ============================================================
   DIRECTIONS
   ============================================================ */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.dir-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.45rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.dir-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.dir-card__icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.4rem;
  color: var(--red); background: var(--red-050); border-radius: 12px; margin-bottom: 1rem;
}
.dir-card h3 { font-size: 1.18rem; margin-bottom: .45rem; }
.dir-card p { font-size: .93rem; color: var(--ink-soft); }
/* Профильные направления (проктология, онкология, колоноскопия) — акцент */
.dir-card--feature { border-color: transparent; box-shadow: inset 0 0 0 1px var(--red-050); background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.dir-card--feature .dir-card__icon { color: #fff; background: var(--grad); }

/* ============================================================
   BARIATRIC
   ============================================================ */
.bariatric { background: var(--dark); color: #fff; position: relative; overflow: hidden; }
.bariatric::before {
  content: ""; position: absolute; top: -30%; right: -5%; width: 50%; height: 160%;
  background: var(--grad); opacity: .12; filter: blur(30px); pointer-events: none;
}
.bariatric__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; position: relative; }
.bariatric__lead { font-size: 1.12rem; color: rgba(255,255,255,.78); margin: 1.1rem 0 1.5rem; max-width: 52ch; }
.bariatric__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .8rem; margin-bottom: 2rem; }
.bariatric__list li { padding-left: 2rem; position: relative; color: rgba(255,255,255,.9); }
.bariatric__list li::before {
  content: "✓"; position: absolute; left: 0; top: .05rem;
  width: 1.4rem; height: 1.4rem; display: grid; place-items: center;
  background: var(--red); color: #fff; border-radius: 6px; font-size: .75rem; font-weight: 700;
}
.bariatric__visual { position: relative; }
.bariatric__visual::before { content: ""; position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: 5px; background: var(--grad); }
.bariatric__visual img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg);
  border: 1px solid var(--line-dark);
}

/* ============================================================
   PRICES
   ============================================================ */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.price-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.price-card:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: var(--shadow-sm); }
.price-card__name { font-weight: 500; }
.price-card__value { font-size: 1.22rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.price-note { margin-top: 1.3rem; font-size: .88rem; color: var(--ink-soft); }

/* ============================================================
   TEAM
   ============================================================ */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.doc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.doc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.doc-card__photo {
  width: 104px; height: 104px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.9rem; font-weight: 700; color: #fff;
  background: var(--grad);
}
.doc-card__photo--img { background: var(--bg-soft); overflow: hidden; padding: 0; }
.doc-card__photo--img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.doc-card--chief { border-color: var(--red); }
.doc-card h3 { font-size: 1.22rem; }
.doc-card__role { color: var(--red); font-weight: 600; font-size: .95rem; margin-top: .3rem; }
.doc-card__meta { color: var(--ink-soft); font-size: .88rem; margin-top: .2rem; }

/* ============================================================
   TRUST
   ============================================================ */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.trust-item { border-top: 3px solid var(--red); padding-top: 1.2rem; }
.trust-item__num { font-size: 1.5rem; font-weight: 700; color: var(--red); display: block; margin-bottom: .5rem; }
.trust-item h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.trust-item p { font-size: .93rem; color: var(--ink-soft); }

/* ============================================================
   REVIEWS
   ============================================================ */
.section--dark { background: var(--dark); color: #fff; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.review {
  background: var(--dark-2); border: 1px solid var(--line-dark); border-radius: var(--radius-lg);
  padding: 1.7rem; display: flex; flex-direction: column; gap: 1rem;
}
.review p { font-size: 1.08rem; line-height: 1.5; color: rgba(255,255,255,.9); }
.review footer { color: rgba(255,255,255,.55); font-size: .9rem; font-weight: 600; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: flex; flex-direction: column; gap: .7rem; }
.faq__item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1.4rem; overflow: hidden;
}
.faq__item summary {
  list-style: none; cursor: pointer; padding: 1.2rem 0; font-weight: 600; font-size: 1.06rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.6rem; color: var(--red); font-weight: 400; line-height: 1; transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding-bottom: 1.25rem; color: var(--ink-soft); }

/* ============================================================
   APPOINTMENT + CONTACTS
   ============================================================ */
.appointment__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.form { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__field { display: flex; flex-direction: column; gap: .4rem; }
.form__field span { font-size: .85rem; font-weight: 600; color: var(--ink); }
.form__field input, .form__field select, .form__field textarea {
  font: inherit; font-size: 1rem; padding: .82rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-text);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(175,40,40,.13);
}
.form__field textarea { resize: vertical; }
.form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.form__consent input { margin-top: .2rem; accent-color: var(--red); }
.form__status { font-size: .92rem; min-height: 1.2em; }
.form__status.is-ok { color: var(--red); font-weight: 600; }
.form__status.is-error { color: var(--red-700); font-weight: 600; }

.appointment__contacts { background: var(--bg-soft); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2rem); }
.appointment__contacts h3 { font-size: 1.45rem; margin-bottom: 1.1rem; }
.contacts-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1.05rem; margin-bottom: 1.3rem; }
.contacts-list li { display: flex; flex-direction: column; gap: .2rem; }
.contacts-list__label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red); font-weight: 700; }
.contacts-list__value { font-size: 1.05rem; color: var(--ink); }
.contacts-list__value a:hover { color: var(--red); }
.contacts__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.contacts__map iframe { width: 100%; height: 240px; border: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); padding-block: clamp(2.5rem, 5vw, 3.75rem) 1.5rem; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line-dark); }
.footer__logo { height: 36px; width: auto; margin-bottom: .9rem; filter: brightness(0) invert(1); }
.footer__brand p { font-size: .92rem; max-width: 40ch; }
.footer__slogan { margin-top: .6rem; font-family: var(--serif); font-style: italic; color: #fff; font-size: 1.02rem; }
.footer__nav { display: flex; flex-direction: column; gap: .7rem; }
.footer__nav a { font-size: .95rem; transition: color .25s var(--ease); }
.footer__nav a:hover { color: #fff; }
.footer__contact { display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.footer__phone { font-size: 1.4rem; font-weight: 700; color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.3rem; font-size: .82rem; color: rgba(255,255,255,.5); }

/* ============================================================
   FAB
   ============================================================ */
.fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90; display: none;
  background: var(--red); color: #fff; padding: .9rem 1.5rem; border-radius: 100px;
  font-weight: 600; box-shadow: 0 14px 30px -10px rgba(175,40,40,.7);
}

/* ============================================================
   CHIEF DOCTOR (ЛИСИЧКИН)
   ============================================================ */
/* overflow-x: clip — лёгкий вылет фото за левый край экрана обрезается,
   но не создаёт горизонтальной прокрутки (ось Y остаётся видимой) */
.chief { overflow-x: clip; }
.chief__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.chief__photo { position: relative; }
/* Фото без рамки — «плавающий» вырез (PNG с прозрачным фоном) */
.chief__photo img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 26px 34px rgba(25,27,32,.28));
}
/* На широких экранах фото крупнее и упирается столом в левый край экрана.
   Правый край «пришпилен» к своей колонке (width:100% + отрицательный margin
   на величину выноса), поэтому фото НЕ налезает на текстовый блок при любой
   ширине. Небольшой обрез слева (до подлокотника) допустим. */
@media (min-width: 1100px) {
  .chief__photo {
    --bleed: calc(max((100vw - var(--container)) / 2, 0px) + clamp(1.1rem, 4vw, 2.5rem) + 2.5rem);
  }
  .chief__photo img {
    width: calc(100% + var(--bleed));
    max-width: none;
    margin-left: calc(-1 * var(--bleed));
  }
}
.chief__lead { font-size: 1.1rem; color: var(--ink-soft); margin: 1rem 0 1.5rem; max-width: 56ch; }
.chief__regalia {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.4rem;
}
.chief__regalia li { position: relative; padding-left: 1.6rem; font-size: .96rem; color: var(--ink); }
.chief__regalia li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: 9px; height: 9px;
  background: var(--grad); border-radius: 1px; transform: rotate(45deg);
}
.chief__spec { font-size: .95rem; color: var(--ink-soft); margin-bottom: 1.6rem; padding: 1rem 1.2rem; background: var(--bg-soft); border-left: 3px solid var(--red); }
.chief__spec span { color: var(--red); font-weight: 700; }

.chief__certs { margin-top: clamp(2.5rem, 5vw, 4rem); }
.chief__certs-title { font-size: 1.3rem; margin-bottom: 1.3rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.certs-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.cert { display: flex; flex-direction: column; gap: .55rem; }
.cert img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border: 1px solid var(--line);
  background: #fff; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.cert:hover img { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--red); }
.cert span { font-size: .82rem; color: var(--ink-soft); text-align: center; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; grid-auto-flow: dense; }
.gallery__item { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption {
  position: absolute; left: 0; bottom: 0; right: 0; padding: 1.4rem 1.1rem .9rem;
  color: #fff; font-size: .92rem; font-weight: 600;
  background: linear-gradient(to top, rgba(10,11,14,.78), transparent);
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .dir-card:hover, .doc-card:hover, .price-card:hover { transform: none; }
}

/* ============================================================
   REVIEWS — карусель и источники
   ============================================================ */
.reviews-carousel { position: relative; display: flex; align-items: center; gap: .6rem; }
.reviews-track {
  display: flex; gap: 1.3rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .3rem .2rem 1rem; scrollbar-width: none; -ms-overflow-style: none;
}
.reviews-track::-webkit-scrollbar { display: none; }
.reviews-track .review {
  scroll-snap-align: start; flex: 0 0 clamp(260px, 32%, 360px);
}
.reviews-arrow {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--dark-2); color: #fff; border: 1px solid var(--line-dark); border-radius: 50%;
  font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background .25s var(--ease), opacity .25s var(--ease);
}
.reviews-arrow:hover { background: var(--red); border-color: var(--red); }
.reviews-arrow:disabled { opacity: .3; cursor: default; }
.reviews-sources {
  margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.1rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line-dark);
}
.reviews-sources__label { color: rgba(255,255,255,.7); font-size: .95rem; }
.reviews-sources__links { display: flex; flex-wrap: wrap; gap: .6rem; }
.reviews-sources__links a {
  font-size: .9rem; font-weight: 600; color: #fff; padding: .5rem 1rem;
  border: 1px solid var(--line-dark); border-radius: 100px; transition: background .25s var(--ease), border-color .25s var(--ease);
}
.reviews-sources__links a:hover { background: var(--red); border-color: var(--red); }

/* ============================================================
   FORM honeypot (скрытое анти-спам поле)
   ============================================================ */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   АДМИНКА
   ============================================================ */
.admin-fab {
  position: fixed; left: 1.1rem; bottom: 1.1rem; z-index: 120;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 1.35rem; cursor: pointer;
  box-shadow: var(--shadow-md); transition: transform .25s var(--ease);
}
.admin-fab:hover { transform: rotate(45deg); }
.admin-overlay { position: fixed; inset: 0; background: rgba(10,11,14,.45); z-index: 130; opacity: 0; transition: opacity .25s var(--ease); }
.admin-overlay.is-open { opacity: 1; }
.admin-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); z-index: 140;
  background: #fff; box-shadow: -14px 0 40px -20px rgba(0,0,0,.5);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s var(--ease);
}
.admin-panel.is-open { transform: translateX(0); }
.admin-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.admin-panel__head strong { font-family: var(--serif); font-size: 1.1rem; }
.admin-panel__close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--ink-soft); }
.admin-panel__body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
.admin-panel__foot { border-top: 1px solid var(--line); padding: .9rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.admin-panel__status { flex: 1 1 100%; font-size: .85rem; color: var(--ink-soft); order: 3; }
.admin-panel__status.is-ok { color: #1a7f45; }
.admin-panel__status.is-warn { color: #b06a00; }
.admin-panel__tools { display: flex; gap: .4rem; margin-left: auto; }
.admin-sec { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.admin-sec:last-child { border-bottom: none; }
.admin-sec__title { font-size: 1rem; margin-bottom: .8rem; }
.admin-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .7rem; }
.admin-field > span { font-size: .78rem; color: var(--ink-soft); }
.admin-field input, .admin-field textarea, .admin-panel input[type="number"] {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: .9rem; background: #fff; color: var(--ink-text);
}
.admin-field textarea { resize: vertical; }
.admin-field--inline { flex-direction: row; align-items: center; gap: .6rem; }
.admin-field--inline input { width: 90px; }
.admin-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .9rem; cursor: pointer; }
.admin-check input { width: 16px; height: 16px; }
.admin-slide { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin: .8rem 0; background: var(--bg-soft); }
.admin-slide__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.admin-slide__move { display: flex; gap: .3rem; }
.admin-slide__thumb { height: 90px; margin-bottom: .6rem; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.admin-slide__thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-hint { font-size: .82rem; color: var(--ink-soft); margin-bottom: .9rem; line-height: 1.4; }
.admin-badge { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; margin-top: .7rem; background: #fff; }
.admin-badge__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.admin-badge__head strong { font-size: .86rem; }
.admin-switch { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--ink-soft); cursor: pointer; margin: 0; }
.admin-switch input { width: 15px; height: 15px; }
.admin-mini { font-size: .78rem; padding: .3rem .55rem; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; color: var(--ink); }
.admin-mini:hover { border-color: #cfd4db; }
.admin-mini:disabled { opacity: .4; cursor: default; }
.admin-mini--danger { color: var(--red); border-color: #e7c3c3; }
.admin-mini--danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.admin-add { width: 100%; margin-top: .4rem; padding: .6rem; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font: inherit; font-size: .9rem; color: var(--red); font-weight: 600; }
.admin-add:hover { background: var(--red-050); }
.admin-upload { display: inline-block; font-size: .8rem; color: var(--red); cursor: pointer; margin-bottom: .7rem; }
.admin-upload input { display: block; margin-top: .3rem; font-size: .8rem; }

/* ============================================================
   LEGAL / DOC PAGES (политика, документы)
   ============================================================ */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding-block: clamp(1.8rem, 4vw, 3rem); }
.page-hero .eyebrow { margin-bottom: .6rem; }
.breadcrumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: .7rem; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--red); }
.legal { max-width: 860px; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.legal h3 { font-size: 1.05rem; margin: 1.3rem 0 .5rem; }
.legal p { margin-bottom: .9rem; color: var(--ink-text); line-height: 1.65; }
.legal ul { margin: 0 0 1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.legal li { line-height: 1.55; }
.legal__meta { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.4rem; }

.docs-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.doc-item {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.doc-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--red); }
.doc-item__icon {
  flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--red-050); color: var(--red); border-radius: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.doc-item__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.doc-item__name { font-weight: 600; color: var(--ink); font-size: 1rem; }
.doc-item__meta { font-size: .82rem; color: var(--ink-soft); }
.doc-item__dl { margin-left: auto; flex: 0 0 auto; font-size: .85rem; font-weight: 600; color: var(--red); white-space: nowrap; }
.fns-note { background: var(--bg-soft); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.fns-note p { margin-bottom: .7rem; line-height: 1.6; }
.fns-note ol { margin: 0 0 .8rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; }
.fns-note li { line-height: 1.55; }
.fns-note__warn { color: var(--red); font-weight: 600; margin-bottom: 0; }

/* ============================================================
   ВЕРСИЯ ДЛЯ СЛАБОВИДЯЩИХ
   ============================================================ */
.vision-toggle {
  display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--line);
  border-radius: 100px; padding: .45rem .8rem; font: inherit; font-size: .82rem; color: var(--ink);
  cursor: pointer; transition: border-color .25s var(--ease), color .25s var(--ease);
}
.vision-toggle:hover { border-color: var(--red); color: var(--red); }
.vision-toggle__icon { font-size: 1rem; line-height: 1; }

/* Панель настроек (видна только в режиме для слабовидящих) */
.vision-bar { background: #15325a; color: #fff; font-size: 1rem; }
.vision-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.4rem; padding-block: .6rem; }
.vision-bar__group { display: inline-flex; align-items: center; gap: .4rem; }
.vision-bar__label { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.vision-btn {
  min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem; border: 2px solid rgba(255,255,255,.55);
  background: transparent; color: #fff; border-radius: 4px; cursor: pointer; font: inherit; line-height: 1;
}
.vision-btn[data-v="font"][data-val="1"] { font-size: .85rem; }
.vision-btn[data-v="font"][data-val="2"] { font-size: 1.1rem; }
.vision-btn[data-v="font"][data-val="3"] { font-size: 1.35rem; }
.vision-btn.is-active { background: #fff; color: #15325a; border-color: #fff; font-weight: 700; }
.vision-swatch { font-weight: 700; }
.vision-swatch--white { background: #fff; color: #000; }
.vision-swatch--black { background: #000; color: #fff; }
.vision-swatch--beige { background: #f7f3d9; color: #3b2f1a; }
.vision-swatch--blue  { background: #9fd3ff; color: #06243f; }
.vision-swatch.is-active { outline: 3px solid #ffd400; outline-offset: 1px; }
.vision-bar__exit { margin-left: auto; background: #fff; color: #15325a; border: none; border-radius: 4px; padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }

/* Режим для слабовидящих: применяется к <html class="vision"> */
html.vision[data-vcolor="white"] { --v-bg: #ffffff; --v-fg: #000000; --v-link: #0033cc; }
html.vision[data-vcolor="black"] { --v-bg: #000000; --v-fg: #ffffff; --v-link: #ffff00; }
html.vision[data-vcolor="beige"] { --v-bg: #f7f3d9; --v-fg: #3b2f1a; --v-link: #0b3d91; }
html.vision[data-vcolor="blue"]  { --v-bg: #9fd3ff; --v-fg: #06243f; --v-link: #06243f; }
html.vision { background: var(--v-bg); }
html.vision body { background: var(--v-bg) !important; color: var(--v-fg) !important; }
html.vision body * {
  background-color: transparent !important; color: var(--v-fg) !important;
  border-color: var(--v-fg) !important; box-shadow: none !important; text-shadow: none !important;
  background-image: none !important; filter: none !important;
}
html.vision *::before, html.vision *::after { background-image: none !important; }
html.vision a, html.vision a * { color: var(--v-link) !important; text-decoration: underline !important; }
html.vision .btn, html.vision button { border: 2px solid var(--v-fg) !important; border-radius: 4px !important; }
html.vision * { animation: none !important; transition: none !important; }
html.vision .reveal { opacity: 1 !important; transform: none !important; }
/* размеры шрифта */
html.vision[data-vfont="1"] { font-size: 112%; }
html.vision[data-vfont="2"] { font-size: 134%; }
html.vision[data-vfont="3"] { font-size: 162%; }
/* интервалы */
html.vision[data-vspacing="big"] body * { letter-spacing: .1em !important; word-spacing: .14em !important; line-height: 1.9 !important; }
/* изображения выкл */
html.vision[data-vimages="off"] img,
html.vision[data-vimages="off"] .gallery-grid,
html.vision[data-vimages="off"] .certs-gallery,
html.vision[data-vimages="off"] .doc-card__photo,
html.vision[data-vimages="off"] .contacts__map { display: none !important; }
/* декоративный слайдер/плашки прячем всегда в этом режиме */
html.vision .hero__visual { display: none !important; }
/* панель настроек всегда поверх выбранной цветовой схемы */
html.vision .vision-bar { background: #15325a !important; color: #fff !important; }
html.vision .vision-bar * { color: #fff !important; border-color: rgba(255,255,255,.55) !important; }
html.vision .vision-bar .vision-swatch--white { background: #fff !important; color: #000 !important; }
html.vision .vision-bar .vision-swatch--black { background: #000 !important; color: #fff !important; }
html.vision .vision-bar .vision-swatch--beige { background: #f7f3d9 !important; color: #3b2f1a !important; }
html.vision .vision-bar .vision-swatch--blue  { background: #9fd3ff !important; color: #06243f !important; }
html.vision .vision-bar .vision-btn.is-active { background: #fff !important; color: #15325a !important; }
html.vision .vision-bar__exit { background: #fff !important; color: #15325a !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav, .header__phone { display: none; }
  .nav-toggle { display: flex; }
  .header__inner { gap: 1rem; }
  .header__actions { margin-left: auto; }
  .hero__inner, .bariatric__inner, .appointment__inner, .chief__inner { grid-template-columns: 1fr; }
  .chief__photo { max-width: 360px; }
  .hero__visual { min-height: 360px; margin-top: 1rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1rem; }
  .stat:nth-child(2)::after { display: none; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .fab { display: inline-block; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .header__actions .btn { display: none; }
  .cards-grid, .price-grid, .team-grid, .trust-grid { grid-template-columns: 1fr; }
  .reviews-track .review { flex-basis: 85%; }
  .reviews-sources { flex-direction: column; align-items: flex-start; }
  .chief__regalia { grid-template-columns: 1fr; }
  .certs-gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-column: span 1; }
  .stat::after { display: none !important; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__card--rating { left: 0; }
  .hero__card--badge { right: 0; }
}

/* ░░ Карта (Leaflet) ░░ */
.map { border-radius: var(--radius-lg, 4px); overflow: hidden; border: 1px solid var(--line, #e4e7ec); box-shadow: 0 10px 30px rgba(0,0,0,.08); margin-top: 1rem; }
.map #map { width: 100%; height: 420px; background: var(--bg-soft-2, #eef1f4); z-index: 1; }
@media (max-width: 560px) { .map #map { height: 340px; } }
.map-pin { background: transparent; border: 0; }
.map-pin span { display: block; width: 26px; height: 26px; background: var(--red, #af2828); border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.map-pop__sub { color: var(--ink-soft, #5c616b); font-size: .86rem; }
.leaflet-popup-content { line-height: 1.45; }
.leaflet-popup-content a { color: var(--red, #af2828); font-weight: 700; }
.contacts-list__pin { display: inline-block; vertical-align: middle; margin-right: 5px; color: var(--red, #af2828); }
.route-btn { margin-top: 12px; }

/* degree в карточке врача на главной */
.doc-card__degree{ color:var(--ink-soft,#5c616b); font-size:.84rem; margin-top:.25rem; }

/* Акция в прайсе */
.pacc-row[data-promo]{ background:#fff6e0; border-left:3px solid #e8a33d; }
.pacc-row[data-promo] .pacc-row__name{ font-weight:700; }
.pacc-row[data-promo] .pacc-row__price{ font-weight:800; color:#c0392b; }
.pacc-badge{ display:inline-block; background:#e8a33d; color:#fff; font-size:.68rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; padding:.1rem .45rem; border-radius:5px; margin-right:.5rem; vertical-align:1px; }

/* Мини-расписание (часы работы в контактах) */
.sched-mini { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
@media (max-width: 480px) { .sched-mini { grid-template-columns: 1fr; } }
.sched-mini__item { display: flex; flex-direction: column; gap: .12rem; padding: .55rem .8rem; background: var(--bg-soft); border-radius: 8px; }
.sched-mini__t { color: var(--ink); font-size: .95rem; font-weight: 700; }
.sched-mini__t small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .78rem; }
.sched-mini__item > span { font-size: .9rem; color: var(--ink-text); }

.pacc-row__price { white-space: nowrap; }

/* Акции направления — автоподтягиваются из прайса (data-price-promos) */
.dir-promos { display: grid; gap: .6rem; margin-top: 1.1rem; }
.dir-promos:empty { display: none; }
.dir-callout { margin: .2rem 0; padding: .9rem 1.2rem; border-left: 4px solid var(--red); background: var(--red-050); border-radius: var(--radius); line-height: 1.5; color: var(--ink-text); }
.dir-callout b { color: var(--red-700); }
