/* ============================================================
   Новый блок «Специалисты» — карточная сетка (07.2026).
   Утверждено клиентом 15.07.2026: desktop 3 в ряд (контейнер 1170),
   планшет 2, мобильный 1; кнопки #6e9c3f; отзыв — кламп 4 строки;
   «Ближайшая запись» жирным; порядок: фото → ФИО → специальность →
   чипы → отзывы → запись → кнопки (низ прижат).
   ============================================================ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/templates/base/fonts/inter/inter-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/templates/base/fonts/inter/inter-var-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.sp-cards {
    max-width: 1170px;
    margin: 0 auto;
    padding: 8px 0 32px;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #1f241f;
}

.sp-cards__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 22px;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1f241f;
}

.sp-cards__count {
    font-size: 28px;
    font-weight: 700;
    color: #a9aea3;
}

/* Сетка: ≥960 — 3 колонки; 560–959 — 2; <560 — 1 (резиновые 1fr между брейкпоинтами) */
.sp-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* ---------- Карточка ----------
   Внутреннее поле задаёт САМА карточка (padding: 16px), фото и текст — без
   собственных боковых отступов. Так фото, ФИО и кнопки стоят на одной
   вертикальной линии, как в утверждённой клиентом демке v4. */
.sp-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(31, 42, 30, 0.10), 0 0 0 1px rgba(31, 42, 30, 0.05);
}

