/* ========================================
   Общие стили карточек специалистов
   Используются на главной странице и страницах врачей
   ======================================== */

/* Обертка карточки специалиста */
.specialist-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 400px;
    position: relative;
}

/* Карточка специалиста */
.specialist-card {
    background-color: white;
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    position: relative;
    height: 386px;
    cursor: pointer;
}

.specialist-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Информация - позиционирована поверх фото */
.specialist-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    max-width: calc(100% - 40px);
}

.specialist-name {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: #383E4B;
}

/* Фамилия красная */
.specialist-lastname {
    color: #E01F26;
}

/* Имя и отчество обычного цвета */
.specialist-firstname,
.specialist-patronymic {
    color: #383E4B;
}

.specialist-specialization {
    color: rgba(56, 62, 75, 0.7);
    font-size: 16px;
    line-height: 1.1;
    margin: 0;
}

/* Фото - на весь верх карточки */
.specialist-photo {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
}

.specialist-photo img {
    object-fit: contain;
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
}

/* Кнопка записи - внизу */
.specialist-book-btn {
    background-color: transparent;
    border: 1px solid rgba(224, 31, 38, 0.22);
    border-radius: 5px;
    color: #E01F26;
    font-size: 16px;
    font-weight: 400;
    height: 50px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    order: 3;
    margin-top: 10px;
    position: relative;
}

.specialist-book-btn:hover {
    border-color: rgba(224, 31, 38, 0.4);
}

/* При наведении на карточку - кнопка становится красной */
.specialist-wrapper:hover .specialist-book-btn {
    background-color: #E01F26;
    color: white;
    border-color: #E01F26;
}

.specialist-book-btn svg {
    width: 21px;
    height: 21px;
    position: absolute;
    left: 20px;
}

/* Иконка часов в кнопке белая при hover на карточку */
.specialist-wrapper:hover .specialist-book-btn svg path {
    fill: white;
}

/* ========================================
   Стили раскладки секции специалистов
   ======================================== */

/* Секция специалистов */
.section-specialists {
    margin: 160px 0 50px;
}

/* Заголовок - отдельно, по центру, над табами */
.section-specialists .section-title {
    color: #383E4B;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 30px;
    text-align: center;
}

/* Строка с фильтрами и кнопкой "Все" */
.section-specialists .section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 30px;
    position: relative;
}

/* Фильтры табов */
.specialists-filters {
    display: flex;
    gap: 15px;
}

/* Ссылка "Все" - справа */
.specialists-all {
    color: #E01F26;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 0;
    transition: opacity 0.3s ease;
}

.specialists-all:hover {
    opacity: 0.8;
}

.specialists-all svg {
    width: 23px;
    height: 11px;
}

/* Splide слайдер - breakout эффект (вне контейнера) */
.section-specialists .specialists-splide {
    margin-left: auto;
    margin-right: 0;
    max-width: calc(50vw + var(--container-width) / 2);
    padding-left: var(--container-padding);
    padding-right: 20px;
    margin-bottom: 40px;
}

/* Сетка карточек */
.specialists-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1300px) {
    .section-specialists {
        margin-top: clamp(90px, calc(23.333vw - 143.333px), 160px);
    }
}

/* Мобильная версия */
@media (max-width: 1000px) {
    /* Секция специалистов */
    .section-specialists {
        margin: 80px 0 40px;
    }

    .section-specialists .section-title {
        font-size: 26px;
        margin-bottom: 20px;
        text-align: left;
    }

    .section-specialists .section-header {
        align-items: flex-start;
        margin-bottom: 30px;
        gap: 15px;
    }

    .specialists-filters {
        gap: 10px;
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-tab {
        font-size: 15px;
        height: 38px;
        padding: 0 20px;
    }

    .specialists-all {
        position: static;
        font-size: 18px;
    }

    .section-specialists .specialists-splide {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        margin-bottom: 0;
    }

    /* Карточки специалистов */
    .specialist-wrapper {
        width: 100%;
        max-width: 400px;
    }

    .specialist-card {
        height: auto;
    }

    .specialist-photo {
        height: 350px;
        position: relative;
        width: 100%;
    }

    .specialist-photo img {
        width: auto;
        max-width: none;
    }

    .specialist-info {
        position: static;
        padding: 15px;
        max-width: 100%;
    }

    .specialist-name {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .specialist-name-br {
        display: none;
    }

    .specialist-specialization {
        font-size: 14px;
    }

    .specialist-book-btn {
        font-size: 15px;
        height: 48px;
        margin-top: 0;
    }

    .specialist-book-btn svg {
        width: 18px;
        height: 18px;
        left: 15px;
    }
}