/* ===========================================================================
   Взгляд Тверь — блоки страниц
   Каждая секция — отдельный чанк MODX (см. README.md).
   Mobile-first: основа — телефон 390 (макет 493:5560), @media ≥744 — планшет (493:4944),
   @media ≥1280 — ПК (493:4289, точные значения при ширине 1440).
   =========================================================================== */

/* ---------- Шапка ---------- */

.header {
  min-height: 3.5rem;
}

.header__top {
  display: none;
}

.header__bar-wrap {
  background: var(--color-light);
}

.header__bar {
  display: flex;
  align-items: center;
  width: var(--container-fluid);
  min-height: 3.5rem;
  margin-inline: auto;
}

.header__logo img {
  width: 7.3125rem;
  height: 2.5rem;
}

/* телефон в полосе меню (телефон и планшет) */
.header__bar-phone {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 3.4375rem;
  font: 700 0.75rem/normal var(--font-family);
  white-space: nowrap;
  opacity: 0.8;
}

.header__bar-phone-icon {
  display: none;
}

.nav,
.header__search,
.header__btn {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 2rem;
}

.header__burger {
  display: block;
}

.header__burger-icon {
  margin-top: -0.125rem; /* у иконки в макете отрицательный отступ сверху */
}

.header__burger-icon--t {
  display: none;
}

.header__info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.header__info--address {
  align-items: center;
}

.header__text {
  font: var(--font-small);
}

.header__address {
  width: 19.3125rem;
}

.header__phone {
  font: 700 1.125rem/normal var(--font-family);
}

.header__callback {
  font: 600 0.875rem/normal var(--font-family);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-position: from-font;
}

.header__callback:active {
  color: var(--color-brand);
}

@media (any-hover: hover) {
  .header__callback:hover {
    color: var(--color-brand);
  }
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  font: var(--font-menu);
  white-space: nowrap;
}

/* UI-Kit «Пункт меню Услуги / Пациентам при наведении» (105:549, 541:8365) */
.nav__submenu {
  position: absolute;
  top: 2.9375rem;
  left: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  width: 14.125rem;
  padding: 0.125rem 1.5rem 1rem;
  background: var(--color-light);
  border-radius: 0 0 var(--radius-small) var(--radius-small);
}

/* мостик под пунктом, чтобы меню не закрывалось по пути курсора */
.nav__submenu::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 1.875rem;
}

/* у пункта с подменю — ссылка и отдельная кнопка-стрелка: стрелка открывает подменю нажатием и с клавиатуры
   (сообщает «свёрнуто/развёрнуто»), ссылка ведёт на страницу раздела; мышью подменю открывается наведением */
.nav__item--parent {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
}

.nav__toggle {
  display: flex;
  padding: 0;
}

.nav__item.is-open .nav__submenu {
  display: flex;
}

.nav__item.is-open .nav__arrow {
  transform: rotate(180deg);
}

@media (any-hover: hover) {
  .nav__item:hover .nav__submenu {
    display: flex;
  }
}

/* «Услуги»: подпункты в одну строку, меню расширяется по содержимому (не уже 226px из макета) */
.nav__submenu:not(.nav__submenu--patients) {
  width: max-content;
  min-width: 14.125rem;
}

.nav__sublink {
  font: var(--font-menu);
  opacity: 0.8;
}

/* Наведение на пункт меню — фирменный цвет, как «Заказать звонок» (UI-Kit 123:135) */
@media (any-hover: hover) {
  .nav__sublink:hover,
  .nav__sublist a:hover {
    color: var(--color-brand);
  }
}

@media (any-hover: hover) {
  .nav__sublink:hover {
    opacity: 1;
  }
}

.nav__subgroup {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav__sublist {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.125rem;
  font: 400 0.875rem/normal var(--font-family); /* в макете 12px — увеличено по просьбе заказчика */
  white-space: nowrap;
  list-style: disc;
}

.nav__sublist li {
  opacity: 0.8; /* на li, а не на списке — иначе при наведении ссылку не сделать непрозрачной */
}

@media (any-hover: hover) {
  .nav__sublist li:hover {
    opacity: 1;
  }
}

@media (min-width: 46.5em) {
  .header {
    min-height: 5.125rem;
  }

  .header__bar {
    min-height: 5.125rem;
  }

  .header__logo img {
    width: 8.75rem;
    height: 3rem;
  }

  .header__bar-phone {
    margin-left: 5.75rem;
    font-size: 1rem;
    opacity: 1;
  }

  .header__bar-phone-icon {
    display: block;
  }

  .header__btn {
    display: inline-flex;
  }

  .header__burger-icon--m {
    display: none;
  }

  .header__burger-icon--t {
    display: block;
  }
}

@media (min-width: 80em) {
  .header {
    min-height: 8.5625rem; /* место под полосу меню, когда она закреплена */
  }

  /* x адреса 81, часов 514, телефона 890, «Заказать звонок» 1144, значка 1316 при ширине 1440 */
  .header__top {
    display: grid;
    grid-template-columns: 433fr 376fr 254fr 172fr 2.5rem;
    align-items: center;
    min-height: 3.5625rem;
    padding-inline: calc((100% - var(--container-fluid)) / 2 - 0.1875rem) calc((100% - var(--container-fluid)) / 2);
    background: var(--color-card);
  }

  .header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    min-height: 5rem;
  }

  .header__bar-phone,
  .header__burger {
    display: none;
  }

  .nav {
    display: block;
  }

  /* меню на ПК крупнее макета (там 14 px): среди посетителей клиники много людей с плохим зрением — решение заказчика 2026-10-20 */
  .nav__link,
  .nav__sublink {
    font-size: 1rem;
  }

  .nav__sublist {
    font-size: 0.9375rem;
  }

  .nav__sublink,
  .nav__sublist li {
    opacity: 1;
  }

  /* «Пациентам»: при 16 px в ширину 226 px из макета памятки переносились в три строки */
  .nav__submenu--patients {
    width: 18.5rem;
  }

  .header__actions {
    justify-content: flex-end;
    margin-left: 0;
    gap: 1.5rem;
  }

  .header__search {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
  }

  /* UI-Kit «Хедер, закреплённый при скролле» (185:1306): появляется через 600px */
  .header--fixed .header__bar-wrap {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 4px 10px 0 rgba(47, 61, 61, 0.1);
  }
}

/* ---------- Бургер-меню (телефон 493:6016, планшет 493:5421) ---------- */

.burger {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow-y: auto;
}

.burger[hidden] {
  display: none;
}

/* затемнение — как у всплывающих окон */
.burger::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #323232;
  backdrop-filter: blur(10px);
  opacity: 0.5;
}

.burger__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: start;
  width: calc(100% - 1rem);
  padding: 0 0 1.5rem 2rem;
  background: var(--color-light);
  border-radius: 0 0 0 var(--radius);
}

.burger__head {
  display: flex;
  align-items: flex-start;
  justify-self: stretch;
  margin-left: -1rem;
}

.burger__logo {
  margin-top: 1rem;
}

.burger__logo img {
  width: 10.6875rem;
  height: 3.625rem;
}

.burger__eye {
  margin: 0.75rem 0 0 auto;
}

.burger__close {
  width: 3rem;
  height: 3rem;
  margin: 0.5rem 1rem 0 1rem;
  background: url('../icons/close.svg') center / 3rem 3rem no-repeat;
}

@media (any-hover: hover) {
  .burger__close:hover {
    background-image: url('../icons/close-hover.svg');
  }
}

.burger__phone {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 1.1875rem 0 0;
  font: 700 1.375rem/normal var(--font-family);
}

.burger__callback {
  margin: 0.3125rem 0 0 2.0625rem; /* x 81 в макете */
  font: 600 0.875rem/normal var(--font-family);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-position: from-font;
}

.burger__services {
  margin: 2.25rem 0 0;
}

.burger__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 0.875rem/normal var(--font-family);
  text-transform: uppercase;
}

.burger__toggle-arrow {
  margin: -0.0625rem 0 -0.125rem; /* стрелка 20 выступает, строка — высотой текста (меню через 16 от текста) */
}

.burger__toggle--patients .burger__toggle-arrow {
  margin: 0;
}

.burger__toggle[aria-expanded='true'] .burger__toggle-arrow {
  transform: rotate(180deg);
}

/* телефон: «Услуги» свёрнуты, в раскрытом виде — плоский список разделов (493:6063) */
.burger__services-list {
  display: none;
  flex-direction: column;
  gap: 0.375rem;
  margin: 1rem 0 0 1rem;
  padding-left: 1.3125rem;
  font: 500 0.875rem/normal var(--font-family);
  text-transform: uppercase;
  list-style: disc;
}

.burger__services-list .burger__link {
  font: inherit;
}

.burger__services [aria-expanded='true'] + .burger__services-list {
  display: flex;
}

.burger__services-list .burger__sublist {
  display: none;
}

.burger__menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin: 1rem 0 0;
}

/* после раскрытого списка услуг меню ниже на 24 (493:6063) */
.burger__services:has([aria-expanded='true']) + .burger__menu {
  margin-top: 1.5rem;
}

.burger__link {
  font: 700 0.875rem/normal var(--font-family);
  text-transform: uppercase;
}

.burger__patients {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.burger__toggle--patients {
  gap: 0.25rem;
}

.burger__sublist {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-left: 1.3125rem;
  font: 500 0.875rem/normal var(--font-family);
  list-style: disc;
}

.burger__sublist li {
  opacity: 0.8;
}

.burger__sublist--patients {
  display: none;
  width: 17.875rem;
}

.burger__patients [aria-expanded='true'] + .burger__sublist--patients {
  display: flex;
}

.burger__branches {
  display: contents;
}

.burger__branch {
  margin: 5rem 0 0;
}

.burger__branch + .burger__branch {
  margin-top: 1rem;
}

.burger__branch-title {
  margin-left: 0.125rem;
  font: 700 0.875rem/normal var(--font-family);
  text-transform: uppercase;
}

.burger__address {
  display: flex;
  align-items: flex-start;
  margin-top: 0.5rem;
  font: 500 0.875rem/normal var(--font-family);
}

.burger__address img {
  margin: 0.125rem 0.25rem -0.3125rem;
}

.burger__hours {
  margin-top: 0.25rem;
  padding-left: 1.5rem;
  font: var(--font-small);
  opacity: 0.8;
}

.burger__vk {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 1.125rem 0 0 0.25rem;
}

.burger__btn {
  justify-self: stretch;
  width: auto;
  max-width: none;
  margin: 2.625rem 1rem 0 -1rem;
}

@media (any-hover: hover) {
  .burger__link:hover,
  .burger__sublist a:hover,
  .burger__phone:hover,
  .burger__callback:hover {
    color: var(--color-brand);
  }
}

@media (min-width: 46.5em) {
  .burger__panel {
    grid-template-columns: 18.4375rem 1fr;
    width: 37.5rem;
    padding: 0 0 2.5rem 2.5rem;
  }

  .burger__head {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .burger__logo {
    margin-top: 1.5rem;
  }

  .burger__logo img {
    width: 11.75rem;
    height: 4rem;
  }

  .burger__eye {
    margin: 1.75rem 1.5rem 0 auto;
  }

  .burger__close {
    margin: 1.5rem 1.5rem 0 0;
  }

  /* на планшете услуги показаны сразу, как в подвале */
  .burger__services {
    grid-column: 1;
    grid-row: 2;
    margin: 2.5rem 0 0;
  }

  .burger__services .burger__toggle {
    display: none;
  }

  .burger__services-list {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    font: inherit;
    list-style: none;
  }

  .burger__services-list .burger__link {
    font: 700 0.875rem/normal var(--font-family);
  }

  .burger__services-list > li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .burger__services-list .burger__sublist {
    display: flex;
    text-transform: none;
  }

  .burger__menu {
    grid-column: 2;
    grid-row: 2;
    margin: 2.5rem 0 0;
  }

  .burger__services:has([aria-expanded='true']) + .burger__menu {
    margin-top: 2.5rem;
  }

  .burger__phone {
    grid-column: 1 / -1;
    margin: 3.9375rem 0 0;
  }

  .burger__callback {
    grid-column: 1 / -1;
    margin: 0.625rem 0 0;
  }

  .burger__branch {
    margin: 1.5rem 0 0;
  }

  .burger__branch + .burger__branch {
    margin-top: 1.5rem;
  }

  .burger__branch-title {
    margin-left: 0.125rem;
  }

  .burger__vk {
    grid-column: 1 / -1;
    margin: 1rem 0 0;
  }

  .burger__btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: 18.75rem;
    margin: 3rem 0 0;
  }
}

@media (min-width: 80em) {
  .burger,
  .burger[hidden] {
    display: none;
  }
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-card);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-areas:
    'badge'
    'title'
    'text'
    'slider'
    'btn';
  width: var(--container-fluid);
  margin-inline: auto;
  padding: 1rem 0 2rem;
}

