.loop-video-bg {
    position: relative;
    overflow: hidden;
}

.loop-video-bg > .elementor-container,
.loop-video-bg > .e-con,
.loop-video-bg > .e-container {
    position: relative;
    z-index: 1; /* keep content above */
}

/* 
 * The main fix for mobile layout overflow: 
 * We must ensure the background wrapper doesn't cause the body to overflow horizontally 
 * when the video is wider than the viewport (which it always is on portrait mode).
 */
.angie-video-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden !important; /* Force hidden overflow */
    max-width: 100vw; /* Prevent from going beyond viewport width */
}

.angie-video-bg-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.angie-video-bg-container video.active {
    opacity: 1;
}