/* Опорные страницы: цены, контакты, отзывы, документы, политика.
   Визуальный язык тот же, что у страниц услуг: белые скруглённые блоки,
   фирменный синий, шрифты Golos Text и Commissioner. */

/* Запас перед подвалом задаёт сам подвал (--wb-section-pad в
   reference.css). Свои 72 px сверху давали зазор 152 px вместо 80 и
   белую полосу над синим подвалом, которой нет на главной. */

.core-heading {
  align-items: start;
}
.core-page .core-lead {
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.6;
  color: #3c5a78;
}

.core-section {
  margin-top: 44px;
  padding: 32px 36px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.core-section > h2 {
  line-height: 1.12;
  font-size: var(--wb-h2);
  margin: 0 0 18px;
  font-family: var(--figma-font-heading);
  letter-spacing: -0.01em;
  color: var(--figma-blue);
}
.core-section p {
  max-width: 68ch;
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.65;
}
.core-section p:last-child {
  margin-bottom: 0;
}

.core-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 68ch;
}
.core-list li {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
  line-height: 1.55;
}
.core-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--figma-sky);
  box-shadow: 0 0 0 3px rgba(188, 228, 254, 0.45);
}

/* ── Цены ─────────────────────────────────────────────────────────────── */
.core-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}
.core-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}
.core-table th,
.core-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
}
.core-table thead th {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-width: 2px;
}
.core-table tbody th {
  font-weight: 600;
  color: var(--ink);
  width: 36%;
}
.core-table .core-price {
  font-family: var(--figma-font-heading);
  font-weight: 700;
  font-size: 19px;
  color: var(--figma-blue);
  white-space: nowrap;
}
.core-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.core-note {
  max-width: 68ch;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f2f7fb;
  color: #3c5a78;
  font-size: 15px !important;
  line-height: 1.55;
}
.core-note-strong {
  background: #fff6e6;
  color: #6b4b12;
  margin-top: 24px;
}

/* ── Контакты и реквизиты ─────────────────────────────────────────────── */
.core-contacts dl {
  display: grid;
  gap: 2px;
  margin: 0 0 20px;
}
.core-contacts dl > div {
  display: grid;
  grid-template-columns: minmax(180px, 32%) 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.core-contacts dt {
  color: var(--muted);
  font-size: 16px;
}
.core-contacts dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}
.core-pending {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}
.core-map {
  display: inline-flex;
}

/* ── Отзывы ───────────────────────────────────────────────────────────── */
.core-rating {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: var(--figma-sky);
}
.core-rating strong {
  font-family: var(--figma-font-heading);
  font-size: 44px;
  line-height: 1;
  color: var(--figma-blue);
}
.core-rating span {
  font-size: 16px;
  line-height: 1.45;
  color: #184066;
  max-width: 44ch;
}
.core-reviews {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}
.core-review {
  padding: 20px 22px;
  border-radius: 18px;
  background: #f7fafd;
  border: 1px solid var(--line);
}
.core-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.core-review-head b {
  font-size: 16px;
}
.core-stars {
  color: #8a6000; /* #f0a500 давало 1,99:1, #a87500 всё ещё 3,85 при норме 4,5 */
  letter-spacing: 1px;
}
.core-review p {
  font-size: 16px !important;
  line-height: 1.55;
  margin-bottom: 10px;
}
.core-review time {
  color: var(--muted);
  font-size: 14px;
}

/* ── Вопросы и ответы ─────────────────────────────────────────────────── */
/* Единственная реализация блока на всём сайте: главная, опорные страницы и
   одиннадцать услуг. Разметку собирает scripts/faq.mjs, вторую реализацию не
   пускает гейт npm run test:faq. Эталон взят с главной: заголовок над белой
   карточкой, список внутри неё. */
.wb-faq-section {
  margin-top: var(--wb-section-pad);
  margin-bottom: var(--wb-section-pad);
}
.wb-faq-head > p {
  margin-top: 16px;
  max-width: 68ch;
}
.wb-faq-section .core-faq {
  margin-top: 20px;
  padding: 8px 28px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--line);
}
/* Внутри секции услуги отступы задаёт сама секция. */
.implant-section .wb-faq-section {
  margin-top: 0;
  margin-bottom: 0;
}
.core-faq details {
  border-bottom: 1px solid var(--line);
}
.core-faq details:last-of-type {
  border-bottom: 0;
}
.core-faq summary {
  padding: 18px 40px 18px 0;
  position: relative;
  cursor: pointer;
  font-family: var(--figma-font-heading);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}
.core-faq summary::-webkit-details-marker {
  display: none;
}
.core-faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 26px;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--figma-blue);
  border-bottom: 2px solid var(--figma-blue);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.core-faq details[open] summary::after {
  transform: rotate(-135deg);
}
.core-faq details p {
  padding-bottom: 20px;
}

