/* Video Header Styles */

/* Video Loading Bar */
.video-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.video-loading-bar.hide {
    opacity: 0;
    pointer-events: none;
}

.video-loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4d57 0%, #ff6b76 50%, #ff4d57 100%);
    background-size: 200% 100%;
    animation: loadingProgress 2s ease-in-out, shimmer 1.5s infinite;
    transition: width 0.3s ease;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Video Header Wrapper - Contains video only */
.video-header-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0; /* No margin - search section handles spacing */
}

/* Video Header Container */
.video-header-container {
    position: relative;
    width: 100%;
    height: 860px; /* Increased from 790px (+70px) to prevent bottom crop on desktop */
    overflow: hidden;
    background: #000;
}

/* Video Background */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

/* Video Overlay - Removed for clear video visibility */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* No overlay - video is fully clear */
    z-index: 2;
    pointer-events: none; /* Don't block interactions with elements above */
}

/* Video Search Overlay - DEPRECATED - kept for compatibility */
.video-search-overlay {
    position: absolute;
    top: 570px; /* Adjusted for 720px video height */
    left: 0;
    right: 0;
    z-index: 3;
    padding: 30px 0 40px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Video Search Section - Search form below video (not overlaying) */
.video-search-section {
    position: relative;
    width: 100%;
    padding: 50px 0;
    background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);
    margin-bottom: 30px;
}

/* Video Content - Text & Image di atas video */
.video-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    padding: 40px 0;
}

.video-content h1 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.video-content h2 {
    color: #ff4d57;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.video-content img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

/* Search Form Section - Legacy (kept for other pages) */
.search-form-section {
    background: #f9f9f9;
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 15px 15px 0 0;
}

/* Search Form Content - Updated for video section */
.search-form-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    pointer-events: auto;
    position: relative;
}

/* When inside video overlay (deprecated but kept for compatibility) */
.video-search-overlay .search-form-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* When inside video search section */
.video-search-section .search-form-content {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.search-form-content .form-control {
    height: 50px;
    border-radius: 5px;
    border: 2px solid #333;
    padding-left: 45px;
    font-size: 15px;
}

.search-form-content .form-control:focus {
    border-color: #ff4d57;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 77, 87, 0.1);
}

.search-form-content .form-group {
    position: relative;
    margin-bottom: 20px;
}

.search-form-content .form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff4d57;
    font-size: 18px;
}

.search-form-content .btn-search-icon {
    width: 100%;
    height: 50px;
    background: #ff4d57;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    transition: all 0.3s ease;
}

.search-form-content .btn-search-icon:hover {
    background: #e63946;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 87, 0.3);
}

.search-form-content .selectpicker {
    height: 50px;
    border-radius: 5px;
}

.search-form-content select,
.search-form-content .bootstrap-select .btn {
    border: 2px solid #333 !important;
    height: 50px;
}

.search-form-content .bootstrap-select .btn:focus {
    border-color: #ff4d57 !important;
    box-shadow: 0 0 0 3px rgba(255, 77, 87, 0.1) !important;
}

/* Bootstrap Select Dropdown Menu - High z-index to show above everything */
.bootstrap-select .dropdown-menu {
    z-index: 999999999 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Ensure dropdown opens properly in video overlay */
.video-search-overlay .bootstrap-select .dropdown-menu {
    position: absolute !important;
    will-change: transform !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-header-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .video-header-container {
        height: 560px; /* Increased from 530px (+30px) to prevent bottom crop on tablet */
        width: 100%;
        max-width: 100%;
    }

    .video-background {
        min-width: 100%;
        min-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain; /* Changed from cover to contain - shows full video width without crop */
        object-position: center center;
    }

    .video-content h1 {
        font-size: 2rem;
    }

    .video-content h2 {
        font-size: 1.3rem;
    }

    .video-search-overlay {
        top: 370px; /* Adjusted for 500px video height */
        padding: 20px 0 30px 0;
    }

    .video-search-section {
        padding: 40px 0;
    }

    .search-form-section {
        padding: 40px 0;
        margin-top: -30px;
    }

    .search-form-content {
        padding: 25px;
    }

    .search-form-content .form-control,
    .search-form-content .btn-search-icon {
        height: 45px;
    }

    .search-form-content .col-md-6,
    .search-form-content .col-md-5,
    .search-form-content .col-md-1 {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .video-header-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .video-header-container {
        height: 450px; /* Increased from 420px (+30px) to prevent bottom crop on mobile */
        width: 100%;
        max-width: 100%;
    }

    .video-background {
        min-width: 100%;
        min-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain; /* Changed from cover to contain - shows full video width without crop */
        object-position: center center;
        max-width: none;
    }

    .video-content h1 {
        font-size: 1.5rem;
    }

    .video-content h2 {
        font-size: 1.1rem;
    }

    .video-content {
        padding: 20px 0;
    }

    .video-search-overlay {
        top: 280px; /* Adjusted for 400px video height */
        padding: 15px 0 20px 0;
    }

    .video-search-section {
        padding: 30px 0;
    }

    .search-form-content {
        padding: 20px;
    }
}

/* Video Fallback - jika video tidak load */
.video-background:not([src]) {
    background: linear-gradient(135deg, #ff4d57 0%, #ffffff 50%, #ff4d57 100%);
}

/* Pause/Play button (optional) */
.video-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}
