/* ==========================================================================
VIDEO PAGE LAYOUT & STYLES
========================================================================== */
.btp-content-wrapper { max-width: 1024px; margin: 0 auto; padding: 20px 0; }
.btp-main-layout { display: grid !important; grid-template-columns: 1fr 300px !important; gap: 30px !important; align-items: start !important; width: 100% !important; }
.btp-content-area { min-width: 0 !important; width: 100% !important; overflow: visible !important; }
.btp-sidebar { width: 300px !important; min-width: 300px !important; }

.wrapper { display: flex; flex-direction: row; gap: 24px; max-width: 100%; margin: 0 auto; align-items: flex-start; position: relative; }
.kolom-kiri { width: 160px; min-width: 160px; max-width: 160px; flex-shrink: 0; position: sticky; top: 100px; align-self: flex-start; z-index: 10; }
.kolom-kiri .btp-ad-placeholder { width: 160px; height: 600px; background: #f0f0f1; display: flex; align-items: center; justify-content: center; }
.kolom-kanan { flex: 1; min-width: 0; overflow: visible; position: relative; color: #3d3d3d; }

/* ==========================================================================
3. VIDEO PLAYER STYLES
========================================================================== */
.btp-featured-video-direct,
.btp-youtube-facade {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Rasio aspek 16:9 */
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}
.btp-featured-video-direct iframe,
.btp-featured-video-direct video,
.btp-youtube-facade iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: cover;
}

.btp-youtube-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.btp-youtube-facade:hover .btp-youtube-thumb { opacity: 0.8; transform: scale(1.02); }

.btp-youtube-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 2;
}
.btp-youtube-play-btn:hover { transform: translate(-50%, -50%) scale(1.1); }
.btp-youtube-facade.is-playing .btp-youtube-thumb,
.btp-youtube-facade.is-playing .btp-youtube-play-btn { display: none; }
/* ==========================================================================
4. RESPONSIVE VIDEO LAYOUT
========================================================================== */
@media (max-width: 1023px) {
    .btp-main-layout { display: flex !important; flex-direction: column !important; gap: 20px !important; }
    .btp-sidebar { display: none !important; }
    .wrapper { flex-direction: column !important; gap: 20px !important; }
    
    /* Di tablet, iklan pindah ke bawah (order 2) */
    .kolom-kiri { width: 100% !important; min-width: 100% !important; max-width: 100% !important; position: relative !important; top: 0 !important; align-self: stretch !important; display: flex !important; justify-content: center !important; order: 2; }
    .kolom-kiri .btp-ad-placeholder { width: 300px !important; height: 250px !important; }
    .kolom-kanan { width: 100% !important; order: 1; }
    
    .btp-featured-video-direct,
    .btp-youtube-facade {
        border-radius: 0 !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        width: 100vw !important;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    .btp-content-area { padding: 0 !important; background: transparent !important; box-shadow: none !important; }
    .kolom-kanan { padding: 0 !important; width: 100% !important; order: 1; }
    .btp-sidebar { display: none !important; }
    
    .btp-article-breadcrumb,
    .btp-article-header,
    .btp-author-actions-wrapper {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
    
    /* ========================================== */
    /* PERBAIKAN: SEMBUNYIKAN KOLOM KIRI DI MOBILE */
    /* ========================================== */
    .kolom-kiri {
        display: none !important; /* Ini akan menyembunyikan kolom iklan kiri sepenuhnya di HP */
    }
    
    .btp-featured-video-direct,
    .btp-youtube-facade {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 50% !important;
        transform: translateX(-50%) !important;
        border-radius: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        height: 250px !important;
        padding-bottom: 0 !important;
    }
    .btp-featured-video-direct iframe,
    .btp-featured-video-direct video,
    .btp-youtube-facade iframe {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 250px !important;
        object-fit: contain !important;
    }
    .btp-youtube-thumb { width: 100vw !important; max-width: 100vw !important; height: 250px !important; }
    
    .kolom-kanan > *:not(.btp-featured-video-direct):not(.btp-youtube-facade) {
        padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box !important;
    }
}

/* ==========================================================================
   PERBAIKAN JARAK (PADDING) LATEST NEWS DI MOBILE (16px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Paksa container Latest News memiliki jarak 16px dari kiri dan kanan */
    .latest-2-news, 
    .latest-2-news-mobile, 
    .latest-2-news-desktop {
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Pastikan grid di dalamnya tidak memiliki margin negatif yang merusak layout */
    .latest-2-news-grid {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        gap: 16px !important; /* Jarak antar item jika perlu */
    }

    /* Pastikan item berita di dalamnya juga mengikuti batas lebar */
    .latest-2-news-item {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}