/* ==========================================================================
   UNIVERSAL SECTION HEADER (Optimized & No-Wrap)
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.section-header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto; /* Mencegah judul meregang/mengecil */
}

/* === PERBAIKAN UTAMA: LINK INDEKS BERITA === */
.section-header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px !important; /* Paksa ukuran 12px */
    font-weight: 600;
    color: #494949;
    text-decoration: none;
    white-space: nowrap; /* KUNCI: Mencegah teks bersusun/word-wrap */
    flex-shrink: 0; /* KUNCI: Mencegah elemen tertekan oleh flex container */
    margin-left: auto;
    transition: color 0.2s ease, gap 0.2s ease;
}

.section-header-link:hover {
    color: #8B0000; /* Dark red hover effect */
    gap: 8px; /* Efek panah bergerak sedikit ke kanan */
}

/* === IKON PANAH FONT AWESOME === */
.section-header-arrow {
    font-size: 12px; /* Ukuran ikon menyesuaikan teks */
    line-height: 1; /* Mencegah offset vertikal */
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.section-header-link:hover .section-header-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
   RESPONSIVE: MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 14px;
        justify-content: flex-start;
        gap: 8px;
    }

    .section-header-title {
        font-size: 16px;
    }

    /* Sembunyikan link "Indeks Berita" di mobile */
    .section-header-link {
        display: none !important;
    }
}
/* ==========================================================================
   GRID SECTION WRAPPER (Border & Bleed Effect)
   Digunakan untuk membungkus section grid agar memiliki border top/bottom
   dan efek "bleed" (rapat ke tepi) di mobile.
   ========================================================================== */

.grid-pilihan-wrapper {
    margin: 0;
    padding: 24px 0;
    border-top: 4px solid #f6f6f6;
    border-bottom: 4px solid #f6f6f6;
    background: #ffffff;
}

.grid-pilihan-wrapper .section-header {
    margin-bottom: 20px;
    padding: 0;
}

.grid-pilihan-container {
    padding: 0;
}

/* ==========================================================================
   RESPONSIVE: MOBILE BLEED EFFECT (max-width: 767px)
   Membuat border rapat ke tepi kiri-kanan layar
   ========================================================================== */
@media (max-width: 767px) {
    .grid-pilihan-wrapper {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        margin-top: 24px;
        margin-bottom: 24px;
    }
}
/* ==========================================================================
   GRID COMPONENT - Reusable Card Styling
   Prefix: .grid-* (bisa digunakan di grid berita pilihan, terkait, kategori, dll)
   ========================================================================== */

/* --- Grid Item (Card) --- */
.grid-item {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* --- Image Wrapper --- */
.grid-image-wrapper {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 12px;
    position: relative;
    aspect-ratio: 16 / 9;
}

.grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.grid-item:hover .grid-image {
    transform: scale(1.05);
    filter: brightness(0.9);
}

/* --- Content Area --- */
.grid-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Category (Teks Berwarna Uniform) --- */
.grid-category {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #8B0000; /* Dark red - satu warna untuk semua kategori */
    text-transform: capitalize;
    margin-bottom: 8px;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.grid-category:hover {
    opacity: 0.7;
}

/* --- Title --- */
.grid-title {
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.grid-title a {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
    
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-title a:hover {
    color: #8B0000;
}

/* ==========================================================================
   UNIFIED CONTENT BADGE & ICONS (Reusable Component)
   Dipakai di: latest-news, grid-pilihan, related, headline, dll.
   ========================================================================== */

/* --- 1. Badge Konten (Pojok Kanan Atas Gambar) --- */
.content-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.2s ease, background 0.2s ease;
}

/* Varian: Video & Gallery (menggunakan base .content-badge) */
.video-badge,
.gallery-badge {
    /* Inherits .content-badge */
}

/* --- 2. Ikon di Dalam Badge (SVG) --- */
.content-badge .badge-icon {
    width: 12px;
    height: 12px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* --- 3. Teks di Dalam Badge (durasi / jumlah foto) --- */
.badge-text {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* --- 4. Hover State Badge --- */
.latest-news-item:hover .content-badge,
.grid-item:hover .content-badge,
.headline-news:hover .content-badge {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* --- 5. Mobile Badge Adjustment --- */
@media (max-width: 768px) {
    .content-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        border-radius: 4px;
        font-size: 10px;
        gap: 3px;
    }

    .content-badge .badge-icon {
        width: 11px;
        height: 11px;
    }
}


/* ==========================================================================
   VIDEO PLAY ICON (Tengah Gambar)
   ========================================================================== */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    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;
}

.video-play-icon svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    fill: #ffffff;
}

/* Hover State Play Icon */
.has-video:hover .video-play-icon {
    background: rgba(139, 0, 0, 0.9); /* Dark red accent konsisten */
    transform: translate(-50%, -50%) scale(1.1);
}

/* Desktop: Play Icon lebih besar */
@media (min-width: 1000px) {
    .video-play-icon {
        width: 50px;
        height: 50px;
    }

    .video-play-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   GRID VIDEO - TANGGAL UPDATE
   ========================================================================== */
/* ==========================================================================
   GRID VIDEO - TANGGAL UPDATE
   ========================================================================== */
.grid-video-date {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #888888;
    margin-top: 12px;
    line-height: 1;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

/* Efek hover: Tanggal berubah sedikit lebih gelap saat item di-hover */
.grid-item:hover .grid-video-date {
    color: #555555;
}

/* Mobile: sedikit lebih kecil */
@media (max-width: 767px) {
    .grid-video-date {
        font-size: 11px;
        margin-top: 5px;
    }
} 