/* ==========================================================================
   LATEST NEWS (list-news-1) - Mobile First & Optimized
   ========================================================================== */

/* --- 1. BASE & MOBILE STYLES --- */
.latest-news-mobile { 
    display: block; 
    padding: 16px 0; 
}
.latest-news-desktop { 
    display: none; 
}
.latest-header { 
    display: none; /* Muncul hanya di desktop */
}

.latest-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.latest-news-item {
    display: block;
    cursor: pointer;
    text-decoration: none;
}
.latest-news-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f0f0f0; /* Mencegah layout shift saat gambar loading */
}

.latest-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.latest-news-title {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.latest-news-title:hover {
    color: #8B0000; /* Dark red accent konsisten */
}

.latest-news-time {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

/* Sembunyikan meta tertentu di mobile agar bersih */
.latest-news-category,
.latest-news-readtime,
.latest-news-meta .separator {
    display: none;
}


/* --- 2. BADGES & VIDEO ICONS (Specific to Latest News) --- */
.latest-news-item .content-badge,
.latest-news-item .video-badge,
.latest-news-item .gallery-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease;
}

.latest-news-item:hover .content-badge,
.latest-news-item:hover .video-badge {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
}

.latest-news-item .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.latest-news-item .video-play-icon svg {
    width: 16px;
    height: 16px;
    fill: #ffffff;
    margin-left: 2px;
}

.latest-news-item.has-video:hover .video-play-icon {
    background: rgba(139, 0, 0, 0.9); /* Dark red accent on hover */
    transform: translate(-50%, -50%) scale(1.1);
}


/* --- 3. DESKTOP VERSIONS (min-width: 1024px) --- */
@media (min-width: 1024px) {
    .latest-news-mobile { display: none !important; }
    .latest-news-desktop { display: block !important; padding: 0; margin: 24px 0; }
    
    /* Header Section */
    .latest-header { 
        display: flex; 
        align-items: center; 
        justify-content: space-between; 
        margin-bottom: 16px; 
    }
    
    .latest-header-title { 
        font-family: 'Poppins', sans-serif;
        font-size: 18px; 
        font-weight: 700; 
        color: #1a1a1a; 
        margin: 0; 
    }
    
    .latest-header-link {
        display: flex;
        align-items: center;
        gap: 4px;
        font-family: 'Manrope', sans-serif;
        font-size: 13px;
        font-weight: 600;
        color: #555;
        text-decoration: none;
        transition: color 0.2s ease, gap 0.2s ease;
    }

    .latest-header-link:hover {
        color: #8B0000;
        gap: 8px; /* Efek panah bergerak */
    }
    
    /* Grid & List Layout */
    .latest-news-desktop .latest-news-grid { 
        display: flex; 
        flex-direction: column; 
        background: #ffffff; 
    }
    
    .latest-news-desktop .latest-news-item { 
        display: flex; 
        align-items: center; 
        gap: 20px; 
        padding: 12px 0; 
           }
    
    .latest-news-desktop .latest-news-item:last-child { 
        border-bottom: none; 
    }
    
    .latest-news-desktop .latest-news-image { 
        width: 210px; 
        height: 120px; 
        border-radius: 4px; 
        flex-shrink: 0; 
        margin-bottom: 0;
    }
    
    .latest-news-desktop .latest-news-item:hover .latest-news-image img { 
        transform: scale(1.05); 
    }
    
    .latest-news-desktop .latest-news-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }
    
    .latest-news-desktop .latest-news-title { 
        font-size: 18px; 
         color: #1a1a1a; 
        line-height: 1.4; 
        margin-bottom: 8px; 
        -webkit-line-clamp: 3; 
    }
    
    /* Tampilkan kategori dan meta di desktop */
    .latest-news-desktop .latest-news-category { 
        display: inline-block;
        font-family: 'Manrope', sans-serif;
        font-size: 11px; 
        color: #8B0000; /* Dark red accent */
        font-weight: 600; 
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 6px; 
    }
    
    .latest-news-desktop .latest-news-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: 'Manrope', sans-serif;
        font-size: 12px;
        color: #888;
    }

    .latest-news-desktop .latest-news-time,
    .latest-news-desktop .latest-news-readtime {
        display: inline;
    }

    .latest-news-desktop .latest-news-meta .separator {
        display: inline;
        color: #ccc;
    }

    /* Adjust Video Icon Size for Desktop */
    .latest-news-desktop .video-play-icon { 
        width: 44px; 
        height: 44px; 
    }
    .latest-news-desktop .video-play-icon svg { 
        width: 20px; 
        height: 20px; 
    }
}

/* ==========================================================================
   LIST NEWS 2 - Horizontal List (Thumbnail Kiri, Teks Kanan)
   Menggunakan Design Token yang sama dengan List News 1 (Font, Warna, Badge)
   ========================================================================== */

.list-news-2-wrapper {
    margin: 30px 0;
}

.list-news-2-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-news-2-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
}

/* --- Image Wrapper (Kiri) --- */
.list-news-2-image-wrapper {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0; /* Mencegah layout shift */
}

.list-news-2-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.list-news-2-item:hover .list-news-2-image {
    transform: scale(1.05);
}

/* --- Content (Kanan) --- */
.list-news-2-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    min-width: 0; /* Mencegah teks overflow */
}

