/* Ulug'bek Ultramed — стили сайта (макет C204, версия 34). Цвета — как у логотипа и сайта записи (book.uultramed.uz). */
:root {
  --blue: #006699; --blue-deep: #00557f; --red: #cc0033; --gold: #b8860b;
  --ink: #0e2a3b; --text: #3b4f5d; --muted: #4a6070;
  --paper: #f2f6f9; --line: #dce5eb; --line-2: #cfe0ea; --sky: #e8f1f6; --sky-2: #e1eef5; --border: #c9d7e0;
  --dark: #0e2a3b; --dark-text: #c3d3dd; --accent-light: #8cc4e0;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-deep); }
section[id] { scroll-margin-top: 12px; }
:focus-visible { outline: 3px solid #4da3d1; outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; }
.h1 { font-family: var(--serif); font-weight: 600; font-size: 54px; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.15; margin: 0; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.lead-s { margin: 10px 0 0; color: var(--muted); font-size: 17px; max-width: 42em; }
.lead-s.light { color: var(--dark-text); margin: 0; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.kicker-light { color: var(--accent-light); }
.link-strong { font-weight: 600; text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* Верхняя строка и шапка */
.topbar { background: var(--dark); color: #dce7ee; font-size: 14px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar-info { display: flex; gap: 24px; flex-wrap: wrap; }
.ti { display: inline-flex; gap: 8px; align-items: center; }
.langs { display: flex; gap: 4px; }
.lang { color: #dce7ee; text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.lang:hover { color: #fff; }
.lang.is-on { color: #fff; background: rgba(255,255,255,.14); font-weight: 600; }
.header { background: #fff; border-bottom: 1px solid #e3ebf0; position: relative; z-index: 30; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 52px; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--blue); white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.header-phone { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.lang-mini, .menu-btn { display: none; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.lang-mini { min-width: 52px; padding: 0 10px; font: inherit; font-size: 14px; font-weight: 600; }
.menu-btn { width: 44px; padding: 0; }
.menu-btn span { display: flex; }
.menu-btn .ico-x, .menu-btn[aria-expanded="true"] .ico-menu { display: none; }
.menu-btn[aria-expanded="true"] .ico-x { display: flex; }
.pop-lang { position: absolute; right: 68px; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(14,42,59,.18); padding: 6px; display: flex; flex-direction: column; min-width: 170px; }
.pop-lang a { padding: 11px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.pop-lang a.is-on { background: var(--sky-2); color: var(--blue); font-weight: 600; }
.pop-menu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(14,42,59,.16); padding: 8px 32px 16px; display: flex; flex-direction: column; }
.pop-menu > a { padding: 14px 2px; border-bottom: 1px solid #e3ebf0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; }
.pop-cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; }

/* Первый экран: название → подзаголовок → фото с подписями дугой → текст и кнопки */
.hero { background: var(--paper); padding: 44px 0 64px; }
.hero-in { display: flex; flex-direction: column; gap: 28px; }
.hero-title { text-align: center; color: var(--blue); } /* название — цветом логотипа (слово владельца 18.10); подзаголовок — своим цветом */
.hero-sub { display: block; margin-top: 10px; font-size: 0.5em; font-weight: 500; line-height: 1.2; color: var(--text); }
.hero-media { position: relative; margin-bottom: 44px; }
.hero-photo { width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; object-position: 50% 45%; border-radius: 24px; box-shadow: 0 18px 44px rgba(14,42,59,.16); }
.bubble { position: absolute; width: 262px; height: 78px; background: #fff; border-radius: 14px; padding: 0 16px 0 14px; box-shadow: 0 10px 30px rgba(14,42,59,.16); display: flex; gap: 12px; align-items: center; }
.b1 { left: -44px; bottom: 36px; }
.b2 { left: calc(36% - 131px); bottom: -42px; }
.b3 { left: calc(64% - 131px); bottom: -42px; }
.b4 { right: -44px; bottom: 36px; }
.bub-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--sky-2); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.bub-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.bub-txt b { font-size: 16px; }
.bub-txt small { font-size: 13px; color: var(--muted); }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.hero-lead { margin: 0; font-size: 19px; color: var(--text); max-width: 720px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-btns .btn { min-height: 54px; }
.hero-main { padding: 0 26px; font-size: 17px; }
.hero-my { font-size: 15px; color: var(--muted); }

/* Цифры, награда */
.facts-sec { padding: 56px 0 24px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 28px 0; }
.fact { padding: 8px 26px; }
.fact + .fact { border-left: 1px solid var(--line-2); }
.fact-num { display: flex; align-items: center; gap: 12px; }
.fact-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sky); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.fact-val { font-family: var(--serif); font-size: 42px; font-weight: 600; color: var(--blue); line-height: 1.1; white-space: nowrap; }
.fact-lbl { color: var(--text); margin-top: 8px; }
.award-sec { padding: 8px 0 24px; }
.award { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); background: #fff; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; }
.award picture, .award-photo { height: 100%; }
.award-photo { width: 100%; object-fit: cover; object-position: center 30%; }
.award-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.award-kicker { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.award-title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.25; margin: 0; }
.award-text { margin: 0; color: var(--text); }

/* Секции */
.sec { padding: 88px 0; }
.sec-dirs { padding: 72px 0; }
.sec-grey { background: var(--paper); }
.sec-dark { background: var(--dark); color: #fff; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }

/* Направления */
.dir-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.dir-item { display: flex; gap: 16px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.dir-ico { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--sky); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.dir-name { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.dir-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.dir-item:hover .dir-name { color: var(--blue); }
.dir-ctl { display: none; }

/* Врачи: без фото — компактные карточки с инициалами (фото — когда появятся в МИС) */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.doc-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.doc-photo { width: 64px; height: 64px; border-radius: 50%; background: #dce7ee; display: flex; align-items: center; justify-content: center; flex: none; }
.doc-photo span { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #6f8a9c; }
.doc-name { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.doc-name:hover { color: var(--blue); }
.doc-spec { font-size: 14px; color: var(--muted); margin-top: 4px; }
.doc-book { font-size: 15px; margin-top: 8px; }
.docs-all-m { display: none; }

/* Диагностика */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.chip-btn { font: inherit; font-weight: 500; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--blue); }
.chip-btn[aria-selected="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.diag-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.diag-who { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.diag-who b { color: var(--ink); }
.diag-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.diag-doc { display: flex; gap: 14px; align-items: flex-start; }
.diag-doc-txt { display: flex; flex-direction: column; gap: 2px; }
.diag-doc-txt small { font-size: 14px; color: var(--muted); }
.diag-doc-txt a { font-size: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #dce7ee; color: #6f8a9c; display: flex; align-items: center; justify-content: center; flex: none; font-family: var(--serif); font-weight: 600; }

/* Хирургия */
.surg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.surg-text { display: flex; flex-direction: column; gap: 22px; }
.surg .h2 { color: #fff; }
.chips-static { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-static span { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: #dce7ee; }
.growth { display: flex; gap: 32px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; }
.growth-n { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent-light); }
.growth-t { font-size: 14px; color: var(--dark-text); }
.surg-media { display: flex; flex-direction: column; gap: 16px; }
.surg-photo-box { aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; }
.surg-photo-box picture, .surg-photo { width: 100%; height: 100%; }
.surg-photo { object-fit: cover; object-position: 50% 70%; transform: scale(1.18); transform-origin: 50% 88%; }
.scards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.scard { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.lamps { display: flex; gap: 8px; }
.lamp { width: 40px; height: 40px; border-radius: 50%; background: #e3ecf2; display: flex; align-items: center; justify-content: center; flex: none; }
.lamp svg { width: 22px; height: 22px; }
.lamp.is-on { background: var(--blue); }
.fifth-title { font-weight: 700; font-size: 18px; line-height: 1.3; }
.fifth-n { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--blue); }
.scard-p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.scard-foot { border-top: 1px solid #e3ebf0; padding-top: 10px; font-size: 14px; color: var(--muted); margin-top: auto; }
.scard-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.bars { display: flex; align-items: flex-end; gap: 22px; height: 150px; border-bottom: 1px solid var(--border); padding: 0 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-n { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.bar-n-b { font-size: 26px; color: var(--blue); }
.bar { width: 100%; max-width: 56px; border-radius: 4px 4px 0 0; }
.bar-a { height: 26px; background: #9cc3da; }
.bar-b { height: 112px; background: var(--blue); }
.bar-years { display: flex; gap: 22px; padding: 0 6px; margin-top: -8px; font-size: 13px; color: var(--muted); }
.bar-years span { flex: 1; text-align: center; }

/* Стационар: карточки и листаемая галерея */
.hosp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: stretch; }
.hosp-cards { display: flex; flex-direction: column; gap: 16px; }
.hosp-card { border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hosp-card > div { display: flex; flex-direction: column; gap: 10px; }
.hosp-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--sky); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.gal { margin: 0; position: relative; border-radius: 20px; overflow: hidden; min-height: 440px; background: #dce7ee; touch-action: pan-y; }
.gal-track { position: absolute; inset: 0; display: flex; transition: transform .8s ease; }
.gal-slide { flex: 0 0 100%; height: 100%; }
.gal-slide picture, .gal-img { width: 100%; height: 100%; }
.gal-img { object-fit: cover; }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 16px; background: linear-gradient(to top, rgba(14,42,59,.72), rgba(14,42,59,0)); color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.gal-name { font-weight: 600; }
.gal-nav { display: flex; align-items: center; gap: 10px; }
.gal-dots { display: flex; gap: 6px; }
.gal-dot { position: relative; width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.6); cursor: pointer; transition: width .3s ease; }
.gal-dot::after { content: ''; position: absolute; inset: -12px -3px; }
.gal-dot[aria-current="true"] { width: 24px; background: #fff; }
.gal-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.gal-btn:hover { color: var(--blue); }
html:not(.js) .gal-nav { display: none; }

/* Страны и карта */
.intl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 56px; align-items: end; }
.intl-text { display: flex; flex-direction: column; gap: 16px; }
.intl-text .lead-s { margin: 0; }
.intl-map { border-radius: 24px; overflow: hidden; background: #cfe3f1; }
.intl-map svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Отзывы: лента карточек, высота постоянная (длинные тексты свёрнуты) — страница не дёргается */
.rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
/* Шапка блока отзывов — по центру (слово владельца 18.10); карточки и листание — как у ленты. */
.rev-head { justify-content: center; text-align: center; }
.rev-head > div { flex: 1 1 100%; min-width: 0; }
.rev-head .rating { justify-content: center; }
.rev-head .lead-s { margin-left: auto; margin-right: auto; }
.rating-n { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.stars { color: #e0a100; font-size: 20px; letter-spacing: 2px; }
.rev-refresh { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -12px -10px -12px -6px; padding: 0; vertical-align: middle; border: 0; border-radius: 50%; background: none; color: var(--blue); cursor: pointer; transition: background .15s, color .15s; }
.rev-refresh:hover { background: var(--sky); color: var(--blue-deep); }
.rev-refresh svg { transform: rotate(var(--turn, 0deg)); transition: transform .6s ease; }
.rev-stage { position: relative; touch-action: pan-y; }
.rev-viewport { overflow: hidden; padding: 4px 3px; margin: 0 -3px; transition: opacity .26s ease; }
.rev-viewport.is-fading { opacity: 0; }
.rev-track { display: flex; gap: 20px; align-items: stretch; transition: transform .7s ease; transform: translateX(calc(var(--i, 0) * (100% + 20px) / -3)); }
.rev-track.no-anim { transition: none; }
.rev-card { flex: 0 0 calc((100% - 40px) / 3); margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rev-q { flex: none; fill: #9cc3da; }
.rev-text { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.js .rev-text { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.js .rev-card.is-open .rev-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.rev-more { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--blue); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 32px; }
.rev-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #e3ebf0; padding-top: 14px; }
.rev-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rev-av { width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; }
.rev-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.rev-meta b { font-weight: 600; overflow-wrap: anywhere; }
.rev-meta small { color: var(--muted); font-size: 14px; }
.rev-src { align-self: flex-start; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; }
.rev-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(14,42,59,.12); }
.rev-arrow:hover { border-color: var(--blue); color: var(--blue); }
.rev-prev { left: -24px; }
.rev-next { right: -24px; }
.rev-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; min-height: 8px; }
.rev-dot { position: relative; width: 10px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--border); cursor: pointer; transition: width .3s ease, background .3s ease; }
.rev-dot::after { content: ''; position: absolute; inset: -12px -4px; }
.rev-dot[aria-current="true"] { width: 28px; background: var(--blue); }
/* Без JS: первый набор листается пальцем/прокруткой, стрелок и точек нет */
html:not(.js) .rev-arrow, html:not(.js) .rev-dots { display: none; }
html:not(.js) .rev-viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
html:not(.js) .rev-track { transform: none; }
html:not(.js) .rev-card { scroll-snap-align: start; }

/* Запись, вопросы */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.way { background: #fff; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.way-main { border: 2px solid var(--blue); }
.way-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--sky-2); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.way-main .way-ico { background: var(--blue); color: #fff; }
.way .btn { align-self: flex-start; margin-top: auto; }
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq-plus { color: var(--blue); transition: transform .15s; flex: none; }
.faq details[open] .faq-plus { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--muted); }

/* Контакты */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.ci { display: flex; gap: 14px; }
.ci svg { flex: none; color: var(--blue); margin-top: 2px; }
.ci > div { display: flex; flex-direction: column; }
.ci a, .ci span { color: var(--text); text-decoration: none; }
.ci a:hover { color: var(--blue); }
.contact-map { position: relative; min-height: 440px; border-radius: 20px; overflow: hidden; background: #e8eef2; }
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.maps { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.maps-menu { background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(14,42,59,.22); padding: 6px; display: flex; flex-direction: column; min-width: 210px; }
.maps-menu a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.maps-menu a:hover { background: var(--paper); }

/* Подвал */
.footer { background: var(--dark); color: var(--dark-text); padding: 56px 0 32px; font-size: 15px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.foot-about p { max-width: 22em; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col b { color: #fff; }
.foot-col a { color: var(--dark-text); text-decoration: none; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #93a8b6; }
.langs-foot { display: flex; gap: 12px; }
.lang-foot { color: #93a8b6; text-decoration: none; }
.lang-foot.is-on { color: #fff; }
.mbar { display: none; }

/* Узкий компьютер */
@media (max-width: 1290px) {
  .b1 { left: -12px; }
  .b4 { right: -12px; }
  .rev-prev { left: -14px; }
  .rev-next { right: -14px; }
}
@media (max-width: 1340px) { .header-phone { display: none; } }
@media (max-width: 1100px) { .nav { gap: 18px; font-size: 14px; } }
@media (min-width: 1001px) { .pop-menu { display: none !important; } }

/* Планшет */
@media (max-width: 1000px) {
  .nav { display: none; }
  .js .menu-btn { display: inline-flex; }
  .h1 { font-size: 40px; }
  .h2 { font-size: 30px; }
  .hero-media { margin-bottom: 0; }
  .hero-bubbles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .bubble { position: static; width: auto; height: auto; padding: 14px 16px 14px 14px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .fact:nth-child(3) { border-left: 0; }
  .dir-grid, .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diag-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surg, .contact { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .intl { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hosp-grid { grid-template-columns: minmax(0, 1fr); }
  .ways { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-track { transform: translateX(calc(var(--i, 0) * (100% + 20px) / -2)); }
  .rev-card { flex-basis: calc((100% - 20px) / 2); }
}

/* Телефон */
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .js .topbar { display: none; }
  .topbar .ti-extra { display: none; }
  .header-in { min-height: 60px; gap: 8px; }
  .brand { gap: 9px; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 17px; }
  .brand-sub, .header-book { display: none; }
  .header-actions { gap: 8px; }
  .js .lang-mini { display: inline-flex; }
  .pop-menu { padding: 8px 16px 16px; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 26px; }
  .lead-s { font-size: 15px; }
  .sec, .sec-dirs { padding: 44px 0; }
  .sec-head { margin-bottom: 20px; gap: 12px; }

  .hero { padding: 20px 0 28px; }
  .hero-in { gap: 16px; }
  .hero-title { text-align: left; }
  .hero-sub { font-size: 0.6em; margin-top: 6px; line-height: 1.25; }
  .hero-photo { aspect-ratio: 3 / 2; object-position: 62% 50%; border-radius: 16px; box-shadow: none; }
  .hero-bubbles { gap: 8px; margin-top: 10px; }
  .bubble { padding: 10px; gap: 9px; align-items: flex-start; box-shadow: 0 4px 14px rgba(14,42,59,.08); border-radius: 12px; }
  .bub-ico { width: 32px; height: 32px; border-radius: 8px; }
  .bub-ico svg { width: 18px; height: 18px; }
  .bub-txt b { font-size: 14px; }
  .bub-txt small { font-size: 12px; line-height: 1.3; }
  .hero-cta { align-items: stretch; text-align: left; gap: 14px; }
  .hero-lead { font-size: 16px; }
  .hero-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-btns .btn { min-height: 50px; padding: 0 12px; font-size: 15px; }
  .hero-btns .hero-main { grid-column: 1 / -1; min-height: 54px; font-size: 17px; }
  .hero-my { text-align: center; font-size: 14px; }

  .facts-sec { padding: 24px 0 8px; }
  .facts { padding: 0; border-radius: 16px; overflow: hidden; row-gap: 0; }
  .fact { padding: 16px 14px; border-left: 0 !important; }
  .fact:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .fact-num { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fact-ico { width: 38px; height: 38px; border-radius: 10px; }
  .fact-val { font-size: 30px; }
  .fact-lbl { font-size: 14px; margin-top: 4px; line-height: 1.35; }
  .award-sec { padding: 8px 0; }
  .award { grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
  .award picture, .award-photo { height: 220px; }
  .award-photo { object-position: center 12%; }
  .award-body { padding: 18px; gap: 8px; }
  .award-kicker { font-size: 12px; gap: 8px; }
  .award-title { font-size: 19px; line-height: 1.3; }
  .award-text { font-size: 14px; }

  /* Направления — плитки 2 в ряд; первые восемь, остальные по кнопке (без JS — все сразу) */
  .dir-grid { border-top: 0; gap: 10px; }
  .dir-item { flex-direction: column; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
  .dir-ico { width: 38px; height: 38px; }
  .dir-ico svg { width: 21px; height: 21px; }
  .dir-name { font-size: 14px; overflow-wrap: anywhere; }
  .dir-sub, .dir-all { display: none; }
  .js .dirs:not(.is-open) .dir-more { display: none; }
  .js .dir-ctl { display: block; margin-top: 12px; }
  .dir-ctl .btn { width: 100%; }
  .dir-ctl-open { display: grid; gap: 10px; }
  .dirs.is-open .dir-open, .dirs:not(.is-open) .dir-ctl-open { display: none; }

  /* Врачи и виды диагностики — ленты пальцем вбок */
  .docs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; gap: 12px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .docs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .doc { flex: 0 0 80%; scroll-snap-align: start; padding: 14px; gap: 12px; }
  .doc-photo { width: 52px; height: 52px; }
  .doc-photo span { font-size: 18px; }
  .doc-name { font-size: 16px; }
  .doc-spec { font-size: 13px; }
  .docs-all { display: none; }
  .docs-all-m { display: flex; margin-top: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
  .chip-btn { flex: none; white-space: nowrap; padding: 8px 14px; font-size: 14px; }
  .diag-card { padding: 16px; border-radius: 16px; }
  .diag-who { font-size: 13px; margin-bottom: 14px; }
  .diag-docs { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .avatar { width: 48px; height: 48px; font-size: 14px; }

  .surg { gap: 24px; }
  .scards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .surg-photo-box { border-radius: 16px; }
  .fifth-title { font-size: 17px; }
  .lamp { width: 38px; height: 38px; }

  .hosp-grid { gap: 14px; }
  .gal { order: -1; min-height: 0; aspect-ratio: 4 / 3; border-radius: 16px; }
  .gal-cap { padding: 36px 12px 10px; font-size: 14px; }
  .gal-btn { display: none; }
  .hosp-cards { gap: 14px; }
  .hosp-card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 16px; }
  .hosp-card > div { gap: 4px; }
  .hosp-ico { width: 44px; height: 44px; border-radius: 12px; }
  .hosp-ico svg { width: 24px; height: 24px; }
  .hosp-card .h3 { font-size: 18px; }
  .hosp-card .muted { font-size: 15px; }
  .intl { gap: 20px; }

  .rating-n { font-size: 24px; }
  .stars { font-size: 17px; }
  .rating .muted { font-size: 14px; }
  .rev-stage { overflow: hidden; margin: 0 -16px; padding: 0 16px; }
  .rev-viewport { overflow: visible; }
  .rev-track { gap: 12px; transform: translateX(calc(var(--i, 0) * -1 * (88% + 12px))); }
  .rev-card { flex-basis: 88%; padding: 18px 18px 16px; border-radius: 16px; gap: 10px; }
  .rev-text { font-size: 16px; line-height: 1.5; }
  .js .rev-text { -webkit-line-clamp: 8; }
  .rev-more { font-size: 14px; }
  .rev-av { width: 40px; height: 40px; font-size: 14px; }
  .rev-meta b { font-size: 14px; }
  .rev-meta small { font-size: 13px; }
  .rev-src { font-size: 12px; }
  .rev-arrow { display: none; }
  .rev-dots { margin-top: 16px; }
  html:not(.js) .rev-stage { overflow: visible; }

  /* Способы записи — компактные строки, вся карточка нажимается */
  .ways { gap: 12px; margin-top: 20px; }
  .way { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 16px; border-radius: 14px; }
  .way-ico { grid-row: span 3; width: 44px; height: 44px; }
  .way .h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.35; }
  .way .muted { font-size: 14px; line-height: 1.45; }
  .way .btn { min-height: 40px; padding: 0 14px; font-size: 15px; margin-top: 8px; }
  .way .btn::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
  .faq summary { font-size: 17px; }
  .contact-map { min-height: 300px; border-radius: 16px; }
  .contact-info .row-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .maps { left: 10px; bottom: 10px; }
  .foot { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer { padding: 36px 0 calc(32px + 76px); font-size: 14px; }

  /* Нижняя панель записи — появляется после первого экрана (site.js) */
  .mbar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14,42,59,.08); transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .mbar.is-on { transform: none; visibility: visible; }
  .mbar .btn { min-height: 50px; }
  .mbar .btn-primary { flex: 1; }
  .mbar-call { width: 54px; padding: 0; flex: none; }
}
