/* ==========================================================================
   Rehab Family – главная страница
   Брейкпоинты: ≥1280 десктоп по макету, 1024–1279, 768–1023 планшет, ≤767 мобильная версия
   ========================================================================== */

:root {
  --green: #9fc74d;
  --green-light: #b5d65f;
  --beige: #f6f3ee;
  --beige-line: #e9e4dc;
  --dark: #595450;
  --dark-2: #4e4b46;
  --yellow: #ddd24c;
  --text: #2e2e2e;
  --text-2: #4a4a4a;
  --muted: #8d8680;
  --container: 1280px;
  --gutter: 40px;
  --font: "Roboto", Arial, sans-serif;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --shadow: 0 20px 45px rgba(60, 50, 40, .09);
}

/* Базовые стили (сброс – в reset.css) */
body {
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: #fff;
}
svg { width: 1em; height: 1em; flex-shrink: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Заголовок секции ---------- */
.title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.08;
  color: var(--text);
  text-align: center;
  text-wrap: balance;
}
.title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin: 40px auto 0;
  background: var(--green);
}
.title--left { text-align: left; }
.title--left::after { display: none; }

/* ---------- Кнопки ---------- */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  border: 2px solid var(--green);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-outline--lg { min-height: 56px; padding: 12px 30px; font-size: 15px; }

.btn-reception {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 320px;
  max-width: 100%;
  height: 62px;
  padding: 0 24px 0 12px;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(90deg, #c4df74 0%, #d7d75d 45%, #f8ba43 100%);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 10px 24px rgba(240, 186, 67, .25);
  transition: filter .2s;
}
.btn-reception:hover { filter: brightness(1.05); }
.btn-reception::after { /* декоративная «R» */
  content: "R";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 1;
  color: rgba(255, 255, 255, .35);
  pointer-events: none;
}
.btn-reception__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .12);
  font-size: 18px;
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.header { position: relative; z-index: 50; }
.header__top { background: var(--beige); }
.header__top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 127px;
}
.logo { flex-shrink: 0; width: 163px; margin-right: 16px; }
.header__tagline {
  max-width: 300px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.15;
  color: #3c3c3c;
  margin-right: 8px;
}