.hero__content {
  display: contents;
}

.hero__badge {
  grid-area: badge;
  width: 10rem;
  height: 2.25rem;
  border-radius: var(--radius-small);
}

.hero__title {
  grid-area: title;
  margin-top: 1.5rem;
  font: var(--font-h1-m);
}

.hero__text {
  grid-area: text;
  margin-top: 1.475rem;
  font: var(--font-body);
}

.hero__btn {
  grid-area: btn;
  width: 100%;
  max-width: none;
  margin-top: 2rem;
}

/* У «Записаться на приём» в UI-Kit свой градиент наведения */
.hero__btn:active {
  background: var(--gradient-reverse-large);
}

@media (any-hover: hover) {
  .hero__btn:hover {
    background: var(--gradient-reverse-large);
  }
}

@media (min-width: 46.5em) {
  .hero__inner {
    grid-template-areas:
      'badge'
      'title'
      'text'
      'btn'
      'slider';
    padding: 0.875rem 0 2.125rem;
  }

  .hero__title {
    width: 34.9375rem;
    margin-top: 1.875rem;
    font: var(--font-h1);
  }

  .hero__text {
    width: 36.375rem;
    margin-top: 2rem;
    font: var(--font-accent);
  }

  .hero__btn {
    width: 18.75rem;
    margin-top: 1.925rem;
  }
}

@media (min-width: 80em) {
  /* Таблица Сивцева на фоне: размытие 2px, непрозрачность 3% */
  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(50% - 43.375rem); /* x 26 при ширине 1440 */
    width: 43.25rem;
    height: 29.25rem;
    background: url('../img/sivtsev-hero.png') center / 100% 100% no-repeat;
    filter: blur(2px);
    opacity: 0.03;
    pointer-events: none;
  }

  .hero__inner {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 650fr) minmax(0, 622fr);
    padding: 0 0 2.5rem;
  }

  .hero__content {
    display: block;
    padding-top: 1.5rem;
  }

  .hero__badge {
    width: 14.0625rem;
    height: 3.125rem;
    margin-left: -0.6875rem;
  }

  .hero__title {
    width: auto;
    margin-top: 1.75rem;
  }

  .hero__text {
    width: 30.875rem;
    margin-top: 1.5rem;
  }

  .hero__btn {
    margin-top: 4.3625rem;
  }
}

/* ---------- Слайдер ---------- */

.slider {
  grid-area: slider;
  min-width: 0;
  margin-top: 2.1rem;
}

/* лента листается пальцем (scroll-snap), точки и стрелки сдвигают её скриптом */
.slider__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.slider__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slider__track::-webkit-scrollbar {
  display: none;
}

.slider__slide {
  display: grid;
  grid-template-rows: 22.5625rem;
  flex: 0 0 100%;
  overflow: hidden;
  border-radius: var(--radius);
  scroll-snap-align: start;
}

.slider__picture,
.slider__caption {
  grid-area: 1 / 1;
}

.slider__picture {
  display: block;
  height: 100%;
}

.slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__caption {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  align-self: end;
  height: 13.125rem;
  padding: 0 1rem 1.5rem;
  color: var(--color-light);
  background: var(--slide-shade);
}

.slider__title {
  max-width: 19.875rem;
  font: var(--font-h2-m);
}

.slider__text {
  max-width: 18.125rem;
  margin-top: 0.275rem;
  font: var(--font-accent-m);
}

.slider__caption .btn-outline {
  margin-top: 1.025rem;
  padding: 0.1875rem 2.3125rem;
  font: var(--font-button-small);
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Точки: «таблетка» 40×12 и две по 12, градиент — UI-Kit 101:251 */
.slider__dot {
  width: 0.75rem;
  height: 0.75rem;
  background: var(--gradient);
  border-radius: 0.375rem;
}

.slider__dot--active {
  width: 2.5rem;
}

@media (min-width: 46.5em) {
  .slider {
    margin-top: 4rem;
  }

  .slider__slide {
    grid-template-rows: 30rem;
  }

  .slider__caption {
    height: 13.9375rem;
    padding: 0 3rem 2.5rem;
  }

  .slider__slide--soft .slider__caption {
    background: var(--slide-shade-soft);
  }

  .slider__title {
    max-width: none;
    font: var(--font-h2);
    white-space: nowrap;
  }

  .slider__text {
    max-width: none;
    margin-top: 0.23125rem;
    font: var(--font-accent);
    white-space: nowrap;
  }

  .slider__caption .btn-outline {
    margin-top: 0.975rem;
    padding: 0.5625rem 2.3125rem;
    font: var(--font-button);
  }

  .slider__dots {
    margin-top: 1.5rem;
  }
}

@media (min-width: 80em) {
  .slider {
    grid-area: auto;
    margin-top: 0;
    padding-top: 2.5rem;
  }

  .slider__dots {
    margin-top: 1rem;
  }

  .slider__slide {
    grid-template-rows: 22.5rem;
  }

  .slider__caption {
    padding: 0 4rem 2rem;
  }
}

/* ---------- О нас в цифрах ---------- */

.stats {
  margin-top: 2rem;
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5625rem;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 8.3125rem;
  padding-top: 1.5rem;
  text-align: center;
  background: var(--color-card);
  border-radius: var(--radius);
}

.stats__value {
  font: var(--font-numbers-m);
  color: var(--color-brand);
}

.stats__label {
  margin-top: 0.5rem;
  font: var(--font-accent-m);
}

@media (min-width: 46.5em) {
  .stats {
    margin-top: 4rem;
  }

  .stats__list {
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .stats__item {
    min-height: 10rem;
    padding-top: 2rem;
  }

  .stats__value {
    font: var(--font-h1); /* в макете планшета цифры — стиль H1, Bold 40/1.1 */
  }

  .stats__label {
    width: 13.375rem;
    font: var(--font-accent);
  }
}

@media (min-width: 80em) {
  .stats {
    margin-top: 5rem;
  }

  .stats__list {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 2.5rem;
  }

  .stats__item {
    min-height: 12.5625rem;
    padding-top: 2.5rem;
  }

  .stats__value {
    font: var(--font-numbers);
  }
}

/* ---------- Наши услуги ---------- */

.services {
  margin-top: 4rem;
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5625rem;
}

.services__photo {
  display: none;
}

.service-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  min-height: 7.3125rem;
  padding: 1.5rem 1.5rem 0;
  overflow: hidden;
  background: var(--color-card);
  border-radius: var(--radius);
}

.service-card--large {
  min-height: 13.125rem;
  padding-top: 1rem;
}

.service-card--large + .service-card--large {
  min-height: 11.8125rem;
}

.service-card--accent {
  color: var(--color-light);
  background: var(--color-brand);
}

.service-card__title {
  grid-area: 1 / 1;
  font: var(--font-h3-m);
}

.service-card__title br {
  display: none; /* на телефоне название в одну строку */
}

.service-card__title--brand {
  color: var(--color-brand);
}

.service-card__list {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 1rem 0 0 -0.4375rem;
  padding-left: 1.3125rem;
  font: var(--font-accent-m);
  list-style: disc;
}

.service-card--large + .service-card--large .service-card__list {
  margin-left: -0.5rem;
}

/* Иконки стоят в той же ячейке сетки, сдвиг — точные координаты из макета */
.service-card__icon {
  grid-area: 1 / 1 / 4 / 2;
  justify-self: end;
  align-self: start;
  margin-right: -0.0625rem;
}

.service-card__icon--adult { width: 6.75rem; height: 7.5rem; margin-top: 1.75rem; }
.service-card__icon--kids { width: 6.75rem; height: 6.3125rem; margin-top: 1.5rem; }
.service-card__icon--laser { width: 4.5625rem; height: 4.96875rem; margin-top: -0.5rem; opacity: 0.5; }
.service-card__icon--diagnostics { width: 5rem; height: 5rem; margin-top: -0.5rem; }
.service-card__icon--lenses { width: 5.5625rem; height: 5rem; margin-top: -0.5rem; }
.service-card__icon--optics { width: 4.75rem; height: 5rem; margin-top: -0.5rem; }

/* Крупные карточки: заголовок — ссылка на раздел на всю площадь карточки,
   пункты списка и «Подробнее» — отдельные ссылки поверх неё */
.service-card__main-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.service-card__link,
.service-card--large .service-card__more {
  position: relative;
  z-index: 1;
}

/* Наведение на пункт — подчёркивание, как «Врач в списке» в UI-Kit (173:490) */
@media (any-hover: hover) {
  .service-card__link:hover {
    text-decoration: underline;
    text-underline-position: from-font;
  }
}

/* «Подробнее» на телефоне и планшете видна всегда: бирюзовая обводка (UI-Kit 424:3255) */
.service-card__more {
  display: inline-flex;
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
  align-self: start;
  margin-top: 1.5125rem;
  padding: 0.1875rem 2.3125rem;
  font: var(--font-button-small);
  color: var(--color-brand-text);
  text-transform: uppercase;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-small);
}

.service-card--large .service-card__more {
  grid-row: 3;
  margin-top: 1.0625rem;
}

.service-card--accent .service-card__more {
  color: var(--color-light);
  border-color: var(--color-light);
}

/* «Лечение косоглазия» есть в макетах планшета и телефона, на ПК — нет */
.service-card__item--adaptive {
  display: list-item;
}

