/* Хаб «Услуги клиники» — /uslugi-i-tseny/. Токены берутся из общего styles.css (--ed-*). */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.sh-page b { font-weight: 400; }

/* ── Первый экран ─────────────────────────────────────────── */
.sh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 60px;
  align-items: end;
  padding-bottom: 44px;
}
.editorial-body .sh-hero h1 { margin-bottom: 18px; }
.sh-hero__lead {
  max-width: 560px;
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ed-ink);
}
.sh-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.editorial-body .sh-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ed-blue);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.sh-hero__facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--ed-line); }
.sh-hero__facts > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--ed-line);
}
.sh-hero__facts dt {
  font: 700 19px/1.2 var(--ed-heading);
  letter-spacing: -.02em;
  color: var(--ed-ink);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.sh-hero__facts dd { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ed-muted); }

/* ── «Что вас беспокоит?» ─────────────────────────────────── */
.sh-tiles {
  padding: 30px 32px 32px;
  background: var(--ed-pale);
  border-radius: 18px;
}
.editorial-body .sh-tiles h2 { margin: 0 0 20px; font-size: 22px; line-height: 1.2; }
.sh-tiles ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sh-tiles a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  min-height: 92px;
  padding: 18px 46px 18px 20px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color .15s;
}
.sh-tiles a:hover, .sh-tiles a:focus-visible { border-color: #8dabda; }
.sh-tiles strong { font: 700 16px/1.3 var(--ed-heading); letter-spacing: -.02em; color: var(--ed-ink); }
.sh-tiles small { font-size: 12.5px; line-height: 1.5; color: var(--ed-muted); }
.sh-tiles a > b { position: absolute; top: 16px; right: 18px; font-size: 17px; line-height: 1; color: var(--ed-blue); }

/* ── Направление ──────────────────────────────────────────── */
.sh-section { padding-top: 62px; scroll-margin-top: 12px; }
.sh-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px 60px;
  align-items: end;
  padding-top: 26px;
  border-top: 1px solid var(--ed-ink);
}
.sh-section__kicker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ed-blue);
}
.sh-section__kicker i { font-style: normal; color: var(--ed-muted); font-variant-numeric: tabular-nums; }
.editorial-body .sh-section h2 { margin: 10px 0 0; font-size: clamp(28px, 2.9vw, 38px); line-height: 1.12; }
.sh-section__lead { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ed-ink); }
.sh-section__doctors { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ed-muted); }
.sh-section__doctors span { color: var(--ed-ink); font-weight: 600; }
.editorial-body .sh-section__doctors a { color: var(--ed-blue); border-bottom: 1px solid #b8cdf0; }
.editorial-body .sh-section__doctors a:hover { border-bottom-color: currentColor; }

.sh-section__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px;
  margin-top: 30px;
  align-items: stretch;
}
/* Одна фотокарточка в направлении — горизонтальная, на две колонки; список всегда справа */
.sh-section__body--1 .sh-card { grid-column: span 2; flex-direction: row; }
.sh-section__body--1 .ed-directory__card.sh-card > img { width: 46%; height: 100%; min-height: 320px; flex: none; }
.sh-section__body--1 .ed-directory__card.sh-card > div { padding: 30px; }