.search {
  position: relative;
  flex: 0 1 190px;
  height: 42px;
}
.search__input {
  width: 100%;
  height: 100%;
  padding: 0 40px 0 15px;
  border: 1px solid var(--beige-line);
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  -webkit-appearance: none;
}
.search__input::placeholder { color: #9a9a9a; }
.search__input:focus { border-color: var(--green); }
.search__btn {
  position: absolute;
  top: 0; right: 0;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: #d6d6d6;
  font-size: 16px;
}
.search__btn:hover { color: var(--green); }

.lang {
  position: relative;
  flex: 0 0 141px;
  height: 42px;
  display: flex;
  align-items: center;
}
.lang__select {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 40px;
  border: 1px solid var(--beige-line);
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  font-weight: 300;
  color: #8a8a8a;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.lang__select:focus { border-color: var(--green); }
.lang__globe { position: absolute; left: 15px; font-size: 16px; color: #cfcfcf; pointer-events: none; }
.lang__caret { position: absolute; right: 15px; width: 10px; height: 6px; color: #2e2e2e; pointer-events: none; }

.pay-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.pay-link svg { font-size: 20px; color: var(--green); }
.pay-link:hover { color: var(--green); }

.header__phone {
  margin-left: 40px;
  text-align: right;
  white-space: nowrap;
}
.phone {
  display: block;
  font-size: 27px;
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
}
.phone span { font-size: 15px; }
.header__phone-note {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  color: #6f6f6f;
}

.burger { display: none; }

/* ---------- Навигация ---------- */
.nav { background: #fff; border-bottom: 1px solid #eeeae4; }
.nav__inner { position: relative; }
.nav__list {
  display: flex;
  justify-content: space-between;
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 63px;
  padding: 0 32px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: background .2s;
}
.nav__item:first-child .nav__link { margin-left: 0; }
.nav__caret { width: 9px; height: 5px; color: var(--green); transition: transform .2s; }

.submenu {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 100%;
  display: grid;
  grid-template-columns: 384px 288px 1fr;
  padding: 26px 64px 30px;
  background: var(--beige);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 16px 30px rgba(60, 50, 40, .06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.submenu__col li { margin-top: 10px; }
.submenu a {
  position: relative;
  display: inline-block;
  padding-left: 16px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 26px;
  color: var(--text);
}
.submenu a::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.submenu a:hover { color: var(--green); }

@media (min-width: 1024px) {
  .nav__item.has-sub:hover > .nav__link,
  .nav__item.has-sub:focus-within > .nav__link { background: var(--beige); }
  .nav__item.has-sub:hover > .submenu,
  .nav__item.has-sub:focus-within > .submenu {
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__link:hover { color: #000; }
  .nav__mobile-extra { display: none; }
}

/* ==========================================================================
   Первый экран
   ========================================================================== */
.hero { padding: 32px 0 64px; }
.hero__inner {
  display: grid;
  grid-template-columns: 768fr 448fr;
  gap: 64px;
}
.hero__media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  max-height: 512px;
  object-fit: cover;
  border-radius: 3px;
}
.hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 32px;
  max-width: 385px;
}
.hero__menu li + li { border-top: 1px solid #ebe8e3; }
.hero__menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  font-size: 21px;
  font-weight: 300;
  color: var(--text);
  transition: color .2s;
}
.hero__menu a > svg:last-child { margin-left: auto; width: 6px; height: 10px; color: var(--green); }
.hero__menu a:hover { color: var(--green); }
.hero__leaf { width: 22px !important; height: 20px !important; margin-left: 0; }
.hero__aside .btn-reception { margin-top: 42px; }

/* ==========================================================================
   Диагнозы
   ========================================================================== */
.section--beige { background: var(--beige); }
.diagnoses { padding: 96px 0 128px; }
.diagnoses__grid {
  display: grid;
  grid-template-columns: 416px 1fr;
  margin-top: 96px;
}
.diagnoses__subtitle {
  margin-bottom: 26px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
}
.abc {
  display: grid;
  grid-template-columns: repeat(6, 46px);
  gap: 14px;
}
.abc a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  transition: background .2s, color .2s;
}
.abc a:hover, .abc a.is-active { background: var(--green); color: #fff; }

.popular {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}
.popular li { margin-bottom: 10px; }
.popular a {
  position: relative;
  display: inline-block;
  padding-left: 32px;
  font-size: 17px;
  font-weight: 300;
  line-height: 26px;
  color: var(--text);
}
.popular a::before {
  content: "";
  position: absolute;
  left: 13px; top: 10px;
  width: 5px; height: 5px;
  border-top: 1.4px solid var(--green);
  border-right: 1.4px solid var(--green);
  transform: rotate(45deg);
}
.popular a:hover { color: var(--green); }
.diagnoses__popular .btn-outline { margin-top: 18px; min-width: 222px; }

/* ==========================================================================
   Консультация
   ========================================================================== */
.consult { padding: 96px 0 100px; }
.consult__inner {
  display: grid;
  grid-template-columns: 436fr 768fr;
  gap: 76px;
  align-items: start;
}
.consult__text { padding-top: 16px; }
.consult .title { font-size: 40px; line-height: 1.17; }
.consult p {
  margin-top: 38px;
  font-size: 15px;
  font-weight: 300;
  line-height: 32px;
  color: var(--text-2);
}
.consult__action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 38px;
}
.consult__note { font-size: 11px; font-weight: 400; color: var(--text-2); }
.consult__media img {
  width: 100%;
  aspect-ratio: 768 / 448;
  object-fit: cover;
  border-radius: 3px;
}

/* ==========================================================================
   Карточки «доверие»
   ========================================================================== */
.trust .title { max-width: 620px; margin: 0 auto; }
.trust__band {
  margin-top: 68px;
  padding-bottom: 84px;
  background: linear-gradient(#fff 127px, var(--beige) 127px);
}
.slider { position: relative; }
.slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 64px) / 3);
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* место под тень карточек */
  padding-bottom: 40px;
  margin-bottom: -40px;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * { scroll-snap-align: start; }

.card {
  position: relative;
  background: #fff;
  border-radius: 3px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card__img { width: 100%; aspect-ratio: 405 / 161; object-fit: cover; }
.card__body { position: relative; margin-top: -20px; padding: 0 32px 30px; }
.card__title { font-size: 28px; font-weight: 300; line-height: 1.2; color: var(--text); }
.card__text { margin-top: 4px; font-size: 16px; font-weight: 300; line-height: 1.4; color: var(--text-2); max-width: 260px; }

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.slider__dots:empty { display: none; }
.slider__dot {
  width: 17px; height: 17px;
  padding: 0;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  transition: background .2s;
}
.slider__dot.is-active { background: radial-gradient(circle, var(--green) 0 3px, #fff 3.5px); }

/* ==========================================================================
   Отделения
   ========================================================================== */
.depts__top { background: var(--beige); padding: 0 0 64px; }
.depts__cards-wrap { background: linear-gradient(var(--beige) 158px, var(--dark) 158px); }
.depts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.dept {
  display: block;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dept__img { width: 100%; aspect-ratio: 405 / 158; object-fit: cover; transition: transform .4s; }
.dept:hover .dept__img { transform: scale(1.03); }
.dept__body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
  padding: 18px 32px;
  background: #fff;
}
.dept__title { font-size: 22px; font-weight: 300; color: var(--text); }
.dept__sub { font-size: 11px; font-weight: 400; color: var(--text-2); margin-top: 2px; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer { background: var(--dark); color: #fff; }
.footer__main {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 158px;
  padding-bottom: 66px;
}
.footer__logo { display: inline-block; width: 163px; }
.footer__copy {
  margin-top: 36px;
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  color: #8f8882;
}
.footer__right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.footer__contacts { display: flex; align-items: center; gap: 36px; }
.footer__big-link {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.3;
  padding-bottom: 4px;
  background-image: linear-gradient(90deg, rgba(255,255,255,.3) 50%, transparent 50%);
  background-size: 8px 2px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  white-space: nowrap;
}
.footer__big-link:hover { color: var(--yellow); }
.footer__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.footer__arrow-link {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--yellow);
}
.footer__arrow-link:hover { color: #fff; }
.footer__address { margin-top: 44px; font-size: 15px; font-weight: 400; }
.footer__address + .footer__arrow-link { margin-top: 4px; }

.footer__bottom { background: var(--dark-2); }
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}
.footer__bottom img { width: 88px; }
.footer__policy { font-size: 13px; font-weight: 400; letter-spacing: .03em; color: #8f8882; }
.footer__policy:hover { color: #fff; }

/* ==========================================================================
   Попап «Обратная связь»
   ========================================================================== */
html:has(.modal[open]) { overflow: hidden; }

.modal {
  /* reset.css обнуляет margin – возвращаем центрирование <dialog> */
  margin: auto;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(46, 42, 38, .6);
  backdrop-filter: blur(2px);
}
.modal[open] { animation: modal-in .25s ease-out; }
.modal[open]::backdrop { animation: backdrop-in .25s ease-out; }
.modal.is-closing { animation: modal-out .2s ease-in forwards; }
.modal.is-closing::backdrop { animation: backdrop-out .2s ease-in forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(16px); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }

.modal__box {
  position: relative;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 48px 48px 40px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .2);
}
.modal__box::before { /* зелёная полоса сверху, как под заголовками секций */
  content: "";
  position: absolute;
  left: 48px; top: 0;
  width: 80px; height: 4px;
  background: var(--green);
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  transition: background .2s;
}
.modal__close::before,
.modal__close::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.modal__close:hover { background: var(--beige); }

.modal__title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  padding-right: 32px;
}
.modal__lead {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}

.field { margin-top: 20px; }
.feedback .field:first-of-type { margin-top: 28px; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 400;
}
.field__req { color: var(--green); }
.field__input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #ddd8cf;
  border-radius: 4px;
  background: #fff;
  font-size: 16px; /* 16px – чтобы iOS не зумил поле */
  font-weight: 300;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #aaa; }
.field__input:hover { border-color: #c9c2b6; }
.field__input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(159, 199, 77, .2); }
.field.is-invalid .field__input { border-color: #d9534f; box-shadow: 0 0 0 3px rgba(217, 83, 79, .12); }
.field__error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #d9534f;
}
.field__error:empty { display: none; }

.feedback__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 28px;
  border-radius: 4px;
  background: linear-gradient(90deg, #c4df74 0%, #d7d75d 45%, #f8ba43 100%);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 10px 24px rgba(240, 186, 67, .25);
  transition: filter .2s, opacity .2s;
}
.feedback__submit:hover { filter: brightness(1.05); }
.feedback__submit:disabled { opacity: .6; cursor: wait; }
.feedback__fail {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  background: #fdf0ef;
  font-size: 13px;
  font-weight: 400;
  color: #b9403c;
}
.feedback__fail a { white-space: nowrap; text-decoration: underline; }
.feedback__fail + .feedback__submit { margin-top: 16px; }
.feedback__agree {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.feedback__agree a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.feedback__agree a:hover { color: var(--green); }

.feedback__done { text-align: center; }
.feedback__done .modal__title { padding-right: 0; }
.feedback__done-icon {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--beige);
  color: var(--green);
  font-size: 34px;
}

@media (max-width: 767px) {
  .modal__box { padding: 40px 24px 28px; }
  .modal__box::before { left: 24px; }
  .modal__title { font-size: 30px; }
  .modal__lead { font-size: 14px; }
}

/* ==========================================================================
   ≤1279
   ========================================================================== */
@media (max-width: 1279px) {
  :root { --gutter: 32px; }
  .header__tagline { display: none; }
  .header__phone { margin-left: 24px; }
  .nav__link { padding: 0 18px; }
  .submenu { grid-template-columns: repeat(3, 1fr); padding: 26px 40px 30px; gap: 0 24px; }
  .hero__inner { gap: 40px; }
  .diagnoses__grid { grid-template-columns: 1fr; gap: 56px; }
  .consult__inner { gap: 48px; }
  .footer__big-link { font-size: 22px; }
}

/* ==========================================================================
   ≤1023 – планшет, бургер-меню
   ========================================================================== */
@media (max-width: 1023px) {
  .header__top-inner { min-height: 96px; }
  .header__top .search,
  .header__top .lang,
  .header__top .pay-link,
  .header__phone { display: none; }
  .logo { width: 130px; margin-right: auto; }

  .burger {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 44px; height: 44px;
    padding: 0;
    border: 1.5px solid #3a3a3a;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  .burger span {
    display: block;
    width: 14px; height: 1.5px;
    background: #3a3a3a;
    transition: transform .25s, opacity .25s;
  }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  .nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    border-bottom: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__inner { padding-top: 8px; padding-bottom: 32px; }
  .nav__list { flex-direction: column; }
  .nav__item { border-bottom: 1px solid #ebe8e3; }
  .nav__link { justify-content: space-between; height: 54px; padding: 0; font-size: 16px; }
  .nav__item.is-open .nav__caret { transform: rotate(180deg); }
  .submenu {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    padding: 4px 0 16px;
    background: none;
    box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__item.is-open > .submenu { display: grid; }
  .submenu__col li { margin-top: 6px; }
  .submenu a { font-size: 14px; }

  .nav__mobile-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 24px;
  }
  .nav__mobile-extra .search { width: 100%; flex: none; }
  .nav__mobile-extra .pay-link { margin-left: 0; }
  .nav__mobile-extra .phone { font-size: 24px; }
  .nav__mobile-extra .header__phone-note { margin-top: -14px; }

  .hero__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero__media img { min-height: 360px; }
  .hero__menu a { font-size: 18px; height: 50px; }

  .consult__inner { grid-template-columns: 1fr; }
  .consult__media { order: -1; }

  .slider__track { grid-auto-columns: calc((100% - 32px) / 2); }

  .depts__grid { gap: 20px; }
  .dept__body { padding: 16px 20px; min-height: 84px; }
  .dept__title { font-size: 18px; }
  .depts__cards-wrap { background: linear-gradient(var(--beige) 45%, var(--dark) 45%); }

  .footer__main { flex-direction: column; align-items: center; text-align: center; padding-top: 96px; }
  .footer__right { align-items: center; text-align: center; }
}

/* ==========================================================================
   ≤767 – мобильная версия (макет 320–576)
   ========================================================================== */
@media (max-width: 767px) {
  :root { --gutter: 32px; }
  body { font-size: 14px; }

  .title { font-size: 31px; line-height: 1.06; }
  .title::after { margin-top: 24px; }

  .hero { padding: 0; }
  .hero__inner { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .hero__media img { min-height: 0; aspect-ratio: 320 / 193; border-radius: 0; }
  .hero__aside { max-width: none; padding: 16px var(--gutter) 0; }
  .hero__menu a { font-size: 15px; height: 48px; }
  .hero__leaf { width: 18px !important; height: 16px !important; }
  .hero__aside .btn-reception {
    width: 100%;
    height: 62px;
    margin: 16px 0 -31px;
    z-index: 2;
    font-size: 14px;
  }
  .btn-reception::after { font-size: 44px; right: 12px; }

  .diagnoses { padding: 80px 0 84px; }
  .diagnoses .title { text-align: left; }
  .diagnoses .title::after { margin-left: 0; }
  .diagnoses__grid { margin-top: 48px; gap: 44px; }
  .diagnoses__subtitle { margin-bottom: 14px; font-size: 16px; line-height: 1.15; }
  .diagnoses__abc .diagnoses__subtitle { max-width: 180px; }
  .abc { grid-template-columns: repeat(5, 1fr); gap: 4px; max-width: 280px; }
  .abc a { font-size: 14px; border-radius: 7px; }
  .popular { grid-template-columns: 1fr; }
  .popular__col + .popular__col { display: none; }
  .popular li { margin-bottom: 9px; }
  .popular a { font-size: 15px; padding-left: 32px; }
  .diagnoses__popular .btn-outline { display: flex; width: 100%; min-height: 62px; margin-top: 22px; }

  .consult { padding: 0 0 60px; }
  .consult__inner { padding: 0; gap: 0; }
  .consult__media img { aspect-ratio: 320 / 351; border-radius: 0; }
  .consult__text { padding: 56px var(--gutter) 0; }
  .consult .title { font-size: 28px; line-height: 1.12; }
  .consult p { margin-top: 28px; font-size: 13px; line-height: 28px; }
  .consult__action { display: flex; align-items: stretch; margin-top: 28px; text-align: center; }
  .consult__action .btn-outline { min-height: 62px; }

  .trust .title { font-size: 28px; line-height: 1.12; max-width: 260px; }
  .trust .title::after { margin-top: 16px; }
  .trust__band { margin-top: 32px; padding-bottom: 32px; background: linear-gradient(#fff 50%, var(--beige) 50%); }
  .trust__band > .container { padding: 0; }
  .slider__track { grid-auto-columns: 100%; gap: 0; }
  .card { border-radius: 0; box-shadow: none; }
  .card__img { aspect-ratio: 320 / 141; }
  .card__body { padding: 0 var(--gutter) 24px; margin-top: -26px; }
  .card__title { font-size: 26px; }
  .card__text { font-size: 15px; line-height: 1.2; }
  .slider__dots { margin-top: 24px; }

  .depts__top { padding-bottom: 32px; }
  .depts__top .title { font-size: 28px; }
  .depts__top .title::after { margin-top: 16px; }
  .depts__cards-wrap { background: var(--beige); }
  .depts__cards-wrap > .container { padding: 0; }
  .depts__grid { grid-template-columns: 1fr; gap: 0; }
  .dept { border-radius: 0; box-shadow: 0 18px 30px rgba(60, 50, 40, .12); position: relative; }
  .dept:nth-child(1) { z-index: 3; }
  .dept:nth-child(2) { z-index: 2; }
  .dept__body { min-height: 96px; padding: 16px var(--gutter); }
  .dept__title { font-size: 15px; font-weight: 400; }
  .dept__sub { font-size: 10px; }

  .footer__main { padding-top: 56px; padding-bottom: 40px; gap: 0; }
  .footer__logo { width: 140px; }
  .footer__copy { margin-top: 24px; font-size: 13px; line-height: 20px; }
  .footer__copy br { display: none; }
  .footer__right { margin-top: 32px; }
  .footer__contacts { flex-direction: column; gap: 16px; }
  .footer__dot { display: none; }
  .footer__big-link { font-size: 21px; background: none; padding: 0; }
  .footer__arrow-link { margin-top: 18px; font-size: 11px; }
  .footer__address { margin-top: 24px; font-size: 13px; max-width: 220px; }
  .footer__bottom-inner { flex-direction: column; justify-content: center; padding-top: 34px; padding-bottom: 34px; gap: 14px; text-align: center; }
  .footer__bottom img { width: 76px; }
  .footer__policy { font-size: 12px; max-width: 180px; }
}


/* ==========================================================================
   Попап «Технические работы»
   ========================================================================== */

.maintenance-notice {
  max-width: 520px;
}

.maintenance-notice__box {
  padding: 56px 48px 44px;
}

.maintenance-notice__content {
  text-align: center;
}

.maintenance-notice .modal__title {
  padding-right: 0;
  font-size: 38px;
}

.maintenance-notice .modal__lead {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.7;
}

.maintenance-notice__phone {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}

.maintenance-notice__phone a {
  display: inline-block;
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: color .2s;
}

.maintenance-notice__phone a:hover {
  color: var(--green);
}

.maintenance-notice .feedback__submit {
  margin-top: 30px;
}

@media (max-width: 767px) {
  .maintenance-notice__box {
    padding: 48px 24px 28px;
  }

  .maintenance-notice .modal__title {
    font-size: 30px;
  }

  .maintenance-notice .modal__lead {
    font-size: 14px;
  }

  .maintenance-notice__phone {
    font-size: 14px;
  }

  .maintenance-notice__phone a {
    font-size: 19px;
  }
}
