﻿#equipo {
    padding: 40px 20px;
    background: inherit; /* hereda el fondo del body */
    text-align: center;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 700;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 5px; /* espacio entre tarjetas */
}

.team-card {
    position: relative;
    flex: 0 0 calc((100% - 60px) / 4); /* 4 tarjetas */
    height: 450px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .team-card img {
        width: 100%;
        height: 100%;
        object-fit: cover/contain;
        filter: grayscale(100%);
        transition: all 0.5s ease;
    }

    .team-card:hover img {
        filter: grayscale(0%);
        transform: scale(1.05);
    }

.overlay {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 100%;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .overlay {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    font-size: 32px;
    color: white;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10; /* los pone por encima de las cartas */
}

    .carousel-btn:hover {
        background: rgba(0, 0, 0, 0.8);
    }

    .carousel-btn.prev {
        left: -50px; /* visible dentro del carrusel */
    }

    .carousel-btn.next {
        right: -50px;
    }

/* Pantallas medianas (tablets) */
@media screen and (max-width: 992px) {
    .team-card {
        flex: 0 0 calc((100% - 40px) / 3); /* 3 tarjetas */
    }

    .carousel-btn.prev {
        left: -40px;
    }

    .carousel-btn.next {
        right: -40px;
    }
}

/* Pantallas pequeñas (móviles grandes) */
@media screen and (max-width: 768px) {
    .team-card {
        flex: 0 0 calc((100% - 20px) / 2); /* 2 tarjetas */
    }

    .carousel-btn.prev, .carousel-btn.next {
        top: 45%; /* ajustar botones */
    }
}

/* Pantallas muy pequeñas (móviles pequeños) */
@media screen and (max-width: 320px) {
    .carousel-track {
        gap: 0; /* elimina espacio extra entre tarjetas */
    }

    .team-card {
        flex: 0 0 100%; /* que ocupen casi todo el ancho */
    }

    /* Acomoda las flechas en móvil para que no tapen la imagen */
    .carousel-btn {
        background: rgba(0,0,0,0.6);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        justify-content: center;
        align-items: center;
        top: 50%;
        transform: translateY(-50%);
    }

        .carousel-btn.prev {
            left: -8px;
        }

        .carousel-btn.next {
            right: -8px;
        }

}

