/* Team section styles */
.team-section {
    padding: 1px 0;
}

.team-carousel {
    margin-top: 60px;
    position: relative;
    padding-top: 5px; /* отступ для hover эффекта */
}

.team-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    margin-top: 0;
    padding: 0 8px;
    z-index: 3;
    pointer-events: none; /* чтобы клики проходили к треку */
}

.team-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #6090f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto; /* кнопки кликабельны */
}

.team-btn:hover {
    background: #6090f0;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(96, 144, 240, 0.3);
}

.team-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.team-btn svg {
    width: 20px;
    height: 20px;
}

.team-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px 20px 20px 20px; /* top padding to allow hover lift without clipping */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.team-track::-webkit-scrollbar {
    display: none;
}

.team-member {
    flex: 0 0 280px;
    height: 400px;
    text-align: center;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-member:hover {
    transform: translateY(-6px); /* slightly smaller lift to fit padding */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%);
    transition: background 0.3s ease;
}

.team-member:hover::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.9) 100%);
}

.member-photo {
    display: none;
}

.member-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    text-align: left;
}

.member-info h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.member-role {
    font-size: 15px;
    font-weight: 500;
    color: #8fb1ff;
    margin: 0 0 8px 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.member-description {
    font-size: 13px;
    line-height: 1.4;
    color: #e6e9f2;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Mobile adjustments for team section */
@media (max-width: 768px) {
    .team-section {
        padding: 1px 0;
    }
    
    .team-carousel {
        margin-top: 40px;
        padding-top: 1px;
    }
    
    .team-track {
        gap: 25px;
        padding: 10px 15px 15px 15px; /* allow hover on mobile too */
    }
    
    .team-member {
        flex: 0 0 250px;
        height: 350px;
    }
    
    .member-info {
        padding: 18px;
    }
    
    .team-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .team-member {
        flex: 0 0 220px;
        height: 320px;
    }
    
    .member-info {
        padding: 16px;
    }
    
    .team-btn {
        width: 40px;
        height: 40px;
    }
}
