/* ==============================================================
   JOURNAL PAGE STYLES (NLS AESTHETIC - WHITE & GOLD)
   ============================================================== */

html.dark {
    --bg-main: #0A0A0E;
    --bg-soft: #111115;
    --text-dark: #FFFFFF;
    --text-muted: #A0A0A0;
    --border-light: rgba(197, 160, 89, 0.2);
}
body { transition: background-color 0.4s ease, color 0.4s ease; background: var(--bg-main); color: var(--text-dark); margin: 0; }

/* --- GLOBAL RESET ANTI-BOCOR HORIZONTAL --- */
html, body {
    max-width: 100%;
    overflow-x: hidden; /* Memotong semua elemen yang mencoba melar ke kanan */
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box; /* Memastikan padding tidak menambah ukuran elemen */
}

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.section-separator { width: 90%; height: 1px; background: linear-gradient(to right, transparent, var(--border-light), transparent); margin: 20px auto; }
.loader-text { text-align: center; color: var(--gold-primary); font-style: italic; grid-column: 1/-1; padding: 40px 0; }

/* --- NAVBAR (KONSISTEN DENGAN HOMEPAGE) --- */
.navbar { position: fixed; top: 0; left: 0; width: 100%; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid transparent; z-index: 9999; transition: all 0.4s ease; box-sizing: border-box; }
.navbar.scrolled { background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid rgba(197, 160, 89, 0.15); padding: 15px 5%; }
html.dark .navbar { background: rgba(10, 10, 14, 0.8); } html.dark .navbar.scrolled { background: rgba(10, 10, 14, 0.98); }
.logo { font-family: var(--font-serif); font-size: 1.6rem; letter-spacing: 2px; font-weight: 700; color: var(--gold-primary); }

