/* ==========================================================================
   STYLE FINAL HALAMAN INDEKS (RAMPING, TENGAH, TANPA GARIS)
   ========================================================================== */

/* --- GLOBAL FIX: Mencegah Layar HP Goyang --- */
html, body {
    overflow-x: hidden !important;
}

/* --- 0. FIX AREA KONTEN AGAR TIDAK NABRAK SIDEBAR --- */
#main-content {
    padding-right: 40px; /* Jarak aman antara daftar berita dan sidebar di desktop */
}

/* --- 1. JUDUL HALAMAN (Dikecilkan & Ke Tengah) --- */
.page-header .page-title {
    font-size: 26px !important; /* Ukuran judul jauh lebih kecil */
    text-align: center !important; /* Posisi teks ke tengah */
    margin-bottom: 15px !important;
}

/* --- 2. FORM FILTER (Ramping & Di Tengah) --- */
.indeks-filter-wrapper {
    background: #fff;
    padding: 0;
    margin-bottom: 25px;
    border-bottom: none !important; /* MENGHAPUS GARIS PEMISAH BAWAH FORM */
}

.indeks-form {
    max-width: 320px; /* Dibuat jauh lebih ramping/kecil */
    margin: 0 auto; /* KUNCI: Memindahkan seluruh form ke posisi TENGAH */
}

/* Kunci agar padding tidak bocor */
.indeks-form *, .indeks-item * {
    box-sizing: border-box !important;
}

.filter-row {
    margin-bottom: 10px;
}

.filter-flex {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* Input Kategori & Tanggal Dibuat Pendek/Slim */
.filter-select, .filter-date {
    width: 100%;
    padding: 6px 12px !important; /* Padding dikecilkan agar ramping */
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px !important; /* Font lebih kecil */
    background-color: #fff;
    color: #333;
}

.filter-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 6px 20px !important; /* Tombol lebih ramping */
    border-radius: 4px;
    font-size: 13px !important;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-btn:hover { background: #0056b3; }

/* --- 3. LIST BERITA INDEKS (TANPA GARIS PEMISAH) --- */
.indeks-post-list {
    display: flex;
    flex-direction: column;
}

.indeks-item {
    display: flex;
    gap: 20px;
    padding: 15px 0; /* Padding dikurangi karena garis sudah dihapus */
    border-bottom: none !important; /* MENGHAPUS GARIS PEMISAH ANTAR BERITA */
    align-items: flex-start;
}

/* Gambar Desktop */
.indeks-thumb-wrapper {
    width: 250px; /* Gambar sedikit lebih kecil agar rapi */
    flex-shrink: 0;
}

.indeks-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #f5f5f5;
}

/* Konten Teks */
.indeks-content {
    flex: 1;
}

.indeks-cat {
    font-size: 12px;
    color: #2c529d;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 5px;
    display: inline-block;
}

.indeks-title {
    font-size: 18px; /* Judul berita sedikit dikecilkan */
    line-height: 1.4;
    margin: 5px 0 10px 0;
}

.indeks-title a {
    color: #111;
    text-decoration: none;
}

.indeks-title a:hover { color: #2c529d; }

.indeks-date {
    font-size: 12px;
    color: #888;
}

/* --- 3. PAGINATION INDEKS (BULAT KECIL HITAM) --- */
.indeks-pagination {
    margin-top: 30px;
    text-align: center;
    padding-bottom: 40px;
}

.indeks-pagination a, .indeks-pagination span {
    display: inline-flex; /* Flexbox agar angka persis di tengah */
    align-items: center;
    justify-content: center;
    width: 32px; /* Ukuran lebar bulat kecil */
    height: 32px; /* Ukuran tinggi bulat kecil */
    border: 1px solid #111; /* Garis tepi hitam */
    margin: 0 4px;
    text-decoration: none;
    color: #111; /* Angka warna hitam */
    border-radius: 50%; /* KUNCI: Membuatnya bulat sempurna */
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Efek saat angka didekati kursor (Hover) */
.indeks-pagination a:hover {
    background-color: #333; /* Hitam keabu-abuan saat disentuh */
    color: #fff;
    border-color: #333;
}

/* Angka halaman yang sedang aktif saat ini */
.indeks-pagination .current {
    background-color: #000; /* Latar bulat hitam pekat */
    color: #fff; /* Teks angka putih */
    border-color: #000;
}

/* ==========================================================================
   5. PENGATURAN MOBILE (DI BAWAH 768PX)
   ========================================================================== */
@media (max-width: 768px) {
    .site-main .main-content-wrapper {
        display: flex !important;
        flex-direction: column !important;
    }
    
    #main-content, #secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important; /* Hapus jarak kanan di HP */
    }
    
    #secondary { margin-top: 30px !important; }

    /* Form Filter Mobile */
    .indeks-form { max-width: 100%; }

    /* List Berita Mobile (Rapat & Gambar Kotak 1:1) */
    .indeks-item {
        gap: 12px;
        padding: 12px 0;
    }

    .indeks-thumb-wrapper {
        width: 105px; 
    }

    .indeks-thumb {
        aspect-ratio: 1 / 1 !important; 
        border-radius: 6px;
    }

    .indeks-title {
        font-size: 15px !important; 
        margin: 3px 0 8px 0;
    }
}

/* ==========================================================================
   FIX JARAK KONTEN DENGAN HEADER ATAS (SUPAYA TIDAK MEPET)
   ========================================================================== */

.main-content-wrapper {
    padding-top: 40px !important; /* Memberikan jarak 40px dari header hitam ke teks */
}

/* Penyesuaian untuk layar HP agar jarak atasnya tidak terlalu lebar */
@media (max-width: 768px) {
    .main-content-wrapper {
        padding-top: 20px !important;
    }
}

