/* Video Background Styles */
.video-section {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* YouTube Video Background */
.youtube-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.youtube-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Make YouTube video cover the section properly */
@media (min-aspect-ratio: 16/9) {
    .youtube-iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .youtube-iframe {
        width: 177.78vh;
    }
}

/* MP4 Video Background */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Optional: dark overlay for better text readability */
    z-index: 2;
    pointer-events: none;
}

/* Fallback image styles */
.video-section .video-img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

/* Content over video (if you want to add text/buttons) */
.video-section .video-content {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-section {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .video-section {
        height: 300px;
    }
}

/* For portrait videos on mobile */
@media (max-aspect-ratio: 16/9) {
    .video-background {
        width: 100%;
        height: auto;
    }
}

/* For landscape videos */
@media (min-aspect-ratio: 16/9) {
    .video-background {
        width: auto;
        height: 100%;
    }
}