.nav-links { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { text-decoration: none; color: var(--text-dark); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.nav-links a:hover { color: var(--gold-primary); }

.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-cart-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(197, 160, 89, 0.1); color: var(--text-dark); transition: 0.3s; }
.nav-cart-icon:hover { background: var(--gold-primary); color: #FFF; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--gold-primary); color: #FFF; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #FFF; }
html.dark .cart-badge { border-color: #0A0A0E; color: #000; }

.btn-nav-pill { background: var(--text-dark); color: var(--bg-main) !important; padding: 10px 24px; text-decoration: none; border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: 0.3s; border: 1px solid var(--text-dark); }
.btn-nav-pill:hover { background: var(--gold-primary); border-color: var(--gold-primary); color: #FFF !important; box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3); }

/* IKON LOGIN MOBILE (Sembunyikan di Desktop) */
.mobile-login-icon { display: none; color: var(--text-dark); transition: 0.3s; }
.mobile-login-icon:hover { color: var(--gold-primary); }

/* HAMBURGER MENU */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 25px; height: 2px; background: var(--text-dark); transition: 0.3s; }

/* === RESPONSIVE LAYAR MEDIUM / TABLET === */
@media (max-width: 992px) {
    .btn-nav-pill { display: none !important; }
    
    /* Menghapus margin-right yang mendorong hamburger keluar layar */
    .mobile-login-icon { display: flex; align-items: center; justify-content: center; } 
    .mobile-menu-btn { display: flex; }
    
    .nav-right { gap: 15px; } /* Kurangi sedikit celah antar ikon */
    
    /* PERBAIKAN MUTLAK DROPDOWN MENU */
    .nav-links { 
        display: flex !important; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column; 
        align-items: center;
        padding: 30px 5%; 
        border-bottom: 1px solid var(--border-light, #E5E7EB);
        gap: 25px;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.05);
        z-index: 999; 
    }
    
    html.dark .nav-links { background: rgba(10, 10, 14, 0.98); }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* === RESPONSIVE LAYAR HP KECIL === */
@media (max-width: 768px) {
    .nav-right { gap: 12px; } /* Rapatkan lagi di HP kecil agar tidak tumpah ke luar layar */
    .navbar { padding: 15px 5%; }
}

/* --- HERO JOURNAL --- */
.journal-page-wrapper { padding-top: 100px; min-height: 100vh; }
.journal-hero { position: relative; padding: 80px 5% 40px; text-align: center; }
.hero-glow-gold { position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(circle, rgba(197, 160, 89, 0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.journal-hero-content { max-width: 800px; margin: 0 auto; position: relative; z-index: 2; }
.journal-badge { display: inline-block; background: rgba(197, 160, 89, 0.1); color: var(--gold-primary); padding: 5px 14px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.journal-main-title { font-family: var(--font-serif); font-size: 3.5rem; color: var(--text-dark); margin-bottom: 20px; line-height: 1.1; }
.journal-subtitle { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }

/* --- FILTER & SEARCH HUD --- */
.journal-filter-section { padding: 10px 5%; }
.filter-hub-container { max-width: 1000px; margin: 0 auto; background: var(--bg-soft); border: 1px solid var(--border-light); border-radius: 16px; padding: 25px; }

.search-bar-wrapper { position: relative; margin-bottom: 20px; }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--gold-primary); }
.search-bar-wrapper input { width: 100%; height: 50px; background: var(--bg-main); border: 1px solid var(--border-light); border-radius: 50px; padding: 10px 20px 10px 55px; font-family: var(--font-sans); font-size: 0.95rem; color: var(--text-dark); transition: 0.3s; }
.search-bar-wrapper input:focus { outline: none; border-color: var(--gold-primary); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1); }

/* Category Tab Pillage */
.journal-categories-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.category-tab { background: var(--bg-main); border: 1px solid var(--border-light); color: var(--text-dark); padding: 8px 18px; border-radius: 50px; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.3s; }
.category-tab:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.category-tab.active { background: #111; color: var(--gold-primary); border-color: #111; }
html.dark .category-tab.active { background: var(--gold-primary); color: #000; border-color: var(--gold-primary); }

/* --- DAFTAR ARTIKEL (3 KOLOM) --- */
.journal-grid-section { padding: 40px 5% 120px; }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }

.journal-card { background: var(--bg-main); border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 25px rgba(0,0,0,0.02); transition: 0.4s; }
.journal-card:hover { transform: translateY(-8px); border-color: var(--gold-primary); box-shadow: 0 15px 35px rgba(197, 160, 89, 0.1); }

.j-card-img-wrap { width: 100%; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; cursor: pointer; }
.j-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.journal-card:hover .j-card-img { transform: scale(1.04); }

.j-card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.j-card-badge { display: inline-block; color: var(--gold-primary); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.j-card-title { font-family: var(--font-serif); font-size: 1.4rem; color: var(--text-dark); margin-bottom: 12px; line-height: 1.3; font-weight: 600; cursor: pointer; transition: color 0.3s; }
.j-card-title:hover { color: var(--gold-primary); }
.j-card-snippet { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.j-card-footer { border-top: 1px solid var(--border-light); padding-top: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-muted); }
.btn-read-j { color: var(--text-dark); font-weight: 600; text-decoration: none; cursor: pointer; transition: color 0.3s; }
.journal-card:hover .btn-read-j { color: var(--gold-primary); }

/* --- MAIN MODAL BACA JURNAL UTUH --- */
.journal-content-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background: var(--bg-main); padding: 40px; border-radius: 20px; z-index: 100001; width: 90%; max-width: 750px; max-height: 85vh; overflow-y: auto; opacity: 0; visibility: hidden; transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); border: 1px solid var(--border-light); box-shadow: 0 30px 60px rgba(0,0,0,0.2); }
.journal-content-modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.j-modal-badge { display: inline-block; background: rgba(197, 160, 89, 0.1); color: var(--gold-primary); padding: 5px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; }
.j-modal-title { font-family: var(--font-serif); font-size: 2.4rem; color: var(--text-dark); margin-bottom: 10px; line-height: 1.2; font-weight: 600; }
.j-modal-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 25px; }
.j-modal-cover-wrap { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; margin-bottom: 30px; border: 1px solid var(--border-light); }
.j-modal-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.j-modal-body-text { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-dark); line-height: 1.8; text-align: justify; padding-right: 5px; }
.j-modal-body-text p { margin-bottom: 20px; }

/* SIDE CART & FOOTER RE-USE (COMPATIBLE) */
.nls-complex-footer { border-top: 1px solid var(--border-light); background: var(--bg-main); color: var(--text-dark); }
.footer-container-fluid { width: 100%; padding: 80px 5% 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 50px; margin-bottom: 60px; }
.footer-heading-serif { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 600; margin-bottom: 15px; color: var(--text-dark); letter-spacing: -0.5px; }
.footer-text { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; line-height: 1.6; max-width: 90%; }
.newsletter-form { position: relative; max-width: 100%; }
.newsletter-input { width: 100%; height: 50px; border-radius: 50px; border: 1px solid var(--border-light); background: transparent; padding: 10px 60px 10px 20px; font-size: 0.9rem; color: var(--text-dark); transition: 0.3s; }
.newsletter-input:focus { outline: none; border-color: var(--gold-primary); }
.newsletter-btn { position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; border-radius: 50%; background: var(--text-dark); color: var(--bg-main); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; }
.newsletter-btn:hover { background: var(--gold-primary); color: #FFF; transform: scale(1.05); }
.footer-heading { font-size: 1.1rem; font-weight: 600; margin-bottom: 25px; color: var(--text-dark); }
.footer-nav { display: flex; flex-direction: column; gap: 15px; }
.footer-nav a, .footer-address p { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; line-height: 1.5; }
.footer-nav a:hover { color: var(--gold-primary); }
.social-links { display: flex; gap: 12px; margin-bottom: 30px; }
.social-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-light); color: var(--text-muted); transition: 0.3s; text-decoration: none; }
.social-btn:hover { background: var(--gold-primary); color: #FFF; border-color: var(--gold-primary); transform: translateY(-3px); }
.theme-toggle-wrapper { display: flex; align-items: center; gap: 15px; }
.theme-icon { color: var(--text-muted); }
.theme-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(197, 160, 89, 0.2); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: var(--gold-primary); transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #111; }
html.dark input:checked + .slider { background-color: var(--gold-primary); }
html.dark input:checked + .slider:before { background-color: #111; }
input:checked + .slider:before { transform: translateX(22px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-light); padding-top: 30px; }
.copyright { color: var(--text-muted); font-size: 0.9rem; }
.legal-nav { display: flex; gap: 30px; }
.legal-link { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; transition: 0.3s; cursor: pointer; }
.legal-link:hover { color: var(--gold-primary); }

/* SIDE CART PANEL */
.side-cart { position: fixed; top: 0; right: -450px; width: 100%; max-width: 400px; height: 100vh; background: var(--bg-main); z-index: 10001; box-shadow: -10px 0 40px rgba(0,0,0,0.15); display: flex; flex-direction: column; transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.side-cart.active { right: 0; }
.side-cart-header { padding: 25px 30px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; }
.side-cart-header h3 { font-family: var(--font-serif); font-size: 1.4rem; color: var(--text-dark); margin: 0; }
.side-cart-items { padding: 25px 30px; flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.side-cart-item { display: flex; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.side-cart-img { width: 70px; height: 95px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-light); }
.side-cart-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.side-cart-title { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.side-cart-price { font-size: 0.9rem; font-weight: 600; color: var(--gold-primary); margin-bottom: 10px; }
.btn-remove-item { background: transparent; border: none; color: #d9534f; font-size: 0.8rem; font-weight: 600; text-align: left; padding: 0; cursor: pointer; }
.side-cart-footer { padding: 30px; background: var(--bg-soft); border-top: 1px solid var(--border-light); }
.side-cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 1.1rem; color: var(--text-muted); }
.side-cart-total strong { font-size: 1.4rem; color: var(--text-dark); }
.btn-checkout-full { display: block; background: var(--text-dark); color: var(--bg-main); text-align: center; padding: 16px; border-radius: 8px; font-weight: 600; font-size: 1rem; text-decoration: none; transition: 0.3s; border: 1px solid var(--text-dark); }
.btn-checkout-full:hover { background: var(--gold-primary); border-color: var(--gold-primary); color: #FFF; box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2); }
.close-cart { background: transparent; border: none; font-size: 2rem; color: var(--text-muted); cursor: pointer; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .nav-links { display: none; } .mobile-menu-btn { display: flex; }
    .journal-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
    .journal-grid { grid-template-columns: 1fr; }
    .journal-main-title { font-size: 2.4rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .journal-content-modal { padding: 25px 20px; }
    .j-modal-title { font-size: 1.8rem; }
}

