/* ===== FIX HERO BUTTONS & VIDEO ===== */

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video Background - Fix Smooth Playback */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    /* Optimasi untuk smooth playback */
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Hero Content - Center Alignment */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Hero Buttons - Responsive & Centered */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    width: 100%;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 20px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .hero-title {
        font-size: 32px !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
    }
    
    .hero-description {
        font-size: 14px !important;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        padding: 0 15px;
    }
    
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 24px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
    }
    
    .hero-description {
        font-size: 13px !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        min-width: 180px;
        padding: 14px 28px;
    }
}

/* Desktop Large */
@media (min-width: 1025px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        min-width: 220px;
        padding: 18px 36px;
        font-size: 17px;
    }
}

/* Fix Video Stuttering */
@media (prefers-reduced-motion: no-preference) {
    .hero-video {
        animation: none;
    }
}

/* Ensure video plays smoothly on mobile */
@media (max-width: 768px) {
    .hero-video {
        /* Reduce quality on mobile for smooth playback */
        image-rendering: auto;
    }
}

/* Video Poster - Small & Centered */
.hero-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: url('images/logo bkn.png') no-repeat center center;
    background-size: contain;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Show poster only when video is loading */
.hero-video[poster] {
    background: rgba(0, 0, 0, 0.8);
}

/* Custom poster styling */
.hero-video {
    background-color: #1a1a2e;
    background-image: 
        radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.5) 100%),
        url('images/logo bkn.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 150px auto, cover;
}

/* Hide default poster, use custom background */
.hero-video[poster]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: url('images/logo bkn.png') no-repeat center center;
    background-size: contain;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.5));
}

/* Hide custom poster when video is playing */
.hero-video.playing::after {
    opacity: 0;
}

/* Mobile poster size */
@media (max-width: 768px) {
    .hero-video {
        background-size: 120px auto, cover;
    }
    
    .hero-video[poster]::after {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .hero-video {
        background-size: 100px auto, cover;
    }
    
    .hero-video[poster]::after {
        width: 100px;
        height: 100px;
    }
}
