/* ==========================================================================
   UNIVERSAL SECTION HEADER
   Digunakan di: category-grid, pilihan-redaksi, widget, latest-news, 
                 related, terpopuler, mobile-populer, dll.
   ========================================================================== */

/* --- Wrapper Header Section --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Desktop: ada link di kanan */
    margin-bottom: 16px;
    gap: 12px; /* Jarak antara bar merah dan judul */
}

/* --- Bar Merah di Kiri Judul --- */
.section-header-bar {
    width: 4px;
    height: 20px;
    background: #e60012;
    border-radius: 2px;
    flex-shrink: 0;
}

/* --- Judul Section --- */
.section-header-title {
    font-family: 'Manrope', 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 mengisi ruang kosong */
}

/* --- Link "Selengkapnya" di Kanan --- */
.section-header-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #494949;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
    margin-left: auto; /* Mendorong ke kanan */
}

.section-header-link:hover {
    color: #0066cc;
}

/* --- Ikon Panah di Link --- */
.section-header-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.section-header-link:hover .section-header-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   VARIANT MODIFIERS
   ========================================================================== */

/* --- Variant: Tanpa Bar Merah (untuk widget/sidebar) --- */
.section-header--no-bar .section-header-bar {
    display: none;
}

/* --- Variant: Tanpa Link (hanya judul, rapat ke kiri) --- */
.section-header--no-link {
    justify-content: flex-start; /* ✅ Memaksa bar dan judul rapat ke kiri */
}

.section-header--no-link .section-header-link {
    display: none;
}

/* --- Variant: Center (untuk header kategori/tag) --- */
.section-header--center {
    justify-content: flex-start;
}

/* --- Variant: Compact (untuk mobile atau section khusus) --- */
.section-header--compact {
    margin-bottom: 12px;
}

.section-header--compact .section-header-bar {
    height: 18px;
}

.section-header--compact .section-header-title {
    font-size: 16px;
}

/* ==========================================================================
   RESPONSIVE: MOBILE (RAPAT KE KIRI, TANPA SPACE-BETWEEN)
   ========================================================================== */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 14px;
        justify-content: flex-start; /* ✅ KUNCI: Paksa rapat ke kiri di mobile */
        gap: 8px; /* ✅ Jarak lebih rapat antara bar dan judul di mobile */
    }

    .section-header-title {
        font-size: 16px;
        flex: 0 0 auto; /* ✅ Pastikan judul tidak meregang */
    }

    .section-header-bar {
        height: 18px;
    }

    /* ✅ Sembunyikan link "Selengkapnya" di mobile */
    .section-header-link {
        display: none !important;
    }
    
    /* ✅ Sembunyikan ikon bookmark di mobile agar header lebih rapi */
    .pilihan-redaksi-bookmark-inline {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .section-header-title {
        font-size: 15px;
    }

    .section-header-bar {
        height: 16px;
    }
}

/* ==========================================================================
   KHUSUS: Sembunyikan ENTIRE Section Header HANYA di Latest News Mobile
   ========================================================================== */
@media (max-width: 768px) {
    /* Target spesifik: section-header yang berada DI DALAM .latest-news-mobile */
    .latest-news-mobile .section-header {
        display: none !important;
    }
}