/* Блок Наша команда */
.team-section {
    padding: 40px 0 100px 0;
    background-color: #fff;
    overflow: hidden; /* Предотвращает горизонтальную прокрутку на моб */
}

.team-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 0px;
    position: relative;
}

.team-title {
    color: #303030;
    text-align: left;
    font-family: 'Bebas Neue Cyrillic', 'Bebas Neue', sans-serif;
    font-size: 48px;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 0 30px 0;
    width: 100%;
}

/* Табы категорий (ПК) */
.team-tabs {
    display: flex;
    flex-direction: row;
    gap: 0px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 40px;
}

.team-tab {
    flex: 1;
    text-align: center;
    padding: 0 0 13px 0;
    border-bottom: 1px solid #e1e1e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.team-tab.active {
    border-bottom: 1px solid #1481db;
}

.team-tab span {
    font-family: 'Bebas Neue Cyrillic', 'Bebas Neue', sans-serif;
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
    color: #e1e1e1;
    transition: color 0.3s ease;
}

.team-tab.active span {
    color: #1481db;
}

/* Выпадающий список (Моб) */
.team-dropdown {
    display: none;
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    z-index: 10;
}

.team-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 13px;
    border-bottom: 1px solid #1481DB;
    cursor: pointer;
}

.team-dropdown-title {
    color: #1481DB;
    font-family: 'Bebas Neue Cyrillic', 'Bebas Neue', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
}

.team-dropdown-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.team-dropdown.open .team-dropdown-arrow {
    transform: rotate(180deg);
}

.team-dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #E1E1E1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-dropdown.open .team-dropdown-list {
    display: block;
}

.team-dropdown-item {
    padding: 12px 15px;
    color: #1481DB;
    font-family: 'Bebas Neue Cyrillic', 'Bebas Neue', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 1px solid #F2F3F5;
}

.team-dropdown-item:last-child {
    border-bottom: none;
}

.team-dropdown-item.active {
    background: #F2F3F5;
}

/* Обёртка слайдера */
.team-slider-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

/* Сам слайдер */
.team-slider {
    width: 100%;
    overflow: hidden;
}

/* Контейнер с карточками (Native Swiper) */
.team-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding-bottom: 5px;
}

/* Скрываем стандартный скроллбар в Chrome, Safari и Opera */
.team-list::-webkit-scrollbar {
    display: none;
}

/* Карточка сотрудника */
.team-card {
    flex: 0 0 271px;
    background: #f2f3f5;
    padding: 12px 12px 23px 12px;
    display: flex;
    flex-direction: column;
    gap: 23px;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    scroll-snap-align: start;
}

.team-card-inner {
    display: flex;
    flex-direction: column;
    gap: 23px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1; 
}

.team-photo {
    background: #ffffff;
    border-radius: 2px;
    width: 100%;
    height: 271px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-photo svg {
    width: 170px;
    height: 179px;
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1; 
}

.team-name {
    color: #1481db;
    text-align: center;
    font-family: 'Bebas Neue Cyrillic', 'Bebas Neue', sans-serif;
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    width: 100%;
}

.team-position {
    color: #303030;
    text-align: center;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    line-height: 1.3;
}

.team-phone,
.team-email,
.team-phone a,
.team-email a {
    color: #818084;
    text-align: center;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    width: 157px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.team-social {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-start;
}

.team-social .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #1481DB;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.team-social .social-icon:hover {
    background-color: #8AC0ED;
}

.team-social .social-icon svg {
    width: 40px;
    height: 40px;
}

/* Индикатор прокрутки */
.team-progress {
    position: relative;
    height: 4px;
    background: #f2f3f5;
    border-radius: 900px;
    overflow: hidden;
    margin-top: 30px;
}

.team-progress-bar {
    height: 100%;
    width: 0;
    background: #e1e1e1;
    border-radius: 900px;
    transition: width 0.1s linear;
}

/* Медиа-запросы */
@media (max-width: 1240px) {
    .team-list {
        gap: 15px;
    }
    
    .team-card {
        flex: 0 0 280px;
    }
}

@media (max-width: 1024px) {
    .team-card {
        flex: 0 0 260px;
    }
}

@media (max-width: 767px) {
    .team-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

	.team-section {padding: 48px 0 0px 0;}

	.team-container {padding:0;}
    
    /* Показываем выпадающий список, скрываем табы */
    .team-tabs {
        display: none;
    }
    .team-dropdown {
        display: block;
    }
    
    .team-list {
        gap: 9px;
    }
    
    .team-card {
        flex: 0 0 163px;
        padding: 10px 10px 16px 10px;
        gap: 16px;
    }
    
    .team-card-inner {
        gap: 16px;
    }
    
    .team-photo {
        height: 143px;
    }
    
    /* ИСПРАВЛЕНИЕ: Вписываем фото полностью без обрезки */
    .team-photo img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* contain вписывает фото целиком, crop - обрезает */
    }
    
    .team-photo svg {
        width: 98px;
        height: 103px;
    }
    
    .team-info {
        gap: 12px;
    }
    
    .team-name {
        font-size: 18px;
    }
    
    .team-position {
        font-size: 13px;
    }
    
    .team-phone,
    .team-email,
    .team-phone a,
    .team-email a {
        width: 157px;
        font-size: 13px;
    }
    
    .team-social .social-icon {
        background-color: #8AC0ED;
    }
    
    .team-progress {
        margin-top: 20px;
    }
}
@media (max-width: 480px) {
    .team-card {
        flex: 0 0 163px; /* Жестко фиксируем 2 карточки по макету (335 - 9 = 326 / 2 = 163) */
    }
}