/* SLIM landing — mobile-first. Breakpoints: 768px (tablet), 1024px (desktop). */

:root {
  --primary: #88577a;
  --primary-2: #9d547e;
  --primary-dark: #6e3b5e;
  --primary-soft: #f5ecf2;
  --gold: #c59d5f;
  --bg: #fbf9fa;
  --card: #ffffff;
  --text: #241c22;
  --muted: #6f6470;
  --line: #eee3ea;
  --viber: #6550e6;
  --shadow: 0 6px 24px rgba(136, 87, 122, 0.08);
  --shadow-lg: 0 14px 40px rgba(110, 59, 94, 0.16);
  --r: 18px;
  --r-sm: 12px;
  --head: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --tbar-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  padding-bottom: calc(var(--tbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0;
  font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 44px; }
.btn--primary { background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); color: #fff; box-shadow: 0 6px 16px rgba(136, 87, 122, .3); }
.btn--soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn--light { background: #fff; color: var(--primary-dark); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.btn--viber { background: var(--viber); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; text-decoration: none; min-height: 44px; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.hdr__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.logo { display: flex; align-items: center; min-height: 44px; }
.logo img { width: 168px; height: auto; }
.nav, .hdr__cta { display: none; }
.lang { display: flex; padding: 3px; background: var(--primary-soft); border-radius: 999px; }
.lang__link { min-width: 44px; min-height: 36px; display: grid; place-items: center; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--primary-dark); text-decoration: none; }
.lang__link.is-active { background: var(--primary); color: #fff; }

.bstrip { border-top: 1px solid var(--line); background: #fff; }
.bstrip__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-top: 8px; padding-bottom: 6px; }
.bstrip__label { display: none; width: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; width: calc(100% + 32px); scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; scroll-snap-align: start;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(136, 87, 122, .25); }
.bstrip__addr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); text-decoration: none; min-height: 32px; }
.bstrip__addr svg { color: var(--primary); }
.bstrip__lm { display: none; }
.bstrip__lm::before { content: '· '; }

/* ---------- Hero ---------- */
.hero { padding: 12px 0 4px; }
.hero__copy {
  background: linear-gradient(140deg, var(--primary-2) 0%, var(--primary-dark) 100%);
  color: #fff; border-radius: var(--r); padding: 20px 18px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero__copy::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); pointer-events: none; }
.badge { align-self: flex-start; display: inline-block; background: rgba(255,255,255,.18); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; }
.hero h1 { font-size: clamp(25px, 6.6vw, 44px); font-weight: 700; line-height: 1.15; margin: 12px 0 10px; text-wrap: balance; }
.hero__lead { font-size: clamp(15px, 1.6vw, 18px); opacity: .92; max-width: 34em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero__ctas .btn { flex: 1 1 auto; }
.stats { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.2); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats b { display: block; font: 700 clamp(18px, 2.4vw, 26px)/1.1 var(--head); }
.stats span { font-size: 12.5px; opacity: .9; line-height: 1.3; display: block; margin-top: 2px; }
.hero__visual { display: none; }

/* ---------- Sections ---------- */
.sec { padding: 40px 0; }
.sec--tint { background: linear-gradient(180deg, #f6eef3 0%, var(--bg) 100%); }
.sec__head { margin-bottom: 18px; }
.sec__head h2 { font-size: clamp(23px, 3vw, 32px); text-wrap: balance; }
.sec__head h2::after { content: ''; display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--primary); margin-top: 12px; }
.sec__head p { color: var(--muted); margin-top: 6px; max-width: 60ch; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---------- Services ---------- */
.svc-grid { display: grid; gap: 12px; }
.svc {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.svc.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(136, 87, 122, .14), var(--shadow); }
.svc__tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 10px; }
.svc__title { font-size: 17px; font-weight: 700; margin-top: 4px; }
.svc__desc { font-size: 14px; color: var(--muted); flex: 1; }
.svc__foot .btn svg { width: 16px; height: 16px; }
.svc__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.svc__price { font: 700 19px/1.1 var(--head); color: var(--primary-dark); white-space: nowrap; }
.svc__price span { font: 600 13px var(--body); color: var(--muted); }
.svc--cta { background: linear-gradient(140deg, var(--primary-2), var(--primary-dark)); color: #fff; border-color: transparent; }
.svc--cta .svc__desc { color: rgba(255,255,255,.88); }

/* ---------- Doctors ---------- */
.docs { list-style: none; margin: 0 -16px; padding: 4px 16px 8px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.docs::-webkit-scrollbar { display: none; }
.doc { flex: 0 0 158px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); padding-bottom: 14px; }
.doc__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--primary-soft); }
.doc__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.doc__name { font-size: 15px; font-weight: 700; padding: 12px 12px 2px; }
.doc__role { font-size: 13px; color: var(--muted); padding: 0 12px; line-height: 1.35; }

/* ---------- Branches ---------- */
.branches { display: grid; gap: 12px; }
.branch { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.branch.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(136, 87, 122, .14), var(--shadow); }
.branch__name { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.branch__name svg { color: var(--primary); }
.branch__addr { font-size: 14px; }
.branch__addr span { color: var(--muted); }
.branch__phone { font-weight: 700; color: var(--primary-dark); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.branch__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

/* ---------- Booking ---------- */
.book { display: grid; gap: 16px; }
.book__form, .book__contacts { padding: 22px 18px; }
.book h2 { font-size: clamp(22px, 2.6vw, 28px); }
.book__form > .muted { margin: 6px 0 18px; font-size: 15px; }
form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0; }
.field legend { margin-bottom: 6px; }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: #fff; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; text-overflow: ellipsis; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(136, 87, 122, .15); }
.field input[aria-invalid="true"] { border-color: #c0392b; }
.field__err { font-size: 13px; color: #b03a2e; }
.field-row { display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; }
.chip input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: 14px; font-weight: 600; min-height: 1em; }
.form__status.is-ok { color: #1e7d4f; background: #e9f7ef; padding: 12px 14px; border-radius: var(--r-sm); }
.form__status.is-err { color: #b03a2e; }
.fine { font-size: 12px; color: var(--muted); }

.book__contacts { display: flex; flex-direction: column; gap: 10px; }
.bc__name { display: flex; align-items: center; gap: 6px; font: 700 20px var(--head); margin-top: 8px; }
.bc__name svg { color: var(--primary); }
.bc__phone { font: 700 24px var(--head); color: var(--primary-dark); text-decoration: none; }
.bc__btns { display: grid; gap: 10px; margin-top: 6px; }

/* ---------- Footer ---------- */
.ftr { background: #2a1f27; color: #e9dfe6; padding: 32px 0; font-size: 14px; }
.ftr__row { display: grid; gap: 18px; }
.ftr__logo { width: 170px; height: auto; margin-bottom: 12px; }
.ftr__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr__list a { color: #fff; }
.ftr .link { color: #f1c9e4; }

/* ---------- Sticky thumb bar (mobile/tablet) ---------- */
.tbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}
.tbar a { white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 16px; text-decoration: none; font-weight: 700; font-size: 15px; }
.tbar__tg { flex: 2; background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); color: #fff; box-shadow: 0 6px 14px rgba(136, 87, 122, .35); }
.tbar__call { flex: 1; background: var(--primary-soft); color: var(--primary-dark); }
.tbar__viber { flex: 0 0 54px; background: var(--viber); color: #fff; }
.tbar svg { width: 20px; height: 20px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 300; background: #2a1f27; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px;
  width: max-content; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg);
}

@media (max-width: 359px) {
  .tbar__tg span { font-size: 13px; }
  .stats span { font-size: 11px; }
}

/* ================= Tablet ≥ 768px ================= */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  .pills { margin: 0; padding: 2px 0; width: auto; overflow: visible; flex-wrap: wrap; }
  .bstrip__label { display: inline; width: auto; }
  .hero { padding-top: 24px; }
  .hero__copy { padding: 36px 32px; }
  .logo img { width: 196px; }
  .hero__ctas .btn { flex: 0 0 auto; }
  .sec { padding: 56px 0; }
  .sec__head { margin-bottom: 26px; }
  .svc-grid, .branches { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .doc { flex-basis: 200px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .book__form, .book__contacts { padding: 28px; }
  .bc__btns { grid-template-columns: repeat(3, auto); justify-content: start; }
  .ftr__row { grid-template-columns: 1fr 2fr; }
  .ftr__row > .link { grid-column: 1 / -1; }
}

/* ================= Desktop ≥ 1024px ================= */
@media (min-width: 1024px) {
  :root { --tbar-h: 0px; }
  body { padding-bottom: 0; }
  html { scroll-padding-top: 130px; }
  .tbar { display: none; }
  .toast { bottom: 24px; }

  .hdr__row { min-height: 76px; gap: 24px; }
  .logo img { width: 220px; }
  .nav { display: flex; gap: 4px; margin-right: auto; margin-left: 16px; }
  .nav a { padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text); }
  .nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
  .hdr__cta { display: flex; align-items: center; gap: 10px; }
  .hdr__phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--primary-dark); white-space: nowrap; min-height: 44px; padding: 0 6px; }

  .bstrip__row { flex-wrap: nowrap; min-height: 52px; }
  .bstrip__addr { margin-left: auto; font-size: 14px; }
  .bstrip__lm { display: inline; }
  .bstrip__addr:hover { color: var(--primary-dark); }

  .hero { padding: 40px 0 16px; }
  .hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: stretch; }
  .hero__copy { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
  .hero__visual { display: block; position: relative; min-height: 460px; }
  .hero__ph { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 4px solid #fff; background: var(--primary-soft); }
  .hero__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
  .hero__ph--1 { width: 54%; aspect-ratio: 2 / 3; left: 22%; top: 0; z-index: 2; }
  .hero__ph--2 { width: 40%; aspect-ratio: 3 / 4; left: 0; bottom: 6%; z-index: 1; }
  .hero__ph--3 { width: 40%; aspect-ratio: 3 / 4; right: 0; bottom: 0; z-index: 1; }
  .hero__chip { position: absolute; z-index: 3; left: 50%; bottom: 10px; transform: translateX(-50%); background: #fff; color: var(--primary-dark); font-weight: 700; font-size: 13px; padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-lg); white-space: nowrap; }

  .sec { padding: 72px 0; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .svc { padding: 22px; }
  .svc:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .docs { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; overflow: visible; }
  .branches { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .branch:hover { box-shadow: var(--shadow-lg); }

  .book { grid-template-columns: minmax(0, 560px) minmax(0, 380px); justify-content: center; gap: 28px; align-items: start; }
  .book__form, .book__contacts { padding: 32px; }
  .book__contacts { position: sticky; top: 150px; }
  .bc__btns { grid-template-columns: 1fr; }

  .btn--primary:hover, .tbar__tg:hover { box-shadow: 0 10px 22px rgba(136, 87, 122, .38); transform: translateY(-1px); }
  .btn--soft:hover { background: #eddbe6; }
  .btn--light:hover { transform: translateY(-1px); }
  .btn--ghost:hover { background: rgba(255,255,255,.1); }
  .pill:hover:not(.is-active) { border-color: var(--primary); color: var(--primary-dark); }
  .chip span:hover { border-color: var(--primary); }

  .ftr__row { grid-template-columns: 1fr 2fr auto; align-items: start; }
  .ftr__row > .link { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
