/* ========================================
   Carousel - Efectos Avanzados
   ======================================== */

/* Overlay gradient animado */
.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(197, 154, 47, 0.2) 0%,
        transparent 50%,
        rgba(168, 132, 39, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.carousel-slide.active::after {
    opacity: 1;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Slide entry animation */
.carousel-slide {
    animation: slideEnter 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideEnter {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image zoom on hover */
.carousel-slide:hover .carousel-image {
    transform: scale(1.05);
    transition: transform 0.6s ease;
}

.carousel-image {
    transition: transform 0.4s ease;
}

/* Navigation buttons - Glow effect */
.carousel-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.carousel-btn:hover {
    background: rgba(197, 154, 47, 0.8);
    border-color: var(--color-acento);
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(197, 154, 47, 0.6);
}

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

.carousel-btn i {
    transition: transform 0.3s ease;
}

.carousel-btn:hover i {
    transform: scale(1.2);
}

/* Indicators - Animated */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-indicator {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.carousel-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-acento);
    transition: left 0.4s ease;
}

.carousel-indicator:hover::before {
    left: 0;
}

.carousel-indicator.active {
    background: var(--color-acento);
    box-shadow: 0 0 20px rgba(244, 180, 0, 0.6);
}

.carousel-indicator.active::before {
    left: 0;
    animation: indicator-progress 5s linear infinite;
}

@keyframes indicator-progress {
    from {
        left: -100%;
    }
    to {
        left: 100%;
    }
}

/* Caption animation (si se agrega texto) */
.carousel-caption {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.carousel-caption h2 {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(30px);
    animation: captionReveal 0.8s ease forwards;
    animation-delay: 0.3s;
}

.carousel-caption p {
    font-size: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: captionReveal 0.8s ease forwards;
    animation-delay: 0.5s;
}

@keyframes captionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progressive blur effect */
.carousel-slide:not(.active) {
    filter: blur(3px);
}

.carousel-slide.active {
    filter: blur(0);
}

/* Light rays effect */
.carousel-slide::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 50px,
        rgba(255, 255, 255, 0.03) 50px,
        rgba(255, 255, 255, 0.03) 100px
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.carousel-slide.active::before {
    opacity: 1;
    animation: rays-rotate 20s linear infinite;
}

@keyframes rays-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-indicator {
        width: 30px;
        height: 3px;
    }

    .carousel-caption h2 {
        font-size: 32px;
    }

    .carousel-caption p {
        font-size: 16px;
    }
}
