/* styles/carousel.css */

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

/* CAMBIO IMPORTANTE: Estilos para el enlace contenedor */
.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;             /* Oculto por defecto */
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
    display: block;         /* Necesario para que el <a> ocupe espacio */
    text-decoration: none;
}

/* La clase active se aplica al .carousel-item */
.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

/* La imagen solo debe llenar el espacio del enlace */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Botones (sin cambios) */
.carousel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 15px 12px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.carousel button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel button.prev { left: 15px; }
.carousel button.next { right: 15px; }

@media (max-width: 768px) {
    .banner {
        height: auto;
        aspect-ratio: 16 / 5; 
        max-height: 400px;
    }
    .carousel button {
        padding: 8px 10px;
        font-size: 16px;
    }
}