/* Optimized Team Card Animation */
.team-card {
    width: 150px;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    flex-shrink: 0;
    /* Smooth transition for width */
    transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: width;
}

.team-card.active {
    width: 400px;
}

.team-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), transparent);
    padding: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card.active .team-name-overlay {
    opacity: 1;
    transition-delay: 0.1s;
}

.card-image {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Mobile Layout - Vertical Stack */
@media (max-width: 1024px) {
    .team-wrapper {
        flex-direction: column !important;
        height: auto !important;
        align-items: center;
        overflow-x: hidden !important;
        padding-bottom: 2rem;
    }

    .team-card {
        width: 100% !important;
        max-width: 450px;
        /* Prevent them from being too wide on tablets */
        height: 500px !important;
        margin-bottom: 20px;
    }

    /* Ensure overlay is always visible on mobile since hover/click isn't ideal for discovery */
    .team-name-overlay {
        opacity: 1 !important;
    }

    /* Ensure active state doesn't look different width-wise specifically (handled by width !important above) */
}