@media (min-width: 46.5em) {
  .services {
    margin-top: 5rem;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .service-card {
    grid-template-rows: 3.625rem auto 1fr;
    min-height: 11.1875rem;
    padding: 2rem 2.5rem 0;
  }

  .service-card--large {
    grid-column: 1 / -1;
    grid-template-rows: auto auto 1fr;
    min-height: 14.875rem;
    padding-top: 2rem;
  }

  .service-card--large + .service-card--large {
    min-height: 13.25rem;
  }

  .service-card__title {
    font: var(--font-h3);
  }

  .service-card__title br {
    display: inline;
  }

  /* список в две колонки: x40 и x273 */
  .service-card__list {
    display: grid;
    grid-template-columns: 14.5625rem auto;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    row-gap: 0.225rem;
    margin: 1.5rem 0 0;
    padding-left: 1.5rem;
    font: var(--font-accent);
  }

  .service-card--large + .service-card--large .service-card__list {
    grid-template-rows: repeat(2, auto);
    margin-left: 0;
  }

  .service-card__icon { margin-right: -1rem; }
  .service-card--large .service-card__icon { margin-right: 0; }
  .service-card__icon--adult { width: 6.0625rem; height: 6.75rem; margin-top: 0; }
  .service-card__icon--kids { width: 7.1875rem; height: 6.75rem; margin-top: 0; margin-right: 0.0625rem; }
  .service-card__icon--laser { width: 5.75rem; height: 6.25rem; margin-top: -0.5rem; }
  .service-card__icon--diagnostics { width: 6.25rem; height: 6.25rem; margin-top: -0.5rem; }
  .service-card__icon--lenses { width: 6.9375rem; height: 6.25rem; margin-top: -0.5rem; }
  .service-card__icon--optics { width: 5.9375rem; height: 6.25rem; margin-top: -0.5rem; }

  .service-card__more {
    margin-top: 2.125rem;
  }

  .service-card--large .service-card__more {
    margin-top: 1.475rem;
  }
}

@media (min-width: 80em) {
  .services {
    margin-top: 7.5rem;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 15.25rem 8.9375rem 8.9375rem;
    margin-top: 2.5rem;
  }

  .services__photo {
    display: block;
    grid-column: 3;
    grid-row: 1 / 4;
    width: 100%;
    height: 36.125rem;
    object-fit: cover;
    border-radius: var(--radius);
  }

  .service-card,
  .service-card--large,
  .service-card--large + .service-card--large {
    grid-column: auto;
    grid-template-rows: auto auto 1fr;
    height: auto;
    min-height: 0; /* минимальная высота с меньшей ширины здесь не действует */
    padding: 2rem 2.5rem;
  }

  .service-card--accent {
    background: rgba(0, 163, 161, 0.7);
  }

  .service-card__list,
  .service-card--large + .service-card--large .service-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 14.625rem;
    margin: 1.5rem 0 0;
  }

  .service-card__item--adaptive {
    display: none;
  }

  /* margin = координата из макета минус padding карточки (32 сверху, 40 справа) */
  .service-card__icon--adult { width: 6.0625rem; height: 6.75rem; margin: 4.8125rem -0.1875rem 0 0; }
  .service-card__icon--kids { width: 7.1875rem; height: 6.75rem; margin: 5.1875rem -0.6875rem 0 0; }
  .service-card__icon--laser { width: 6.1875rem; height: 6.75rem; margin: -1.1875rem -0.6875rem 0 0; }
  .service-card__icon--diagnostics { width: 6.75rem; height: 6.75rem; margin: -0.6875rem -0.5rem 0 0; }
  .service-card__icon--lenses { width: 7.5rem; height: 6.75rem; margin: -0.875rem -0.6875rem 0 0; }
  .service-card__icon--optics { width: 6.4375rem; height: 6.75rem; margin: -0.875rem -1.4375rem 0 0; }

  /* UI-Kit: карточки услуг при наведении (101:272, 105:361, 105:426 …) */
  .service-card__more,
  .service-card--accent .service-card__more {
    display: none;
    margin-top: 1rem;
    color: var(--color-light);
    border-color: var(--color-light);
  }

  .service-card--large .service-card__more,
  .service-card--large + .service-card--large .service-card__more {
    margin-top: 1.775rem;
  }

  /* UI-Kit «Кнопка Подробнее малая» (171:174): Hover / Active — белая заливка, тёмный текст */
  .service-card__more:active {
    color: var(--color-text);
    background: var(--color-light);
  }

  @media (any-hover: hover) {
    .service-card__more:hover {
      color: var(--color-text);
      background: var(--color-light);
    }
  }

  @media (any-hover: hover) {
    .service-card:hover {
      color: var(--color-light);
      background: var(--color-brand);
    }
  }

  @media (any-hover: hover) {
    .service-card:hover .service-card__title {
      margin-top: -0.5625rem;
      color: var(--color-light);
    }
  }

  @media (any-hover: hover) {
    .service-card--large:hover .service-card__title {
      margin-top: -0.625rem;
    }
  }

  @media (any-hover: hover) {
    .service-card--large:hover .service-card__list {
      margin-top: 1rem;
    }
  }

  @media (any-hover: hover) {
    .service-card:hover .service-card__more {
      display: inline-flex;
    }
  }

  @media (any-hover: hover) {
    .service-card--large:hover .service-card__icon {
      opacity: 0.4;
    }
  }

  @media (any-hover: hover) {
    .service-card:not(.service-card--large):hover .service-card__icon {
      opacity: 0.5;
    }
  }
}

/* ---------- Баннер ARGOS ---------- */

.promo {
  display: grid;
  margin-top: 2rem;
  background: var(--color-card);
  border-radius: var(--radius);
}

.promo__picture {
  display: block;
}

/* картинка растянута по рамке — в макете без object-fit (сверено с рендером планшета) */
.promo__img {
  width: 100%;
  height: 10.25rem;
  border-radius: var(--radius);
}

.promo__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.5rem;
}

.promo__title {
  max-width: 19.375rem;
  font: var(--font-h3-m);
  color: var(--color-brand);
}

.promo__text {
  max-width: 19.4375rem;
  margin-top: 0.5125rem;
  font: var(--font-body);
}

.promo__text br {
  display: none;
}

/* на телефоне «Подробнее» — бирюзовая малая (424:3255) */
.promo .btn-outline {
  margin-top: 1.1rem;
  padding: 0.1875rem 2.3125rem;
  color: var(--color-brand-text);
  border-color: var(--color-brand);
  opacity: 1;
}

@media (min-width: 46.5em) {
  .promo {
    grid-template-columns: 21rem 1fr;
    margin-top: 4rem;
  }

  .promo__img {
    width: 21rem;
    height: 17.5625rem;
  }

  .promo__content {
    padding: 2rem 0 0 3rem;
  }

  .promo__title {
    max-width: 17.6875rem;
    font: var(--font-h3);
  }

  .promo__text {
    max-width: 19.5rem;
    margin-top: 1.5rem;
  }

  /* на планшете — тёмная обводка, как на ПК */
  .promo .btn-outline {
    margin-top: 1.6rem;
    padding: 0.4375rem 1.9375rem;
    color: var(--color-text);
    border-color: var(--color-text);
    opacity: 0.7;
  }
}

@media (min-width: 80em) {
  .promo {
    grid-template-columns: 36.75rem 1fr;
    margin-top: 5rem;
  }

  .promo__img {
    width: 36.75rem;
    height: 19.1875rem;
  }

  .promo__content {
    padding: 2.5rem 0 0 3.75rem;
  }

  .promo__title {
    width: 36.25rem;
    max-width: 100%;
    font: var(--font-h1);
  }

  .promo__text {
    width: 36.25rem;
    max-width: 100%;
    font: var(--font-accent);
  }

  .promo__text br {
    display: inline;
  }

  .promo .btn-outline {
    margin-top: 2.45rem;
  }
}

/* ---------- Цитата ---------- */

.quote {
  display: grid;
  margin-top: 1.5rem;
}

.quote__mark,
.quote__body {
  grid-area: 1 / 1;
}

/* кавычки отражены по вертикали; телефон — 160, x = центр − 8 */
.quote__mark {
  display: block;
  margin-left: calc(50% - 0.5rem);
  transform: scaleY(-1);
}

.quote__mark-img {
  width: 10rem;
  height: 10rem;
}

.quote__body {
  position: relative; /* поверх кавычек: у них transform */
  display: flex;
  flex-direction: column;
  padding-top: 5.4375rem;
}

.quote__text {
  width: 17.75rem;
  margin-inline: auto;
  font: italic 600 1.5rem/normal var(--font-family);
}

.quote__author {
  margin-left: calc(50% + 2.5rem);
  font: var(--font-body);
  font-style: normal;
  opacity: 0.8;
}

@media (min-width: 46.5em) {
  .quote {
    margin-top: 4rem;
  }

  .quote__mark-img {
    width: 15.375rem;
    height: 15.375rem;
  }

  .quote__body {
    padding-top: 5rem;
  }

  .quote__text {
    width: 28.5rem;
    font-size: 2.5rem;
  }

  .quote__author {
    margin: -2.6rem 0 0 calc(66.67% - 0.625rem);
    font: 400 1rem/1.4 var(--font-family);
    font-style: normal;
  }
}

@media (min-width: 80em) {
  .quote {
    width: 70.375rem;
    max-width: var(--container-fluid);
    height: 12.3125rem;
    margin: 2.5rem auto 0;
  }

  .quote__mark {
    justify-self: end;
    margin: 0 2.75rem 0 0;
  }

  .quote__mark-img {
    width: 12.3125rem;
    height: 12.3125rem;
  }

  .quote__body {
    align-items: flex-end;
    padding-top: 6.8125rem;
  }

  .quote__text {
    width: auto;
    margin: 0;
    white-space: nowrap;
  }

  .quote__author {
    align-self: flex-start;
    margin: 0.4125rem 0 0 62.9375rem; /* x 1164 из макета */
  }
}

/* ---------- Серый блок: О клинике + Специалисты ---------- */

.section-grey {
  margin-top: 4rem;
  padding: 2rem 0;
  overflow: hidden;
  background: var(--color-card);
}

.about__grid {
  display: grid;
  margin-top: 1.5625rem;
}

.about__picture {
  display: block;
  margin-inline: -0.0625rem; /* фото в макете на 1px шире колонки с каждой стороны */
}

.about__img {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.about__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 1.5rem;
}

.about__text p + p {
  margin-top: 1.225rem; /* пустая строка между абзацами */
}

.about__accent {
  margin-top: 1.875rem;
  padding: 0.5625rem 0 0.65rem 0.875rem;
  font: var(--font-accent-italic-m);
  border-left: 4px solid var(--color-brand);
}

/* на телефоне и планшете — большая кнопка */
.about__btn {
  justify-content: center;
  align-self: stretch;
  height: 3rem;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  font: var(--font-button);
}

.about__btn:active {
  font: var(--font-button-hover);
}

@media (any-hover: hover) {
  .about__btn:hover {
    font: var(--font-button-hover);
  }
}

@media (min-width: 46.5em) {
  .section-grey {
    margin-top: 4.85rem;
    padding: 4rem 0;
  }

  .about__picture {
    margin-inline: 0;
  }

  .about__img {
    height: 27.5rem;
  }

  .about__content {
    padding-top: 2.5rem;
  }

  .about__text p + p {
    margin-top: 0.5rem;
  }

  .about__accent {
    max-width: 38.4375rem;
    margin-top: 0.45rem;
    padding: 0.8125rem 0 0.7125rem 1.25rem;
    font: italic 500 1rem/1.4 var(--font-family);
  }

  .about__btn {
    align-self: center;
    width: 18.75rem;
    margin-top: 1.5rem;
  }
}

@media (min-width: 80em) {
  .section-grey {
    margin-top: 5rem;
    padding: 2.5rem 0 5rem;
  }

  .about__grid {
    grid-template-columns: minmax(0, 624fr) minmax(0, 604fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .about__img {
    height: 27.4375rem;
  }

  .about__content {
    padding-top: 1.5rem;
  }

  .about__text p + p {
    margin-top: 2.225rem; /* в макете между абзацами пустая строка: 8 + 19.6 + 8 */
  }

  .about__accent {
    width: 38.4375rem;
    max-width: 100%;
    margin-top: 1.29375rem;
    padding: 0.4375rem 0 0.3875rem 1.25rem;
    font-size: 1.125rem;
  }

  .about__btn {
    align-self: flex-start;
    width: 9.5rem;
    height: auto;
    min-height: 0; /* минимальная высота с меньшей ширины здесь не действует */
    margin-top: 2.0625rem;
    padding: 0.5rem 1.5rem;
    font: var(--font-button-small);
  }

  .about__btn:active {
    font: var(--font-button-small-hover);
  }

  @media (any-hover: hover) {
    .about__btn:hover {
      font: var(--font-button-small-hover);
    }
  }
}

/* ---------- Заголовок блока со стрелками ---------- */

.block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.block-head__subtitle {
  margin-top: 1.025rem;
  font: var(--font-accent-m);
}

/* на телефоне ленты листаются пальцем, стрелок нет */
.carousel-nav {
  display: none;
  gap: 2rem;
}

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 163, 161, 0.5);
  border-radius: 50%;
}

.carousel-arrow__icon {
  fill: var(--color-light);
}

.carousel-arrow--prev .carousel-arrow__icon {
  transform: translateX(-0.05625rem);
}

.carousel-arrow--next .carousel-arrow__icon {
  transform: translateX(0.05625rem) rotate(180deg);
}

/* UI-Kit «Стрелка»: Hover/Active — круг #00A3A1 без прозрачности */
.carousel-arrow:not(:disabled):active {
  background: var(--color-brand);
  opacity: 1;
}

@media (any-hover: hover) {
  .carousel-arrow:not(:disabled):hover {
    background: var(--color-brand);
    opacity: 1;
  }
}

.carousel-arrow:disabled {
  cursor: default;
  background: var(--color-inactive);
}

/* В отзывах у активной стрелки прозрачность 50% на всю кнопку, у неактивной — серый #E0E0E0 */
.carousel-arrow--soft {
  background: var(--color-brand);
  opacity: 0.5;
}

.carousel-arrow--soft:disabled {
  background: var(--color-arrow-soft);
  opacity: 1;
}

@media (min-width: 46.5em) {
  .block-head__subtitle {
    margin-top: 0.5rem;
    font: var(--font-accent);
  }

  .carousel-nav {
    display: flex;
  }

  .specialists .carousel-nav {
    margin-top: 1.625rem;
  }

  .reviews .carousel-nav {
    margin-top: -0.25rem;
  }

  .achievements .carousel-nav {
    margin-top: -0.25rem;
  }
}

