/* specialists-slider.css */

.rows.specialists--cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    padding: 20px 0;
}

/* Карточка: шире, чем раньше */
.specialist-card {
    width: 240px;
    position: relative;
    /* Скрыты по умолчанию */
    display: none;
    /* Зеленый фон под карточкой */
    background: #80c216;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Первые 3 видны сразу */
.specialist-card:nth-child(-n+3),
.specialist-card.active {
    display: block;
}

/* Фото — шире и выше */
.specialist-photo {
    flex: 0 0 300px;
    width: 100%;
    height: 300px;
    overflow: hidden;
    /* Скрываем фото под зеленым фоном */
    position: relative;
    z-index: 1;
    border-radius: 10px 10px 0 0;
}

.specialist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border-radius: 10px 10px 0 0;
}

/* Анимация при наведении */
.specialist-card:hover {
    box-shadow: 0 5px 12px rgba(0,0,0,0.25);
}

.specialist-card:hover .specialist-photo img {
    transform: scale(1.05);
    box-shadow: none;
}

/* Текстовый блок — полный текст, без обрезки */
.specialist-info {
    flex: 1;
    padding: 16px 14px;
    background: #80c216;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
    /* Выравнивание по высоте */
    min-height: 100px;
    border-radius: 0 0 10px 10px;
}



.specialist-info .fio {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
}

/* Горизонтальный разделитель */
.specialist-info .fio::after {
    content: '';
    display: block;
    margin: 8px 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.specialist-info .position {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
}

/* Кнопка */
.show-all.btn-more {
    margin: 30px auto;
    display: inline-block;
    padding: 10px 24px;
    background: #80c216;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.show-all.btn-more:hover {
    background: #6aa112;
}

/* Убираем outline */
.specialist-card img:focus,
.show-all.btn-more:focus {
    outline: none;
    box-shadow: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .rows.specialists--cards {
        gap: 25px;
    }

    .specialist-card {
        width: 180px;
    }

    .specialist-photo {
        flex: 0 0 180px;
        height: 180px;
    }

    .specialist-info {
        padding: 10px;
    }

    .specialist-info .fio {
        font-size: 16px;
    }

    .specialist-info .position {
        font-size: 13px;
    }
}

.center--block {
    text-align: center;
}