.team-section {
    padding: 60px 0;
    background-color: #fff; /* Белый фон для всей секции */
    /* Если фон страницы уже белый, можно убрать */
}

.section-title-main {
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
    color: #212529; /* Темный цвет заголовка */
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    font-size: 1em;
    color: #6c757d; /* Серый цвет подзаголовка */
    max-width: 700px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

.team-tabs-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border: 1px solid #dee2e6; /* Рамка вокруг группы табов */
    border-radius: 25px; /* Скругление рамки */
    overflow: hidden; /* Чтобы скругление работало с внутренними элементами */
    max-width: 600px; /* Ограничиваем ширину табов */
    margin-left: auto;
    margin-right: auto;
}

.tab-link {
    flex-grow: 1;
    padding: 12px 20px;
    background-color: #fff;
    border: none;
    /* border-right: 1px solid #dee2e6; Убираем правую рамку, т.к. есть общая */
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    white-space: nowrap;
}
.tab-link:not(:last-child) {
    border-right: 1px solid #dee2e6; /* Разделитель между табами */
}


/* .tab-link:last-child {
    border-right: none;
} */

.tab-link:hover {
    background-color: #f8f9fa;
}

.tab-link.active {
    background-color: #343a40; /* Темный фон для активного таба */
    color: #fff;
    font-weight: bold;
}

.team-tab-content {
    display: none; /* Скрываем все контенты табов по умолчанию */
    padding-top: 20px;
}

.team-tab-content.active {
    display: block; /* Показываем активный контент таба */
}

.tab-content-title {
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #212529;
    margin-top: 0;
    margin-bottom: 40px;
}

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Адаптивная сетка */
    gap: 30px;
    margin-bottom: 50px;
}

.team-member-card {
    background-color: #fff; /* Фон карточки */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Для скругления фото */
    display: flex;
    flex-direction: column;
}

.member-photo img {
    width: 100%;
    height: 380px; /* Фиксированная высота для фото */
    object-fit: cover; /* Масштабирует и обрезает фото */
    display: block;
    border-top-left-radius: 8px; /* Если нужно скругление только верхних углов фото */
    border-top-right-radius: 8px;
}

.member-info {
    padding: 20px;
    text-align: left; /* Текст в карточке слева */
    flex-grow: 1; /* Чтобы контент занимал доступное пространство, если карточки разной высоты */
    display: flex;
    flex-direction: column;
}

.member-info h4 {
    font-size: 1.15em;
    font-weight: bold;
    color: #212529;
    margin-top: 0;
    margin-bottom: 8px;
}

.member-info p {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 15px;
    flex-grow: 1; /* Чтобы описание растягивалось, и ссылка "Подробнее" была внизу */
}

.details-link-member {
    font-size: 0.9em;
    color: #fd7e14; /* Оранжевый цвет для ссылки "Подробнее" */
    text-decoration: none;
    font-weight: 500;
    margin-top: auto; /* Прижимает ссылку к низу */
    align-self: flex-start; /* Выравнивание ссылки по левому краю */
}

.details-link-member:hover {
    text-decoration: underline;
}

.team-summary {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #e9ecef; /* Разделитель */
    margin-top: 20px;
}

.summary-text {
    font-size: 1.2em;
    font-weight: 500;
    color: #212529;
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.summary-number {
    font-size: 4.5em; /* Очень большой размер цифры */
    font-weight: bold;
    color: #212529;
    margin-bottom: 5px;
    line-height: 1;
}

.summary-description {
    font-size: 0.95em;
    color: #6c757d;
    margin-bottom: 40px;
    border-top: 1px solid #e9ecef; /* Тонкая линия над описанием */
    display: inline-block; /* Чтобы рамка была по ширине текста */
    padding-top: 10px;
}

.cta-button-team {
    display: inline-block;
    background-color: #20c997; /* Бирюзовый/зеленый цвет кнопки */
    color: #fff;
    padding: 14px 35px;
    border-radius: 25px; /* Сильное скругление */
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cta-button-team:hover {
    background-color: #1baa80; /* Темнее при наведении */
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .section-title-main { font-size: 1.8em; }
    .tab-content-title { font-size: 1.5em; }
    .team-tabs-navigation {
        flex-direction: column;
        border-radius: 8px; /* Можно изменить скругление для вертикальных табов */
        max-width: 100%;
    }
    .tab-link {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    .tab-link:last-child {
        border-bottom: none;
    }
    .team-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* На мобильных может быть одна колонка */
    }
    .summary-text { font-size: 1.1em; }
    .summary-number { font-size: 3.5em; }
}

@media (max-width: 480px) {
    .member-photo img { height: 240px; }
}

.team-subsection-block {
    margin-bottom: 50px; /* Отступ между блоками подразделений */
}
.team-subsection-block:last-child {
    margin-bottom: 0;
}