/* --- VARIABLES --- */
:root {
    --primary: #10b981; 
    --primary-dark: #047857;
    --accent-pop: #f59e0b; 
    
    --hero-bg: #bbf7d0; 
    --footer-bg: #016c49; 
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-light: rgba(0,0,0,0.08);
    
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.98);

    --container-width: 1200px;
    --radius-lg: 24px;
    --radius-md: 16px;
}

.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --hero-bg: #131c31;
    --footer-bg: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-light: rgba(255,255,255,0.08);
    --navbar-scrolled-bg: rgba(15, 23, 42, 0.98);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 130px; /* Jarak aman agar judul tidak ketutup navbar */
}

body { 
    font-family: 'Dosis', sans-serif; 
    font-weight: 400; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.6; 
    transition: background 0.3s, color 0.3s; 
    overflow-x: hidden;
    letter-spacing: 0.5px; 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- NAVBAR --- */
.navbar { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1rem 0; background: transparent; transition: all 0.4s ease; }
.navbar.scrolled { background: var(--navbar-scrolled-bg); box-shadow: 0 4px 25px rgba(0,0,0,0.05); }

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 600; color: var(--text-muted); font-size: 1.1rem; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 3px; bottom: -5px; left: 0; background-color: var(--primary); transition: width 0.3s; border-radius: 3px;}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 20px; }

/* Social Nav */
.social-nav { display: flex; gap: 15px; margin-right: 5px; }
.social-nav a { color: var(--text-muted); font-size: 1.25rem; transition: 0.3s; }
.social-nav a:hover { color: var(--primary); transform: translateY(-3px); }

/* Tombol Cari di Navbar */
.nav-search-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: 0.3s;
    padding: 8px;
    border-radius: 50%;
}
.nav-search-btn:hover { color: var(--primary); background: rgba(0,0,0,0.05); }

/* Hamburger Menu (Hidden on Desktop) */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger .bar { width: 25px; height: 3px; background-color: var(--text-main); border-radius: 5px; transition: 0.3s; }

/* Mobile Menu Container */
.mobile-menu {
    position: fixed; top: 70px; left: 0; width: 100%; 
    background: var(--navbar-scrolled-bg);
    padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: flex; flex-direction: column; gap: 15px; text-align: center;
    transform: translateY(-150%); transition: transform 0.4s ease;
    z-index: 999;
}
.mobile-menu.active { transform: translateY(0); }
.mobile-menu a { font-weight: 700; font-size: 1.1rem; padding: 10px; border-bottom: 1px solid var(--border-light); }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #64748b; transition: .4s; border-radius: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; z-index: 2; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
input:checked + .slider { background-color: var(--accent-pop); }
.dark-mode input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }
.sun-icon { color: #f59e0b; font-size: 12px; }
.moon-icon { color: #f1f5f9; font-size: 12px; }

/* --- HERO SECTION --- */
.hero-section {
    padding-top: 75px; 
    background-color: var(--hero-bg);
    border-bottom-left-radius: 60px; border-bottom-right-radius: 60px;
    margin-bottom: 5rem; position: relative;
    display: flex; align-items: center;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; width: 100%; }

/* FOTO PROFIL AVATAR */
.hero-avatar {
    width: 110px; height: 110px;
    border-radius: 50%; border: 4px solid white; 
    overflow: hidden; margin-bottom: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background-color: white; 
    animation: floatAvatar 6s ease-in-out infinite;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@keyframes floatAvatar { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }

/* Teks Hero */
.hero-text h1 { font-size: 3.2rem; line-height: 1.1; margin: 1rem 0; font-weight: 800; letter-spacing: -1px; } 
.badge-hero { background: white; color: var(--primary-dark); padding: 6px 16px; border-radius: 30px; font-size: 0.9rem; font-weight: 700; display: inline-block; box-shadow: 0 4px 15px rgba(0,0,0,0.05);}
.dark-mode .badge-hero { background: rgba(255,255,255,0.1); color: var(--primary); }
.text-gradient { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1rem; max-width: 95%; font-weight: 400; } 

.hero-card { position: relative; }
.featured-card { display: block; height: 380px; width: 100%; background-size: cover; background-position: center; border-radius: var(--radius-lg); position: relative; overflow: hidden; box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3); transition: transform 0.4s;}
.featured-card:hover { transform: scale(1.02); }
.overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 15%, transparent); width: 100%; height: 100%; padding: 2rem; color: white; display: flex; flex-direction: column; justify-content: flex-end;}
.tag-featured { background: var(--accent-pop); color: white; padding: 5px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; display: inline-block; }
.featured-content h3 { font-size: 1.8rem; margin: 5px 0; line-height: 1.2; color: white; font-weight: 700; }
.featured-content p { color: rgba(255,255,255,0.85); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; }

/* --- BLOG & PAGINATION --- */
.blog-section { margin-bottom: 0; }
.section-header { margin-bottom: 3rem; text-align: center; }
.section-header h2 { font-size: 2rem; font-weight: 800; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-light); transition: 0.4s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.03);}
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.img-placeholder { height: 200px; background: linear-gradient(45deg, var(--hero-bg), var(--primary)); opacity: 0.8; }
.card-body { padding: 1.5rem; }
.card-meta { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); font-weight: 600;}
.tag { color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px;}
.card h3 { font-size: 1.4rem; margin-bottom: 0.8rem; line-height: 1.35; font-weight: 700; }
.read-more { color: var(--primary); font-weight: 700; font-size: 1rem; display: inline-block; margin-top: 1rem;}

/* Pagination */
.pagination-container { display: flex; justify-content: center; gap: 10px; margin-top: 4rem; margin-bottom: 4rem; }
.page-link { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--border-light); color: var(--text-muted); font-weight: 700; transition: all 0.3s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);}