@media (max-width: 760px) {
  .wb-faq-section .core-faq {
    padding: 4px 18px;
  }
  .core-section {
    margin-top: 24px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .core-page .core-lead {
    font-size: 17px;
  }
  .core-section p,
  .core-list li {
    font-size: 16px;
  }
  .core-contacts dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .core-rating {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .core-reviews {
    grid-template-columns: 1fr;
  }
  .core-faq summary {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .core-faq summary::after {
    transition: none;
  }
}

/* ── Живая лента отзывов ───────────────────────────────────────────────
   Ряды листаются пальцем и трекпадом: это настоящая прокрутка контейнера,
   а не CSS-анимация. Автоход двигает scrollLeft и замирает, пока человек
   листает сам. Полоса прокрутки спрятана, края растворяются маской. */
/* Контейнер отзывов мог быть сеткой карточек (.core-reviews или
   .dp-reviews-grid). В режиме ленты раскладка другая, иначе ряды зажимает
   в одну колонку старой сетки. */
.is-feed {
  display: block !important;
}
/* Края ленты не размываем: владелец 13.10 сказал, что маска выглядит плохо.
   Карточка на краю просто обрезается рамкой контейнера. */
.rv-feed {
  display: grid;
  gap: 16px;
}
.rv-feed-row {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
  cursor: grab;
  /* Прокрутка пальцем на телефоне и трекпадом на ноутбуке. */
  -webkit-overflow-scrolling: touch;
}
.rv-feed-row::-webkit-scrollbar {
  display: none;
}
.rv-feed-row:focus-visible {
  outline: 3px solid var(--figma-blue);
  outline-offset: 4px;
  border-radius: 18px;
}
.rv-feed-track {
  display: flex;
  gap: 16px;
  padding-right: 16px;
  flex: none;
}
.rv-feed .core-review {
  width: 340px;
  flex: none;
  display: flex;
  flex-direction: column;
}
.rv-feed .core-review p {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rv-feed-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.rv-feed-hint {
  color: var(--muted);
  font-size: 15px;
}
.rv-feed-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--figma-blue);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.rv-feed-pause:hover {
  background: #f2f7fb;
}
.rv-feed-pause:focus-visible {
  outline: 3px solid var(--figma-blue);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .rv-feed .core-review {
    width: 280px;
  }
  .rv-feed-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .rv-feed-hint {
    text-align: center;
  }
  .rv-feed-pause {
    width: 100%;
  }
}

/* Карточки отзывов в профиле врача внутри ленты. */
.rv-feed .rv-feed-track .dp-review,
.rv-feed .rv-feed-track .core-review {
  width: 340px;
  flex: none;
  display: flex;
  flex-direction: column;
}
.rv-feed .dp-review p {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 760px) {
  .rv-feed .rv-feed-track .dp-review,
  .rv-feed .rv-feed-track .core-review {
    width: 280px;
  }
}

/* ── Таблица цен на узком экране ───────────────────────────────────────
   Замер 13.10.2026 на 390: 220 px таблицы за экраном, подсказки о
   прокрутке нет, обрезаны и цена, и колонка «что входит». Пациент читает
   это как «от меня прячут». На узких экранах строка становится карточкой,
   разметка остаётся таблицей: так её читают поиск и скринридер. */
@media (max-width: 560px) {
  .core-table-wrap {
    overflow: visible;
  }
  .core-table {
    min-width: 0;
    display: block;
  }
  .core-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .core-table tbody,
  .core-table tr,
  .core-table th,
  .core-table td {
    display: block;
    width: auto;
  }
  .core-table tr {
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f7fafd;
  }
  .core-table tbody th {
    width: auto;
    padding: 0 0 8px;
    border-bottom: 0;
    font-size: 17px;
  }
  .core-table td {
    padding: 8px 0 0;
    border-bottom: 0;
  }
  .core-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 13px;
  }
  .core-table .core-price {
    font-size: 22px;
  }
}

/* Призыв рядом с ценой. */
.core-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--figma-sky);
}
.core-cta b {
  display: block;
  font-family: var(--figma-font-heading);
  font-size: 22px;
  line-height: 1.25;
  color: var(--figma-blue);
}
.core-cta p {
  margin: 6px 0 0;
  max-width: 54ch;
  color: #1f3f60;
  font-size: 16px;
  line-height: 1.5;
}
.core-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.core-cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  color: var(--figma-blue);
}
@media (max-width: 760px) {
  .core-cta {
    padding: 20px 18px;
  }
  .core-cta-actions,
  .core-cta-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Раскрытие обрезанного отзыва. */
.rv-more {
  align-self: flex-start;
  margin: 2px 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--figma-blue);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.rv-more:focus-visible {
  outline: 3px solid var(--figma-blue);
  outline-offset: 2px;
}
.core-review.is-open p,
.dp-review.is-open p {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
.rv-feed .core-review.is-open,
.rv-feed .dp-review.is-open {
  width: 420px;
}

/* Рейтинги независимых площадок. */
.core-rating-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
/* Каждая площадка в своём фирменном цвете и со своим значком: человек
   узнаёт источник оценки до того, как прочитает название (владелец 14.10).
   Цвета сняты подсчётом пикселей самих значков, см.
   styleboard/assets/platforms/ПРОВЕНАНС.md. */
.core-rating-bar a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "logo rating"
    "name name"
    "count count";
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f8fd;
  background: color-mix(in srgb, var(--platform, #1d4ed8) 9%, #fff);
  border: 1px solid #dbe8f6;
  border-color: color-mix(in srgb, var(--platform, #1d4ed8) 28%, #fff);
  text-decoration: none;
  color: inherit;
}
.core-rating-bar a:hover {
  border-color: var(--platform, #1d4ed8);
}
.core-rating-bar img {
  grid-area: logo;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.core-rating-bar b {
  grid-area: rating;
  font-family: var(--figma-font-heading);
  font-size: 26px;
  line-height: 1;
  color: var(--platform, #1d4ed8);
}
.core-rating-bar span {
  grid-area: name;
  font-weight: 600;
  font-size: 15px;
}
.core-rating-bar small {
  grid-area: count;
  font-size: 13px;
}
.core-rating-bar small {
  color: var(--muted);
}

/* ── Хаб категории врачей ──────────────────────────────────────────────
   Формат карточки взят у агрегаторов, которые занимают весь кластер
   «стоматолог-имплантолог уфа»: фото, специальность, цифры, две кнопки.
   У клиник Уфы такого формата нет ни у одной (разбор 13.10.2026). */
.core-doctors {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.core-doctor {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 20px;
  border-radius: 22px;
  background: #f7fafd;
  border: 1px solid var(--line);
}
.core-doctor-photo {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: var(--figma-sky);
}
.core-doctor-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.core-doctor-body h3 {
  margin: 0 0 4px;
  font-family: var(--figma-font-heading);
  font-size: 21px;
  line-height: 1.2;
}
.core-doctor-body h3 a {
  color: var(--figma-blue);
  text-decoration: none;
}
.core-doctor-body > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}
.core-doctor-body ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.core-doctor-body li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.45;
}
.core-doctor-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--figma-sky);
}
.core-doctor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.core-doctor-book {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  background: var(--figma-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.core-doctor-book:hover {
  background: #0d357a;
}
@media (max-width: 560px) {
  .core-doctor {
    grid-template-columns: 1fr;
  }
  .core-doctor-photo {
    max-width: 180px;
  }
}

/* ── Карта проезда ────────────────────────────────────────────────────
   До нажатия кадра нет: стоит кнопка и объяснение, почему так. */
.core-map-embed {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.core-map-embed iframe {
  width: 100%;
  height: min(420px, 60vh);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.core-map-embed p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Цены в таблице сравнивают взглядом по столбцу: цифры должны быть одной
   ширины, иначе разряды не выстраиваются. */
.core-price-table td,
.core-price-table th,
.implant-price-amount,
.core-price-amount {
  font-variant-numeric: tabular-nums;
}

/* ── Лента отзывов во всю ширину экрана (владелец 14.10) ───────────────
   Контейнер страницы шириной 1120 px её сдерживал. `overflow-x: clip` у
   страницы нужен, чтобы вынос за контейнер не породил горизонтальную
   прокрутку; `clip` вместо `hidden`, иначе перестаёт работать липкая шапка. */
html,
body {
  overflow-x: clip;
}
.home-reviews > .core-reviews,
.core-page #otzyvy .core-reviews {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: clamp(16px, 4vw, 40px);
}

/* Городские ориентиры под картой: как дойти, когда адрес уже найден. */
.core-landmarks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: wb-landmark;
  width: 100%;
}
.core-landmarks li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f1f6fb;
  font-size: 15px;
  line-height: 1.5;
}
.core-landmarks li::before {
  counter-increment: wb-landmark;
  content: counter(wb-landmark);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--figma-blue, #0f408f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.core-map-embed.is-open iframe {
  margin-bottom: 4px;
}

/* Карточка врача на хабе: кнопки в ряд одинаковой высоты, как в каталоге. */
.core-doctor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.core-doctor-actions .dp-card-about,
.core-doctor-actions .core-doctor-book {
  min-height: 46px;
  min-width: 0;
  justify-content: center;
}
.core-doctor .dp-card-chips {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .core-doctor-actions {
    grid-template-columns: 1fr;
  }
}

/* ── Блок «Сколько стоит восстановить зуб» ─────────────────────────────
   Плоские голубые плашки стали карточками с иллюстрацией и выделенной
   ценой (владелец 14.10: «обыграть красиво»). */
.home-price-card {
  position: relative;
  background: linear-gradient(160deg, #e8f3fd 0%, #d7eafb 100%) !important;
  overflow: hidden;
}
.home-price-art {
  display: block;
  width: auto;
  height: 46px;
  object-fit: contain;
  object-position: left bottom;
  margin-bottom: 10px;
}

/* Первый экран опорных страниц: плашка акции и одна кнопка записи в ряд.
   Раньше первое действие встречалось только внизу страницы. */
.core-hero-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px;
  margin: 24px 0 8px;
}
@media (max-width: 760px) {
  .core-hero-offer {
    align-items: stretch;
    gap: 16px;
  }
  .core-hero-offer .button {
    width: 100%;
    justify-content: center;
  }
}
