/* Contenedor principal del carrusel */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* La pista horizontal que hace scroll */
.gallery-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth; /* Para que el scroll con botones sea suave */
    padding: 10px 5px; /* Espacio para que no se corte la sombra */
    /* Oculta la barra de scroll en navegadores modernos */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Ocultar barra de scroll en Chrome/Safari */
.gallery-track::-webkit-scrollbar {
    display: none;
}

/* Tarjeta individual (Fija un ancho para que no se encojan) */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #e2e8f0;
    flex: 0 0 260px; /* Tamaño fijo de ancho por cada foto */
    aspect-ratio: 1 / 1; 
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.4s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img.loaded {
    transform: scale(1.08);
}

/* Botones de navegación */
.carousel-control-prev,
.carousel-control-next {
    background: #203f85; /* Color de tu marca */
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(32,63,133,0.3);
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: #142a5c;
    transform: scale(1.05);
}

.carousel-control-prev:active,
.carousel-control-next:active {
    transform: scale(0.95);
}

/* Responsive: Ocultar botones en móviles (pueden usar el dedo para deslizar) */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    .gallery-item {
        flex: 0 0 200px; /* Fotos un poco más pequeñas en móviles */
    }
}