@media (min-width: 80em) {
  .carousel-nav {
    gap: 1.5rem;
  }

  .specialists .carousel-nav {
    margin-top: 2.625rem;
  }

  .reviews .carousel-nav {
    margin-top: 0.75rem;
  }

  .achievements .carousel-nav {
    display: none;
  }
}

/* ---------- Карусель ---------- */

.carousel {
  /* лента уходит до правого края окна, как в макете */
  margin-right: calc((var(--container-vw) - 100vw) / 2);
  margin-top: 1.525rem;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track > * {
  scroll-snap-align: start;
}

/* у последней карточки отступ справа — как поле страницы */
.carousel__track::after {
  content: '';
  flex: 0 0 calc((100vw - var(--container-vw)) / 2 - 1rem);
}

.block-more {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 2rem auto 0;
}

@media (min-width: 46.5em) {
  .carousel {
    margin-top: 1.975rem;
  }

  .carousel__track {
    gap: 1.5rem;
  }

  .carousel__track::after {
    flex-basis: calc((100vw - var(--container-vw)) / 2 - 1.5rem);
  }

  .block-more {
    width: 18.75rem;
  }
}

@media (min-width: 80em) {
  .carousel {
    margin-top: 1.5rem;
  }

  .block-more {
    margin-top: 2.5rem;
  }
}

/* ---------- Наши специалисты ---------- */

.specialists {
  margin-top: 4rem;
}

.doctor-card {
  display: flex;
  flex: 0 0 18.75rem;
  flex-direction: column;
  min-height: 31.4375rem;
  overflow: hidden;
  background: var(--color-light);
  border-radius: var(--radius);
}

.doctor-card__photo {
  display: grid;
}

.doctor-card__picture,
.doctor-card__badge {
  grid-area: 1 / 1;
}

.doctor-card__picture {
  display: block;
}

.doctor-card__img {
  width: 100%;
  height: 18.75rem;
  object-fit: cover;
}

.doctor-card__badge {
  justify-self: end;
  align-self: start;
  margin: 1rem 0.875rem 0 0;
  padding: 0.25rem 0.625rem;
  font: 600 0.75rem/normal var(--font-family);
  color: var(--color-light);
  background: var(--gradient);
  border-radius: var(--radius-small);
}

.doctor-card__name {
  margin: 1rem 1rem 0;
  font: var(--font-h3-m);
  white-space: nowrap;
}

.doctor-card__position {
  margin: 0.525rem 1rem 0;
  font: var(--font-small);
  opacity: 0.75;
}

.doctor-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 1rem 1.5rem;
}

.doctor-card__reviews {
  font: var(--font-small);
  text-decoration: underline;
  text-underline-position: from-font;
  opacity: 0.8;
}

@media (min-width: 46.5em) {
  .specialists {
    margin-top: 5rem;
  }

  .doctor-card {
    flex-basis: 21rem;
    min-height: 30.75rem;
  }

  .doctor-card__badge {
    margin-right: 1.0625rem;
  }

  .doctor-card__position {
    margin-top: 0.525rem;
  }

  .doctor-card__footer {
    padding: 0 1.0625rem 1.5rem 1rem;
  }
}

@media (min-width: 80em) {
  .specialists {
    margin-top: 7.5rem;
  }

  .doctor-card {
    flex-basis: 18.75rem;
    min-height: 31.4375rem;
  }

  .doctor-card__badge {
    margin-right: 0.875rem;
  }

  .doctor-card__name {
    font: var(--font-subtitle);
  }

  .doctor-card__position {
    margin-top: 0.5rem;
  }

  .doctor-card__footer {
    padding: 0 1rem 1.5rem;
  }
}

/* ---------- Независимые рейтинги ---------- */

.ratings {
  margin-top: 4rem;
}

.ratings__list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5625rem;
}

.rating-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 7.5rem;
  background: var(--color-card);
  border-radius: var(--radius);
}

