/* ===== HERO YOUTUBE VIDEO FIX ===== */
/* Styling untuk YouTube embed di hero section */

.hero {
    position: relative;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video-youtube {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.hero-video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.scroll-indicator {
    position: relative;
    z-index: 3;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .hero-video-youtube {
        /* Disable autoplay on mobile to save data */
        display: none;
    }
    
    .hero-video-poster {
        display: block !important;
        z-index: 1;
    }
    
    .hero {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-video-youtube {
        width: 120vw;
        height: 67.5vw;
    }
}

/* Performance: Hide video on slow connection */
@media (prefers-reduced-data: reduce) {
    .hero-video-youtube {
        display: none;
    }
    
    .hero-video-poster {
        display: block !important;
    }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-video-youtube {
        display: none;
    }
    
    .hero-video-poster {
        display: block !important;
    }
}
