/* ==========================================================================
   1. BASE & RESET STYLE
   ========================================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif; 
}

body { 
    background-color: #fcfbf9; 
    color: #222222; 
    padding-top: 110px; 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. NAVBAR PREMIUM EDITORIAL (STABILIZED ZOOM & FIXED DESKTOP)
   ========================================================================== */
.custom-navbar { 
    background-color: #ffffff; 
    border-bottom: 2px solid #111111; 
    width: 100%; 
    position: fixed; 
    top: 0; 
    left: 0; 
    z-index: 9999; 
    padding: 15px 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); 
    box-sizing: border-box; /* Mengunci padding agar tidak melar keluar layar */
}

/* Mengunci ukuran logo agar tidak gepeng atau terdesak saat zoom in */
.brand-logo { 
    font-size: 24px; 
    font-weight: 900; 
    color: #111111; 
    text-decoration: none; 
    text-transform: uppercase; 
    letter-spacing: -0.5px; 
    flex-shrink: 0; /* Mencegah logo mengecil atau hancur saat di-zoom */
    margin-right: 20px;
}

.brand-logo span { 
    color: #d4af37; 
}

/* Mengunci baris menu tengah agar tetap horizontal satu baris lurus */
.nav-menu { 
    display: flex; 
    list-style: none; 
    gap: 8px; 
    margin: 0 auto; /* Menjaga posisi deretan menu tetap seimbang di tengah */
    padding: 0; 
    flex-grow: 1; 
    justify-content: center; 
    overflow-x: auto; /* Otomatis membuat scroll horizontal halus jika di-zoom ekstrim */
    white-space: nowrap; /* MUTLAK: Mencegah menu kategori patah turun ke bawah */
}

/* Menghilangkan scrollbar bawaan browser pada menu tengah agar tetap estetik */
.nav-menu::-webkit-scrollbar {
    display: none;
}

/* Menyesuaikan ukuran padding teks kategori agar pas di segala level zoom */
.nav-item-link { 
    color: #444444; 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    padding: 8px 14px; 
    transition: all 0.2s ease; 
    border-radius: 4px; 
    display: inline-block;
}

.nav-item-link:hover { 
    color: #b33939; 
    background-color: #f5f4f0; 
}

.nav-item-link.active { 
    color: #ffffff; 
    background-color: #006241; 
}

/* Mengunci ukuran kotak pencarian di ujung kanan */
.search-wrapper { 
    position: relative; 
    width: 240px; 
    flex-shrink: 0; /* Mencegah kolom cari mengecil atau hilang saat di-zoom */
    margin-left: 20px;
}

.search-wrapper input { 
    width: 100%; 
    background: #f5f4f0; 
    border: 1px solid #e1dfd8; 
    color: #111111; 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 13px; 
    outline: none; 
    transition: all 0.2s ease; 
}

.search-wrapper input:focus { 
    border-color: #d4af37; 
    background: #ffffff; 
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.hamburger-toggle { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
    color: #111111; 
    line-height: 1; 
}

/* ==========================================================================
   3. TATA LETAK KONTEN (DUAL COLUMN SYSTEM)
   ========================================================================= */
.main-wrapper { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
    display: flex; 
    gap: 40px; 
    box-sizing: border-box;
    width: 100%;
}

.left-content { 
    flex: 3; 
    min-width: 0; 
}

.right-content { 
    flex: 1; 
    min-width: 0;
}

/* ==========================================================================
   4. DESAIN BANNER HEADLINE
   ========================================================================== */
.flat-headline { 
    background: #ffffff; 
    border: 1px solid #eae7e0; 
    margin-bottom: 50px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.01);
}

.flat-headline img { 
    width: 100%; 
    height: 420px; 
    object-fit: cover; 
    display: block;
}

.p-content { 
    padding: 35px; 
}

.category-pill { 
    color: #006241; 
    font-size: 11px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    text-decoration: none; 
    display: inline-block; 
    margin-bottom: 10px; 
}

