/* === Desktop 3840x2160 === */
@media (min-width: 3840px) {
    .video-bg iframe {
        width: 225vw;
        height: 225vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.5) !important;
        position: absolute;
        border: 0;
        pointer-events: none;
    }

    .video-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-120%, 5%) !important;
        width: 80%;
        max-width: 1600px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .video-content h1 {
        font-size: 2.5vw;
        line-height: 1.0;
    }

    .video-content h2 {
        font-size: 1vw;
    }
}

/* === Desktop 2560x1440 === */
@media (min-width: 2560px) and (max-width: 3839px) {
    .video-bg iframe {
        width: 290vw;
        height: 290vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.5) !important; 
        position: absolute;
        border: 0;
        pointer-events: none;
    }

    .video-content {
        top: 50%;
        left: 50%;
        transform: translate(-90%, 5%) !important;
        width: 85%;
        max-width: 1400px;
        padding: 20px;
    }

    .video-content h1 {
        font-size: 3vw;
    }

    .video-content h2 {
        font-size: 1.8vw;
    }
}

/* === Desktop 1920x1080 === */
@media (min-width: 1920px) and (max-width: 2559px) {
    .video-bg iframe {
        width: 280vw;
        height: 280vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.63) !important;
        position: absolute;
        border: 0;
        pointer-events: none;
    }

    .video-content {
        top: 50%;
        left: 50%;
        transform: translate(-80%, 5%) !important;
        width: 90%;
        max-width: 1200px;
        padding: 20px;
    }

    .video-content h1 {
        font-size: 3.5vw;
        line-height: 1.0;
    }

    .video-content h2 {
        font-size: 1.5vw;
    }
}

/* === Desktop 1440x900 === */
@media (min-width: 1440px) and (max-width: 1919px) {
    .video-bg iframe {
        width: 280vw;
        height: 280vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -47.5%) scale(0.7) !important;
        position: absolute;
        border: 0;
        pointer-events: none;
    }

    .video-content {
        top: 50%;
        left: 50%;
        transform: translate(-71.5%, 7%) !important;
        width: 95%;
        max-width: 1000px;
        padding: 20px;
    }

    .video-content h1 {
        font-size: 3.5vw;
        line-height: 1.0;
    }

    .video-content h2 {
        font-size: 2vw;
    }
}

/* === Desktop 1280x720 === */
@media (min-width: 1280px) and (max-width: 1439px) {
    .video-bg iframe {
        width: 255vw;
        height: 255vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) !important;
        position: absolute;
        border: 0;
        pointer-events: none;
    }

    .video-content {
        top: 50%;
        left: 50%;
        transform: translate(-70%, 5%) !important;
        width: 100%;
        max-width: 900px;
        padding: 20px;
    }

    .video-content h1 {
        font-size: 4vw;
    }

    .video-content h2 {
        font-size: 2.5vw;
    }
}




/* ===== HERO SLIDER RESPONSIVE RULES ===== */