/* Фотокарточка: база от .ed-directory__card, здесь — заголовок h3 и цена */
.editorial-body .sh-card h3 { font-size: 23px; line-height: 1.2; margin: 0 0 12px; }
.sh-card p { margin-bottom: 18px !important; }
.sh-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--ed-line);
}
.sh-card__price strong {
  font: 700 19px/1.2 var(--ed-heading);
  letter-spacing: -.02em;
  color: var(--ed-ink);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.sh-card__price small { font-size: 12px; line-height: 1.4; color: var(--ed-muted); }
.ed-directory__card.sh-card > div > span { margin-top: 0; }

/* Список услуг направления */
.sh-rows {
  display: flex;
  flex-direction: column;
  padding: 22px 25px 10px;
  border: 1px solid var(--ed-line);
  border-radius: 14px;
  min-width: 0;
  align-self: start;
}
.sh-rows__label {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ed-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ed-line);
}
.sh-rows ul { list-style: none; margin: 0; padding: 0; }
.sh-rows li { break-inside: avoid; border-bottom: 1px solid var(--ed-line); }
.sh-rows li:last-child { border-bottom: 0; }
.sh-rows a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 12px;
  align-items: baseline;
  min-height: 52px;
  padding: 13px 0;
  transition: color .15s;
}
.sh-rows a:hover, .sh-rows a:focus-visible { color: var(--ed-blue); }
.sh-row__name { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.sh-row__name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.45; color: var(--ed-muted); }
.sh-row__price {
  grid-column: 2;
  font-size: 13px;
  font-weight: 600;
  color: var(--ed-ink);
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
.sh-rows a > b { grid-column: 3; justify-self: end; font-size: 15px; color: var(--ed-blue); }
.sh-row--urgent .sh-row__name { color: #b3261e; }
.sh-row--urgent a:hover .sh-row__name { color: inherit; }

/* ── Перед записью ────────────────────────────────────────── */
.sh-utility { margin-top: 70px; padding-top: 26px; border-top: 1px solid var(--ed-ink); }
.editorial-body .sh-utility h2 { margin: 0 0 22px; font-size: 22px; line-height: 1.2; }
.sh-utility ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.sh-utility a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 18px 42px 18px 20px;
  background: var(--ed-pale);
  border-radius: 12px;
  transition: background .15s;
}
.sh-utility a:hover, .sh-utility a:focus-visible { background: #e4edf9; }
.sh-utility strong { font: 700 16px/1.3 var(--ed-heading); letter-spacing: -.02em; }
.sh-utility small { font-size: 12.5px; line-height: 1.5; color: var(--ed-muted); }
.sh-utility a > b { position: absolute; top: 17px; right: 18px; font-size: 15px; color: var(--ed-blue); }

/* ── Планшет ──────────────────────────────────────────────── */
@media (max-width: 1050px) {
  .sh-hero { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .sh-section__head { grid-template-columns: 1fr; align-items: start; }
  .sh-section__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-section__body--1 .sh-card { grid-column: auto; flex-direction: column; }
  .sh-section__body--1 .ed-directory__card.sh-card > img { width: 100%; height: 220px; min-height: 0; }
  .sh-section__body--1 .ed-directory__card.sh-card > div { padding: 25px; }
  .sh-section__body--2 .sh-rows { grid-column: 1 / -1; }
  .sh-section__body--2 .sh-rows ul { columns: 2; column-gap: 40px; }
  .sh-utility ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Телефон ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .sh-hero { padding-bottom: 30px; }
  .sh-hero__lead { font-size: 15.5px; margin-bottom: 22px; }
  .sh-hero__actions .ed-button { width: 100%; }
  .sh-hero__facts > div { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 13px 0; }
  .sh-hero__facts dt { font-size: 17px; }
  .sh-tiles { padding: 22px 16px 16px; margin-inline: -4px; border-radius: 16px; }
  .editorial-body .sh-tiles h2 { font-size: 20px; margin-bottom: 15px; padding-inline: 4px; }
  .sh-tiles ul { grid-template-columns: 1fr; gap: 8px; }
  .sh-tiles a { min-height: 0; padding: 15px 42px 15px 16px; }
  .sh-tiles strong { font-size: 15.5px; }
  .sh-section { padding-top: 46px; }
  .sh-section__head { padding-top: 20px; gap: 14px; }
  .sh-section__body { grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
  .sh-section__body--2 .sh-rows ul { columns: 1; }
  .ed-directory__card.sh-card > img,
  .sh-section__body--1 .ed-directory__card.sh-card > img { height: 210px; }
  .sh-section__body--1 .ed-directory__card.sh-card > div { padding: 20px; }
  .sh-rows { padding: 18px 18px 6px; }
  .sh-utility { margin-top: 50px; }
  .sh-utility ul { grid-template-columns: 1fr; gap: 8px; }
}

/* Кнопка «Записаться» ведёт к полю формы внизу — оставляем над ним подпись и заголовок */
#appointment-footer-name { scroll-margin-top: 150px; }