.article-title { 
    font-size: 32px; 
    font-weight: 800; 
    line-height: 1.3; 
    margin-bottom: 14px; 
}

.article-title a { 
    color: #111111; 
    text-decoration: none; 
}

.article-title a:hover { 
    color: #b33939; 
}

.flat-headline p { 
    color: #555555; 
    font-size: 15px; 
    margin-bottom: 25px; 
}

/* ==========================================================================
   5. PEMBATAS SEKSI (SECTION HEADER)
   ========================================================================== */
.section-header { 
    font-size: 14px; 
    font-weight: 900; 
    color: #111111; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 25px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.section-header::after { 
    content: ''; 
    flex: 1; 
    height: 2px; 
    background: #006241; 
}

/* ==========================================================================
   6. GRID BERITA TERBARU (NEWS GRID & CARDS)
   ========================================================================== */
.news-grid { 
    display: grid !important; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; 
    gap: 25px !important; 
    width: 100% !important;
}

.news-card { 
    background: #ffffff !important; 
    border: 1px solid #eae7e0 !important; 
    border-radius: 8px !important; 
    overflow: hidden !important; 
    display: flex !important; 
    flex-direction: column !important; 
    width: 100% !important;
}

.card-img { 
    width: 100% !important; 
    height: 180px !important; 
    object-fit: cover !important; 
    display: block !important;
}

.card-body { 
    padding: 20px !important; 
    display: flex !important; 
    flex-direction: column !important; 
    flex-grow: 1 !important; 
}

.card-body h3 { 
    font-size: 18px !important; 
    margin: 8px 0 !important; 
    font-weight: 700 !important; 
    line-height: 1.4 !important; 
}

.card-body h3 a { 
    color: #111111 !important; 
    text-decoration: none !important; 
}

.card-body h3 a:hover { 
    color: #b33939 !important; 
}

.card-body p { 
    color: #666666 !important; 
    font-size: 13px !important; 
    margin-bottom: 18px !important; 
}

.btn-read { 
    background: #f5f4f0 !important; 
    color: #444444 !important; 
    text-decoration: none !important; 
    padding: 8px 15px !important; 
    border-radius: 6px !important; 
    font-size: 13px !important; 
    font-weight: 600 !important; 
    text-align: center !important; 
    margin-top: auto !important; 
    border: 1px solid #e1dfd8 !important; 
}

.btn-read:hover { 
    background: #006241 !important; 
    color: #ffffff !important; 
}
/* ==========================================================================
   7. PANEL BERITA TERPOPULER (SIDEBAR TRENDING)
   ========================================================================== */
.sidebar-panel { 
    background: #ffffff; 
    padding: 25px; 
    border: 1px solid #eae7e0; 
    border-radius: 8px; 
    position: sticky; 
    top: 110px; 
}

.compact-trending { 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
    border-bottom: 1px dashed #eae7e0; 
}

.compact-trending:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trend-meta { 
    font-size: 11px; 
    color: #b33939; 
    font-weight: 800; 
    text-transform: uppercase; 
}

.compact-title { 
    font-size: 14px; 
    font-weight: 700; 
    margin-top: 4px; 
}

.compact-title a { 
    color: #222222; 
    text-decoration: none; 
    transition: color 0.2s ease;
}

.compact-title a:hover {
    color: #006241;
}

/* ==========================================================================
   8. FOOTER HALAMAN
   ========================================================================== */
footer { 
    text-align: center; 
    color: #888680; 
    background: #ffffff; 
    padding: 35px 0; 
    font-size: 13px; 
    border-top: 1px solid #eae7e0; 
    margin-top: 80px; 
}

/* ==========================================================================
   9. RESPONSIVITAS MOBILE (PERBAIKAN GAMBAR UTUH & NAVBAR MOBILE)
   ========================================================================== */