.list-news-2-title {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.list-news-2-title a {
    color: inherit;
    text-decoration: none;
}

.list-news-2-title:hover {
    color: #8B0000; /* Dark red accent (Sama dengan List 1) */
}

.list-news-2-meta {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    color: #888;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-news-2-category {
    color: #8B0000;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- Badges (Sama persis dengan List News 1) --- */
.list-news-2-item .content-badge,
.list-news-2-item .video-badge,
.list-news-2-item .gallery-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

/* ==========================================================================
   RESPONSIVE: DESKTOP (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
    .list-news-2-container {
        gap: 0; /* Hilangkan gap, gunakan border bawah */
        background: #ffffff;
    }

    .list-news-2-item {
        align-items: center;
        gap: 20px;
        padding: 16px 0;
        border-bottom: 1px solid #eeeeee;
    }

    .list-news-2-item:last-child {
        border-bottom: none;
    }

    .list-news-2-image-wrapper {
        width: 210px;
        height: 140px;
        border-radius: 6px;
    }

    .list-news-2-title {
        font-size: 16px;
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
    }

    .list-news-2-meta {
        font-size: 12px;
        gap: 8px;
    }

    .list-news-2-category {
        font-size: 11px;
    }

    .list-news-2-item .content-badge,
    .list-news-2-item .video-badge,
    .list-news-2-item .gallery-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 10px;
        border-radius: 4px;
    }
}

/* ==========================================================================
   LIST NEWS 2 MOBILE - KHUSUS THUMBNAIL LAYOUT (Opsi 2)
   Hanya menargetkan .latest-news-mobile yang memiliki class .is-thumbnail
   ========================================================================== */
@media (max-width: 999px) {
    
    /* 1. Paksa Container menjadi Flex Column (Menggantikan Grid 2 Kolom) */
    .latest-news-mobile.is-thumbnail .latest-news-grid {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
    }

    /* 2. Paksa Item menjadi Flex Row (Gambar Kiri, Teks Kanan) */
    .latest-news-mobile.is-thumbnail .latest-news-item {
        display: flex !important;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        border-bottom: 1px solid #f0f0f0; /* Opsional: Garis pemisah halus */
        padding-bottom: 16px;
    }

    .latest-news-mobile.is-thumbnail .latest-news-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* 3. Thumbnail Gambar di Kiri */
    .latest-news-mobile.is-thumbnail .latest-news-image {
        width: 90px;
        height: 90px;
        flex-shrink: 0;
        margin-bottom: 0;
        border-radius: 4px;
        overflow: hidden;
    }

    .latest-news-mobile.is-thumbnail .latest-news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 4. Konten Teks di Kanan */
    .latest-news-mobile.is-thumbnail .latest-news-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0; /* Penting agar text-clamp bekerja */
    }

    /* 5. Penyesuaian Tipografi & Badge */
    .latest-news-mobile.is-thumbnail .latest-news-title {
        font-size: 14px;
        margin-bottom: 6px;
        -webkit-line-clamp: 3;
    }

    .latest-news-mobile.is-thumbnail .latest-news-category {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .latest-news-mobile.is-thumbnail .latest-news-meta {
        font-size: 11px;
    }

    /* Perkecil Badge agar pas di thumbnail kecil */
    .latest-news-mobile.is-thumbnail .content-badge,
    .latest-news-mobile.is-thumbnail .video-badge,
    .latest-news-mobile.is-thumbnail .gallery-badge {
        top: 4px;
        right: 4px;
        padding: 2px 5px;
        font-size: 9px;
        border-radius: 3px;
    }

    .latest-news-mobile.is-thumbnail .video-play-icon {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================================================
   MOBILE POPULER (Style Baru: Nomor Lingkaran + Gambar Kanan)
   ========================================================================== */

/* Sembunyikan di desktop */
.mobile-populer-wrapper {
    display: none;
}

@media (max-width: 1023px) {
    .mobile-populer-wrapper {
        display: block;
        background: #ffffff;
        padding: 20px 0;
        margin-bottom: 24px;
    }

    .mobile-populer-header {
        margin-bottom: 16px;
    }

    .mobile-populer-title {
        font-family: 'Manrope', sans-serif;
        font-size: 18px;
        font-weight: 800;
        color: #1a1a1a;
        margin: 0;
        line-height: 1.3;
    }

    .mobile-populer-list {
        display: flex;
        flex-direction: column;
    }

    /* Item: Nomor + Teks + Gambar */
    .mobile-populer-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
          }

    .mobile-populer-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .mobile-populer-item:first-child {
        padding-top: 0;
    }

    /* ✅ NOMOR BADGE: Lingkaran abu-abu muda */
    .mobile-populer-number {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        background: #e8e8e8; /* Abu-abu muda */
        color: #555555;      /* Abu-abu tua untuk nomor */
        font-family: 'Manrope', sans-serif;
        font-size: 13px;
        font-weight: 700;
        border-radius: 50%;  /* Lingkaran sempurna */
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;
    }

    /* Konten Teks (tengah) */
    .mobile-populer-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

    .mobile-populer-title-text {
        font-family: 'Manrope', sans-serif;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
        margin: 0;
        color: #1a1a1a;
        /* ✅ Dibatasi 2 baris dengan ellipsis */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-populer-title-text a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .mobile-populer-title-text a:hover {
        color: #8B0000;
    }

    .mobile-populer-category {
        font-family: 'Manrope', sans-serif;
        font-size: 12px;
        font-weight: 500;
        color: #888;
        text-transform: capitalize;
        line-height: 1.2;
    }

    /* ✅ GAMBAR DI KANAN */
    .mobile-populer-image {
        flex-shrink: 0;
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        background: #f0f0f0;
        display: block;
    }

    .mobile-populer-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    .mobile-populer-image:hover img {
        transform: scale(1.05);
    }
}