/* ===== Переменные ===== */
:root {
  --brand:        #0f7c8a;
  --brand-dark:   #0a5b66;
  --brand-soft:   #e6f4f6;
  --accent:       #f4a259;
  --ink:          #10242a;
  --ink-soft:     #4d6570;
  --line:         #dce6e9;
  --bg:           #ffffff;
  --bg-alt:       #f5f9fa;

  --radius:       14px;
  --radius-lg:    22px;
  --shadow:       0 4px 20px rgba(16, 36, 42, .07);
  --shadow-hover: 0 12px 32px rgba(16, 36, 42, .13);

  --gap:          16px;
  --section-y:    56px;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;              /* страховка от горизонтальной прокрутки */
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
p  { margin: 0 0 12px; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a  { color: var(--brand); text-decoration: none; }

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 780px; }

.section { padding: var(--section-y) 0; }
.section__title { font-size: 26px; font-weight: 800; }
.section__head  { margin-bottom: 28px; }
.section__lead  { color: var(--ink-soft); max-width: 620px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 2px solid transparent;
  border-radius: 100px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 124, 138, .28);
}
.btn--primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 124, 138, .34);
}
.btn--ghost {
  background: transparent;
  color: var(--brand-dark);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn--wide { width: 100%; }
.btn:active { transform: translateY(0); }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 66px;
}

