/*
Theme Name: eNews
Theme URI: https://musoffaasad.com
Author: Musoffa
Description: Tema portal berita modern, ringan, dan sangat cepat.
Version: 1.0.0
Text Domain: enews
*/

/* Reset Dasar Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* =========================================================
   STYLE BACA JUGA: MODERN MINIMALIST (PREMIUM)
   ========================================================= */

.inline-related-post {
    margin: 40px 0;
    padding: 20px 0; /* Tanpa padding samping biar sejajar teks */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: all 0.3s ease;
}

/* Label "BACA JUGA" dengan gaya Badge Kecil */
.related-label {
    display: inline-block;
    width: fit-content;
    background: #cc0000;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 2px;
    margin-bottom: 5px;
}

/* Gaya Judul Artikel */
.related-link {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 20px; /* Ukuran lebih besar agar dominan */
    font-weight: 800;
    color: #111 !important;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s ease;
}

/* Efek saat Disentuh */
.inline-related-post:hover {
    border-top-color: #cc0000;
    border-bottom-color: #cc0000;
    padding-left: 10px; /* Sedikit geser ke kanan saat hover */
}

.related-link:hover {
    color: #cc0000 !important;
}

/* Tambahan: Ikon Panah di Akhir Judul (Optional) */
.related-link::after {
    content: " →";
    opacity: 0;
    transition: all 0.3s ease;
    display: inline-block;
    transform: translateX(-10px);
}

.inline-related-post:hover .related-link::after {
    opacity: 1;
    transform: translateX(5px);
}

/* Responsif Mobile */
@media screen and (max-width: 767px) {
    .inline-related-post {
        margin: 30px 0;
        padding: 15px 0;
    }
    .related-link {
        font-size: 17px;
    }
}

/* Container Iklan Global */
.ad-container { text-align: center; margin: 20px auto; overflow: hidden; }

/* 1. Iklan Melayang Footer */
.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 728px;
    text-align: center;
}
.ad-close {
    position: absolute;
    top: -25px;
    right: 0;
    background: #111;
    color: #fff;
    border: none;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 16px;
}

/* 2. Iklan Melayang Kanan Kiri (Desktop Only) */
.ad-side-fixed {
    position: fixed;
    top: 150px;
    z-index: 100;
}
.ad-left { left: 10px; }
.ad-right { right: 10px; }

/* 3. Iklan Parallax (Tengah Halaman) */
.ad-parallax-wrap {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f9f9f9;
    margin: 40px 0;
}
.ad-parallax-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px; /* Lebih tinggi dari container */
    display: flex;
    justify-content: center;
    align-items: center;
    clip: rect(0, auto, auto, 0); /* Trick parallax sederhana */
}

/* 4. Iklan dalam artikel */
.ad-in-article { margin: 30px 0; text-align: center; }

/* Responsive: Sembunyikan iklan samping di layar kecil */
@media screen and (max-width: 1200px) {
    .ad-side-fixed { display: none; }
}

/* =========================================================
   MEMBERIKAN JARAK PADA IKLAN BAWAH HEADER
   ========================================================= */

/* Sesuaikan jarak iklan agar tidak membuat header terlihat melompong */
.ad-header-bottom {
    margin-top: 20px !important; /* Kurangi dari 30px ke 15px */
    margin-bottom: none; !important;
}

/* Opsional: Jika ingin memberi garis tipis pembatas agar lebih rapi */
/* .ad-header-bottom {
    padding-bottom: 20px;
    border-bottom: 1px solid #f2f2f2;
} 
*/

/* =========================================================
   PENGATURAN UKURAN LOGO (DESKTOP & MOBILE)
   ========================================================= */

/* 1. Desktop Branding */
.site-branding .custom-logo-link img {
    max-height: 35px; /* Sesuaikan angka ini (misal: 45px - 60px) */
    width: auto;      /* Biarkan lebar menyesuaikan secara proporsional */
    display: block;
    transition: all 0.3s ease;
}

/* 2. Mobile Branding */
.site-branding-mobile .custom-logo-link img {
    max-height: 25px; /* Sedikit lebih kecil agar hemat ruang di HP */
    width: auto;
    display: block;
}

/* Penyesuaian Spasi: Menghilangkan margin bawaan link logo */
.custom-logo-link {
    display: inline-block;
    padding: 0;
    margin: 0;
    line-height: 0;
}

/* iklan dibawah header mobile */
@media screen and (max-width: 767px) {
	.ad-header-bottom {
    margin-top: 10px !important; /* Kurangi dari 30px ke 15px */
    margin-bottom: -10px !important;
	}
}	

/* =========================================================
   DROPDOWN MENU: CLEAN & MINIMALIST
   ========================================================= */

/* Pastikan parent menu memiliki posisi relatif */
.nav-menu-desktop li {
    position: relative;
    list-style: none;
}

/* 1. Sembunyikan Sub-Menu Secara Default */
.nav-menu-desktop .sub-menu {
    position: absolute;
    top: 100%;       /* Muncul tepat di bawah menu utama */
    left: 0;
    width: 200px;    /* Lebar kotak dropdown */
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* Efek bayangan halus */
    padding: 10px 0;
    margin: 0;
    display: none;    /* Sembunyikan dulu */
    z-index: 9999;
    border-top: 3px solid #cc0000; /* Garis merah ciri khas News 12 */
}

/* =========================================================
   FIX: HIDE DROPDOWN UNTIL HOVER
   ========================================================= */

/* 1. SEMBUNYIKAN TOTAL saat kondisi normal */
.nav-menu-desktop .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 10px 0;
    margin: 0;
    z-index: 9999;
    border-top: 3px solid #cc0000;
    
    /* KUNCI: Sembunyikan secara visual dan sistem */
    display: none !important; 
    visibility: hidden;
    opacity: 0;
    pointer-events: none; /* Biar nggak bisa diklik pas ngumpet */
    
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

/* 2. TAMPILKAN HANYA saat parent (li) di-hover */
.nav-menu-desktop li:hover > .sub-menu {
    display: block !important;
    visibility: visible;
    opacity: 1;
    pointer-events: auto; /* Aktifkan klik kembali */
    transform: translateY(0);
}

/* 3. Style tambahan untuk teks di dalamnya agar rapi */
.nav-menu-desktop .sub-menu li {
    width: 100%;
    text-align: left;
}

.nav-menu-desktop .sub-menu li a {
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    display: block;
    font-weight: 500;
}

.nav-menu-desktop .sub-menu li a:hover {
    background: #fcfcfc;
    color: #cc0000;
}
/* 3. Style Link di Dalam Sub-Menu */
.nav-menu-desktop .sub-menu li a {
    padding: 10px 20px;
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-transform: none; /* Jangan huruf besar semua agar bersih */
    border: none;
    transition: background 0.2s;
}

.nav-menu-desktop .sub-menu li a:hover {
    background: #f9f9f9;
    color: #cc0000;
}

/* Animasi Fade In */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}