/* ==========================================================================
   БЛОК: НАШИ СПЕЦИАЛИСТЫ (СЛАЙДЕР)
   ========================================================================== */
.specialists-section {
    background-color: var(--c-primary-light);
    border-radius: 32px;
    padding: 60px 0;
    margin: 60px 0;
    position: relative;
    z-index: 5;
}

/* Наезд на верхний блок (галочка в ACF) */
.specialists-section--overlap {
    margin-top: -70px;
    padding-top: 50px;
    /* Компенсируем наезд внутренним отступом */
    z-index: 10;
}

.specialists-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.specialists-section__nav {
    display: flex;
    gap: 12px;
}

.swiper-button-prev-spec,
.swiper-button-next-spec {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition, 0.3s ease);
}

.swiper-button-prev-spec:hover svg rect,
.swiper-button-next-spec:hover svg rect {
    fill: var(--c-primary);
}

/* ЧТОБЫ КАРТОЧКИ БЫЛИ ОДИНАКОВОЙ ВЫСОТЫ */
.specialists-swiper .swiper-wrapper {
    align-items: stretch;
}

.specialists-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Карточка врача в слайдере */
.specialist-card {
    background-color: var(--c-white);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* Карточка тянется на всю высоту слайда */
    text-decoration: none;
    color: var(--c-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specialist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.specialist-card__photo {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.specialist-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialist-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Позволяет контенту выталкивать ссылку "подробнее" вниз */
}

.specialist-card__name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.specialist-card__position {
    font-size: 12px;
    color: var(--c-text-muted);
    margin: 0 0 12px 0;
}

.specialist-card__desc {
    font-size: 13px;
    color: var(--c-text);
    line-height: 1.4;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.specialist-card__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
    /* Прижимает ссылку всегда к низу карточки */
}

.specialists-section__footer-text {
    margin-top: 40px;
    font-size: 14px;
    color: var(--c-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   СТРАНИЦА ВРАЧА (SINGLE)
   ========================================================================== */
.doctor-page {
    padding: 40px 0 80px 0;
}

.doctor-page__breadcrumbs {
    font-size: 14px;
    color: var(--c-text-muted);
    margin-bottom: 40px;
}

.doctor-page__breadcrumbs a {
    color: var(--c-dark);
    text-decoration: none;
}

.doctor-page__grid {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr) !important;
    gap: 60px;
    align-items: start;
}

.doctor-page__photo {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
}

.doctor-page__photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.doctor-page__name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--c-dark);
}

.doctor-page__position {
    font-size: 16px;
    color: var(--c-primary);
    font-weight: 600;
    margin: 0 0 16px 0;
}

.doctor-page__short-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--c-text-muted);
}

.doctor-page__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
}

.doctor-page__content {
    min-width: 0;
    width: 100%;
}

.doctor-page__text,
.doctor-page__text p {
    max-width: 100% !important;
    width: 100% !important;
}

/* Сертификаты */
.cert-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--c-border);
}

.cert-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 991px) {
    .doctor-page__grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }
}
/* Мобильная версия (Поля в край экрана) */
@media (max-width: 767px) {
    .specialists-section {
        border-radius: 0;
        /* Убираем скругления */
        padding: 30px 0;
        /* Делаем блок компактнее по высоте */
        /* margin: 0px 0; */
    }

    .specialists-section__header {
        flex-direction: row;
        /* Выстраиваем заголовок и кнопки в одну линию */
        align-items: center;
        /* Центрируем по вертикали */
        justify-content: space-between;
        /* Раскидываем по краям */
        margin-bottom: 24px;
        /* Уменьшаем отступ до слайдера */
        gap: 12px;
    }

    .specialists-section__nav {
        align-self: center;
        /* Сбрасываем старое выравнивание */
        flex-shrink: 0;
        /* Запрещаем кнопкам сжиматься, если заголовок длинный */
    }

    /* Чуть уменьшаем сами кнопки на мобилках для эстетики */
    .swiper-button-prev-spec svg,
    .swiper-button-next-spec svg {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================================================
   СТРАНИЦА ВСЕХ СПЕЦИАЛИСТОВ (АРХИВ / ШАБЛОН)
   ========================================================================== */
.specialists-page {
    padding-bottom: 100px;
}

.specialists-page__hero {
    padding: 40px 0 80px 0;
}

.specialists-page__hero-text {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 24px;
}

.specialists-page__hero-thumb {
    width: 100%;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.specialists-page__hero-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Сетка карточек специалистов */
.specialists-page-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 врача в ряд на десктопе */
    gap: 30px;
}

.specialists-page-grid__item {
    display: flex;
}

.specialists-page-grid__item .specialist-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ СПЕЦИАЛИСТОВ
   ========================================================================== */
@media (max-width: 1200px) {
    .specialists-page-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 врача в ряд на ноутбуках */
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .specialists-page__hero {
        padding: 30px 0 40px 0;
    }

    .specialists-page-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 врача в ряд на планшетах */
    }

    .specialists-page__hero-thumb {
        margin-top: 30px;
    }
}

@media (max-width: 575px) {
    .specialists-page-grid {
        grid-template-columns: 1fr;
        /* 1 врач в ряд на мобильных устройствах */
        gap: 16px;
    }
}
/* ==========================================================================
   БЛОК ГРАФИКА РАБОТЫ В КАРТОЧКЕ ВРАЧА (В СЕТКЕ И СЛАЙДЕРЕ)
   ========================================================================== */
.specialist-card__schedule {
    margin: 16px 0 20px 0;
    background-color: #F8F3FC;
    /* Очень нежный светло-фиолетовый фон */
    border: 1px solid #E8DDF2;
    /* Тонкая элегантная рамка */
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--c-dark);
}

.specialist-card__schedule svg {
    flex-shrink: 0;
    color: var(--c-primary);
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.specialist-card__schedule div {
    flex-grow: 1;
}