/* ===== RESET MOBILE - Ripristina visualizzazione mobile ===== */
@media (max-width: 767.98px) {
    .mobile-hero-slider {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        min-height: 1100px !important;
        z-index: 0 !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        overflow: hidden !important;
    }
    
    .mobile-hero-slider .hero-mobile-swiper {
        height: 100% !important;
        width: 100% !important;
    }
    
    .mobile-hero-slider .swiper-slide {
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-hero-slider .swiper-slide img {
        width: 100% !important;
        height: calc(100% + 50px) !important;
        min-height: calc(915px + 50px) !important;
        object-fit: cover !important;
        object-position: center top !important;
        display: block !important;
        position: relative !important;
        top: -25px !important;
        transform: none !important;
        margin: 0 !important;
    }
}


/* Base styles per desktop slider */

.mobile-hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.mobile-hero-slider.d-none.d-md-block {
    height: 120vh; /* Ingrandito per coprire meglio */
    min-height: 700px;
    width: 120%; /* Allargato oltre i bordi */
    margin-left: -10%; /* Centra l'allargamento */
    margin-top: -10vh; /* Sposta verso l'alto */
}

.mobile-hero-slider .hero-mobile-swiper {
    height: 100%;
    width: 100%;
}

.mobile-hero-slider .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hero-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ===== 4K ULTRA HD: 3840x2160 ===== */
@media screen and (min-width: 2560px) {
    .mobile-hero-slider.d-none.d-md-block {
        height: 100vh;
        min-height: 1200px;
    }
    
    .mobile-hero-slider .swiper-slide img {
        object-fit: cover;
        object-position: center center;
        transform: scale(0.69); /* Leggero zoom per riempire meglio */
    }
}

@media screen and (min-width: 2560px) and (max-width: 3839.98px) {
    .mobile-hero-slider.d-none.d-md-block {
        height: 180vh !important;
        min-height: 1400px !important;
        width: 160% !important;
        margin-left: -30% !important;
        margin-top: -40vh !important;
    }
    
    .mobile-hero-slider .swiper-slide img {
        object-fit: cover !important;
        object-position: center center !important;
        transform: scale(0.65   ) !important;
    }
}

/* ===== FULL HD: 1920x1080 ===== */
@media screen and (min-width: 1440px) and (max-width: 1919.98px) {
    .mobile-hero-slider.d-none.d-md-block {
        height: 130vh; /* Leggero aumento per eliminare linea nera */
        min-height: 900px;
        width: 125%;
        margin-left: -12.5%;
        margin-top: -5vh; /* Spostato più in basso per coprire */
    }
    
    .mobile-hero-slider .swiper-slide img {
        object-fit: cover !important;
        object-position: center center !important;
    }
} 

/* ===== WXGA+: 1440x900 ===== */
@media screen and (min-width: 1280px) and (max-width: 1439.98px) {
    .mobile-hero-slider.d-none.d-md-block {
        height: 200vh !important;
        min-height: 1400px !important;
        width: 200% !important;
        margin-left: -50% !important;
        margin-top: -15vh !important;
    }
    
    .mobile-hero-slider .swiper-slide img {
        object-fit: cover !important;
        object-position: center center !important;
        transform: scale(0.75) !important;
    }
}
    


/* ===== HD: 1280x720 ===== */
@media screen and (min-width: 1024px) and (max-width: 1279.98px) {
    .mobile-hero-slider.d-none.d-md-block {
        height: 220vh !important;
        min-height: 1600px !important;
        width: 220% !important;
        margin-left: -60% !important;
        margin-top: -60vh !important;
    }
    
    .mobile-hero-slider .swiper-slide img {
        object-fit: cover !important;
        object-position: center center !important;
        transform: scale(0.75) !important;
    }

}


/* ===== OTTIMIZZAZIONI GENERALI PER TUTTE LE RISOLUZIONI DESKTOP ===== */

/* Overlay sempre presente su desktop */
.video-overlay {
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.5) 0%, 
        rgba(0, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.4) 100%
    ) !important;
    z-index: 1 !important;
}

/* Contenuto sempre sopra l'overlay */
.video-content {
    z-index: 2 !important;
    position: relative;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Transizioni smooth per il cambio slide */
.mobile-hero-slider .swiper-slide img {
    transition: transform 0.3s ease-out;
}

/* Ottimizzazione loghi clienti per diverse risoluzioni */
@media screen and (min-width: 2560px) {
    .clients-style-08 .swiper-slide img {
        height: 60px !important;
    }
}

@media screen and (min-width: 1920px) and (max-width: 2559px) {
    .clients-style-08 .swiper-slide img {
        height: 50px !important;
    }
}

@media screen and (min-width: 1280px) and (max-width: 1919px) {
    .clients-style-08 .swiper-slide img {
        height: 40px !important;
    }
}

@media screen and (max-width: 1279px) {
    .clients-style-08 .swiper-slide img {
        height: 35px !important;
    }
}

/* Performance optimization */
.mobile-hero-slider .swiper-slide {
    will-change: transform;
}

.mobile-hero-slider .swiper-slide img {
    will-change: transform;
    backface-visibility: hidden;
}