.rating-card__score {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.rating-card__score img {
  width: 1.125rem;
  height: 1.125rem;
}

.rating-card__value {
  font: var(--font-h3-m);
}

.rating-card__count {
  margin-left: 0.125rem;
  font: var(--font-accent-m);
  opacity: 0.8;
}

/* Координаты логотипов и оценок внутри карточек — из макета телефона (493:5592) */
.rating-card--yandex .rating-card__logo { width: 9.5rem; height: 2.875rem; margin: 0.75rem 0 0 6.4375rem; }
.rating-card--yandex .rating-card__badge { width: 10rem; height: 3.3125rem; margin: 0 0 0 6.5625rem; }
.rating-card--doktu .rating-card__logo { width: 10.0625rem; height: 2.875rem; margin: 1.625rem 0 0 5.8125rem; }
.rating-card--doktu .rating-card__score { margin: 0 0 0 6.0625rem; }
.rating-card--medadvisor .rating-card__logo { width: 11.4375rem; height: 1.5625rem; margin: 2rem 0 0 5.5rem; }
.rating-card--medadvisor .rating-card__score { margin: 0.5625rem 0 0 6.4375rem; }
.rating-card--napopravku .rating-card__logo { width: 12.625rem; height: 2.625rem; margin: 1.5rem 0 0 4.75rem; }
.rating-card--napopravku .rating-card__score { margin: 0.5625rem 0 0 6.5rem; }

@media (min-width: 46.5em) {
  .ratings {
    margin-top: 4rem;
  }

  .ratings__list {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 11.9375rem 13.25rem;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .rating-card {
    height: auto;
    min-height: 0; /* минимальная высота с меньшей ширины здесь не действует */
  }

  .rating-card__score {
    gap: 0.5rem;
  }

  .rating-card__score img {
    width: 1.5rem;
    height: 1.5rem;
  }

  .rating-card__value {
    font: 600 1.25rem/1.4 var(--font-family);
  }

  .rating-card__count {
    margin-left: 0;
    font: 500 1rem/1.4 var(--font-family);
    text-decoration: underline;
    text-underline-position: from-font;
  }

  /* планшет (493:4980) */
  .rating-card--yandex .rating-card__logo { width: 12.6875rem; height: 3.8125rem; margin: 1.5rem 0 0 4.1875rem; }
  .rating-card--yandex .rating-card__badge { width: 14rem; height: 4.625rem; margin: 0.5rem 0 0 4.375rem; }
  .rating-card--doktu .rating-card__logo { width: 13rem; height: 3.6875rem; margin: 2.75rem 0 0 4rem; }
  .rating-card--doktu .rating-card__score { margin: 1rem 0 0 5rem; }
  .rating-card--medadvisor .rating-card__logo { width: 14.375rem; height: 1.9375rem; margin: 4.25rem 0 0 3.3125rem; }
  .rating-card--medadvisor .rating-card__score { margin: 1rem 0 0 5.375rem; }
  .rating-card--napopravku .rating-card__logo { width: 15.5625rem; height: 3.25rem; margin: 3.625rem 0 0 2.6875rem; }
  .rating-card--napopravku .rating-card__score { margin: 1rem 0 0 5.125rem; }
}

@media (min-width: 80em) {
  .ratings {
    margin-top: 5rem;
  }

  .ratings__list {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 13.25rem;
    margin-top: 2.5rem;
  }

  .rating-card {
    min-height: 13.25rem;
  }

  /* ПК (493:4320) */
  .rating-card--yandex .rating-card__logo { margin: 2.5rem 0 0 3rem; }
  .rating-card--yandex .rating-card__badge { margin: 0.375rem 0 0 2.5625rem; }
  .rating-card--doktu .rating-card__logo { margin: 3rem 0 0 2.9375rem; }
  .rating-card--doktu .rating-card__score { margin: 0.9375rem 0 0 3.5rem; }
  .rating-card--medadvisor .rating-card__logo { margin: 3.6875rem 0 0 2.1875rem; }
  .rating-card--medadvisor .rating-card__score { margin: 2rem 0 0 3.8125rem; }
  .rating-card--napopravku .rating-card__logo { margin: 3.0625rem 0 0 1.5625rem; }
  .rating-card--napopravku .rating-card__score { margin: 1.3125rem 0 0 4.0625rem; }
}

/* ---------- Отзывы ---------- */

.reviews {
  margin-top: 4rem;
}

.reviews .carousel {
  margin-top: 1.5625rem;
}

.review-card {
  display: grid;
  flex: 0 0 18.75rem;
  grid-template-columns: 3.75rem 1fr;
  grid-template-rows: 3.75rem 14rem auto 1fr;
  column-gap: 1rem;
  min-height: 25.25rem;
  padding: 1.5rem 1.5rem 2.025rem;
  background: var(--color-card);
  border-radius: var(--radius);
}

.review-card__avatar {
  grid-area: 1 / 1;
  margin: 0.3125rem;
  opacity: 0.4;
}

.review-card__name,
.review-card__date {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}

.review-card__name {
  margin-top: 0.375rem;
  font: var(--font-h3-m);
}

.review-card__date {
  margin-top: 1.9875rem;
  font: var(--font-body);
  opacity: 0.75;
}

/* текст обрезается по строкам; «Читать больше» показывает скрипт, если текст не влез */
.review-card__text {
  grid-column: 1 / -1;
  grid-row: 2;
  display: -webkit-box;
  max-height: 12.5rem;
  margin-top: 1.5rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
}

.review-card__more {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: start;
  margin-top: 0.25rem;
  text-decoration: underline;
  text-underline-position: from-font;
  opacity: 0.75;
}

.review-card__more[hidden] {
  display: none;
}

.review-card__doctor {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: end;
  letter-spacing: -0.02625rem;
}

.review-card__doctor-link {
  font-weight: 500;
  color: var(--color-brand-text);
  text-decoration: underline;
  text-underline-position: from-font;
}

@media (min-width: 46.5em) {
  .reviews {
    margin-top: 5.25rem; /* стрелки на 4px выше заголовка: от рейтингов до стрелок 80 */
  }

  .reviews .carousel {
    margin-top: 2rem;
  }

  .review-card {
    flex-basis: 21rem;
    grid-template-rows: 3.75rem 12.75rem auto 1fr;
  }

  .review-card__name {
    margin-top: 0.5rem;
    font: 500 1.125rem/1.4 var(--font-family);
    letter-spacing: -0.0225rem;
  }

  .review-card__date {
    margin-top: 2.075rem;
  }

  .review-card__text {
    max-height: 11.25rem;
    -webkit-line-clamp: 9;
  }

  .review-card__more {
    margin-top: 1.25rem;
  }

  .review-card__doctor {
    letter-spacing: -0.0175rem;
  }
}

@media (min-width: 80em) {
  .reviews {
    margin-top: 7.5rem;
  }

  .reviews .carousel {
    margin-top: 1.5rem;
  }

  .review-card {
    flex-basis: 25.5rem;
    grid-template-rows: 3.75rem 12.375rem auto 1fr;
    column-gap: 1.5rem;
    min-height: 24.375rem;
    padding: 2rem 2rem 2.525rem;
  }

  .review-card__name {
    margin-top: 0.5rem;
    font: var(--font-subtitle);
    letter-spacing: 0;
  }

  .review-card__date {
    margin-top: 2.25rem;
    font: var(--font-accent);
  }

  .review-card__text {
    max-height: 10rem;
    margin-top: 2.375rem;
    -webkit-line-clamp: 8;
  }

  .review-card__more {
    margin-top: 0.25rem;
  }

  .review-card__doctor {
    letter-spacing: 0;
  }
}

/* ---------- Наши достижения ---------- */

.achievements {
  margin-top: 4rem;
  padding: 2rem 0;
  background: var(--color-card);
}

.achievements .carousel {
  margin-top: 1.5625rem;
}

.achievements__list {
  align-items: center;
}

.achievements__list li {
  flex: 0 0 auto;
}

@media (min-width: 46.5em) {
  .achievements {
    padding: 4rem 0;
  }

  .achievements .carousel {
    margin-top: 2rem;
  }

  .achievements__list {
    gap: 4rem;
  }
}

@media (min-width: 80em) {
  .achievements {
    margin-top: 5rem;
    padding: 2.5rem 0;
  }

  .achievements .carousel {
    margin: 2.5rem 0 0;
    overflow: visible;
  }

  .achievements__list {
    gap: 5rem;
    overflow: visible;
  }

  .achievements__list::after {
    content: none;
  }
}

/* ---------- Ответы на вопросы ---------- */

.faq {
  margin-top: 4rem;
}

.faq__grid {
  display: grid;
  margin-top: 1.5625rem;
}

.faq__img {
  display: none;
}

.faq__list::before {
  content: '';
  display: block;
  border-top: 1px solid var(--color-inactive);
}

.faq__item {
  display: grid;
  grid-template-columns: 2.3125rem 1fr 2.5rem;
  align-items: start;
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-line);
}

.faq__num {
  margin-top: 0.0625rem;
  font: var(--font-body);
  color: var(--color-brand-text);
  text-transform: uppercase;
}

.faq__question {
  max-width: 17.6875rem;
  margin-top: 0.125rem;
  font: var(--font-accent-m);
}

.faq__answer {
  grid-column: 2 / -1;
  margin: 0.975rem 0 0;
  font: var(--font-body);
}

.faq__item.is-open {
  padding-bottom: 1rem;
}

/* плюс в макете телефона выходит за колонку на 10px */
.faq__toggle {
  grid-column: 3;
  grid-row: 1;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -0.625rem;
}

/* UI-Kit «Развернуть»: Hover — белый плюс на круге #00A3A1 */
@media (any-hover: hover) {
  .faq__toggle:hover img {
    content: url('../icons/plus-hover.svg');
  }
}

.faq__btn {
  width: 100%;
  max-width: none;
  margin-top: 1.5rem;
}

@media (min-width: 46.5em) {
  .faq {
    margin-top: 5rem;
  }

  .faq__grid {
    margin-top: 2rem;
  }

  .faq__item {
    grid-template-columns: 4rem 35.5rem 1fr 2.5rem;
  }

  .faq__num {
    margin-top: 0.375rem;
    font: 400 1rem/normal var(--font-family);
  }

  .faq__question {
    max-width: none;
    margin-top: 0.125rem;
    font: var(--font-accent);
  }

  .faq__toggle {
    grid-column: 4;
    margin-right: 0;
  }

  .faq__main {
    display: flex;
    flex-direction: column;
  }

  .faq__btn {
    align-self: center;
    width: 18.75rem;
  }
}

@media (min-width: 80em) {
  .faq {
    margin-top: 7.5rem;
  }

  .faq__grid {
    grid-template-columns: minmax(0, 408fr) minmax(0, 840fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .faq__img {
    display: block;
    width: 100%;
    height: 28.75rem;
    object-fit: cover;
    border-radius: var(--radius);
  }

  .faq__list {
    min-height: 23.25rem;
    padding: 2.5rem;
    background: var(--color-card);
    border-radius: var(--radius);
  }

  .faq__item {
    grid-template-columns: 4rem 39.375rem 1fr 2.5rem;
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* В макете пункт 48px с шагом 56px, вопрос в две строки (52.3px) выходит за пункт:
     линия рисуется под текстом, следующий пункт начинается на 56px ниже предыдущего */
  .faq__item + .faq__item {
    margin-top: -0.33125rem;
  }

  .faq__num {
    margin-top: 0.625rem;
  }

  .faq__question {
    margin-top: 0.46875rem;
  }

  .faq__answer {
    grid-column: 2 / 4;
    max-width: 39.375rem;
    margin: 0.975rem 0 0 0.0625rem;
  }

  .faq__item.is-open .faq__question {
    margin-top: 0.5rem;
  }

  .faq__btn {
    align-self: flex-start;
    margin-top: 2.5rem;
  }
}

/* ---------- Запись на приём ---------- */

.appointment {
  margin-top: 4rem;
}

.appointment__grid {
  display: grid;
  margin-top: 1.5625rem;
}

.appointment__img {
  display: none;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: -0.5rem; /* в макете телефона вкладка заходит на подложку на 8px */
}

.tabs__tab {
  position: relative;
  z-index: 1;
}

.tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  font: 400 0.875rem/1.4 var(--font-family);
  opacity: 0.75;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tabs__tab--active {
  font: var(--font-accent-m);
  color: var(--color-brand-text);
  background: var(--color-card);
  opacity: 1;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1rem;
  background: var(--color-card);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}

.appointment__form-wrap--kids .form {
  border-radius: var(--radius) 0 var(--radius) var(--radius);
}

.form__field {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  font: var(--font-body);
  color: var(--color-text);
  background: var(--color-light);
  border: 0;
  border-radius: var(--radius-small);
  outline: none;
  appearance: none;
}

/* поле без обводки, обводка только у активного поля — по макету (правки дизайнера 18.10 отменили рамку для контраста) */
.form__field:focus {
  box-shadow: inset 0 0 0 1px var(--color-text);
}

/* на телефоне шрифт полей 16px: при меньшем iPhone увеличивает страницу, когда нажимаешь в поле (решение 2026-10-18) */
@media (max-width: 46.4375em) {
  .form__field {
    font-size: 1rem;
  }
}

@media (any-hover: hover) {
  .form__field:hover {
    box-shadow: inset 0 0 0 1px var(--color-text);
  }
}

.form__field--error, .form__field--error:focus {
  padding-right: 3.5rem;
  color: var(--color-error);
  background: var(--color-light) url('../icons/field-error.svg') right 1rem center / 1.4375rem 1.4375rem no-repeat;
  box-shadow: inset 0 0 0 1px var(--color-error);
}

@media (any-hover: hover) {
  .form__field--error:hover {
    padding-right: 3.5rem;
    color: var(--color-error);
    background: var(--color-light) url('../icons/field-error.svg') right 1rem center / 1.4375rem 1.4375rem no-repeat;
    box-shadow: inset 0 0 0 1px var(--color-error);
  }
}

.form__field--textarea.form__field--error {
  background-position: right 1rem top 0.78125rem;
}

.form__field--error::placeholder {
  color: var(--color-error);
}

/* текст ошибки под полем или флажком согласия (в макете только красная подсказка в пустом поле) */
.form__error {
  margin-top: -0.625rem;
  font: var(--font-small);
  color: var(--color-error);
}

.form__field::placeholder {
  color: var(--color-text);
  opacity: 0.75;
}

.form__field--textarea {
  height: 7.5rem;
  resize: none;
}

/* подсказка в многострочном поле — с тем же отступом сверху, что текст в обычных полях (правки 18.10);
   двойной класс — иначе отступы .form__field на планшете и ПК обнуляют padding-top */
.form__field.form__field--textarea {
  padding-top: 0.875rem;
}

.select {
  position: relative;
}

.select__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.select__value {
  opacity: 0.75;
}

.select--chosen .select__value {
  opacity: 1;
}

.select__arrow {
  margin-right: 0.046875rem;
}

/* развёрнутый список ложится поверх формы */
.select__panel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  padding: 0.875rem 1rem 1.5rem 1rem;
  background: var(--color-light);
  border-radius: var(--radius-small);
}

.select__panel::after {
  /* стрелка вверх в открытом состоянии */
  content: '';
  position: absolute;
  top: 1.199375rem;
  right: 1.109375rem;
  width: 0.90678125rem;
  height: 0.477451875rem;
  background: url('../icons/select-arrow.svg') center / contain no-repeat;
  transform: rotate(180deg);
}

.select__placeholder {
  font: var(--font-body);
  opacity: 0.75;
}

.select__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.525rem;
}

.select__list[hidden] {
  display: none;
}

.select__option {
  font: var(--font-body);
  cursor: pointer;
}

@media (any-hover: hover) {
  .select__option:hover {
    text-decoration: underline;
    text-underline-position: from-font;
  }
}

.form__consent {
  display: flex;
  align-items: center;
  gap: 1rem;
  font: var(--font-small);
  cursor: pointer;
}

.form__checkbox {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  opacity: 0;
}

/* UI-Kit «Чекбокс» (175:225 вкл / 175:227 выкл) */
.form__checkbox-box {
  flex: 0 0 1.25rem;
  height: 1.25rem;
  background: url('../icons/checkbox-off.svg') center / 1.25rem 1.25rem no-repeat;
}

.form__checkbox:checked + .form__checkbox-box {
  background: url('../icons/checkbox-on.svg') center / 1.25rem 1.25rem no-repeat;
}

.form__consent-link {
  color: var(--color-brand-text);
  text-decoration: underline;
  text-underline-position: from-font;
}

.form__submit {
  width: 100%;
  max-width: none;
  margin-top: 0.5rem; /* согласие в 2 строки, до кнопки 24 = 16 (gap) + 8 */
}

@media (min-width: 46.5em) {
  .appointment {
    margin-top: 5rem;
  }

  .appointment__grid {
    margin-top: 2rem;
  }

  .tabs {
    margin-bottom: 0;
  }

  .tabs__tab--active {
    font: var(--font-accent);
  }

  .form {
    padding: 2rem 2.5rem;
  }

  .form__field {
    padding: 0 1.5rem;
  }

  .form__field--error, .form__field--error:focus {
    padding-right: 4rem;
    background-position: right 1.5rem center;
  }

  @media (any-hover: hover) {
    .form__field--error:hover {
      padding-right: 4rem;
      background-position: right 1.5rem center;
    }
  }

  .form__field--textarea.form__field--error {
    background-position: right 1.5rem top 0.78125rem;
  }

  .select__arrow {
    margin-right: -0.294375rem; /* стрелка в макете: 19.29px от правого края при отступе поля 24px */
  }

  .select__panel {
    padding-left: 1.4375rem;
  }

  .select__panel::after {
    right: 1.205625rem;
  }

  .select__placeholder {
    padding-left: 0.0625rem;
  }

  .form__submit {
    align-self: center;
    width: 18.75rem;
    margin-top: 0.875rem; /* 16 + 14 = 30 из макета планшета */
  }
}

@media (min-width: 80em) {
  .appointment {
    margin-top: 7.5rem;
  }

  .appointment__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .appointment__img {
    display: block;
    width: 100%;
    height: 39.25rem;
    object-fit: cover;
    border-radius: var(--radius);
  }

  .form {
    padding: 2.5rem;
  }

  .form__submit {
    align-self: stretch;
    width: 100%;
    margin-top: 1.375rem; /* 16 (gap) + 22 = 38 из макета */
  }
}

/* ---------- Подвал ---------- */

.footer {
  position: relative;
  margin-top: 5rem;
  overflow: hidden;
  color: var(--color-light);
  background: var(--color-brand);
}

.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: start;
  width: var(--container-fluid);
  margin-inline: auto;
  padding-top: 1.9375rem;
}

.footer__col {
  display: contents;
}

.footer__logo {
  justify-self: center;
}

.footer__logo img {
  width: 10.6875rem;
  height: 3.625rem;
}

.footer__phone {
  margin-top: 2rem;
  font: var(--font-h2-m);
}

.footer__branch {
  margin-top: 2.025rem;
}

.footer__branch + .footer__branch {
  margin-top: 1rem;
}

.footer__branch-title,
.footer__link {
  font: 700 0.875rem/normal var(--font-family);
  text-transform: uppercase;
}

.footer__branch-title {
  margin-left: 0.125rem;
  color: var(--color-card);
}

.footer__address {
  display: flex;
  align-items: flex-start;
  margin-top: 0.5rem;
  font: 500 0.875rem/normal var(--font-family);
}

.footer__address img {
  margin: 0.125rem 0.25rem -0.3125rem; /* значок 24 выступает вниз, строка остаётся высотой текста (часы через 4px) */
}

.footer__hours {
  margin-top: 0.25rem;
  padding-left: 1.5rem;
  font: var(--font-small);
  opacity: 1;
}

.footer__vk {
  display: grid;
  order: 1;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 2rem;
}

.footer__services {
  display: flex;
  order: 2;
  flex-direction: column;
  gap: 1rem;
  width: 13.5625rem;
  margin-top: 3.1875rem;
}

.footer__menu {
  display: flex;
  order: 3;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.footer__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__sublist {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-left: 1.3125rem;
  font: 500 0.875rem/normal var(--font-family);
  list-style: disc;
}

.footer__legal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--container-fluid);
  margin: 2.0625rem auto 0;
}

.footer__licenses {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font: 500 0.875rem/normal var(--font-family);
  text-transform: uppercase;
}

