/* Video Background Styles */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Video overlay for better content readability */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Ensure content stays above video */
body {
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-background {
        /* On mobile, we might want to adjust the video positioning */
        object-position: center center;
    }
    
    .video-overlay {
        /* Slightly darker overlay on mobile for better readability */
        background: rgba(0, 0, 0, 0.4);
    }
}

@media (max-width: 480px) {
    .video-overlay {
        /* Even darker overlay on small screens */
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Fallback for browsers that don't support video */
.video-background-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

/* Ensure video doesn't interfere with existing content */
.header,
.container,
main,
footer {
    position: relative;
    z-index: 2;
}

/* Animation for smooth video loading */
.video-background-container {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.video-background-container.loaded {
    opacity: 1;
}

/* Performance optimizations */
.video-background {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Pause video on mobile to save battery */
@media (max-width: 768px) {
    .video-background {
        /* Video will be paused on mobile by JavaScript */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-background-container {
        transition: none;
    }
} 