/**
 * Hero Carousel Component
 * Estilos para el carrusel de imágenes del hero section
 */

/* Contenedor del carrusel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Track del carrusel */
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
}

/* Controles del carrusel */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.indicator.active {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
    transform: scale(1.3);
}

.indicator:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animaciones */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutSlide {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
    }
}

.carousel-slide.fade-in {
    animation: fadeInSlide 0.8s ease-in-out;
}

.carousel-slide.fade-out {
    animation: fadeOutSlide 0.8s ease-in-out;
}

/* Estados de carga */
.carousel-slide.loading {
    opacity: 0.7;
}

.carousel-slide.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 768px) {
    .carousel-controls {
        padding: 0 0.5rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-indicators {
        bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .carousel-indicators {
        bottom: 1rem;
    }
    
    .indicator {
        width: 6px;
        height: 6px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .carousel-track,
    .carousel-slide,
    .carousel-btn,
    .indicator {
        transition: none;
    }
    
    .carousel-slide.fade-in,
    .carousel-slide.fade-out {
        animation: none;
    }
}

/* Modo oscuro (si se implementa en el futuro) */
@media (prefers-color-scheme: dark) {
    .carousel-btn {
        background: rgba(0, 0, 0, 0.8);
        color: white;
    }
    
    .carousel-btn:hover {
        background: rgba(0, 0, 0, 1);
    }
    
    .indicator {
        border-color: rgba(255, 255, 255, 0.6);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .indicator:hover {
        background: rgba(255, 255, 255, 0.4);
    }
    
    .indicator.active {
        background: rgba(255, 255, 255, 0.9);
    }
} 