/**
 * Hero Slider Styles
 *
 * @package ChaletMontagne
 * @since 1.0.0
 */

/* ==========================================================================
   Slider Container
   ========================================================================== */

.hero-slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}

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

/* ==========================================================================
   Slides
   ========================================================================== */

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--slider-transition-speed, 1000ms) ease-in-out,
                visibility var(--slider-transition-speed, 1000ms) ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay */
.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, calc(var(--slider-overlay, 40) / 100)) 0%,
        rgba(0, 0, 0, calc(var(--slider-overlay, 40) / 100 * 1.2)) 100%
    );
    z-index: 2;
}

/* ==========================================================================
   Transition Effects
   ========================================================================== */

/* Fade (default) */
.hero-slider.transition-fade .hero-slide {
    opacity: 0;
    transition: opacity var(--slider-transition-speed, 1000ms) ease-in-out;
}

.hero-slider.transition-fade .hero-slide.active {
    opacity: 1;
}

/* Slide */
.hero-slider.transition-slide .hero-slide {
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    transition: transform var(--slider-transition-speed, 1000ms) cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slider.transition-slide .hero-slide.active {
    transform: translateX(0);
    z-index: 2;
}

.hero-slider.transition-slide .hero-slide.prev {
    transform: translateX(-100%);
    z-index: 1;
}

/* Zoom */
.hero-slider.transition-zoom .hero-slide {
    opacity: 0;
    transform: scale(1.1);
    transition: opacity var(--slider-transition-speed, 1000ms) ease-in-out,
                transform var(--slider-transition-speed, 1000ms) ease-in-out;
}

.hero-slider.transition-zoom .hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Ken Burns effect on active slide */
.hero-slider.transition-zoom .hero-slide.active .hero-slide-image {
    animation: kenBurns calc(var(--slider-speed, 5000ms) + var(--slider-transition-speed, 1000ms)) ease-in-out forwards;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Blur */
.hero-slider.transition-blur .hero-slide {
    opacity: 0;
    filter: blur(20px);
    transition: opacity var(--slider-transition-speed, 1000ms) ease-in-out,
                filter var(--slider-transition-speed, 1000ms) ease-in-out;
}

.hero-slider.transition-blur .hero-slide.active {
    opacity: 1;
    filter: blur(0);
}

/* Flip */
.hero-slider.transition-flip {
    perspective: 1000px;
}

.hero-slider.transition-flip .hero-slide {
    opacity: 0;
    transform: rotateY(-90deg);
    transform-origin: center;
    backface-visibility: hidden;
    transition: opacity var(--slider-transition-speed, 1000ms) ease-in-out,
                transform var(--slider-transition-speed, 1000ms) ease-in-out;
}

.hero-slider.transition-flip .hero-slide.active {
    opacity: 1;
    transform: rotateY(0);
}

/* ==========================================================================
   Content Overlay
   ========================================================================== */

.hero-slider-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 900px;
    padding: 2rem;
}

.hero-slider-content .hero-title {
    color: #fff;
    font-size: var(--hero-title-size, clamp(2rem, 5vw, 4rem));
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-slider-content .hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero-slider-content .hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-primary, #D4AF37);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
    border-radius: 0;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary, #D4AF37);
}

.hero-slider-content .hero-cta:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.hero-slider-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-slider-nav.prev {
    left: 20px;
}

.hero-slider-nav.next {
    right: 20px;
}

/* ==========================================================================
   Navigation Dots
   ========================================================================== */

.hero-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 12px;
}

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

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero-slider-dot.active {
    background: var(--color-primary, #D4AF37);
    border-color: var(--color-primary, #D4AF37);
    transform: scale(1.2);
}

/* Progress bar on active dot */
.hero-slider-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--color-primary, #D4AF37);
    border-radius: 50%;
    animation: dotProgress var(--slider-speed, 5000ms) linear forwards;
    clip-path: polygon(50% 0%, 50% 50%, 100% 50%, 100% 0%);
}

/* ==========================================================================
   Pause indicator
   ========================================================================== */

.hero-slider.paused .hero-slider-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }

    .hero-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .hero-slider-nav.prev {
        left: 10px;
    }

    .hero-slider-nav.next {
        right: 10px;
    }

    .hero-slider-dots {
        bottom: 20px;
        gap: 8px;
    }

    .hero-slider-dot {
        width: 10px;
        height: 10px;
    }

    .hero-slider-content {
        padding: 1rem;
    }

    .hero-slider-content .hero-cta {
        padding: 0.875rem 2rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 50vh;
        min-height: 350px;
    }

    .hero-slider-nav {
        display: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.hero-slider:focus-within .hero-slider-nav,
.hero-slider:focus-within .hero-slider-dots {
    outline: none;
}

.hero-slider-nav:focus,
.hero-slider-dot:focus {
    outline: 2px solid var(--color-primary, #D4AF37);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slider-nav,
    .hero-slider-dot,
    .hero-slide-image {
        transition: none !important;
        animation: none !important;
    }
}
