/* Хаб «Услуги клиники» — доработка 13.11.2026.
   Подключается после общего бандла и переопределяет только .sh-* и плитку «Подробнее об услугах». */

:root {
  --sh-band: #edf4fc;
  --sh-band-deep: #e3eefa;
  --sh-cream: #fbf3e6;
  --sh-chip: #e8f0fc;
}

/* Полосы фона во всю ширину экрана: без горизонтальной прокрутки */
#main-content { overflow-x: clip; }

/* ── Первый экран ─────────────────────────────────────────── */
.sh-hero__lead { font-size: 18.5px; }
.editorial-body .sh-link { font-size: 15px; }
.sh-hero__facts dt { font-size: 21px; color: var(--ed-blue); }
.sh-hero__facts dd { font-size: 15px; }

/* ── «Что вас беспокоит?» ─────────────────────────────────── */
.sh-tiles {
  background: linear-gradient(135deg, #eaf2fc 0%, #f4f8fd 55%, #fbf6ee 100%);
  counter-reset: sh-tile;
}
.editorial-body .sh-tiles h2 { font-size: 26px; margin-bottom: 22px; }
.sh-tiles a {
  padding: 20px 46px 20px 20px;
  gap: 6px;
  box-shadow: 0 1px 2px #20354b0d;
  transition: border-color .15s, transform .15s;
}
.sh-tiles a:hover, .sh-tiles a:focus-visible { transform: translateY(-2px); }
.sh-tiles li { counter-increment: sh-tile; }
.sh-tiles a::before {
  content: counter(sh-tile, decimal-leading-zero);
  font: 700 12px/1 var(--ed-text);
  letter-spacing: .08em;
  color: var(--ed-blue);
  margin-bottom: 4px;
}
.sh-tiles strong { font-size: 18px; }
.sh-tiles small { font-size: 14.5px; }

/* ── Направления: чередуем белый фон и голубую полосу с плавными краями ── */
.sh-section {
  position: relative;
  isolation: isolate;
  padding-block: 72px;
}
.sh-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
}
#vosstanovlenie::before,
#lechenie::before,
#desny::before {
  background: linear-gradient(180deg, #fff 0%, var(--sh-band) 16%, var(--sh-band-deep) 60%, var(--sh-band) 86%, #fff 100%);
}
#ulybka::before {
  background: radial-gradient(60% 70% at 85% 55%, #fbf1e4 0%, #fff 70%);
}
.sh-section + .sh-section { margin-top: 0; }

.sh-section__head {
  border-top: 0;
  padding-top: 0;
  align-items: start;
  gap: 20px 64px;
}
.sh-section__kicker {
  align-items: center;
  font-size: 13px;
  letter-spacing: .1em;
}
.sh-section__kicker i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ed-blue);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}
.editorial-body .sh-section h2 { margin-top: 14px; font-size: clamp(32px, 3.2vw, 44px); }
.sh-section__lead { font-size: 17.5px; line-height: 1.65; }
.sh-section__doctors { margin-top: 14px; font-size: 15.5px; }

.sh-section__body { margin-top: 36px; gap: 22px; }