.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); }
.logo__text { font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; }
.logo__text b { font-weight: 800; color: var(--brand); }
.logo--light .logo__text { color: #fff; }
.logo--light .logo__text b { color: var(--accent); }
.logo--light { color: var(--accent); }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 12px 20px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav.is-open { display: block; }
.nav__list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.nav__list a {
  display: block;
  padding: 11px 4px;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.nav__list a:hover { color: var(--brand); }
.nav__phone { width: 100%; }

/* ===== Первый экран ===== */
.hero {
  padding: 44px 0 var(--section-y);
  background:
    radial-gradient(900px 380px at 82% -8%, var(--brand-soft), transparent 70%),
    var(--bg);
}
.tagline {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 100px;
}
.hero__title { font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.hero__text  { color: var(--ink-soft); max-width: 540px; margin-bottom: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero__note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.hero__note::before { content: '✓'; color: var(--brand); font-weight: 800; margin-right: 7px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
}
.stat {
  padding: 16px 12px;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat__num   { display: block; font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.stat__label { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }

/* ===== Преимущества ===== */
.features { background: var(--bg-alt); }
.features__grid { display: grid; gap: var(--gap); }
.feature {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: box-shadow .25s, transform .25s;
}
.feature:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.feature__icon { width: 34px; height: 34px; margin-bottom: 12px; fill: var(--brand); }
.feature h3 { font-size: 17px; }
.feature p  { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ===== Услуги ===== */
.services__grid { display: grid; gap: var(--gap); }
.service {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.service:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.service--accent { border-color: var(--brand); background: var(--brand-soft); }
.service__badge {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #6b3d0b;
  background: var(--accent);
  border-radius: 100px;
}
.service__name  { font-size: 18px; }
.service__desc  { flex-grow: 1; font-size: 15px; color: var(--ink-soft); }
.service__price { margin: 12px 0 0; font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.service__price span { font-size: 17px; font-weight: 600; }

/* ===== Врачи ===== */
.doctors { background: var(--bg-alt); }
.doctors__grid { display: grid; gap: var(--gap); }
.doctor {
  padding: 26px 22px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.doctor__photo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
}
.doctor__photo span { font-size: 26px; font-weight: 800; color: #fff; }
.doctor__name { font-size: 18px; margin-bottom: 4px; }
.doctor__role { margin-bottom: 6px; font-weight: 600; color: var(--brand); }
.doctor__exp  { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* ===== Отзывы ===== */
.reviews__grid { display: grid; gap: var(--gap); }
.review {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.review__stars { margin-bottom: 10px; color: var(--accent); letter-spacing: 2px; }
.review blockquote { flex-grow: 1; margin: 0 0 14px; font-size: 15px; color: var(--ink-soft); }
.review__author { margin: 0; font-weight: 700; }
.review__author span { display: block; font-size: 13px; font-weight: 400; color: var(--ink-soft); }

/* ===== Вопросы ===== */
.faq { background: var(--bg-alt); }
.faq__list { display: grid; gap: 10px; }
.faq__item {
  padding: 4px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--brand);
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding-bottom: 6px; color: var(--ink-soft); }

/* ===== Форма записи ===== */
.booking__inner { display: grid; gap: 28px; }
.booking__text p { color: var(--ink-soft); max-width: 460px; }
.booking__contacts { display: grid; gap: 6px; margin-top: 18px; font-weight: 600; }
.booking__contacts li { color: var(--ink-soft); font-weight: 400; }
.booking__contacts a { font-size: 20px; font-weight: 800; }

.form {
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.field__opt { font-weight: 400; color: var(--ink-soft); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: #b9cdd3; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 124, 138, .15);
}
.field__error {
  display: none;
  margin-top: 5px;
  font-size: 13px;
  color: #c0392b;
}
.field.has-error input { border-color: #c0392b; }
.field.has-error .field__error { display: block; }

.form__policy  { margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); text-align: center; }
.form__success {
  margin: 14px 0 0;
  padding: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: var(--radius);
  text-align: center;
}

/* ===== Подвал ===== */
.footer { padding: 34px 0 22px; color: #cfe0e4; background: var(--ink); }
.footer__inner { display: grid; gap: 20px; }
.footer__addr { margin: 10px 0 0; font-size: 14px; color: #9fb6bc; }
.footer__nav  { display: grid; gap: 8px; }
.footer__nav a { color: #cfe0e4; }
.footer__nav a:hover { color: var(--accent); }
.footer__bottom {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer__bottom p { margin: 0; font-size: 13px; color: #8ba4ab; }

/* ===== Планшет: от 640px ===== */
@media (min-width: 640px) {
  :root { --section-y: 72px; --gap: 20px; }

  .section__title { font-size: 32px; }
  .hero__title    { font-size: 42px; }

  .features__grid,
  .services__grid,
  .reviews__grid,
  .doctors__grid  { grid-template-columns: repeat(2, 1fr); }

  .booking__inner { grid-template-columns: 1fr 1fr; align-items: start; gap: 32px; }
  .form           { padding: 30px; }
  .footer__inner  { grid-template-columns: 1fr auto; align-items: start; }
  .footer__nav    { grid-auto-flow: column; gap: 22px; }
}

/* ===== Десктоп: от 900px ===== */
@media (min-width: 900px) {
  :root { --section-y: 92px; }

  .burger { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: 26px;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav__list { flex-direction: row; gap: 24px; margin: 0; }
  .nav__list a { padding: 4px 0; border: 0; }
  .nav__phone { width: auto; padding: 10px 20px; }

  .hero { padding-top: 72px; }
  .hero__inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 48px;
  }
  .hero__title  { font-size: 52px; }
  .hero__stats  { grid-template-columns: 1fr; margin-top: 0; gap: 14px; }
  .stat         { display: flex; align-items: baseline; gap: 12px; text-align: left; padding: 20px 22px; }
  .stat__num    { font-size: 30px; }
  .stat__label  { font-size: 14px; }

  .features__grid,
  .services__grid { grid-template-columns: repeat(4, 1fr); }
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .reviews__grid,
  .doctors__grid  { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================
   Сентябрь 2026: новые блоки лендинга клиники
   ===================================================== */

[hidden] { display: none !important; }

/* Плашка «демо» */
.demo-note { padding: 10px 0; font-size: 13px; color: #634b1f; background: #fbf1df; border-bottom: 1px solid #eddcb8; }
.demo-note b { color: #43310e; }

/* Предупреждение для медицинской рекламы — крупно и заметно */
.med-warning {
  padding: 16px 0;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-block: 1px solid #c6e3e7;
}

/* Карточка «Первый приём» в первом экране */
.hero__card {
  margin-top: 34px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}
.hero__card-label { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.hero__card-title { margin-bottom: 14px; font-size: 24px; font-weight: 800; }
.checklist { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 38px; font-size: 15px; counter-increment: c; }
.checklist li::before {
  content: counter(c);
  position: absolute; left: 0; top: -1px;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  font-size: 13px; font-weight: 800; color: #fff;
  background: var(--brand); border-radius: 50%;
}
.hero__card-price { margin: 0; padding: 14px 16px; font-size: 14px; color: var(--ink-soft); background: var(--bg-alt); border-radius: var(--radius); }
.hero__card-price b { margin-right: 6px; font-size: 22px; color: var(--brand-dark); }

/* Услуги: срок и сноска */
.service__time { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.services__note { margin: 20px 0 0; font-size: 13px; color: var(--ink-soft); }

/* Первый визит */
.visit__inner { display: grid; gap: 28px; }
.steps { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: var(--gap); }
.step { position: relative; padding: 22px 22px 22px 70px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); counter-increment: s; }
.step::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 22px; top: 20px;
  font-size: 22px; font-weight: 800; color: var(--brand);
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.bring { align-self: start; padding: 24px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.bring h3 { font-size: 18px; }
.bring ul { display: grid; gap: 10px; }
.bring li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-soft); }
.bring li::before { content: '✓'; position: absolute; left: 0; font-weight: 800; color: var(--brand); }

/* Врачи: пояснение про демо */
.doctors__lead { margin-bottom: 24px; }

/* Форма: выпадающий список и согласие */
.field select {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 124, 138, .15); }
.agree { display: flex !important; gap: 10px; align-items: flex-start; margin: 0 !important; font-size: 13px !important; font-weight: 400 !important; color: var(--ink-soft); cursor: pointer; }
.agree input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--brand); }
.field--agree.has-error .agree { color: #c0392b; }

/* Карта по нажатию */
.map {
  position: relative;
  display: grid;
  place-items: center;
  height: 240px;
  margin-top: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 124, 138, .08) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(15, 124, 138, .08) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.map__pin {
  position: absolute; top: calc(50% - 46px); left: calc(50% - 10px);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 8px rgba(15, 124, 138, .2);
}
.map__btn { position: relative; z-index: 1; margin-top: 40px; padding: 11px 22px; font: inherit; font-weight: 700; color: var(--brand-dark); background: #fff; border: 0; border-radius: 100px; box-shadow: var(--shadow-hover); cursor: pointer; }
.map__note { position: absolute; bottom: 12px; left: 16px; font-size: 12px; color: var(--ink-soft); }
.map iframe { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; }
.map.is-loaded .map__btn, .map.is-loaded .map__note, .map.is-loaded .map__pin { display: none; }
.routes { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.routes a { padding: 8px 16px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); border-radius: 100px; }
.routes a:hover { border-color: var(--brand); background: var(--brand-soft); }

/* Подвал: предупреждение и лицензия */
.footer__bottom { display: grid; gap: 6px; }
.footer__bottom .footer__warning { font-size: 15px; font-weight: 800; color: #e6f4f6; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero__card { margin-top: 0; padding: 28px; }
  .visit__inner { grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
  .bring { margin-top: 118px; }
  .med-warning { font-size: 19px; }
}

/* ===== Уважаем настройку «меньше движения» ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn:hover, .feature:hover, .service:hover { transform: none; }
}