/* --- MODAL --- */
.search-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(15px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.search-modal.show { display: flex; opacity: 1; }
.close-modal { position: fixed; top: 30px; right: 40px; color: white; font-size: 3.5rem; cursor: pointer; transition: 0.3s; z-index: 2001; line-height: 1;}
.close-modal:hover { transform: scale(1.1); color: var(--accent-pop); }
.modal-content { background: transparent; text-align: center; width: 90%; max-width: 750px; transform: scale(0.9); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.search-modal.show .modal-content { transform: scale(1); }
.modal-content h2 { color: white; font-size: 2.5rem; margin-bottom: 2.5rem; font-weight: 800; }
.modal-search-box { background: white; padding: 25px 35px; border-radius: 80px; display: flex; align-items: center; box-shadow: 0 25px 60px rgba(0,0,0,0.4); }
.modal-search-box i { font-size: 1.8rem; color: var(--text-muted); margin-right: 20px; }
.modal-search-box input { border: none; outline: none; font-size: 1.6rem; width: 100%; font-family: inherit; color: var(--text-main); font-weight: 600;}

/* --- FOOTER --- */
footer {
    background-color: var(--footer-bg); padding: 3rem 0; text-align: center; color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.05); border-top-left-radius: 60px; border-top-right-radius: 60px; margin-top: 2rem; 
}
.footer-quote { font-size: 1.2rem; color: #a4f2cd; margin-bottom: 2rem; font-weight: 500; }
.footer-links { margin-bottom: 1.5rem; font-size: 1rem; font-weight: 600; }
.footer-links a:hover { color: var(--primary); }
.footer-identity { font-size: 1.1rem; opacity: 0.9; color: #fff; margin-bottom: 1rem; font-weight: 400;}
.footer-identity span { color: #a4f2cd; font-size: 0.95rem; opacity: 0.8;}
.copyright { color: #a4f2cd; font-size: 0.9rem; opacity: 0.5; }

/* Utilities (FIX PADDING) */
.container { 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 80px; /* Padding Desktop Diperlebar agar ke tengah */
}

/* ========================================= */
/* --- MEDIA QUERIES (MOBILE RESPONSIVE) --- */
/* ========================================= */
@media (max-width: 768px) {
    .desktop-menu { display: none; }
    .hamburger { display: flex; }
    
    /* Padding Mobile jangan terlalu lebar agar muat konten */
    .container { padding: 0 25px; } 

    /* HEADER MOBILE: Rapatkan gap agar muat */
    .nav-actions { gap: 10px; }
    
    /* SOSIAL MEDIA: Tetap Muncul di HP, tapi kecilkan gap */
    .social-nav { display: flex; gap: 8px; margin-right: 0; }
    .social-nav a { font-size: 1.1rem; }

    /* FOOTER MOBILE: Buat Mendatar (Wrap) */
    .footer-links { 
        display: flex; 
        flex-direction: row;    /* Mendatar */
        flex-wrap: wrap;        /* Turun baris jika penuh */
        justify-content: center; 
        gap: 15px; 
    } 
    
    /* Hero Adjustments */
    .hero-section {
        padding-top: 100px; padding-bottom: 50px;
        border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
        height: auto; 
    }
    .hero-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .hero-avatar { margin: 0 auto 20px; }
    .hero-text h1 { font-size: 2.5rem; }
    .blog-grid { grid-template-columns: 1fr; }
}

/* --- HALAMAN ARSIP & FILTER --- */
.archive-header {
    padding-top: 140px; padding-bottom: 60px;
    text-align: center;
    background-color: var(--hero-bg);
    border-bottom-left-radius: 60px; border-bottom-right-radius: 60px;
    margin-bottom: 4rem;
}

.archive-header h1 { font-size: 3rem; margin-bottom: 10px; font-weight: 800; }
.archive-header p { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 2rem; }

/* Filter Box Modern */
.filter-box {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    position: relative;
    display: flex; align-items: center;
}

.filter-group i {
    position: absolute; left: 15px; color: var(--primary); font-size: 1rem;
    pointer-events: none; 
    z-index: 10; /* Pastikan ikon selalu di atas */
}

.filter-group select {
    appearance: none; 
    background-color: var(--bg-body); /* Warna dasar sesuai tema */
    border: 2px solid transparent;
    padding: 10px 20px 10px 40px; 
    border-radius: 30px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main); /* Teks menyesuaikan tema */
    cursor: pointer;
    transition: 0.3s;
    min-width: 160px;
}

/* PERBAIKAN UTAMA DI SINI */
.filter-group select:hover, .filter-group select:focus {
    background-color: var(--bg-card); /* Ganti 'white' menjadi variable tema */
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.1);
}

/* Pastikan Pilihan (Option) di dalam Dropdown juga gelap saat Dark Mode */
.filter-group select option {
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 10px;
}

/* Tombol Reset Filter (X) */
.btn-reset {
    background: #ef4444; color: white;
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: 0.3s;
}
.btn-reset:hover { transform: rotate(90deg); background: #dc2626; }

/* Empty State (Jika tidak ada hasil) */
.empty-state {
    text-align: center; padding: 4rem 1rem; color: var(--text-muted);
}
.empty-state i { font-size: 4rem; color: #cbd5e1; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 0.5rem; }

/* Mobile Responsif untuk Filter */
@media (max-width: 768px) {
    .filter-box {
        flex-direction: column; /* Filter turun ke bawah di HP */
        padding: 20px;
        border-radius: 20px;
        width: 100%;
    }
    .filter-group, .filter-group select { width: 100%; }
}

/* --- HALAMAN STATIS (About, Guestbook, dll) --- */
.static-hero {
    /* PENTING: Padding besar agar lolos dari Navbar Fixed */
    padding-top: 140px; /* <--- DISAMAKAN DENGAN DAFTAR ISI */
    padding-bottom: 60px;
    background-color: var(--hero-bg); 
    text-align: center;
    border-bottom-left-radius: 60px; /* <--- DISAMAKAN JADI 60px */
    border-bottom-right-radius: 60px;
    margin-bottom: 4rem;
}

.static-hero h1 { font-size: 3rem; font-weight: 800; margin-top: 10px; margin-bottom: 10px; }
.static-hero p { color: var(--text-muted); font-size: 1.2rem; }

.static-content {
    margin-bottom: 5rem;
    min-height: 40vh; /* Agar footer tidak naik ke tengah jika isi dikit */
}

.content-box {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border-light);
    max-width: 800px;
    margin: 0 auto; /* Tengah */
}

.content-box h3 { font-size: 1.8rem; margin-bottom: 1rem; color: var(--primary-dark); }
.content-box p { margin-bottom: 1rem; font-size: 1.1rem; color: var(--text-muted); }
.content-box ul { margin-left: 20px; margin-bottom: 2rem; }
.content-box li { margin-bottom: 10px; color: var(--text-main); }

/* Placeholder kotak komentar */
.placeholder-comment {
    background: #f1f5f9; padding: 2rem; 
    border-radius: 10px; text-align: center; border: 2px dashed #cbd5e1;
}

/* Responsif HP untuk Halaman Statis */
@media (max-width: 768px) {
    .static-hero { padding-top: 120px; padding-bottom: 40px; border-radius: 0 0 30px 30px; }
    .static-hero h1 { font-size: 2.2rem; }
    .content-box { padding: 1.5rem; }
}

/* ========================================= */
/* --- DASHBOARD ADMIN STYLES --- */
/* ========================================= */

.admin-body {
    display: flex;
    background-color: #f1f5f9; /* Abu-abu muda untuk background admin */
    min-height: 100vh;
}

/* --- SIDEBAR (FIX SCROLL) --- */
.sidebar {
    width: 260px;
    background: #ffffff;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    border-right: 1px solid rgba(0,0,0,0.05);
    display: flex; flex-direction: column; /* Susun atas-bawah */
    z-index: 100;
    overflow: hidden; /* Hilangkan scrollbar di container utama */
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    /* KUNCI: Agar header tidak ikut mengecil/scroll */
    flex-shrink: 0; 
    background: #ffffff;
    z-index: 2;
}
.sidebar-header h3 { font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.sidebar-header span { color: var(--primary); }

.sidebar-menu { 
    padding: 1.5rem; 
    flex-grow: 1; /* Isi sisa ruang kosong */
    
    /* KUNCI: Aktifkan scroll hanya di area menu ini */
    overflow-y: auto; 
    
    /* Pemanis Scrollbar (Chrome/Safari) */
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 transparent;
}

/* Custom Scrollbar Webkit */
.sidebar-menu::-webkit-scrollbar { width: 5px; }
.sidebar-menu::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }

.sidebar-menu li { margin-bottom: 0.5rem; }

.sidebar-menu a {
    display: flex; align-items: center; gap: 15px;
    padding: 12px 20px; border-radius: 12px;
    color: var(--text-muted); font-weight: 600; font-size: 1rem;
    transition: 0.3s;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--hero-bg); color: var(--primary-dark);
}
.sidebar-menu i { width: 20px; text-align: center; }

/* --- SIDEBAR FOOTER (STICKY LOGOUT) --- */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #ffffff;
    /* Ini memastikan footer tidak ikut mengecil */
    flex-shrink: 0; 
    z-index: 2;
}

.btn-logout-sidebar {
    display: flex; align-items: center; gap: 15px;
    padding: 12px 20px; border-radius: 12px;
    color: #ef4444; /* Warna Merah */
    font-weight: 700; font-size: 1rem;
    transition: 0.3s;
    background: #fef2f2; /* Background Merah Sangat Muda */
    width: 100%;
    text-decoration: none;
}

.btn-logout-sidebar:hover {
    background: #dc2626; 
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
}

.logout-link { margin-top: auto; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 1rem; }
.logout-link a:hover { background: #fef2f2; color: #ef4444; }

/* --- ADMIN CONTENT --- */
.admin-content {
    margin-left: 260px; /* Geser konten ke kanan sebesar lebar sidebar */
    padding: 2rem 3rem;
    width: 100%;
}

.admin-topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 3rem;
}
.btn-view-site {
    background: white; padding: 10px 20px; border-radius: 30px;
    font-size: 0.9rem; font-weight: 700; color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.05);
}
.btn-view-site:hover { color: var(--primary); transform: translateY(-2px); }

/* STATS CARDS */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem; margin-bottom: 3rem;
}
.stat-card {
    background: white; padding: 1.5rem; border-radius: 20px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.stat-icon {
    width: 60px; height: 60px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-info h3 { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 5px; }
.stat-info p { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

/* DATA TABLE */
.data-table-container {
    background: white; border-radius: 20px; padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.btn-add-new {
    background: var(--primary); color: white; padding: 10px 20px;
    border-radius: 30px; font-weight: 700; font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}
.btn-add-new:hover { background: var(--primary-dark); transform: translateY(-2px); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 15px; color: var(--text-muted); border-bottom: 2px solid #f1f5f9; }
.admin-table td { padding: 15px; border-bottom: 1px solid #f1f5f9; color: var(--text-main); font-size: 0.95rem; }
.admin-table tr:last-child td { border-bottom: none; }

.badge-cat {
    background: #f1f5f9; padding: 5px 10px; border-radius: 5px;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted);
}

.action-buttons { display: flex; gap: 10px; }
.btn-action {
    width: 35px; height: 35px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.edit { background: #e0f2fe; color: #0284c7; }
.edit:hover { background: #0284c7; color: white; }
.delete { background: #fee2e2; color: #dc2626; }
.delete:hover { background: #dc2626; color: white; }

/* --- ADMIN DASHBOARD EXTRAS (Search & Pagination) --- */

/* Header Tabel jadi Flexbox agar Search di kanan */
.table-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 15px;
}
.left-head { display: flex; align-items: center; gap: 15px; }

/* Admin Search Bar */
.admin-search {
    display: flex; align-items: center; background: #f8fafc;
    border-radius: 30px; padding: 5px 5px 5px 15px;
    border: 1px solid #e2e8f0;
}
.admin-search input {
    border: none; background: transparent; outline: none;
    font-size: 0.9rem; color: var(--text-main); width: 200px;
}
.admin-search button {
    background: var(--primary); color: white; border: none;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    transition: 0.3s; display: flex; align-items: center; justify-content: center;
}
.admin-search button:hover { background: var(--primary-dark); }

/* Admin Pagination */
.admin-pagination {
    display: flex; justify-content: flex-end; gap: 5px; margin-top: 20px;
    padding-top: 15px; border-top: 1px solid #f1f5f9;
}
.p-btn {
    padding: 6px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
    color: var(--text-muted); background: #f8fafc; border: 1px solid #e2e8f0;
    transition: 0.3s;
}
.p-btn:hover { border-color: var(--primary); color: var(--primary); }
.p-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .table-header-row { flex-direction: column; align-items: flex-start; }
    .admin-search { width: 100%; }
    .admin-search input { width: 100%; }
    .admin-pagination { justify-content: center; }
}

/* --- FILTER TOOLBAR ADMIN --- */
.filter-toolbar {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}

/* Style Dropdown Select */
.select-wrapper select {
    font-family: 'Dosis', sans-serif;
    appearance: none;
    background-color: white;
    border: 1px solid #e2e8f0;
    padding: 8px 30px 8px 15px; /* Kanan lebar utk panah */
    border-radius: 20px;
    font-size: 0.9rem; color: var(--text-muted); font-weight: 600;
    cursor: pointer; outline: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
}
.select-wrapper select:hover, .select-wrapper select:focus {
    border-color: var(--primary); color: var(--text-main);
}

/* Style Search Input */
.search-wrapper {
    font-family: 'Dosis', sans-serif; display: flex; align-items: center; background: white;
    border-radius: 20px; padding: 5px 5px 5px 15px;
    border: 1px solid #e2e8f0;
}
.search-wrapper input {
    font-family: 'Dosis', sans-serif; border: none; outline: none; font-size: 0.9rem; 
    color: var(--text-main); width: 150px;
}
.search-wrapper button {
    background: var(--primary); color: white; border: none;
    width: 28px; height: 28px; border-radius: 50%; 
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Tombol Reset (X) */
.btn-reset-filter {
    color: #ef4444; font-size: 1.1rem; padding: 0 5px; transition: 0.3s;
}
.btn-reset-filter:hover { transform: rotate(90deg); color: #dc2626; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .filter-toolbar { width: 100%; flex-direction: column; align-items: stretch; }
    .select-wrapper, .select-wrapper select, .search-wrapper { width: 100%; }
    .search-wrapper input { width: 100%; }
}

/* --- BUKU TAMU STYLES --- */
.guestbook-form {
    background: #f8fafc; padding: 25px; border-radius: 15px;
    border: 1px solid #e2e8f0; margin-top: 20px;
}
.gb-input {
    width: 100%; padding: 12px 15px; border: 1px solid #cbd5e1;
    border-radius: 10px; font-family: inherit; margin-bottom: 15px;
}
.gb-input:focus { outline: none; border-color: var(--primary); background: white; }

.comments-list h4 { margin-bottom: 20px; color: var(--text-main); }
.comment-item {
    display: flex; gap: 15px; margin-bottom: 20px;
    background: white; padding: 15px; border-radius: 15px;
    border: 1px solid #f1f5f9; box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.comment-avatar {
    width: 45px; height: 45px; background: var(--primary); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem; flex-shrink: 0;
}
.comment-content { width: 100%; }
.comment-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 5px;
}
.comment-header strong { font-size: 1rem; color: var(--text-main); }
.comment-header small { color: var(--text-muted); font-size: 0.8rem; }
.comment-content p { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); }

/* Tombol Kirim */
.btn-primary {
    background: var(--primary); color: white; padding: 10px 25px;
    border: none; border-radius: 30px; font-weight: 700; cursor: pointer; transition: 0.3s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* --- FIX SUMMERNOTE MODAL (FINAL) --- */

/* 1. Paksa setiap grup input (kotak isian) punya jarak bawah besar */
.note-form-group {
    margin-bottom: 25px !important; /* Ini kuncinya! Memberi jarak ke elemen di bawahnya */
    display: block !important;
}

/* 2. Tambahan padding untuk container utama modal */
.note-modal-content {
    padding: 20px !important;
    padding-bottom: 30px !important; /* Jarak ekstra di paling bawah */
}

/* 3. Rapikan tombol agar ada di kanan */
.note-modal-footer {
    display: flex !important;
    justify-content: flex-end !important; /* Geser tombol ke kanan */
    margin-top: 10px !important;
}

/* 4. Style tombol Insert agar cantik */
.note-btn-primary {
    background-color: var(--primary) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
}
.note-btn-primary:hover {
    background-color: var(--primary-dark) !important;
}

/* --- ADMIN REPLY STYLE (Buku Tamu) --- */
.admin-reply-box {
    margin-top: 15px;
    background-color: #f0fdf4; /* Hijau sangat muda */
    border-left: 4px solid var(--primary);
    padding: 12px 15px;
    border-radius: 0 8px 8px 0;
}

.reply-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 5px;
    display: flex; align-items: center; gap: 5px;
}

.admin-reply-box p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin: 0;
}

/* ========================================= */
/* --- NEW ARTICLE DESIGN (WOW FACTOR) --- */
/* ========================================= */

/* 1. HERO HEADER SECTION */
.article-hero {
    background-color: #bbf7d0; /* Warna Hijau Muda (Sama dgn Index) */
    padding: 80px 20px 120px;
    text-align: center;
    color: #1e293b; /* Warna Teks Gelap (agar terbaca di hijau muda) */
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    padding-top: 100px; /* Tambah padding atas agar judul tidak ketutup navbar */
}

/* Overlay hanya muncul JIKA ada background image */
.article-hero.has-image::before {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.6); /* Gelapkan gambar */
    z-index: 1;
}

/* Pola background halus (opsional) */
.article-hero::before {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }

/* Jika ada gambar, teks jadi putih */
.article-hero.has-image .article-title,
.article-hero.has-image .meta-top,
.article-hero.has-image .author-meta {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }

.badge-cat-hero {
    background: rgba(255,255,255,0.2); padding: 5px 15px; border-radius: 50px;
    font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px;
    backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.3);
}

.date-hero { margin-left: 15px; font-weight: 600; opacity: 0.9; font-size: 0.9rem; }

.article-title {
    font-size: 3rem; line-height: 1.2; font-weight: 800; margin: 20px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-meta {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px;
}
.author-avatar {
    width: 40px; height: 40px; background: white; color: var(--primary);
    border-radius: 50%; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* 2. FLOATING PAPER CONTENT */
.article-wrapper {
    position: relative; z-index: 10;
    margin-top: -80px; /* Menarik konten ke atas menutupi header */
    padding-bottom: 50px;
}

.paper-content {
    background: white;
    border-radius: 20px;
    padding: 60px 80px; /* Ruang baca lega */
    box-shadow: 0 20px 60px rgba(0,0,0,0.08); /* Bayangan lembut */
    max-width: 900px; margin: 0 auto;
}

/* TYPOGRAPHY ISI ARTIKEL */
.article-body {
    font-family: 'Merriweather', 'Georgia', serif; /* Font Serif enak dibaca */
    font-size: 1.25rem; line-height: 1.9; color: #334155;
}

.article-body p { margin-bottom: 1.5rem; }
.article-body h2, .article-body h3 {
    font-family: 'Dosis', sans-serif; /* Judul tetap pakai font tema */
    color: #0f172a; margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 800;
}
.article-body img {
    max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.article-body blockquote {
    border-left: 5px solid var(--primary); background: #f0fdf4;
    padding: 20px; font-style: italic; margin: 20px 0; border-radius: 0 10px 10px 0;
}

/* Drop Cap (Huruf Pertama Besar) */
.article-body > p:first-of-type::first-letter {
    font-size: 4rem; float: left; line-height: 0.8; margin-right: 15px; margin-top: 5px;
    color: var(--primary); font-family: 'Dosis', sans-serif; font-weight: 800;
}

/* 3. SHARE & EXTRAS */
.share-section {
    text-align: center; margin: 50px 0; padding: 30px;
    background: #f8fafc; border-radius: 15px;
}
.share-icons { display: flex; justify-content: center; gap: 15px; margin-top: 15px; }
.share-btn {
    width: 40px; height: 40px; border-radius: 50%; background: white;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.share-btn:hover { transform: translateY(-3px); color: white; }
.share-btn.fb:hover { background: #1877f2; }
.share-btn.tw:hover { background: #1da1f2; }
.share-btn.wa:hover { background: #25d366; }

.divider-fancy { border: 0; height: 1px; background: #e2e8f0; margin: 40px 0; }

/* 4. COMMENTS SECTION REDESIGN */
.comments-header h3 { font-size: 1.8rem; font-weight: 800; }
.comments-header span { color: var(--primary); }

.comment-form-box {
    background: #f1f5f9; padding: 25px; border-radius: 15px; margin-top: 20px;
}
.comment-form-box .input-group {
    background: white; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 5px 15px; margin-bottom: 15px; display: flex; align-items: center;
}
.comment-form-box input, .comment-form-box textarea {
    border: none; width: 100%; padding: 10px; outline: none; font-family: inherit;
}
.btn-submit-comment {
    background: var(--primary); color: white; padding: 12px 30px; border: none;
    border-radius: 30px; font-weight: 800; cursor: pointer; transition: 0.3s;
}
.btn-submit-comment:hover { background: var(--primary-dark); transform: translateY(-2px); }

.comments-list { margin-top: 40px; }
.comment-card { display: flex; gap: 20px; margin-bottom: 30px; }
.avatar-circle {
    width: 50px; height: 50px; border-radius: 50%; color: white;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
}
.comment-right { flex: 1; }
.comment-meta strong { font-size: 1.1rem; color: #1e293b; display: block; }
.comment-meta small { color: #94a3b8; }
.comment-text { margin-top: 8px; line-height: 1.6; color: #6e7e95; }

.admin-reply {
    margin-top: 15px; background: #ecfdf5; padding: 15px; border-radius: 10px;
    border-left: 3px solid var(--primary);
}
.reply-badge { font-size: 0.8rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 5px; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .article-title { font-size: 2rem; }
    .paper-content { padding: 30px 20px; }
    .article-body { font-size: 1.1rem; }
}

/* ========================================= */
/* --- PERBAIKAN HEADER & FONT DOSIS --- */
/* ========================================= */

/* 1. Paksa Semua Font Jadi Dosis */
body, h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, .article-body, .btn-submit-comment {
    font-family: 'Dosis', sans-serif !important;
}

/* 2. Fix Menu Header Tidak Kelihatan */
/* Saat di halaman artikel, nav link jadi putih agar kontras dengan header gelap */
.article-hero ~ .navbar .nav-links a,
.article-hero ~ .navbar .logo {
    color: white !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5); /* Bayangan agar terbaca di background terang */
}
/* Kembalikan warna gelap saat scroll/mobile (opsional, tergantung JS navbar Bapak) */

/* 3. Styling Header Gambar */
.article-hero {
    background-color: #10b981; /* Fallback warna hijau */
    background-size: cover;
    background-position: center;
    position: relative;
    /* Agar menu (z-index biasanya 100) tetap di atas, hero z-index rendah */
    z-index: 1; 
}
.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* Gelapkan gambar 50% */
    z-index: 2;
}
.hero-content { position: relative; z-index: 3; }

/* 4. Navigasi Artikel (Prev/Next) */
.post-navigation {
    display: flex; gap: 20px; margin: 40px 0;
}
.nav-box {
    flex: 1; background: #f8fafc; padding: 20px; border-radius: 10px;
    border: 1px solid #e2e8f0; transition: 0.3s;
}
.nav-box:hover { border-color: var(--primary); transform: translateY(-3px); }
.nav-box a { text-decoration: none; display: block; }
.nav-box small { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; }
.nav-box span { display: block; font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.nav-box.next { text-align: right; }
.disabled { opacity: 0.5; cursor: not-allowed; }

/* 5. Artikel Terkait */
.related-section { margin-top: 40px; }
.related-section h3 { font-size: 1.4rem; margin-bottom: 20px; color: var(--text-main); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.related-card {
    display: flex; align-items: center; gap: 15px; padding: 15px;
    background: white; border: 1px solid #e2e8f0; border-radius: 10px;
    text-decoration: none; transition: 0.3s;
}
.related-card:hover { border-color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.rel-icon { 
    background: #e0f2fe; color: #0284c7; width: 40px; height: 40px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
}
.rel-info strong { display: block; color: var(--text-main); line-height: 1.3; margin-bottom: 3px; }
.rel-info small { color: var(--text-muted); }

/* Tombol Submit Font Dosis */
.btn-submit-comment { font-weight: 700; letter-spacing: 0.5px; }

/* ========================================= */
/* --- NAVBAR 2 FASE (TIPIS -> PEKAT) --- */
/* ========================================= */

nav.navbar {
    position: fixed !important;
    top: 0; left: 0; width: 100%;
    
    /* 1. KONDISI DIAM (DI ATAS) */
    /* Kita beri warna abu-abu (30, 41, 59) dengan ketebalan 0.4 (40%) */
    background: rgba(30, 41, 59, 0.4) !important; 
    
    /* Efek Blur Sedikit saja */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    
    /* Garis tipis pemanis */
    border-bottom: 1px solid rgba(255,255,255,0.15);
    
    z-index: 1000;
    transition: all 0.4s ease; /* Transisi halus saat berubah warna */
    padding: 15px 0;
}

/* 2. KONDISI DIGULIR (SCROLLED) */
nav.navbar.scrolled {
    /* Warnanya SAMA, tapi ketebalan jadi 0.95 (95% Pekat) */
    background: rgba(30, 41, 59, 0.95) !important; 
    
    /* Blur lebih kuat */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    border-bottom: none !important;
    padding: 10px 0;
}

/* Warna Teks (Selalu Putih) */
nav.navbar .logo, nav.navbar ul li a, .nav-actions i {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); 
}

/* Dorong isi header ke bawah agar tidak ketabrak menu */
.hero-content {
    margin-top: 80px; /* Jarak aman dari atas */
}

/* ========================================= */
/* --- HERO BLOB DESIGN (ABSTRAK) --- */
/* ========================================= */

.hero-right {
    display: flex; justify-content: center; align-items: center;
    position: relative;
    padding: 20px;
}

.blob-card-wrapper {
    position: relative;
    width: 450px; height: 450px;
    display: flex; align-items: center; justify-content: center;
}

/* 1. GAMBAR BLOB (ANIMASI) */
.blob-image {
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15); /* Bayangan lembut */
    
    /* BENTUK ABSTRAK AWAL */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    
    /* ANIMASI MORPHING (BERUBAH BENTUK) */
    animation: blob-morph 8s ease-in-out infinite alternate;
    transition: all 0.5s ease;
}

@keyframes blob-morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: scale(1.02); }
}

/* 2. OVERLAY KONTEN (GLASSMORPHISM) */
.blob-content-overlay {
    position: absolute;
    bottom: 40px; left: -20px; /* Posisi melayang sedikit keluar */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 20px;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    
    /* Animasi Masuk */
    animation: float-up 1s ease-out forwards;
}

@keyframes float-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Text Styling */
.blob-badge {
    background: #fef3c7; color: #d97706; padding: 4px 10px;
    border-radius: 30px; font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
}

.blob-title {
    font-size: 1.4rem; font-weight: 800; color: #1e293b;
    margin: 10px 0; line-height: 1.3;
    /* Batasi 2 baris */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.blob-meta {
    font-size: 0.85rem; color: #64748b; margin-bottom: 20px;
}

.btn-blob-read {
    text-decoration: none; color: white; background: var(--primary);
    padding: 10px 25px; border-radius: 50px; font-weight: 700;
    font-size: 0.9rem; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-blob-read:hover {
    background: var(--primary-dark); transform: translateX(5px);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .blob-card-wrapper { width: 300px; height: 300px; margin-top: 30px; }
    .blob-content-overlay { left: 0; bottom: -20px; width: 90%; }
}

/* ========================================= */
/* --- CARD UPDATE (GAMBAR & LABEL) --- */
/* ========================================= */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.article-card {
    background: white; border-radius: 15px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.3s;
    border: 1px solid #f1f5f9;
    display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }

/* GAMBAR CARD */
.card-thumb {
    height: 200px; width: 100%;
    background-color: #d1fae5; /* Warna Default jika tidak ada foto (Hijau Muda) */
    background-size: cover; background-position: center;
}

.card-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }

/* LABEL BERJEJER (TAGS) */
.card-tags-list {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px;
}
.mini-tag {
    background: #e0f2fe; color: #0284c7; font-size: 0.75rem;
    padding: 4px 10px; border-radius: 20px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.card-title-link { text-decoration: none; color: #1e293b; }
.card-title-link h3 { margin: 10px 0; font-size: 1.4rem; line-height: 1.3; font-weight: 800; }
.card-date { font-size: 0.85rem; color: #94a3b8; }
.read-more-link { margin-top: auto; color: var(--primary); font-weight: 700; text-decoration: none; }


/* ========================================= */
/* --- RELATED ARTICLES (MODEL CARD) --- */
/* ========================================= */

.related-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Responsif */
    gap: 20px; margin-top: 20px;
}

.related-card-box {
    background: white; border-radius: 12px; overflow: hidden;
    border: 1px solid #e2e8f0; transition: 0.3s;
}
.related-card-box:hover {
    border-color: var(--primary); transform: scale(1.02);
}

.rel-thumb {
    height: 120px; width: 100%;
    background-color: #ecfdf5; /* Default jika tidak ada gambar */
    background-size: cover; background-position: center;
}

.rel-content { padding: 15px; }
.rel-date { font-size: 0.75rem; color: #94a3b8; display: block; margin-bottom: 5px; }
.rel-content a { text-decoration: none; }
.rel-content h4 {
    margin: 0; font-size: 1rem; color: #1e293b; font-weight: 700; line-height: 1.4;
}

/* PAGINATION STYLING */
.pagination-container {
    display: flex; justify-content: center; align-items: center; gap: 10px;
}

.page-link {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: white; border: 1px solid #e2e8f0;
    color: #64748b; text-decoration: none;
    font-weight: 700; transition: 0.3s;
}

.page-link:hover {
    border-color: var(--primary); color: var(--primary);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary); color: white; border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* ========================================= */
/* --- RESPONSIVE TABLET & MOBILE (Hamburger) --- */
/* ========================================= */

/* Tombol Hamburger (Default Sembunyi di Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px; height: 3px; background-color: white;
    margin: 4px 0; transition: 0.4s; border-radius: 5px;
}

/* ================================================================= */
/* === KONFIGURASI TEMA, DARK MODE & PERBAIKAN TAMPILAN (FINAL) === */
/* ================================================================= */

/* --- 1. PERBAIKAN TRANSISI (Agar tidak kedip saat reload) --- */
body.transition-enabled {
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.transition-enabled nav.navbar,
body.transition-enabled .article-card,
body.transition-enabled .content-box,
body.transition-enabled .paper-content {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- 2. PERBAIKAN KONTRAS MODE TERANG (LIGHT MODE) --- */
/* Membuat tulisan artikel lebih hitam pekat agar mudah dibaca */
.article-body {
    color: #111827 !important; /* Hitam Pekat (Slate-900) */
}
.article-body p, 
.article-body li {
    color: #111827 !important;
}

/* ========================================= */
/* --- PENGATURAN KHUSUS DARK MODE --- */
/* ========================================= */

/* A. FORMULIR & INPUT (Agar tulisan terlihat saat mengetik) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .gb-input, 
body.dark-mode .form-control,
body.dark-mode .input-group,
body.dark-mode .filter-group select {
    background-color: #1e293b !important; /* Slate-800 */
    color: #f1f5f9 !important; /* Putih Terang */
    border-color: #334155 !important;
}
/* Pilihan dropdown */
.filter-group select option {
    background-color: #1e293b;
    color: #f1f5f9;
}
/* Placeholder (Teks petunjuk) */
body.dark-mode ::placeholder {
    color: #94a3b8 !important;
}

/* B. KARTU & KOTAK KONTEN (Beranda, Arsip, Komentar) */
body.dark-mode .article-card,
body.dark-mode .comment-item,
body.dark-mode .comment-card,
body.dark-mode .related-card-box,
body.dark-mode .content-box,
body.dark-mode .paper-content,
body.dark-mode .comment-form-box {
    background-color: #1e293b !important; /* Biru Gelap */
    border-color: #334155 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    color: #e2e8f0 !important;
}

/* C. JUDUL & TEKS (Memaksa warna putih di mode gelap) */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4,
body.dark-mode .blob-title,
body.dark-mode .article-title,
body.dark-mode .rel-content h4 a {
    color: #ffffff !important; /* Putih Mutlak */
    text-shadow: none;
}

/* Teks Muted (Tanggal, Meta, Deskripsi singkat) */
body.dark-mode .card-date,
body.dark-mode .card-excerpt,
body.dark-mode .blob-meta,
body.dark-mode .rel-date,
body.dark-mode .comment-meta small,
body.dark-mode .nav-box small {
    color: #94a3b8 !important; /* Abu-abu */
}

/* Link & Nama Penulis (Aksen Biru/Hijau) */
body.dark-mode .comment-header strong,
body.dark-mode .comment-meta strong,
body.dark-mode .nav-box span,
body.dark-mode .mini-tag {
    color: #38bdf8 !important; /* Biru Langit */
}
body.dark-mode .mini-tag {
    background-color: #334155 !important; /* Background Label */
}

/* D. ISI ARTIKEL (OVERRIDE SUMMERNOTE) */
/* Memaksa teks hasil copy-paste menjadi terang */
body.dark-mode .article-body,
body.dark-mode .article-body * {
    color: #e2e8f0 !important; /* Putih Gading */
    background-color: transparent !important; /* Hapus background bawaan teks */
}
body.dark-mode .article-body a {
    color: #38bdf8 !important;
    text-decoration: underline;
}
body.dark-mode .article-body blockquote {
    background-color: #0f172a !important;
    border-left-color: #10b981 !important;
    color: #cbd5e1 !important;
}

/* E. KOMPONEN LAINNYA */

/* Hero Header (Saat tidak ada foto) */
body.dark-mode .article-hero {
    background-color: #0f172a !important; 
}
/* Hero Blob Overlay (Beranda) */
body.dark-mode .blob-content-overlay {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Tombol Navigasi (Prev/Next) & Share */
body.dark-mode .nav-box,
body.dark-mode .share-btn {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
body.dark-mode .nav-box.prev .disabled {
    color: #475569 !important;
}
body.dark-mode .share-section {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

/* Balasan Admin (Hijau Gelap) */
body.dark-mode .admin-reply-box,
body.dark-mode .admin-reply {
    background-color: #064e3b !important;
    border-color: #059669 !important;
    color: #ecfdf5 !important;
}
body.dark-mode .admin-reply i,
body.dark-mode .reply-header i {
    color: #34d399 !important;
}

/* ================================================= */
/* --- FIX KHUSUS: INPUT SEARCH TETAP PUTIH --- */
/* ================================================= */

/* 1. Reset Warna Background & Teks untuk Input Search */
/* Target: Modal Search (Front), Admin Search, & Filter Toolbar */
body.dark-mode .modal-search-box input,
body.dark-mode .admin-search input,
body.dark-mode .search-wrapper input {
    background-color: #ffffff !important; /* Latar Tetap Putih */
    color: #1e293b !important; /* Teks Jadi Hitam (agar terbaca di putih) */
}

/* 2. Pastikan Container/Kotak Pembungkusnya juga Putih */
body.dark-mode .modal-search-box,
body.dark-mode .admin-search,
body.dark-mode .search-wrapper {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* 3. Perbaiki Warna Placeholder (Teks Petunjuk) */
/* Agar teks 'Ketik kata kunci...' terlihat jelas di atas putih */
body.dark-mode .modal-search-box input::placeholder,
body.dark-mode .admin-search input::placeholder,
body.dark-mode .search-wrapper input::placeholder {
    color: #94a3b8 !important; /* Abu-abu */
}

/* 4. Perbaiki Warna Ikon Search (Kaca Pembesar) */
body.dark-mode .modal-search-box i {
    color: #64748b !important; /* Abu-abu gelap */
}

/* ================================================= */
/* --- FIX KHUSUS: BUKU TAMU FULL DARK --- */
/* ================================================= */

/* 1. Gelapkan Kotak Pembungkus Formulir */
body.dark-mode .guestbook-form {
    background-color: #1e293b !important; /* Slate-800 (Sama dengan kartu lain) */
    border-color: #334155 !important;      /* Garis tepi abu gelap */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* Bayangan */
}

/* 2. Gelapkan Input & Textarea (Lebih gelap dari kotaknya) */
body.dark-mode .gb-input {
    background-color: #0f172a !important; /* Slate-900 (Lebih gelap agar terlihat 'masuk') */
    color: #f1f5f9 !important;            /* Teks Putih */
    border-color: #334155 !important;
}

/* 3. Efek saat Input diklik (Focus) */
body.dark-mode .gb-input:focus {
    border-color: #38bdf8 !important;     /* Garis jadi Biru saat mengetik */
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* 4. FIX AUTOFILL (Masalah Kotak Jadi Kuning/Putih saat Browser isi otomatis) */
/* Ini penting agar Chrome tidak mengubah background jadi putih lagi */
body.dark-mode input:-webkit-autofill,
body.dark-mode textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important; /* Paksa background gelap */
    -webkit-text-fill-color: #f1f5f9 !important; /* Paksa teks putih */
    caret-color: white !important; /* Kursor ketik putih */
}

/* ========================================= */
/* --- FIX GOOGLE DRIVE EMBED (RESPONSIF) --- */
/* ========================================= */

.cv-embed-wrapper {
    position: relative;
    width: 100%;
    /* Ini rahasianya: Padding-bottom menentukan rasio tinggi */
    /* 140% kira-kira rasio kertas A4, jadi dokumen tidak akan gepeng */
    padding-bottom: 140%; 
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    margin-top: 20px;
}

.cv-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Khusus Dark Mode: Gelapkan border & background */
body.dark-mode .cv-embed-wrapper {
    border-color: #334155;
    background: #1e293b;
}

/* ========================================= */
/* --- FIX HEADER PENULIS DI MOBILE --- */
/* ========================================= */

@media screen and (max-width: 768px) {
    
    /* 1. Kurangi efek kertas naik agar tidak menutupi nama */
    .article-wrapper {
        margin-top: -30px !important; /* Sebelumnya -80px (terlalu tinggi) */
        position: relative;
        z-index: 20;
    }

    /* 2. Tambah ruang kosong di bawah Hero Header */
    /* Agar ada tempat untuk Foto & Nama Penulis */
    .article-hero {
        padding-bottom: 80px !important; 
        min-height: auto; /* Biarkan tinggi menyesuaikan isi */
    }

    /* 3. Rapikan posisi Foto & Nama Penulis */
    .author-meta {
        margin-top: 15px;
        margin-bottom: 10px;
        position: relative;
        z-index: 5; /* Pastikan selalu di atas background */
    }
    
    /* (Opsional) Kecilkan sedikit judul di HP agar tidak makan tempat */
    .article-title {
        font-size: 1.8rem !important;
        margin: 15px 0 !important;
    }
}

/* ========================================= */
/* --- FIX LABEL AGAR BISA DIKLIK --- */
/* ========================================= */

/* Style untuk Link Tag di Card */
a.mini-tag {
    text-decoration: none !important; /* Hilangkan garis bawah */
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
}

/* Efek saat mouse diarahkan (Hover) */
a.mini-tag:hover {
    background-color: var(--primary) !important; /* Warna Hijau */
    color: white !important;
    transform: translateY(-2px); /* Sedikit naik */
}

/* Style untuk Link Tag di Header Artikel (Single Post) */
a.badge-cat-hero {
    text-decoration: none !important;
    cursor: pointer;
    transition: 0.3s;
}

a.badge-cat-hero:hover {
    background-color: var(--primary);
    color: white !important;
    border-color: var(--primary) !important;
}

/* Pastikan di Dark Mode label hover tetap terlihat bagus */
body.dark-mode a.mini-tag:hover {
    background-color: #38bdf8 !important; /* Biru langit saat hover di dark mode */
}

/* ========================================= */
/* --- FIX HAMBURGER MENU (SELALU PUTIH) --- */
/* ========================================= */

/* Memaksa garis hamburger menjadi putih di semua kondisi */
.menu-toggle .bar,
.hamburger .bar {
    background-color: #ffffff !important; /* Putih Mutlak */
    box-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Sedikit bayangan agar kontras */
}

/* Pastikan tetap putih saat navbar digulir (scrolled) */
nav.navbar.scrolled .menu-toggle .bar {
    background-color: #ffffff !important;
}

/* ================================================================= */
/* === KHUSUS TABLET & MOBILE (Max-Width: 992px) - ALL IN ONE === */
/* ================================================================= */
/* Satukan semua aturan tablet/hp di sini agar tidak bentrok */

@media screen and (max-width: 992px) {
    
    /* --- 1. SETTING NAVBAR & HAMBURGER --- */
    
    /* Sembunyikan Menu Teks Desktop & Sosmed di Navbar Atas */
    .desktop-menu, 
    .nav-actions .social-nav { 
        display: none !important; 
    }

    /* Tampilkan Tombol Hamburger */
    .hamburger { 
        display: flex !important; 
        align-items: center; 
        justify-content: center; 
    }

    /* Atur Jarak Ikon di Kanan Atas */
    .nav-actions { 
        display: flex; 
        align-items: center; 
        gap: 15px; 
    }

    /* Link di dalam Menu Mobile jadi Putih (Fix Bapak tadi) */
    .nav-menu li a,
    .mobile-menu a {
        color: var(--text-main); /* Ikuti tema, atau paksa putih jika perlu */
    }
    /* Khusus jika menu background gelap, paksa putih */
    .mobile-menu {
        background: var(--navbar-scrolled-bg);
        color: var(--text-main);
    }


    /* --- 2. SETTING ISI MENU HAMBURGER --- */
    .mobile-menu {
        display: flex; flex-direction: column;
        position: fixed; top: 80px; right: 0; width: 100%;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0,0,0,0.1);
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        z-index: 998;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .mobile-menu.active { transform: translateY(0); }
    
    .mobile-menu > a {
        padding: 15px; font-size: 1.1rem; font-weight: 700;
        border-bottom: 1px solid rgba(0,0,0,0.05); 
    }

    /* Ikon Sosmed di dalam Menu Hamburger */
    .mobile-social {
        display: flex; justify-content: center; gap: 20px;
        margin-top: 10px; padding-top: 15px;
        border-top: 1px dashed rgba(0,0,0,0.1);
    }
    .mobile-social a {
        font-size: 1.5rem; color: var(--text-muted); padding: 0; border: none !important;
    }
    body.dark-mode .mobile-social a { color: #ffffff; }


    /* --- 3. FIX HERO SECTION (FOTO & TEKS BERANDA) --- */
    
    /* Jarak atas agar tidak ketutup navbar */
    .hero-section { padding-top: 140px !important; padding-bottom: 60px; }
    
    /* Grid jadi 1 Kolom */
    .hero-grid { 
        display: flex !important; /* Paksa Flexbox Column */
        flex-direction: column !important;
        text-align: center !important; 
        gap: 40px; 
    }
    
    /* Urutan: Teks di Atas (1), Foto di Bawah (2) */
    .hero-text { 
        order: 1 !important; 
        margin: 0 auto !important; 
        width: 100%;
    } 

    /* --- TAMBAHKAN INI AGAR FOTO PROFIL KECIL KE TENGAH --- */
    .hero-avatar {
        margin: 0 auto 20px !important; /* Auto Kiri-Kanan = Center */
    }
    
    /* FIX FOTO BENAR-BENAR DI TENGAH */
    .hero-right { 
        order: 2 !important; 
        width: 100% !important;
        display: flex !important; 
        justify-content: center !important; /* Horizontally Center */
        align-items: center !important;     /* Vertically Center */
        margin: 0 auto !important;
    }
    
    /* Wadah Blob (Bentuk Abstrak) */
    .blob-card-wrapper { 
        margin: 0 auto !important; /* Center classic */
        max-width: 350px;
        /* Reset posisi jika ada absolute sebelumnya */
        position: relative !important; 
        left: auto !important; 
        right: auto !important;
    }


    /* --- 4. FIX HEADER ARTIKEL (NAMA PENULIS) --- */
    
    .article-wrapper {
        margin-top: -30px !important; /* Jangan terlalu naik (-80px) */
        position: relative;
        z-index: 20;
    }

    .article-hero {
        padding-bottom: 80px !important; /* Ruang untuk nama penulis */
        min-height: auto;
    }

    .author-meta {
        margin-top: 15px; margin-bottom: 10px;
        position: relative; z-index: 5;
    }
    
    .article-title { font-size: 2.2rem !important; }
}

/* ========================================= */
/* --- STYLE HALAMAN GALERI --- */
/* ========================================= */

/* Grid Publik */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsif otomatis */
    gap: 20px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.gallery-item:hover { transform: translateY(-5px); }

.img-wrapper { position: relative; height: 250px; }

.img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: 0.5s;
}

/* Efek Hover Caption */
.gallery-item:hover img { transform: scale(1.1); }

.overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px; color: white;
    opacity: 0; transition: 0.3s;
}
.gallery-item:hover .overlay { opacity: 1; }

/* Grid Admin */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px; padding: 20px;
}

.gallery-admin-card {
    position: relative; border-radius: 10px; overflow: hidden;
    border: 1px solid #e2e8f0;
}
.gallery-admin-card img {
    width: 100%; height: 120px; object-fit: cover;
}
.g-caption {
    padding: 5px 10px; font-size: 0.8rem; color: #64748b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: white;
}
.btn-del-img {
    position: absolute; top: 5px; right: 5px;
    background: #ef4444; color: white;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ========================================= */
/* --- GAYA GALERI MULTIMEDIA (ALA IG) --- */
/* ========================================= */

/* --- 1. GRID KOTAK-KOTAK --- */
.insta-grid {
    display: grid;
    /* Membuat 3 kolom di desktop, mengecil otomatis */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px; /* Jarak antar kotak ala Instagram (sempit) */
}

/* Di HP jadi 2 kolom agar mirip IG mobile */
@media (max-width: 768px) {
    .insta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}

/* Item Galeri */
.insta-item {
    position: relative;
    width: 100%;
    /* RAHASIA KOTAK SEMPURNA (Aspect Ratio 1:1) */
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    background-color: #f1f5f9; /* Warna loading */
    cursor: pointer;
}

/* Gambar Thumbnail */
.insta-item img {
    width: 100%; height: 100%;
    object-fit: cover; /* Memenuhi kotak tanpa gepeng */
    transition: 0.3s;
}

/* Placeholder Video di Grid (Latar Abu) */
.video-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(45deg, #334155, #475569);
    display: flex; align-items: center; justify-content: center;
}
/* Ikon tipe di pojok kanan atas */
.type-indicator {
    position: absolute; top: 10px; right: 10px;
    color: white; font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- WADAH UTAMA (MENGATUR SUSUNAN) --- */
.insta-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    
    /* UBAH INI DARI 15px MENJADI 0 */
    border-radius: 0 !important; 
    
    z-index: 10;
    
    /* Flexbox tetap sama */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
}

/* --- TOMBOL LIKE (RESET POSISI) --- */
.like-btn {
    /* MATIKAN POSISI ABSOLUTE LAMA */
    position: static !important;  
    transform: none !important;   
    margin: 0 !important;
    
    /* Style standar */
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- TOMBOL LIHAT --- */
.overlay-trigger {
    margin-top: 0 !important;
    cursor: pointer;
    color: white;
    font-weight: 600;
    background: rgba(255,255,255,0.2); /* Tambah background tipis biar jelas */
    padding: 8px 15px;
    border-radius: 20px;
    transition: 0.2s;
}

.overlay-trigger:hover {
    background: rgba(255,255,255,0.4);
}

/* Efek Hover di Gambar */
.insta-item:hover .insta-overlay {
    opacity: 1;
}

/* --- 2. MODAL POP-UP (JENDELA DETAIL) --- */

/* Latar Belakang Gelap Penuh */
.insta-modal {
    display: none; /* Tersembunyi default */
    position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Latar belakang redup */
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
    padding: 20px;
}
/* Saat aktif (ditambah via JS) */
.insta-modal.active { display: flex; animation: fadeIn 0.3s; }

/* Tombol Close (X) */
.close-modal {
    position: absolute; top: 15px; right: 30px;
    color: #f1f5f9; font-size: 40px; font-weight: bold;
    cursor: pointer; z-index: 10001;
}

/* Kotak Konten Modal */
.modal-content-box {
    background-color: var(--card-bg); /* Ikuti tema (putih/gelap) */
    width: 100%; max-width: 900px; /* Lebar maksimal di desktop */
    max-height: 90vh; /* Tinggi maksimal 90% layar */
    display: flex;
    border-radius: 5px; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Bagian Kiri: Media */
.modal-media-container {
    flex: 1.5; /* Lebih lebar dari info */
    background-color: #000; /* Latar media selalu hitam */
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    max-height: 90vh;
}
.modal-media-container img, 
.modal-media-container video {
    width: 100%; height: auto; 
    max-height: 90vh; object-fit: contain; /* Tampil utuh tidak terpotong */
}

/* Bagian Kanan: Informasi */
.modal-info-sidebar {
    flex: 1; /* Lebar standar */
    display: flex; flex-direction: column;
    border-left: 1px solid var(--border-color);
    min-width: 300px;
}
.info-header {
    padding: 15px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 10px; font-weight: 700;
    color: var(--text-main);
}
.info-avatar { width: 35px; height: 35px; border-radius: 50%; }

.info-body { padding: 15px; flex-grow: 1; overflow-y: auto; }
.caption-text { font-size: 1rem; color: var(--text-main); margin-bottom: 10px; }
.date-text { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }

/* --- Responsif Modal di HP --- */
@media (max-width: 768px) {
    .modal-content-box { 
        flex-direction: column; /* Jadi tumpuk ke bawah */
        max-height: 95vh; overflow-y: auto;
    }
    .modal-media-container { 
        flex: none; width: 100%; max-height: 50vh; /* Media di atas */
    }
    .modal-info-sidebar { 
        flex: none; width: 100%; border-left: none; min-width: auto; /* Info di bawah */
    }
    .close-modal { top: 10px; right: 15px; font-size: 30px; }
}

/* --- GAYA TAMBAHAN ADMIN VIDEO --- */
.admin-video-thumb {
    width: 100%; height: 120px; background: #475569;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 2rem;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========================================= */
/* --- PERBAIKAN FORM UPLOAD ADMIN --- */
/* ========================================= */

.upload-grid {
    display: grid;
    /* Desktop: 3 Kolom (File | Caption | Tombol) */
    grid-template-columns: 1fr 1.5fr auto; 
    gap: 20px;
    align-items: center; /* Vertikal sejajar tengah */
}

.form-group-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Style khusus tombol upload agar tinggi & besar */
.upload-btn {
    height: 50px; /* Samakan tinggi dengan input */
    padding: 0 30px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px; /* Kompensasi label agar sejajar visual */
    background: var(--primary);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.upload-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* --- RESPONSIF UNTUK TABLET & HP --- */
@media (max-width: 992px) {
    .upload-grid {
        /* Tablet/HP: Jadi 1 kolom tumpuk ke bawah */
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upload-btn {
        width: 100%; /* Tombol penuh di HP */
        justify-content: center;
        margin-top: 10px;
    }
    
    .form-group-item small {
        margin-bottom: 5px;
    }
}

/* ========================================= */
/* --- SYSTEM TAB ADMIN & FORM FIX --- */
/* ========================================= */

/* 1. Navigation Tabs */
.tab-navigation {
    display: flex; gap: 10px; margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    background: transparent; border: none;
    padding: 12px 25px; font-size: 1rem; font-weight: 700;
    color: #64748b; cursor: pointer; transition: 0.3s;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
}

.tab-btn:hover { color: var(--primary); background: rgba(16, 185, 129, 0.05); }

.tab-btn.active {
    color: var(--primary); border-bottom-color: var(--primary);
}

/* 2. Tab Content Animation */
.tab-content { display: none; opacity: 0; transition: opacity 0.3s ease; }
.tab-content.active { display: block; opacity: 1; }


/* 3. FORM ALIGNMENT FIX (Grid System) */
.upload-grid-aligned {
    display: grid;
    /* Grid: Input File (1 Bagian) | Caption (2 Bagian) | Tombol (Auto) */
    grid-template-columns: 1fr 2fr auto; 
    gap: 20px; align-items: end; /* Kunci agar sejajar bawah */
}

.form-col label {
    display: block; font-weight: 700; margin-bottom: 8px; color: var(--text-main);
}

/* Wrapper Input agar tingginya SERAGAM */
.input-wrapper-fix input {
    width: 100%; height: 50px; /* Paksa tinggi sama */
    padding: 0 15px; border: 1px solid #cbd5e1; border-radius: 10px;
    font-family: inherit; font-size: 0.95rem;
    background: #f8fafc; color: var(--text-main);
}

/* Khusus Input File perlu padding beda agar teks di tengah */
.input-wrapper-fix input[type="file"] {
    padding: 12px 15px; background: white;
}

/* Tombol Upload */
.btn-upload-fix {
    height: 50px; /* Samakan tinggi dengan input */
    padding: 0 30px; border: none; border-radius: 10px;
    background: var(--primary); color: white;
    font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transition: 0.3s;
}
.btn-upload-fix:hover { transform: translateY(-2px); background: var(--primary-dark); }

/* Responsif Mobile */
@media (max-width: 992px) {
    .upload-grid-aligned { grid-template-columns: 1fr; gap: 15px; }
    .btn-upload-fix { width: 100%; justify-content: center; }
    /* Label kosong di tombol kita sembunyikan di HP */
    .btn-col label { display: none; }
}

/* --- GALLERY TABS --- */
.gallery-tabs {
    display: flex; gap: 5px; background: rgba(0,0,0,0.1);
    padding: 5px; border-radius: 50px;
}

.g-tab {
    padding: 8px 20px; border-radius: 40px; 
    text-decoration: none; font-weight: 700; color: var(--text-muted);
    font-size: 0.95rem; transition: 0.3s;
}

.g-tab.active {
    background: white; color: var(--primary); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.g-tab:hover:not(.active) { color: var(--text-main); }

/* Tombol Aksi di Card Admin Galeri */
.gallery-actions {
    position: absolute; top: 5px; right: 5px; display: flex; gap: 5px;
}

/* Update Grid Form agar muat 4 kolom (Label baru) */
.upload-grid-aligned {
    /* File | Caption | Label | Tombol */
    grid-template-columns: 1fr 1.5fr 1fr auto; 
}
@media (max-width: 992px) {
    .upload-grid-aligned { grid-template-columns: 1fr; }
}

/* ========================================= */
/* --- COMBOBOX (INPUT RASA DROPDOWN) --- */
/* ========================================= */

.combobox-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: white;
    color: var(--text-main);
    
    /* RAHASIA: Menambahkan Ikon Panah ke Bawah di Input Teks */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
    
    cursor: pointer; /* Kursor tangan agar terasa seperti tombol */
}

/* Hilangkan panah bawaan browser di beberapa browser agar tidak dobel */
.combobox-input::-webkit-calendar-picker-indicator {
    opacity: 0; 
    position: absolute; right: 0; top: 0; bottom: 0; width: 100%; cursor: pointer;
}

body.dark-mode .combobox-input {
    background-color: #0f172a;
    border-color: #334155;
    color: white;
}

/* ========================================= */
/* --- TOGGLE SELECT / INPUT MANUAL --- */
/* ========================================= */

.tag-toggle-group {
    position: relative;
    width: 100%;
}

/* Style untuk Select Dropdown */
.tag-select {
    width: 100%; height: 50px;
    padding: 0 15px; border: 1px solid #cbd5e1; border-radius: 10px;
    font-family: inherit; font-size: 0.95rem; color: var(--text-main);
    background: white; cursor: pointer;
    appearance: none; /* Hapus panah bawaan browser */
    
    /* Custom Arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px auto;
}
.tag-select:focus { outline: none; border-color: var(--primary); }

/* Style untuk Input Manual (Hidden by Default) */
.manual-input-wrapper {
    display: none; /* Tersembunyi awal */
    align-items: center; gap: 5px;
    width: 100%;
}

/* Tombol Batal (Silang Merah) */
.btn-cancel-manual {
    width: 40px; height: 50px;
    background: #fee2e2; color: #ef4444;
    border: 1px solid #fecaca; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s;
}
.btn-cancel-manual:hover { background: #ef4444; color: white; }

/* --- TAMBAHAN UNTUK THUMBNAIL VIDEO --- */
.video-thumb-grid {
    width: 100%; 
    height: 100%;
    object-fit: cover; /* KUNCI: Agar video ter-crop rapi memenuhi kotak (tidak gepeng) */
    display: block;
    background: #000; /* Latar belakang hitam loading */
}

/* Opsional: Efek video berputar otomatis saat mouse diarahkan */
.insta-item:hover .video-thumb-grid {
    filter: brightness(1.1);
}

/* --- FIX THUMBNAIL VIDEO DI ADMIN --- */
video.admin-video-thumb {
    width: 100%;
    height: 120px; /* Samakan tingginya dengan kotak foto admin */
    object-fit: cover; /* Agar video ter-crop rapi memenuhi kotak */
    background: #000;
    display: block;
}

/* --- TOAST NOTIFICATION (MELAYANG) --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    /* Ubah z-index jadi sangat besar untuk memastikan dia paling depan */
    z-index: 2147483647; 
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Agar klik tembus ke bawah jika transparan */
}

.toast {
    background: white;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Dosis', sans-serif;
    font-weight: 600;
    color: #334155;
    
    /* Animasi Awal */
    opacity: 0;
    transform: translateX(100px); /* Geser ke kanan dulu */
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Efek membal sedikit */
    border-left: 5px solid #cbd5e1; /* Default border */
}

/* Animasi Masuk (Class ini ditambah via JS) */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Warna Berdasarkan Kategori Flask */
.toast.success { border-left-color: #10b981; } /* Hijau */
.toast.danger { border-left-color: #ef4444; }  /* Merah */
.toast.warning { border-left-color: #f59e0b; } /* Kuning */
.toast.info { border-left-color: #3b82f6; }    /* Biru */

/* Ikon di dalam toast */
.toast-icon { font-size: 1.2rem; }
.toast.success .toast-icon { color: #10b981; }
.toast.danger .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #3b82f6; }

/* --- LIKE BUTTON GALLERY --- */
.like-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    opacity: 0; /* Tersembunyi default */
}

/* Muncul saat hover */
.insta-item:hover .like-btn {
    opacity: 1;
    transform: translate(-50%, -60%); /* Sedikit geser ke atas */
}

/* Tombol "Lihat" digeser ke bawah sedikit agar tidak tabrakan */
.insta-item:hover .overlay-trigger {
    margin-top: 40px; 
}

.like-count {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 5px;
}

/* Keadaan Sudah Dilike */
.like-btn.is-liked .heart-icon {
    color: #ef4444; /* Merah */
    /* text-shadow: none; */
}

/* Animasi Detak Jantung */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.beat-anim {
    animation: heartBeat 0.5s ease-in-out;
}

/* Efek Hover untuk Ikon Besar di Halaman Tentang */
.about-social a:hover {
    transform: scale(1.2); /* Membesar saat disentuh */
}

/* Pastikan tombol like selalu di atas dan bisa diklik */
.like-btn {
    position: relative;
    z-index: 100 !important; /* Paksa di paling atas */
    pointer-events: auto;     /* Pastikan menerima klik */
}

/* Pastikan overlay tidak memblokir tapi isinya bisa diklik */
.insta-overlay {
    pointer-events: auto;
}