/* ========================================
   CAROUSEL STYLES
   ======================================== */

.carousel-section {
    width: 100%;
    background-color: var(--color-dark-1);
    padding: var(--spacing-lg) 0;
}

.carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: var(--color-dark-2);
}

.carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--spacing-md);
}

.carousel-loading p {
    color: var(--color-gray-dark);
    font-size: 1.125rem;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay gradiente para mejor legibilidad */
.carousel-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.8), transparent);
    pointer-events: none;
}

/* ========================================
   CAROUSEL CONTROLS
   ======================================== */

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(227, 6, 19, 0.8);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-normal);
    backdrop-filter: blur(5px);
}

.carousel-control:hover {
    background-color: var(--color-red-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(227, 6, 19, 0.6);
}

.carousel-control:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-control svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   CAROUSEL INDICATORS
   ======================================== */

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: var(--color-red-primary);
    border-color: var(--color-white);
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.5);
}

/* ========================================
   RESPONSIVE CAROUSEL
   ======================================== */

@media (max-width: 1024px) {
    .carousel-wrapper {
        height: 500px;
    }
    
    .carousel-control {
        width: 45px;
        height: 45px;
    }
    
    .carousel-control.prev {
        left: 15px;
    }
    
    .carousel-control.next {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .carousel-section {
        padding: var(--spacing-md) 0;
    }
    
    .carousel-container {
        border-radius: 12px;
    }
    
    .carousel-wrapper {
        height: 400px;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: 15px;
        gap: 8px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
    
    .carousel-indicator.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        height: 300px;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
        opacity: 0.8;
    }
    
    .carousel-control svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-indicators {
        bottom: 10px;
        gap: 6px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .carousel-indicator.active {
        width: 20px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.carousel-slide.slide-in {
    animation: slideIn 0.6s ease-out;
}

.carousel-slide.slide-out {
    animation: slideOut 0.6s ease-out;
}