.footer__docs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin-top: 2rem;
  font: var(--font-small);
}

.footer__docs a {
  text-decoration: underline;
  text-underline-position: from-font;
}

.footer__copy {
  position: relative;
  margin-top: 1rem;
  padding: 0.9375rem calc((100% - var(--container-fluid)) / 2) 1rem;
  font: var(--font-small);
  border-top: 1px solid var(--color-light);
}

@media (min-width: 46.5em) {
  /* Таблица Сивцева на фоне подвала: размытие 2px, непрозрачность 3% */
  .footer::before {
    content: '';
    position: absolute;
    top: 10.625rem;
    left: 12.5rem;
    width: 43.25rem;
    height: 29.25rem;
    background: url('../img/sivtsev-footer.png') center bottom / 100% 100% no-repeat;
    filter: blur(2px);
    opacity: 0.03;
    pointer-events: none;
  }

  .footer {
    margin-top: 5rem;
  }

  /* планшет: слева логотип, телефон, отделения, меню, ВК (x49); справа услуги (x385) */
  .footer__top {
    grid-template-columns: 22.5rem 1fr;
    padding-top: 2rem;
  }

  .footer__top > *,
  .footer__col > * {
    grid-column: 1;
  }

  .footer__logo {
    justify-self: start;
    margin-left: 0.0625rem;
  }

  .footer__logo img {
    width: 11.9375rem;
    height: 4.0625rem;
  }

  .footer__phone {
    margin: 2rem 0 0 1.5625rem;
    font: 600 1.25rem/normal var(--font-family);
  }

  .footer__branch {
    margin: 1.9875rem 0 0 1.5625rem;
  }

  .footer__branch + .footer__branch {
    margin-top: 2rem;
  }

  .footer__menu {
    order: 1;
    margin: 2rem 0 0 1.5625rem;
  }

  .footer__vk {
    order: 2;
    margin: 2rem 0 0 1.5625rem;
  }

  .footer__services {
    grid-column: 2;
    grid-row: 1 / span 6;
    order: 0;
    margin-top: 6.5625rem;
  }

  .footer__legal {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-top: 2.5rem;
  }

  .footer__licenses {
    gap: 0.3125rem;
    margin-left: 0.0625rem;
  }

  .footer__docs {
    align-items: flex-end;
    margin: 0.3125rem -0.0625rem 0 0;
  }

  .footer__copy {
    margin-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (min-width: 80em) {
  .footer {
    min-height: 39.6875rem;
    margin-top: 7.5rem;
  }

  .footer::before {
    top: 4.375rem;
    left: calc(50% + 0.8125rem); /* x 733 при ширине 1440 */
  }

  .footer__top {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    min-height: 31.8125rem;
    padding-top: 2.5rem;
  }

  .footer__top > *,
  .footer__col > * {
    grid-column: auto;
  }

  .footer__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__logo {
    margin-left: 0;
  }

  .footer__phone {
    margin: 1.8125rem 0 0;
    font: var(--font-h3);
  }

  .footer__branch {
    margin: 1.5rem 0 0;
  }

  .footer__branch:first-of-type {
    margin-top: 2.5rem;
  }

  .footer__branch + .footer__branch {
    margin-top: 1.5rem;
  }

  .footer__branch-title {
    margin-left: 0;
    color: var(--color-light);
  }

  .footer__address {
    margin-left: -0.125rem;
  }

  .footer__hours {
    padding-left: 1.375rem;
  }

  .footer__services {
    grid-column: auto;
    grid-row: auto;
    margin-top: 0;
    padding-top: 2.5rem;
  }

  .footer__menu {
    margin: 0;
    padding-top: 2.5rem;
  }

  .footer__vk {
    margin: 1.5625rem 0 0 -0.0625rem;
  }

  .footer__legal {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 0;
  }

  .footer__licenses {
    margin-left: 0;
  }

  .footer__docs {
    margin: 1.3125rem 0 0;
  }

  .footer__copy {
    margin-top: 1.5rem;
    padding-bottom: 0;
  }
}

/* ---------- Всплывающие окна (макет 841:51238, 841:51589, 865:54777, 865:55054) ----------
   В макете окна только для ПК; на телефоне и планшете окно сужается по ширине экрана. */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem 0;
  overflow-y: auto;
}

/* Затемнение как в макете: слой #323232 с размытием фона 10px и непрозрачностью 50% на весь слой */
.modal::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #323232;
  backdrop-filter: blur(10px);
  opacity: 0.5;
}

.modal[hidden] {
  display: none;
}

.modal__window {
  position: relative;
  z-index: 1;
  width: min(47rem, 100% - 2rem);
  padding: 3.5rem 1rem 1rem;
  background: var(--color-light);
  border-radius: var(--radius);
}

.modal__window--success {
  width: min(32.5rem, 100% - 2rem);
  text-align: center;
}

/* отзыв целиком («Читать больше»): шрифты — как в карточке отзыва */
.modal__window--review {
  width: min(40rem, 100% - 2rem);
  max-height: calc(100% - 2rem);
  overflow-y: auto;
}

.review-full__name {
  font: var(--font-h3-m);
}

.review-full__date {
  display: block;
  margin-top: 0.5rem;
  font: var(--font-body);
  opacity: 0.75;
}

.review-full__text {
  margin-top: 1.5rem;
  font: var(--font-body);
}

.review-full__doctor {
  margin-top: 1.5rem;
  font: var(--font-body);
}

.review-full__doctor a {
  text-decoration: underline;
  text-underline-position: from-font;
}

.modal__title {
  font: var(--font-h2-m);
  text-align: center;
}

.modal__window--form .modal__title {
  margin-bottom: 1.5rem;
}

.modal__text {
  margin-top: 0.9625rem;
  font: var(--font-body);
}

/* UI-Kit «Закрыть окно» (425:160) */
.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 3rem;
  height: 3rem;
  background: url('../icons/close.svg') center / 3rem 3rem no-repeat;
}

@media (any-hover: hover) {
  .modal__close:hover {
    background-image: url('../icons/close-hover.svg');
  }
}

.appointment__form-wrap--modal .tabs__tab:not(.tabs__tab--active) {
  opacity: 0.8;
}

.form--question {
  border-radius: var(--radius);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.525rem;
}

.form__label {
  font: var(--font-body);
}

html.is-modal-open {
  overflow: hidden;
}

@media (min-width: 46.5em) {
  .modal {
    padding: 1.5rem 0;
  }

  .modal__window {
    padding: 4rem;
  }

  .modal__title {
    font: var(--font-h2);
  }

  .modal__window--form .modal__title {
    margin-bottom: 2.5rem;
  }

  .modal__window--success .modal__title {
    white-space: nowrap; /* в макете строки не переносятся */
  }

  .modal__close {
    top: 1rem;
    right: 1rem;
  }

  /* Окно «Задать вопрос»: серая подложка со всеми скруглениями, низ окна 40px */
  .modal__window:has(.form--question) {
    padding-bottom: 2.5rem;
  }

  /* в окне форма записи — как на ПК: поля во всю ширину, кнопка во всю ширину */
  .modal .form {
    padding: 2.5rem;
  }

  .modal .form__submit {
    align-self: stretch;
    width: 100%;
    margin-top: 1.375rem;
  }
}

/* ---------- Наведение на текстовые ссылки ----------
   В макете у этих ссылок нет состояний. Правило по образцу UI-Kit:
   на светлом фоне — фирменный цвет («Заказать звонок», 123:135),
   на бирюзовом фоне подвала — подчёркивание («Врач в списке», 173:490),
   у ссылок, подчёркнутых по умолчанию, — подчёркивание снимается. */

@media (any-hover: hover) {
  .nav__link:hover,
  .header__phone:hover,
  .header__bar-phone:hover,
  .doctor-card__reviews:hover,
  .rating-card__count:hover,
  .review-card__more:hover {
    color: var(--color-brand);
    opacity: 1;
  }
}

@media (any-hover: hover) {
  .nav__item--parent:hover .nav__arrow {
    opacity: 1;
  }
}

@media (any-hover: hover) {
  .header__eye:hover,
  .footer__vk:hover {
    opacity: 0.8;
  }
}

@media (any-hover: hover) {
  .doctor-card__reviews:hover,
  .rating-card__count:hover,
  .review-card__more:hover,
  .review-card__doctor-link:hover,
  .form__consent-link:hover,
  .footer__docs a:hover {
    text-decoration: none;
  }
}

@media (any-hover: hover) {
  .footer__link:hover,
  .footer__phone:hover,
  .footer__sublist a:hover {
    text-decoration: underline;
    text-underline-position: from-font;
  }
}

.footer__sublist li {
  opacity: 1;
}

@media (any-hover: hover) {
  .footer__sublist li:hover {
    opacity: 1;
  }
}

/* ===========================================================================
   Места нажатия на телефоне — не меньше 44 px (Apple HIG 44, Material 48).
   В макете ссылки высотой 15–23 px; отступление от макета согласовано 2026-10-18.
   Списки ссылок: шаг строк 44, первая строка на прежнем месте.
   Одиночные ссылки: невидимое поле нажатия (::before), вид не меняется.
   =========================================================================== */

@media (max-width: 46.4375em) {
  /* меню */
  /* номер и «Заказать звонок» стоят через 5: поле номера уходит вверх, поле звонка — вниз */
  .burger__phone {
    margin-top: 0.0625rem; /* 19 − 18 */
    padding: 1.125rem 0 0;
  }

  .burger__callback {
    display: inline-block;
    margin-top: 0.0625rem; /* 5 − 4 */
    padding: 0.25rem 0 1.4375rem;
  }

  .burger__services {
    margin-top: -0.0625rem; /* 36 − 23 − 14 */
  }

  .burger__toggle,
  .burger__link,
  .burger__sublist a {
    padding: 0.875rem 0;
  }

  .burger__services-list .burger__link,
  .burger__sublist a {
    display: inline-block;
  }

  .burger__menu,
  .burger__services:has([aria-expanded='true']) + .burger__menu,
  .burger__services-list,
  .burger__patients,
  .burger__sublist {
    gap: 0;
    margin-top: 0;
  }

  /* подвал */
  .footer__phone {
    margin-top: 1.4375rem; /* 32 − 9 */
    padding: 0.5625rem 0;
  }

  .footer__branch {
    margin-top: 1.4625rem;
  }

  .footer__link,
  .footer__sublist a {
    padding: 0.875rem 0;
  }

  .footer__link {
    display: block;
  }

  .footer__sublist a {
    display: inline-block;
  }

  .footer__services,
  .footer__group,
  .footer__sublist,
  .footer__menu {
    gap: 0;
  }

  .footer__services {
    margin-top: 2.3125rem; /* 51 − 14 */
  }

  .footer__menu {
    margin-top: 0.25rem; /* 32 − 14 − 14 */
  }

  .footer__legal {
    margin-top: 1.1875rem; /* 33 − 14 */
  }

  .footer__docs {
    gap: 0;
    margin-top: 1.125rem; /* 32 − 14 */
  }

  .footer__docs a {
    padding: 0.875rem 0 0.9375rem;
  }

  .footer__copy {
    margin-top: 0.0625rem; /* 16 − 15 */
  }

  /* карточки услуг на главной */
  .service-card__list {
    gap: 0;
    margin-top: 0.125rem; /* 16 − 14 */
  }

  .service-card__link {
    display: inline-block;
    padding: 0.875rem 0;
  }

  /* карточки растут по содержимому; под кнопкой как в макете: 17 у крупных, 25 у остальных */
  .service-card,
  .service-card--large,
  .service-card--large + .service-card--large {
    height: auto;
    min-height: 0; /* минимальная высота с меньшей ширины здесь не действует */
  }

  .service-card {
    padding-bottom: 1.5625rem;
  }

  .service-card--large,
  .service-card--large + .service-card--large {
    padding-bottom: 1.0625rem;
  }

  .service-card__more {
    align-items: center;
    min-height: 2.75rem;
  }

  .service-card--large .service-card__more,
  .service-card--large + .service-card--large .service-card__more {
    margin-top: 0.1875rem; /* 17 − 14 (поле последнего пункта) */
  }

  /* одиночные ссылки и кнопки: поле нажатия до 44 */
  .header__logo,
  .header__burger,
  .header__bar-phone,
  .burger__eye,
  .burger__vk,
  .footer__vk,
  .breadcrumbs__link,
  .doctor-card__reviews,
  .doctor-hero__reviews,
  .rating-card__count,
  .review-card__more,
  .review-card__doctor-link,
  .slider__dot,
  .faq__toggle,
  .carousel-arrow,
  .btn-outline,
  .btn-more,
  .qa-topic,
  .qa-card__topic,
  .pagination__link,
  .place-contacts__vk,
  .doc-table__link,
  .docs__mail,
  .dept-services__head,
  .price-group__head {
    position: relative;
  }

  .header__logo::before,
  .header__burger::before,
  .header__bar-phone::before,
  .burger__eye::before,
  .burger__vk::before,
  .footer__vk::before,
  .breadcrumbs__link::before,
  .doctor-card__reviews::before,
  .doctor-hero__reviews::before,
  .rating-card__count::before,
  .review-card__more::before,
  .review-card__doctor-link::before,
  .slider__dot::before,
  .faq__toggle::before,
  .carousel-arrow::before,
  .btn-outline::before,
  .btn-more::before,
  .qa-topic::before,
  .qa-card__topic::before,
  .pagination__link::before,
  .place-contacts__vk::before,
  .doc-table__link::before,
  .docs__mail::before,
  .dept-services__head::before,
  .price-group__head::before {
    content: '';
    position: absolute;
    inset: -0.875rem -0.25rem;
  }

  .header__logo::before,
  .burger__eye::before,
  .faq__toggle::before,
  .carousel-arrow::before {
    inset: -0.125rem;
  }

  .header__burger::before {
    inset: -0.75rem -0.125rem;
  }

  .burger__vk::before,
  .footer__vk::before {
    inset: -0.625rem;
  }

  .btn-outline::before,
  .btn-more::before,
  .qa-topic::before {
    inset: -0.6875rem 0;
  }

  .qa-card__topic::before,
  .dept-services__head::before,
  .price-group__head::before,
  .doctor-hero__reviews::before {
    inset: -0.6875rem 0;
  }

  /* «Читать больше» и «Врач: …» в отзыве стоят через 21: поля заходят друг на друга на 3 px, там срабатывает «Врач» */
  .review-card__more::before {
    inset: -0.75rem -0.25rem -0.625rem;
  }

  .review-card__doctor-link::before {
    inset: -0.875rem -0.25rem;
  }

  .slider__dot::before {
    inset: -1rem -0.25rem;
  }

  .pagination__link::before {
    inset: -0.625rem -0.875rem;
  }

}

