.hero-video-wrapper {
    width: 100%;
    height: 100lvh;
    position: relative;
    background: #000; /* Prevent white flash */
    overflow: hidden;
}

.hero-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; 
    left: 0;
    margin: 0;
    padding: 0;
    border: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: block;
}

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

.hero-video-fallback {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hero-video-fallback.hide {
    opacity: 0;
}

.hero-video-spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    border-top: 4px solid #999;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
