/*
 * Hero Slider - Modern CSS Scroll Snap
 * Performance: Nativo, no JS required
 */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-slider-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.hero-slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Slide */
.hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Slide 1 - Hero Principale */
.hero-slide-1 {
    background-image: url('/assets/img/hero-background.jpg');
    background-color: var(--color-gray-100);
}

/* Slide 2 - Van Service con Video Background */
.hero-slide-2 {
    background: linear-gradient(135deg,
        var(--samsung-blue-dark) 0%,
        var(--samsung-blue) 50%,
        var(--samsung-blue-light) 100%);
    overflow: hidden;
}

/* Video background (YouTube iframe) */
.hero-slide-2 .hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    min-width: 100%;
    min-height: 100%;
    z-index: 0;
    opacity: 0.5; /* Video semi-trasparente per leggibilità testo */
    pointer-events: none; /* Disabilita interazione con video */
}

/* Fix aspect ratio per YouTube iframe */
@media (aspect-ratio > 16/9) {
    .hero-slide-2 .hero-video-bg {
        width: 100vw;
        height: 56.25vw; /* 16:9 aspect ratio */
    }
}

@media (aspect-ratio < 16/9) {
    .hero-slide-2 .hero-video-bg {
        width: 177.78vh; /* 16:9 aspect ratio */
        height: 100vh;
    }
}

/* Overlay più scuro per leggibilità con video */
.hero-slide-2::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}

.hero-slide-2 .hero-slide-content {
    z-index: 2;
}

/* Overlay per leggibilità */
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: 0;
}

/* Contenuto slide */
.hero-slide-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: var(--space-2xl);
    color: var(--color-white);
    box-sizing: border-box;
}

.hero-slide-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
    color: var(--color-white) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-slide-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.hero-slide-cta {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* Dots rimossi - navigazione solo con frecce/swipe */

/* Frecce navigazione */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hero-slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-nav-prev {
    left: var(--space-lg);
}

.hero-slider-nav-next {
    right: var(--space-lg);
}

.hero-slider-nav svg {
    width: 24px;
    height: 24px;
    color: var(--color-white);
}

/* Stats sotto lo slider */
.hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-2xl) 0;
    background: rgba(248, 248, 248, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-gray-300);
    z-index: 5;
}

.hero-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-sm);
}

.hero-stat-label {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .hero-slider {
        height: auto; /* Fix: non forzare 100vh su mobile */
        min-height: 100vh;
    }

    .hero-slide {
        min-height: calc(100vh - 200px); /* Lascia spazio per stats */
        padding-bottom: 80px; /* Padding per dots */
    }

    .hero-slide-content {
        padding: 100px var(--space-md) var(--space-xl);
        max-width: 100%;
        margin-top: 60px; /* Spazio per navbar */
    }

    .hero-slide-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: var(--space-md);
        line-height: 1.2;
    }

    .hero-slide-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.25rem);
        margin-bottom: var(--space-xl);
        line-height: 1.6;
    }

    .hero-slide-cta {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-slide-cta .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .hero-slider-nav {
        display: none; /* Nascondi frecce su mobile, usa swipe */
    }


    .hero-stats {
        position: relative; /* Non assoluto su mobile */
        margin-top: 0;
    }

    .hero-stats-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: 0 var(--space-md);
    }

    .hero-stat-number {
        font-size: var(--text-3xl);
    }

    .hero-stat-label {
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .hero-slide-content {
        padding: var(--space-md) var(--space-sm);
    }

    .hero-slide-title {
        font-size: clamp(1.25rem, 6vw, 2rem);
    }

    .hero-slide-subtitle {
        font-size: clamp(0.75rem, 3.5vw, 1rem);
        margin-bottom: var(--space-md);
    }

    .hero-slider-dots {
        bottom: 80px; /* Sopra le stats su schermi piccoli */
    }
}

/* Dots animation rimossa */