/* отклик на нажатие на сенсорных экранах: наведения там нет */
@media (hover: none) {
  a,
  button,
  summary {
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.1s;
  }

  a:active,
  button:active,
  summary:active {
    opacity: 0.6;
  }
}

.faq__num,
.faq__question {
  cursor: pointer;
}

/* ---------- Узкий телефон (меньше 390 по макету) и крупный шрифт в настройках браузера ----------
   При шрифте браузера 20px телефон 390 ведёт себя как экран 312px: всё в rem растёт, ширина — нет. */

/* длинное слово в заголовке («Электрофизиологические») переносится, а не раздвигает страницу */
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

@media (max-width: 24.3125em) {
  .header__bar-phone {
    margin: 0 1rem 0 auto;
  }

  .header__actions {
    margin-left: 0;
  }
}

/* номер телефона есть в меню; в полосе шапки он не помещается рядом с логотипом */
@media (max-width: 22.4375em) {
  .header__bar-phone {
    display: none;
  }

  .header__actions {
    margin-left: auto;
  }
}

/* ---------- Служебные страницы: 404 и результаты поиска (в макете нет — шрифты и кнопки сайта) ---------- */

.service-page {
  min-height: 50vh;
  padding-block: 3rem 5rem;
}

.service-page__code {
  font: var(--font-numbers);
  color: var(--color-brand);
}

.service-page__title {
  margin-top: 0.5rem;
  font: var(--font-h1-m);
}

.service-page__text {
  max-width: 40rem;
  margin-top: 1.5rem;
  font: var(--font-accent-m);
}

.service-page__text a {
  white-space: nowrap;
}

.service-page__content {
  max-width: 50rem;
  margin-top: 2rem;
}

.service-page__btn {
  margin-top: 2.5rem;
}

.service-page__form {
  display: flex;
  gap: 1rem;
  max-width: 40rem;
  margin-top: 2rem;
}

.service-page__form .form__field {
  flex: 1;
  background: var(--color-card);
}

.search-results {
  max-width: 50rem;
  margin-top: 1.5rem;
}

.search-results__item {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--color-line);
}

.search-results__link {
  font: var(--font-h3-m);
  color: var(--color-brand-text);
  text-decoration: underline;
  text-underline-position: from-font;
}

.search-results__text {
  margin-top: 0.5rem;
}

@media (min-width: 80em) {
  .service-page {
    padding-block: 5rem 7.5rem;
  }

  .service-page__title {
    font: var(--font-h1);
  }

  .service-page__text {
    font: var(--font-accent);
  }
}

/* ---------- Строка поиска под полосой меню (в макете нет; поле — как в форме, кнопка — малая кнопка сайта) ---------- */

.search {
  border-top: 1px solid var(--color-card);
  background: var(--color-light);
}

.search[hidden] {
  display: none;
}

.search__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: var(--container-fluid);
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
}

.search__input {
  flex: 1;
  background: var(--color-card);
}

.search__close {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
}

.search__close::before,
.search__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  border-top: 2px solid var(--color-text);
  transform: rotate(45deg);
}

.search__close::after {
  transform: rotate(-45deg);
}

/* ---------- Фото крупно (галерея, сертификаты; в макете нет — тёмное затемнение, белые стрелки) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 1rem 0.5rem;
  padding: 3.5rem 0.5rem 1rem;
  background: rgba(50, 50, 50, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem); /* на iPhone учитывает панель адреса */
  object-fit: contain;
  border-radius: var(--radius-small);
}

.lightbox__count {
  grid-column: 1 / -1;
  font: var(--font-body);
  color: var(--color-light);
  text-align: center;
}

.lightbox__close,
.lightbox__arrow {
  position: relative;
  width: 3rem;
  height: 3rem;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* крестик и стрелки — линиями белого цвета */
.lightbox__close::before,
.lightbox__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  border-top: 2px solid var(--color-light);
  transform: rotate(45deg);
}

.lightbox__close::after {
  transform: rotate(-45deg);
}

.lightbox__arrow::after {
  content: '';
  position: absolute;
  top: calc(50% - 0.5rem);
  left: calc(50% - 0.25rem);
  width: 1rem;
  height: 1rem;
  border-top: 2px solid var(--color-light);
  border-left: 2px solid var(--color-light);
  transform: rotate(-45deg);
}

.lightbox__arrow--next::after {
  left: calc(50% - 0.75rem);
  transform: rotate(135deg);
}

.lightbox__arrow[hidden] {
  visibility: hidden;
}

@media (any-hover: hover) {
  .lightbox__close:hover,
  .lightbox__arrow:hover {
    opacity: 0.7;
  }
}

/* в галерее и у сертификатов курсор показывает, что фото открывается */
.gallery__slide,
.achievements__img {
  cursor: zoom-in;
}

/* ---------- Кнопка «наверх» (в макете нет; цвета и скругление — как у кнопок сайта) ---------- */

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 4px 10px 0 rgba(47, 61, 61, 0.15);
}

/* прокрутка внутри окна, меню и просмотра фото не уходит на страницу под ними */
.modal,
.burger,
.lightbox {
  overscroll-behavior: contain;
}

/* номер лицензии в подвале не разрывается */
.footer__nowrap {
  white-space: nowrap;
}

/* рамка фокуса на бирюзовом подвале — белая (фирменная на фирменном не видна) */
.footer :focus-visible {
  outline-color: var(--color-light);
}

.to-top[hidden],
.is-modal-open .to-top {
  display: none;
}

/* стрелка вверх — уголок из двух рамок */
.to-top::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 1.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 2px solid var(--color-light);
  border-left: 2px solid var(--color-light);
  transform: rotate(45deg);
}

@media (any-hover: hover) {
  .to-top:hover {
    background: var(--gradient-reverse);
  }
}

@media (min-width: 80em) {
  .to-top {
    right: 2rem;
    bottom: 2rem;
  }
}

/* ===========================================================================
   Версия для слабовидящих (в макете нет — сделано в стиле сайта, README «Версия для слабовидящих»)
   Включается кнопкой-глазом [data-a11y-toggle]; assets/js/a11y.js ставит классы на <html>:
   a11y + a11y--size-1|2|3, a11y--scheme-white|black|blue|color, a11y--images-on|off, a11y--spacing-normal|wide.
   Правила с !important: версия перекрывает размеры и цвета всех блоков, не перечисляя их.
   =========================================================================== */

/* ---------- Панель настроек ---------- */

.a11y-panel {
  position: relative;
  z-index: 20;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-inactive);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  width: var(--container-fluid);
  margin: 0 auto;
  padding: 1rem 0;
}

.a11y-panel__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.a11y-panel__label {
  font: var(--font-menu);
  color: var(--color-text);
}

.a11y-panel__options {
  display: flex;
  gap: 0.5rem;
}

