/* ===================================
   VIDEO BACKGROUND STYLES
   Fullscreen video with overlay
   =================================== */

@media (max-width: 1024px) {
    .video-background-container {
        height: 100vh;
        height: 100dvh;
        /* Dynamic viewport height for mobile browsers */
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .mobile-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block !important;
    }

    .mobile-video video {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        pointer-events: none;
    }

    .desktop-video {
        display: none !important;
    }

    .hero-content {
        padding-top: 30vh;
    }
}

.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    will-change: transform;
    transform: translateZ(0);
    /* Force GPU acceleration */
    backface-visibility: hidden;
}

.video-background-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.video-background-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* Light overlay for video visibility */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(0, 35, 102, 0.7) 0%,
            /* Royal Blue Tint */
            rgba(0, 15, 60, 0.3) 50%,
            rgba(0, 35, 102, 0.2) 100%);
    z-index: 1;
}

/* Ensure hero content is above video */
.hero-content {
    position: relative;
    z-index: 10;
}

.hero-floating {
    position: relative;
    z-index: 2;
}

/* Fallback for browsers that don't support video */
@supports not (display: grid) {
    .video-background-container {
        background: var(--gradient-hero);
    }

    .video-background-container video {
        display: none;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .video-background-container video {
        display: none;
    }

    .video-background-container {
        background: var(--gradient-hero);
    }
}

/* Print styles */
@media print {
    .video-background-container {
        display: none;
    }
}