/* Improved video background styling for Hero Slider component */
.iFrameClass {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Use the larger of the two dimensions to ensure full coverage */
    width: max(100vw, 177.78vh);
    height: max(56.25vw, 100vh);
    /* Always maintain 16:9 aspect ratio while covering full screen */
    min-height: 100vh;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border: none;
    object-fit: cover;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-loaded .iFrameClass {
    opacity: 1;
}

.video-fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    z-index: -2;
}

.video-loaded .video-fallback-image {
    opacity: 0;
}

.background-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* Add media queries for better responsive behavior */
@media (max-aspect-ratio: 16/9) {
    .iFrameClass {
        width: 177.78vh;
        height: 100vh;
    }
}

@media (min-aspect-ratio: 16/9) {
    .iFrameClass {
        width: 100vw;
        height: 56.25vw;
    }
}