.a11y-panel__btn,
.a11y-panel__reset {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  font: 600 1rem/1 var(--font-family);
  color: var(--color-text);
  background: var(--color-light);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.a11y-panel__btn:not(.a11y-panel__btn--scheme)[aria-pressed="true"] {
  color: var(--color-light);
  background: var(--color-brand);
}

.a11y-panel__btn--size-1 { font-size: 0.875rem; }
.a11y-panel__btn--size-2 { font-size: 1.125rem; }
.a11y-panel__btn--size-3 { font-size: 1.375rem; }

/* образцы цветов: кнопка сама показывает схему, выбранная — с толстой рамкой */
.a11y-panel__btn--scheme { padding: 0; border-width: 2px; }
.a11y-panel__btn--scheme-white { color: #000; background: #fff; border-color: #000; }
.a11y-panel__btn--scheme-black { color: #fff; background: #000; border-color: #000; }
.a11y-panel__btn--scheme-blue { color: #063462; background: #9dd1ff; border-color: #063462; }
/* градиент цифрами: в контрастных схемах переменная --gradient выключена */
.a11y-panel__btn--scheme-color { color: var(--color-light); background: linear-gradient(to right, #02A2A3, #0F8BBB); border-color: var(--color-brand); }

.a11y-panel__btn--scheme[aria-pressed="true"] {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.a11y-panel__reset {
  margin-left: auto;
  padding: 0 1.5rem;
  font: var(--font-button);
  color: var(--color-light);
  background: var(--color-brand);
  border: 0;
}

@media (hover: hover) {
  .a11y-panel__btn:hover,
  .a11y-panel__reset:hover {
    opacity: 0.8;
  }
}

@media (max-width: 46.4375em) {
  .a11y-panel__inner {
    gap: 0.75rem;
  }

  .a11y-panel__group {
    width: 100%;
    justify-content: space-between;
  }

  .a11y-panel__reset {
    width: 100%;
    margin-left: 0;
  }
}

/* ---------- Размер шрифта ---------- */

.a11y--size-1 { --a11y-font: 1rem; }
.a11y--size-2 { --a11y-font: 1.25rem; }
.a11y--size-3 { --a11y-font: 1.5rem; }

.a11y body *:not(.a11y-panel, .a11y-panel *) {
  font-size: var(--a11y-font) !important;
  line-height: 1.5 !important;
}

.a11y body :is(h1, h1 *):not(.a11y-panel *) {
  font-size: calc(var(--a11y-font) * 1.6) !important;
  line-height: 1.2 !important;
}

.a11y body :is(h2, h2 *):not(.a11y-panel *) {
  font-size: calc(var(--a11y-font) * 1.35) !important;
  line-height: 1.25 !important;
}

.a11y body :is(h3, h3 *):not(.a11y-panel *) {
  font-size: calc(var(--a11y-font) * 1.15) !important;
  line-height: 1.3 !important;
}

/* ---------- Шапка ----------
   Крупный текст не помещается в строку меню ПК: на всех ширинах меню открывается кнопкой, как на планшете,
   строка с адресом и часами на ПК переносится, полоса меню при прокрутке не закрепляется. */

.a11y .header,
.a11y .header__bar {
  height: auto !important;
  min-height: 0 !important;
}

.a11y .header__bar {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-block: 0.75rem;
}

.a11y .header__actions {
  flex-wrap: wrap;
  margin-left: auto;
}

.a11y .header__bar-phone {
  margin-left: 0 !important;
}

.a11y .header--fixed .header__bar-wrap {
  position: static;
}

/* телефон: номер под логотипом, кнопка меню остаётся справа от логотипа */
@media (max-width: 46.4375em) {
  .a11y .header__bar-phone {
    order: 3;
    flex-basis: 100%;
  }
}

@media (min-width: 80em) {
  .a11y .header__top {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 2.5rem;
    height: auto !important;
    padding: 0.75rem calc((100% - var(--container-fluid)) / 2);
  }

  .a11y .header__eye {
    margin-left: auto;
  }

  .a11y .nav {
    display: none;
  }

  .a11y .header__burger {
    display: block;
  }

  .a11y .burger {
    display: flex;
  }

  .a11y .burger[hidden] {
    display: none;
  }
}

/* ---------- Блоки под крупный текст ----------
   Высоты из макета рассчитаны на обычный шрифт: здесь блоки растут по содержимому, длинные слова переносятся. */

.a11y body *:not(.a11y-panel, .a11y-panel *) {
  overflow-wrap: anywhere;
  white-space: normal !important;
  hyphens: auto;
}

/* номер телефона не разрывается и в версии для слабовидящих */
.a11y body a[href^="tel:"] {
  white-space: nowrap !important;
}

/* номера пунктов («01/») не разрываются */
.a11y body [class*="__num"] {
  overflow-wrap: normal;
  white-space: nowrap !important;
}

/* колонка номера — по его ширине; в карточках этапов номер не в углу, а над заголовком */
.a11y :is(.num-list__item, .dept-services__head) {
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  column-gap: 0.75rem !important;
}

.a11y :is(.step-card__num, .feature-card__num) {
  position: static !important;
  display: block;
  margin-bottom: 0.5rem;
}

.a11y :is(.btn, .btn-outline, .btn-more) {
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem !important;
  text-align: center;
  white-space: normal !important;
}

.a11y :is(.doctor-card, .service-card, .review-card, .footer, .footer__top, .doctor-hero__photo, .step-card, .stats__item) {
  height: auto !important;
}

.a11y :is(.services__grid, .ratings__list) {
  grid-template-rows: none !important;
  grid-auto-rows: auto;
}

.a11y .faq__list {
  height: auto !important;
}

.a11y .faq__item {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  column-gap: 1rem;
}

.a11y .faq__item + .faq__item {
  margin-top: 0.5rem;
}

.a11y .faq__answer {
  grid-column: 2 / -1;
}

.a11y .faq__toggle {
  grid-column: 3 !important;
}

.a11y .faq__question {
  max-width: none !important;
}

.a11y .quote__text {
  width: auto !important;
}

@media (max-width: 79.9375em) {
  .a11y .quote__body {
    padding-inline: var(--page-pad);
  }
}

.a11y .quote__author {
  display: block;
  align-self: flex-end !important;
  margin: 0.5rem 0 0 !important;
  text-align: right;
}

.a11y .doctor-card__name {
  white-space: normal;
}

.a11y .doctor-card__footer {
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
}

.a11y .review-card {
  display: flex;
  flex-direction: column;
}

.a11y .review-card__avatar {
  display: none;
}

.a11y .review-card :is(.review-card__name, .review-card__date, .review-card__text) {
  margin-top: 0.5rem;
}

.a11y .review-card__text {
  display: block !important;
  max-height: none !important;
  -webkit-line-clamp: unset !important;
}

.a11y .reviews-list__grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22.5rem), 1fr)) !important;
}

.a11y .review-card__more {
  display: none !important;
}

/* подпись слайда — под фото, а не поверх него */
.a11y .slider__slide {
  grid-template-rows: auto auto !important;
}

.a11y .slider__picture {
  grid-area: 1 / 1;
  height: 15rem;
}

.a11y .slider__caption {
  grid-area: 2 / 1;
  align-self: start;
  height: auto !important;
  padding: 1rem 0 0.25rem !important;
  color: inherit;
  background: none;
}

.a11y .slider__caption :is(.slider__title, .slider__text) {
  max-width: none !important;
}

.a11y .slider__slide {
  grid-template-columns: minmax(0, 1fr);
}

.a11y .slider__caption .btn-outline {
  color: var(--color-text);
  border-color: currentColor;
}

/* меню — одной колонкой и с прокруткой, если не помещается в экран */
.a11y .burger {
  overflow-y: auto;
}

@media (min-width: 46.5em) {
  .a11y .burger__panel {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .a11y .burger__panel > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .a11y .burger__menu {
    margin-top: 0 !important;
  }
}

/* ---------- Интервал между буквами ---------- */

.a11y--spacing-wide body *:not(.a11y-panel, .a11y-panel *) {
  letter-spacing: 0.12em !important;
  word-spacing: 0.24em !important;
}

/* ---------- Цвета ---------- */

.a11y--scheme-white { --a11y-fg: #000; --a11y-bg: #fff; --a11y-icon: brightness(0); }
.a11y--scheme-black { --a11y-fg: #fff; --a11y-bg: #000; --a11y-icon: brightness(0) invert(1); }
.a11y--scheme-blue { --a11y-fg: #063462; --a11y-bg: #9dd1ff; --a11y-icon: brightness(0); }

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) {
  --gradient: none;
  --gradient-reverse: none;
  --gradient-reverse-large: none;
  --slide-shade: none;
  --slide-shade-soft: none;
  --shadow-button: none;
  color-scheme: light;
}

.a11y--scheme-black {
  color-scheme: dark;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body {
  color: var(--a11y-fg);
  background: var(--a11y-bg);
}

/* фон у блоков прозрачный: остаётся один фон страницы, подложки и затемнения над фото исчезают */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body :is(*, *::before, *::after):not(.a11y-panel, .a11y-panel *) {
  color: var(--a11y-fg) !important;
  background-color: transparent !important;
  border-color: var(--a11y-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  outline-color: var(--a11y-fg);
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body :is(*::before, *::after):not(.a11y-panel *),
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body img[src$=".svg"],
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body svg {
  filter: var(--a11y-icon) !important;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body svg * {
  fill: var(--a11y-fg) !important;
}

/* то, что лежит поверх страницы, остаётся непрозрачным */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body :is(.header__bar-wrap, .nav__submenu, .burger__panel, .modal__window, .select__panel, .select__list, .lightbox) {
  background-color: var(--a11y-bg) !important;
}

/* кнопки и плашки без фона — с рамкой, чтобы их было видно */
/* полупрозрачный текст (даты, неактивные вкладки) — в полную силу; скрытый флажок формы и выключенные стрелки не трогаю */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body :is(*):not(.a11y-panel, .a11y-panel *, input, :disabled) {
  opacity: 1 !important;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) :is(.btn, .header__callback, .slider__dot, .doctor-hero__photo, .form__field, .to-top) {
  border: 2px solid var(--a11y-fg) !important;
}

/* выбранная вкладка, тема и страница — инверсией: фон цветом текста */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) body :is(.tabs__tab--active, .qa-topic--active, .pagination__link--current) {
  color: var(--a11y-bg) !important;
  background-color: var(--a11y-fg) !important;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) :is(.tabs__tab, .qa-topic) {
  border: 2px solid var(--a11y-fg) !important;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) .slider__dot--active {
  background-color: var(--a11y-fg) !important;
}

:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) .doctor-hero__photo {
  background-image: none !important;
}

.a11y--scheme-blue .a11y-panel,
.a11y--scheme-white .a11y-panel {
  border-bottom-color: #000;
}

/* большие кавычки за цитатой — украшение: в контрастных цветах становились сплошным пятном поверх текста */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) .quote__mark {
  visibility: hidden;
}

/* крестики закрытия нарисованы фоном кнопки */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) :is(.burger__close, .modal__close) {
  filter: var(--a11y-icon) !important;
}

/* логотипы — одним цветом с текстом (белый логотип подвала иначе пропадает на белом фоне) */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) :is(.header__logo, .burger__logo, .footer__logo) img {
  filter: var(--a11y-icon) !important;
}

/* таблицы Сивцева за первым экраном и в подвале — украшение, в контрастных цветах убираются */
:is(.a11y--scheme-white, .a11y--scheme-black, .a11y--scheme-blue) :is(.hero, .footer)::before,
.a11y--images-off :is(.hero, .footer)::before {
  display: none !important;
}

/* ---------- Изображения ---------- */

.a11y--images-off body img:not([src$=".svg"], .header__logo img, .burger__logo img, .footer__logo img) {
  visibility: hidden !important;
}

/* ---------- Фокус с клавиатуры ---------- */

.a11y body :focus-visible {
  outline: 3px solid var(--a11y-fg, var(--color-text)) !important;
  outline-offset: 2px;
}

/* «Специалисты»: карточка врача с обводкой 1px #C7C7C7 (макет 780:41991, правки 18.10).
   Обводка внутри карточки и поверх фото — размер карточки прежний */
.doctor-card--grid {
  outline: 1px solid var(--color-inactive);
  outline-offset: -1px;
}

/* баннер «Новая эра в хирургии катаракты»: кнопка при наведении и нажатии — залитая, как все кнопки сайта (правки 18.10).
   Свои цвета .promo .btn-outline перебивали общее наведение .btn-outline--dark */
.promo .btn-outline:active {
  font: var(--font-button-small-hover);
  color: var(--color-light);
  background: var(--gradient-reverse);
  border-color: transparent;
  opacity: 1;
}

@media (any-hover: hover) {
  .promo .btn-outline:hover {
    font: var(--font-button-small-hover);
    color: var(--color-light);
    background: var(--gradient);
    border-color: transparent;
    opacity: 1;
  }
}

/* ---------- Телефон и планшет: шапка закреплена при прокрутке (правки 18.10) ----------
   На ПК — своя закреплённая полоса меню (UI-Kit 185:1306). Тень — когда страница прокручена (класс ставит main.js). */
@media (max-width: 79.9375em) {
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header--fixed .header__bar-wrap {
    box-shadow: 0 4px 10px 0 rgba(47, 61, 61, 0.1);
  }

  /* версия для слабовидящих: шапка с крупным текстом высокая — не закрепляем, чтобы не занимала полэкрана */
  .a11y .header {
    position: static;
  }
}

/* ---------- «Подробнее» на телефоне — везде одной высоты 32px (правки дизайнера 18.10.26, п. 17) ---------- */
@media (max-width: 46.4375em) {
  .btn-more,
  .btn-outline--doctor,
  .service-card__more,
  .slider__caption .btn-outline,
  .promo .btn-outline,
  .dept-services__more,
  .lens-card__btn,
  .link-card__btn {
    min-height: 2rem;
    padding-block: 0;
    align-items: center;
  }
}

/* ---------- Виджет Яндекса «Хорошее место» (правки 18.10, п. 3 и 6): размер задаёт Яндекс — 150×50 на всех ширинах;
   в пикселях: содержимое виджета не растёт вместе со страницей на широких экранах ---------- */
.hero__badge,
.rating-card--yandex .rating-card__badge {
  width: 150px;
  height: 50px;
  border: 0;
}

.hero__badge {
  margin-left: 0;
}

/* Плашки рейтингов целиком ведут на площадку: ссылка растянута на карточку, виджет Яндекса — над ней со своей ссылкой */
.rating-card {
  position: relative;
}

.rating-card__link::after,
.rating-card__count::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.rating-card__badge {
  position: relative;
  z-index: 1;
}

.rating-card__link:focus-visible,
.rating-card__count:focus-visible {
  outline: none;
}

.rating-card__link:focus-visible::after,
.rating-card__count:focus-visible::after {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}


/* виджет уже прежней картинки (224 → 150): центр — там же, где был у картинки */
.rating-card--yandex .rating-card__badge { margin-left: 6.875rem; }

@media (min-width: 46.5em) {
  .rating-card--yandex .rating-card__badge { margin-left: 6.6875rem; }
}

@media (min-width: 80em) {
  .rating-card--yandex .rating-card__badge { margin-left: 4.875rem; }
}
