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

.hero-bg-video .plyr {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* Overlay untuk background video agar text tetap terbaca */
.hero-bg-video::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   Plyr Controls Customization (DLH Green Theme)
   ======================================== */

/* Controls background */
.plyr--youtube .plyr__controls {
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.75));
    color: #fff;
    padding: 10px;
}

/* Play button (large center) */
.plyr__control--overlaid {
    background: rgba(74, 124, 89, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.plyr__control--overlaid:hover,
.plyr__control--overlaid:focus {
    background: rgba(74, 124, 89, 1);
    transform: scale(1.1);
}

/* Control buttons */
.plyr--video .plyr__control {
    background: transparent;
    color: #fff;
}

.plyr--video .plyr__control:hover,
.plyr--video .plyr__control[aria-expanded='true'] {
    background: rgba(74, 124, 89, 0.8);
    color: #fff;
}

/* Progress bar */
.plyr--full-ui input[type=range] {
    color: #4a7c59;
}

.plyr__progress input[type=range]::-webkit-slider-thumb {
    background: #4a7c59;
    box-shadow: 0 1px 1px rgba(74, 124, 89, 0.15), 0 0 0 1px rgba(74, 124, 89, 0.2);
}

.plyr__progress input[type=range]::-moz-range-thumb {
    background: #4a7c59;
    box-shadow: 0 1px 1px rgba(74, 124, 89, 0.15), 0 0 0 1px rgba(74, 124, 89, 0.2);
}

.plyr__progress input[type=range]::-ms-thumb {
    background: #4a7c59;
    box-shadow: 0 1px 1px rgba(74, 124, 89, 0.15), 0 0 0 1px rgba(74, 124, 89, 0.2);
}

/* Progress bar track */
.plyr__progress__buffer {
    background: rgba(255, 255, 255, 0.25);
}

/* Volume control */
.plyr--video .plyr__volume input[type=range]::-webkit-slider-thumb {
    background: #4a7c59;
}

.plyr--video .plyr__volume input[type=range]::-moz-range-thumb {
    background: #4a7c59;
}

/* Tooltips */
.plyr__tooltip {
    background: rgba(74, 124, 89, 0.9);
    color: #fff;
    font-size: 13px;
    padding: 5px 10px;
}

/* ========================================
   Loading State
   ======================================== */

.plyr--loading .plyr__controls {
    opacity: 0.5;
}

/* ========================================
   Poster Image (Thumbnail)
   ======================================== */

.plyr__poster {
    background-size: cover;
    background-position: center;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    /* Background video untuk mobile */
    .hero-bg-video .plyr {
        min-height: 120%;
    }

    /* Controls lebih compact di mobile */
    .plyr--youtube .plyr__controls {
        padding: 5px;
    }

    /* Play button lebih kecil di mobile */
    .plyr__control--overlaid {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .plyr__control--overlaid {
        width: 50px;
        height: 50px;
    }

    .plyr__tooltip {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* Focus states */
.plyr__control:focus-visible {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .plyr__control--overlaid {
        border: 4px solid #fff;
    }

    .plyr--youtube .plyr__controls {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
    .plyr__control--overlaid {
        transition: none;
    }

    .plyr__control--overlaid:hover {
        transform: none;
    }
}

/* ========================================
   Hide Plyr Branding (Optional)
   ======================================== */

.plyr__poster {
    background-color: #000;
}

/* ========================================
   Custom Fullscreen Mode
   ======================================== */

.plyr--fullscreen {
    z-index: 10000;
}

.plyr--fullscreen.plyr--video {
    background: #000;
}

/* ========================================
   Error State
   ======================================== */

.plyr--stopped .plyr__controls {
    display: flex;
}

/* ========================================
   Captions/Subtitles Styling
   ======================================== */

.plyr__captions {
    font-size: 18px;
    line-height: 1.5;
}

.plyr__caption {
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 3px;
}

/* ========================================
   Quality Selector (jika enabled)
   ======================================== */

.plyr__menu__container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 4px;
}

.plyr__menu__container [role='menu'] {
    padding: 5px;
}

.plyr__menu__container [role='menuitem']:hover {
    background: rgba(74, 124, 89, 0.8);
}

/* ========================================
   Z-index Management
   ======================================== */

.hero-slide {
    position: relative;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}