@media (max-width: 991.98px) {
    body { 
        padding-top: 75px; /* Jarak atas navbar mobile yang lebih ramping */
    }
    
    /* 1. Menyelaraskan Logo dan Tombol Menu di HP agar Sejajar */
    .custom-navbar { 
        padding: 12px 20px !important; 
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* Sembunyikan kolom cari bawaan desktop di navbar mobile agar tidak sesak */
    .custom-navbar .search-wrapper { 
        display: none !important; 
    }
    
    .brand-logo {
        font-size: 20px !important;
        margin-right: 0 !important;
    }
    
    .hamburger-toggle { 
        display: block !important; /* Pastikan tombol hamburger muncul di pojok kanan HP */
    }
    
    /* 2. Menu Dropdown Tirai Seluler */
    .nav-menu { 
        display: flex !important; 
        flex-direction: column !important; 
        position: absolute !important; 
        top: 55px; 
        left: 0; 
        width: 100% !important; 
        background-color: #ffffff !important; 
        gap: 0 !important; 
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05) !important; 
        max-height: 0; /* Tertutup rapat secara bawaan */
        overflow: hidden !important; 
        opacity: 0; 
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease !important; 
        z-index: 99999 !important;
        justify-content: flex-start !important;
    }
    
    .nav-menu.mobile-open { 
        max-height: 450px !important; 
        opacity: 1 !important; 
        border-bottom: 2px solid #111111 !important; 
    }
    
    .nav-item-link { 
        display: block !important; 
        padding: 14px 25px !important; 
        border-radius: 0 !important; 
        border-bottom: 1px solid #f5f4f0 !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 3. Mengubah Susunan Kolom Ganda Menjadi Menumpuk ke Bawah di HP */
    .main-wrapper { 
        flex-direction: column !important; 
        gap: 30px !important; 
        padding: 0 15px !important;
    }
    
    /* 4. SOLUSI UTAK GAMBAR HEADLINE: Agar Gambar Utuh & Tidak Terpotong di HP */
    .flat-headline {
        margin-bottom: 30px !important;
    }
    
    .flat-headline img { 
        width: 100% !important; 
        height: auto !important; /* Mengubah tinggi absolut menjadi otomatis mengikuti proporsi gambar */
        max-height: 260px !important; /* Batasi tinggi maksimal di HP agar tidak terlalu panjang */
        object-fit: contain !important; /* MENAMPILKAN SELURUH GAMBAR SECARA UTUH TANPA TERPOTONG */
        background-color: #111111; /* Memberikan latar belakang gelap estetik jika gambar terlalu lebar */
    }
    
    .p-content {
        padding: 20px !important; /* Memperkecil jarak teks di HP agar rapi */
    }
    
    .article-title {
        font-size: 22px !important; /* Ukuran teks judul berita di HP menjadi proporsional */
        line-height: 1.4 !important;
    }
}

/* ==========================================================================
   10. DESAIN LUXURY DARK-GOLD LOGIN PANEL CSS
   ========================================================================== */
.login-body {
    background-color: #111111 !important; /* Hitam Arang Mewah */
    background-image: linear-gradient(135deg, #111111 0%, #1a1a1a 100%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
}

.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 45px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.2);
    text-align: center;
    border-top: 5px solid #d4af37; /* Garis Pembatas Atas Warna Emas */
}

.login-brand {
    font-size: 28px;
    font-weight: 900;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.login-brand span { 
    color: #d4af37; 
}

.login-subtitle {
    font-size: 11px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 35px;
}

.form-group {
    text-align: left;
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cccccc;
    background-color: #fcfbf9;
    color: #111111;
    font-size: 14px;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: #d4af37;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.btn-login {
    width: 100%;
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #d4af37;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #d4af37;
    color: #111111;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.login-footer {
    margin-top: 30px;
    font-size: 12px;
    color: #888888;
}
.login-footer a { 
    color: #111111; 
    text-decoration: none; 
    font-weight: 700; 
}
.login-footer a:hover { 
    color: #d4af37; 
}