/* Кадр 3:2 — фактический формат фотографий клиента (600×400, партия 16.07.2026) */
.sp-card__photo {
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    background-color: #eef0ee;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

/* фолбэк для браузеров без aspect-ratio (Safari < 15) */
@supports not (aspect-ratio: 3 / 2) {
    .sp-card__photo { height: 0; padding-bottom: 66.667%; }
}

.sp-card__photo:focus-visible { outline: 3px solid #6e9c3f; outline-offset: 2px; }

.sp-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 16px 0 0;
}

.sp-card__name {
    display: block;
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f241f;
    text-decoration: none;
}
.sp-card__name:hover { color: #6e9c3f; text-decoration: none; }

.sp-card__spec {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.45;
    color: #40463e;
}

.sp-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}

.sp-card__chip {
    padding: 6px 10px;
    border-radius: 14px;
    background: #eef0ec;
    font-size: 13px;
    line-height: 1;
    color: #3c423a;
    white-space: nowrap;
}

/* ---------- Отзывы (включаются реестром на бэке) ---------- */
.sp-card__reviews {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 14px;
}

.sp-card__reviews-head {
    font-size: 15px;
    font-weight: 700;
    color: #1f241f;
    text-decoration: none;
}
.sp-card__reviews-head:hover { color: #6e9c3f; text-decoration: none; }
.sp-card__reviews-count { color: #a9aea3; font-weight: 600; margin-left: 4px; }

.sp-card__quote {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f1f3ee;
    font-size: 14px;
    line-height: 1.5;
    color: #40463e;
    text-decoration: none;
}
.sp-card__quote:hover { background: #eaeee6; text-decoration: none; }
.sp-card__quote b { color: #1f241f; }

/* кламп ровно 4 строки — на внутреннем элементе, чтобы паддинги
   бокса не показывали обрезок пятой строки */
.sp-card__quote-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

/* ---------- Низ карточки: запись + кнопки, прижаты ---------- */
.sp-card__bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sp-card__slot { min-height: 1px; }

.sp-card__slot .slot-info { padding: 0; }

/* «Ближайшая запись» — жирным (правка клиента 15.07).
   font-family задаём явно: глобальные стили сайта (сериф) перебивают
   наследование от .sp-cards на span'ах слот-строки. */
.sp-card__slot .slot-label {
    display: block;
    margin-bottom: 2px;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1f241f;
}

.sp-card__slot .slot-val {
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #6e9c3f;
    white-space: normal;
}

.sp-card__slot .slot-label-link { text-decoration: none; }
.sp-card__slot .slot-label-link:hover .slot-val { text-decoration: underline; }

.sp-card__slot .slot-info--waitlist .slot-label { margin-bottom: 0; }

.sp-card__no-slots-note {
    display: block;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #6d7368;
}

/* чипы времён из deferred-инжекта в новой карточке не показываем */
.sp-card__slot .slots-list { display: none !important; }

.sp-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-btn {
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}
.sp-btn:hover { text-decoration: none; }
.sp-btn:focus-visible { outline: 3px solid rgba(110, 156, 63, 0.5); outline-offset: 2px; }

.sp-btn--primary {
    flex: 1 1 auto;
    background: #6e9c3f;
    color: #fff;
}
.sp-btn--primary:hover { background: #5f8836; color: #fff; }

.sp-btn--ghost {
    flex: 0 1 auto;
    background: #fff;
    color: #1f241f;
    box-shadow: inset 0 0 0 1.5px #c9cec5;
}
.sp-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px #1f241f; color: #1f241f; }

/* ---------- Кнопка «Смотреть всех специалистов» (главная) ---------- */
.sp-cards__more-wrap { margin: 28px 0 0; text-align: center; }

.sp-cards__more {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1.5px #c9cec5;
    font-size: 16px;
    font-weight: 600;
    color: #1f241f;
    text-decoration: none;
}
.sp-cards__more:hover { box-shadow: inset 0 0 0 1.5px #6e9c3f; color: #6e9c3f; text-decoration: none; }

/* ---------- Планшет / мобильный ландшафт ---------- */
@media (max-width: 959px) {
    .sp-cards__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ---------- Мобильный: 1 колонка, текст ≥ 16px ---------- */
@media (max-width: 767px) {
    /* На мобиле сайт обнуляет .content-cols.mt50/.mt-125 (main.css) — блок
       вплотную прилипает к предыдущей секции. Возвращаем воздух сверху. */
    .sp-cards { padding-top: 28px; }
}

@media (max-width: 559px) {
    .sp-cards__grid { grid-template-columns: 1fr; gap: 18px; }

    .sp-cards__title, .sp-cards__count { font-size: 23px; }

    .sp-card__name { font-size: 20px; }
    .sp-card__spec { font-size: 16px; }
    .sp-card__chip { font-size: 14px; }
    .sp-card__reviews-head { font-size: 16px; }
    .sp-card__quote { font-size: 16px; }
    .sp-card__quote-clamp { -webkit-line-clamp: 5; }
    .sp-card__slot .slot-label, .sp-card__slot .slot-val { font-size: 16px; }
    .sp-card__no-slots-note { font-size: 16px; }
    .sp-btn { flex: 1 1 auto; padding: 15px 20px; font-size: 16px; }
}

/* ============================================================
   Секция «Отзывы» на странице специалиста (#otzyvy) —
   цель клика по отзыву из карточек блока.
   ============================================================ */
.sp-reviews {
    padding: 8px 0 40px;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #1f241f;
    scroll-margin-top: 150px; /* не прятать заголовок под двухъярусной шапкой при переходе по якорю */
}

#otzyvy { scroll-margin-top: 150px; }

.sp-reviews__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 22px;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1f241f;
}

.sp-reviews__count { font-size: 28px; font-weight: 700; color: #a9aea3; }

.sp-reviews__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

.sp-reviews__item {
    background: #f1f3ee;
    border-radius: 12px;
    padding: 18px 20px;
}

.sp-reviews__meta { margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
.sp-reviews__author { font-size: 15px; font-weight: 700; color: #1f241f; }
.sp-reviews__date { font-size: 13px; color: #6d7368; }

.sp-reviews__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #40463e;
}

/* скрытые отзывы (раскрываются кнопкой «Показать ещё» порциями по 6) */
.sp-reviews__item--hidden { display: none; }

.sp-reviews__more-wrap { margin: 24px 0 0; text-align: center; }

.sp-reviews__more {
    display: inline-block;
    padding: 14px 28px;
    border: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1.5px #c9cec5;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #1f241f;
    cursor: pointer;
}
.sp-reviews__more:hover { box-shadow: inset 0 0 0 1.5px #6e9c3f; color: #6e9c3f; }
.sp-reviews__more:focus-visible { outline: 3px solid rgba(110, 156, 63, 0.5); outline-offset: 2px; }

@media (max-width: 767px) {
    .sp-reviews__list { grid-template-columns: 1fr; gap: 14px; }
    .sp-reviews__title, .sp-reviews__count { font-size: 23px; }
    .sp-reviews__text { font-size: 16px; }
    .sp-reviews__author { font-size: 16px; }
    .sp-reviews__date { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .sp-btn { transition: none; }
}
