/* ========================================
   MODERN CAROUSEL CON CSS SCROLL SNAP
   - Sin JavaScript pesado
   - Scroll nativo suave
   - Performance optimizada
   ======================================== */

/* Contenedor principal del carousel */
.modern-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Scroll container */
.modern-carousel-inner {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

/* Ocultar scrollbar */
.modern-carousel-inner::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Slides individuales */
.modern-carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.modern-carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Caption/Content */
.modern-carousel-caption {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 2rem;
    color: white;
}

/* Indicadores (dots) */
.modern-carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.modern-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.modern-carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Controles de navegación */
.modern-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.modern-carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.modern-carousel-control-prev {
    left: 20px;
}

.modern-carousel-control-next {
    right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-carousel-item {
        min-height: 400px;
    }
    
    .modern-carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modern-carousel-control-prev {
        left: 10px;
    }
    
    .modern-carousel-control-next {
        right: 10px;
    }
}

/* Auto-scroll smooth animation */
@keyframes carousel-auto-scroll {
    0%, 30% { scroll-snap-align: start; }
    33%, 63% { scroll-snap-align: center; }
    66%, 96% { scroll-snap-align: end; }
    100% { scroll-snap-align: start; }
}

/* Touch indicators */
.modern-carousel-inner.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
}

/* Accessibility */
.modern-carousel-control:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.modern-carousel-indicator:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}