/* Карточки: белые на полосе, текст идёт сразу за описанием — без пустоты до цены */
.sh-card { background: #fff; box-shadow: 0 1px 2px #20354b0f, 0 8px 24px -16px #20354b33; }
.ed-directory__card.sh-card > div:last-child { padding: 26px 28px 24px; }
.editorial-body .sh-card h3 { font-size: 26px; margin-bottom: 12px; }
.editorial-body .sh-card p { font-size: 16px; line-height: 1.6; color: #44566b; margin-bottom: 18px !important; }
.sh-card__price {
  margin-top: 0;
  padding: 12px 16px;
  border-top: 0;
  border-radius: 10px;
  background: var(--sh-chip);
  gap: 2px 12px;
}
.sh-card__price strong { font-size: 24px; color: var(--ed-ink); }
.sh-card__price small { font-size: 14px; color: #4b5d72; }
.ed-directory__card.sh-card > div > span,
.sh-card__more { margin-top: 18px; padding-top: 0; font-size: 15px; font-weight: 600; }

/* Вертикальные карточки (два фото в направлении): лишняя высота уходит в фото, а не в пустоту */
.sh-section__body--2 .ed-directory__card.sh-card > img { flex: 1 1 auto; height: auto; min-height: 220px; max-height: 300px; }
.sh-section__body--2 .ed-directory__card.sh-card > div:last-child { flex: none; }
/* Горизонтальная карточка: текст по центру по высоте */
.sh-section__body--1 .ed-directory__card.sh-card > div:last-child { justify-content: center; padding: 34px 36px; }
.sh-section__body--1 .ed-directory__card.sh-card > img { min-height: 340px; }

/* Список направления */
.sh-rows { background: #fff; padding: 24px 26px 10px; }
.sh-rows__label { font-size: 12.5px; }
.sh-rows a { grid-template-columns: minmax(0, 1fr) 18px; min-height: 58px; padding: 15px 0; }
.sh-rows a > b { grid-column: 2; }
.sh-row__name { font-size: 16.5px; }
.sh-row__name small { margin-top: 3px; font-size: 14px; }

/* ── Виниры: карточка со слайдером «до/после» ─────────────── */
.sh-card--compare > .smile-compare { flex: none; width: 46%; margin: 0; align-self: stretch; aspect-ratio: auto; min-height: 340px; }
/* база .ed-directory__card span растягивает все span в карточке — возвращаем слайдеру свои */
.sh-card--compare .smile-compare span { width: auto; margin: 0; padding-top: 0; justify-content: normal; }
.sh-card--compare .smile-compare .smile-compare__labels span { display: block; padding: 6px 10px; color: #fff; }
.sh-card--compare .smile-compare span.smile-compare__handle { display: grid; width: 52px; height: 52px; color: #fff; }
.sh-card--compare .smile-compare span.smile-compare__hint { display: block; width: auto; padding: 6px 12px; color: #284554; }
.sh-card--compare h3 a { color: inherit; }
.sh-card--compare h3 a:hover { color: var(--ed-blue); }
.sh-card__more { display: flex; justify-content: space-between; width: 100%; color: var(--ed-blue) !important; }
.sh-card--compare:hover { border-color: var(--ed-line); }

.smile-compare { --smile-split: 50%; position: relative; aspect-ratio: 1; overflow: hidden; background: #f7f7f5; isolation: isolate; }
.smile-compare img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.smile-compare__base { position: absolute; inset: 0; }
.smile-compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--smile-split)) 0 0); pointer-events: none; }
.smile-compare__labels { position: absolute; inset: 16px 16px auto; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.smile-compare__labels span { padding: 6px 10px; border-radius: 4px; background: #173b4bd9; color: #fff; font: 500 12.5px/1.4 var(--ed-text); }
.smile-compare__divider { position: absolute; top: 0; bottom: 0; left: var(--smile-split); width: 2px; transform: translateX(-50%); background: #fff; box-shadow: 0 0 3px #143c4955; pointer-events: none; }
.smile-compare__handle { position: absolute; top: 62%; left: 50%; display: grid; place-items: center; transform: translate(-50%, -50%); width: 52px; height: 52px; border: 2px solid #fff; border-radius: 50%; background: #173f53; color: #fff; box-shadow: 0 2px 10px #143c492b; }
.smile-compare__range { position: absolute; z-index: 2; top: 0; left: -26px; width: calc(100% + 52px); height: 100%; padding: 0; margin: 0; border: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; appearance: none; -webkit-appearance: none; background: transparent; }
.smile-compare__range::-webkit-slider-runnable-track { height: 100%; background: transparent; border: 0; }
.smile-compare__range::-webkit-slider-thumb { -webkit-appearance: none; width: 52px; height: 100%; background: transparent; border: 0; border-radius: 0; }
.smile-compare__range::-moz-range-track { height: 100%; background: transparent; border: 0; }
.smile-compare__range::-moz-range-thumb { width: 52px; height: 100%; background: transparent; border: 0; border-radius: 0; }
.smile-compare:focus-within { outline: 3px solid #143ea4; outline-offset: -3px; }
.smile-compare:focus-within .smile-compare__handle { background: #143ea4; box-shadow: 0 0 0 5px #ffffff80; }
.smile-compare__hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 4px; background: #ffffffec; color: #284554; font: 500 12.5px/1.4 var(--ed-text); white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.smile-compare.is-touched .smile-compare__hint { opacity: 0; }

/* ── Перед записью ────────────────────────────────────────── */
.sh-utility { margin-top: 24px; border-top: 0; }
.editorial-body .sh-utility h2 { font-size: 26px; }
.sh-utility strong { font-size: 18px; }
.sh-utility small { font-size: 14.5px; }

/* ── Подробнее об услугах: горизонтальные карточки, как «Лечение, диагностика и протезирование» на главной ── */
.sh-more {
  position: relative;
  isolation: isolate;
  padding-block: 72px 88px;
}
.sh-more::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background: linear-gradient(180deg, #fff 0%, #f1f8fa 12%, #e7f3f6 100%);
}
.sh-more__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px 64px; align-items: end; }
.editorial-body .sh-more__head h2 { margin: 0; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.12; }
.sh-more__head p { margin: 0; font-size: 17.5px; line-height: 1.65; color: var(--ed-ink); }
.sh-more__groups { display: grid; gap: 40px; margin-top: 40px; }
.editorial-body .sh-more__group h3 {
  margin: 0 0 16px;
  font: 700 13px/1.5 var(--ed-text);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #1d6b7a;
}
.sh-more__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sh-more__group li { min-width: 0; }
.sh-more__group a {
  display: grid;
  grid-template-columns: minmax(0, .73fr) minmax(0, 1fr);
  align-items: center;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5e5ea;
  border-radius: 14px;
  color: var(--ed-ink);
  transition: background .15s, border-color .15s;
}
.sh-more__group a:hover { background: #f3fafa; border-color: #9dbec8; }
.sh-more__group a:focus-visible { outline: 2px solid var(--ed-blue); outline-offset: 3px; }
.sh-more__group img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; background: #dcebee; }
.sh-more__group span {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px 18px;
  font: 700 18px/1.25 var(--ed-text);
  letter-spacing: -.01em;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}
.sh-more__group svg { color: var(--ed-blue); transition: transform .15s; }
.sh-more__group a:hover svg { transform: translateX(3px); }

/* ── Планшет ──────────────────────────────────────────────── */
@media (max-width: 1050px) {
  .sh-more__head { grid-template-columns: 1fr; }
  .sh-more__group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-section__body--2 .ed-directory__card.sh-card > img { flex: none; height: 240px; min-height: 0; }
  .sh-section__body--1 .ed-directory__card.sh-card > img { min-height: 0; }
  .sh-card--compare > .smile-compare { width: 100%; aspect-ratio: 1; min-height: 0; }
  .sh-section__body--1 .ed-directory__card.sh-card > div:last-child { padding: 26px; }
}

/* ── Телефон ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .sh-hero__lead { font-size: 17px; }
  .sh-hero__facts dd { font-size: 14.5px; }
  .editorial-body .sh-tiles h2 { font-size: 22px; }
  .sh-tiles strong { font-size: 17px; }
  .sh-tiles small { font-size: 14px; }
  .sh-section { padding-block: 52px; }
  .editorial-body .sh-section h2 { font-size: 30px; }
  .sh-section__lead { font-size: 16.5px; }
  .sh-section__doctors { font-size: 15px; }
  .sh-section__body { margin-top: 26px; gap: 16px; }
  .ed-directory__card.sh-card > div:last-child,
  .sh-section__body--1 .ed-directory__card.sh-card > div:last-child { padding: 20px; }
  .sh-section__body--2 .ed-directory__card.sh-card > img { height: 210px; }
  .editorial-body .sh-card h3 { font-size: 23px; }
  .editorial-body .sh-card p { font-size: 15.5px; }
  .sh-card__price strong { font-size: 22px; }
  .sh-rows { padding: 18px 18px 6px; }
  .sh-row__name { font-size: 16px; }
  .sh-more { padding-block: 52px 64px; }
  .editorial-body .sh-more__head h2 { font-size: 30px; }
  .sh-more__head p { font-size: 16.5px; }
  .sh-more__groups { margin-top: 30px; gap: 30px; }
  .sh-more__group ul { grid-template-columns: 1fr; gap: 10px; }
  .sh-more__group a { grid-template-columns: 112px minmax(0, 1fr); }
  .sh-more__group span { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 12px 16px; font-size: 16.5px; }
}
