/*
Theme Name: Kabar MKGR Pro V14 (Final Clean)
Theme URI: https://berkahweb.com
Author: BerkahWeb.com
Author URI: https://berkahweb.com
Description: Tema Magazine Premium Custom MKGR. Fitur: Editor Choice, Dark Mode Section, Mobile Menu Fix, Archive Grid, & Social Share.
Version: 14.0
Text Domain: berkahweb-mkgr
*/

/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    /* Warna Brand */
    --primary: #DD9836;       /* Emas */
    --accent: #B5261B;        /* Merah */
    --dark: #0f172a;          /* Biru Gelap Malam */
    --gray: #64748b;          /* Abu-abu Teks */
    --light: #f1f5f9;         /* Background Web */
    --white: #ffffff;
    
    /* Gradients & Effects */
    --grad-btn: linear-gradient(135deg, #DD9836 0%, #B5261B 100%);
    --radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-card: 0 8px 24px rgba(0,0,0,0.06);
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Helpers */
.badge { padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: white; display: inline-block; letter-spacing: 0.5px; }
.bg-primary { background: var(--primary); }
.bg-accent { background: var(--accent); }

/* =========================================
   2. HEADER & NAVIGASI
   ========================================= */
header {
    position: sticky; top: 0; z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 60px; width: auto; object-fit: contain; }

/* Menu Kanan (Desktop) */
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-links a { font-weight: 700; font-size: 0.95rem; color: var(--dark); position: relative; }
.nav-links a:hover { color: var(--primary); }

/* Tombol CTA */
.btn-cta {
    background: var(--grad-btn); color: white !important;
    padding: 0.7rem 1.8rem; border-radius: 50px;
    font-weight: 700; font-size: 0.9rem; white-space: nowrap;
    box-shadow: 0 4px 15px rgba(221, 152, 54, 0.4);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(221, 152, 54, 0.6); }

/* Hamburger (Mobile) */
.mobile-menu-btn { display: none; font-size: 2rem; color: var(--dark); cursor: pointer; }

/* =========================================
   3. HOME SECTIONS (BERANDA)
   ========================================= */

/* Ticker */
.ticker-wrap {
    margin: 2rem 0; background: white; padding: 0.8rem;
    border-radius: 8px; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; border-left: 4px solid var(--accent);
}

/* Hero Bento Grid */
.hero-bento {
    display: grid; grid-template-columns: 1.8fr 1fr; grid-template-rows: 280px 200px;
    gap: 1.5rem; margin-bottom: 4rem;
}
.bento-item {
    border-radius: var(--radius); overflow: hidden; position: relative;
    background: #ddd; box-shadow: var(--shadow-card); cursor: pointer;
}
.bento-item:hover img { transform: scale(1.05); transition: transform 0.5s ease; }
.bento-large { grid-row: span 2; }
.bento-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, transparent);
    padding: 2rem; color: white; display: flex; flex-direction: column; justify-content: flex-end;
}
.bento-overlay h2 { font-size: 1.8rem; line-height: 1.2; margin-top: 0.5rem; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

/* Slider Pilihan Redaksi */
.section-title {
    font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary); padding-left: 15px;
}
.news-slider {
    display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1.5rem;
    scrollbar-width: none; margin-bottom: 3rem;
}
.card-slider {
    min-width: 300px; background: white; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: 0.3s; cursor: pointer;
}
.card-slider:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }

/* Iklan Banner */
.ad-banner {
    background: #e2e8f0; min-height: 120px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; margin: 3rem 0; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}

/* Dark Section (Focus Lensa) */
.dark-section {
    background: var(--dark); color: white; padding: 4rem 0; margin-bottom: 4rem; position: relative;
}
.dark-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}
.dark-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.dark-card { cursor: pointer; }
.dark-card h3 { font-size: 1rem; color: white; margin-top: 0.8rem; line-height: 1.4; }
.dark-card:hover h3 { color: var(--primary); }

/* Triple Category Grid */
.category-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 5rem; }
.cat-col { background: white; border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; border-top: 5px solid transparent; }
.cat-col.gold { border-top-color: var(--primary); } .cat-col.gold .cat-header { color: var(--primary); background: #fffcf5; }
.cat-col.red { border-top-color: var(--accent); } .cat-col.red .cat-header { color: var(--accent); background: #fff5f5; }
.cat-col.teal { border-top-color: #0f766e; } .cat-col.teal .cat-header { color: #0f766e; background: #f0fdfa; }

.cat-header { padding: 1rem 1.5rem; font-weight: 800; text-transform: uppercase; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; }
.cat-big-post-body { padding: 1.2rem; }
.cat-big-title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; margin-bottom: 0.5rem; }
.cat-list-item { display: flex; gap: 1rem; padding: 0.8rem 1.2rem; border-top: 1px dashed #eee; cursor: pointer; align-items: center; }
.cat-list-item img { width: 70px; height: 50px; border-radius: 6px; flex-shrink: 0; }
.cat-list-title { font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: #444; }

/* Bottom Section (Main Feed + Sidebar) */
.bottom-layout { display: grid; grid-template-columns: 2.5fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.list-post { display: flex; gap: 1.5rem; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px dashed #e2e8f0; }
.list-post img { width: 220px; height: 140px; border-radius: 8px; flex-shrink: 0; }
.list-post h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }

/* Sidebar Widgets Custom */
.custom-sidebar-widget { background: white; padding: 1.5rem; border-radius: var(--radius); margin-bottom: 2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.widget-header-accent { border-left: 4px solid var(--accent); padding-left: 10px; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; text-transform: uppercase; }

/* =========================================
   4. ARCHIVE / INDEX (GRID 2 KOLOM)
   ========================================= */
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.archive-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s; border: 1px solid #eee; }
.archive-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.archive-thumb { height: 200px; width: 100%; overflow: hidden; position: relative; }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.archive-card:hover .archive-thumb img { transform: scale(1.1); }
.archive-body { padding: 1.5rem; }
.archive-meta { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; display: flex; justify-content: space-between; }
.archive-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.8rem; line-height: 1.4; }

/* Pagination */
.pagination { margin-top: 3rem; display: flex; justify-content: center; gap: 0.5rem; }
.pagination .page-numbers { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: white; border: 1px solid #eee; color: var(--dark); font-weight: 700; border-radius: 8px; transition: 0.3s; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   5. SINGLE POST & PAGE (70/30 LAYOUT)
   ========================================= */
.detail-layout { display: grid; grid-template-columns: 70% 28%; gap: 2%; margin-top: 3rem; margin-bottom: 5rem; align-items: start; }
.detail-content { background: white; padding: 3rem; border-radius: var(--radius); box-shadow: 0 5px 20px rgba(0,0,0,0.05); overflow: hidden; }

/* Entry Typography */
.entry-header { margin-bottom: 2rem; border-bottom: 1px solid #eee; padding-bottom: 1.5rem; }
.entry-title { font-size: 2.2rem; font-weight: 800; line-height: 1.3; color: var(--dark); margin-bottom: 1rem; }
.entry-meta { font-size: 0.9rem; color: #888; display: flex; align-items: center; gap: 15px; }
.entry-meta i { color: var(--primary); margin-right: 5px; }
.entry-content { font-size: 1.125rem; line-height: 1.8; color: #334155; }
.entry-content p { margin-bottom: 1.5rem; }
.entry-content h2, .entry-content h3 { color: var(--dark); font-weight: 800; margin-top: 2.5rem; margin-bottom: 1rem; }
.entry-content blockquote { border-left: 5px solid var(--primary); background: #fffcf5; padding: 1.5rem; margin: 2rem 0; font-style: italic; color: #555; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
/* Drop Cap */
.entry-content > p:first-of-type::first-letter { float: left; font-size: 3.5rem; line-height: 0.8; font-weight: 800; color: var(--primary); margin-right: 12px; margin-top: 5px; }

/* Sidebar Default WP */
.sidebar-widget { background: white; padding: 1.5rem; border-radius: var(--radius); box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 2rem; border: 1px solid #f1f5f9; }
.sidebar-widget .widget-title { font-size: 1.1rem; font-weight: 800; text-transform: uppercase; margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 2px solid var(--primary); display: inline-block; }
.sidebar-widget ul { padding: 0; margin: 0; }
.sidebar-widget li { border-bottom: 1px dashed #eee; padding: 10px 0; }
.sidebar-widget li a { font-weight: 600; color: #333; font-size: 0.95rem; }

/* Share Buttons */
.share-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.5rem; margin: 3rem 0; }
.share-header { font-weight: 700; margin-bottom: 1rem; display: block; }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-share { padding: 10px 20px; border-radius: 6px; color: white !important; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: 0.2s; border: none; cursor: pointer; }
.btn-share:hover { transform: translateY(-3px); opacity: 0.9; }
.btn-share.fb { background: #1877F2; } .btn-share.wa { background: #25D366; } .btn-share.ig { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }

/* Related Posts */
.related-section { margin-top: 3rem; border-top: 1px dashed #ddd; padding-top: 3rem; }
.related-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.related-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: 0.3s; }
.related-card:hover { transform: translateY(-5px); }
.related-card img { width: 100%; height: 150px; object-fit: cover; }
.related-body { padding: 1rem; }
.related-body h4 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0; }

/* =========================================
   6. FOOTER
   ========================================= */
footer { background: var(--dark); color: white; padding-top: 4rem; margin-top: 5rem; border-top: 5px solid var(--primary); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 4rem; padding-bottom: 3rem; }
.footer-logo-box { background: white; padding: 10px 15px; border-radius: 8px; display: inline-block; margin-bottom: 1.5rem; }
.footer-logo-box img { width: 160px; height: auto; filter: none; }
.footer-col h4 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.footer-links li { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 8px 0; }
.footer-links li:last-child { border-bottom: none; }
.footer-links a { color: #cbd5e1; font-size: 0.95rem; display: flex; align-items: center; }
.footer-links a::before { content: "»"; color: var(--primary); font-size: 1.2rem; margin-right: 8px; line-height: 1; }
.footer-links a:hover { color: white; padding-left: 5px; }
.social-icons { display: flex; gap: 12px; margin-top: 1rem; }
.social-icons a { width: 38px; height: 38px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; }
.social-icons a:hover { background: var(--primary); transform: translateY(-3px); }

/* =========================================
   7. FINAL MOBILE FIX (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) {
    
    /* --- HEADER & MENU --- */
    .mobile-menu-btn { display: block; margin-left: auto; } /* Hamburger di kanan */
    
    .nav-right {
        display: none; /* Default Hidden */
        position: absolute; top: 100%; left: 0; width: 100%;
        background: white; flex-direction: column;
        padding: 1.5rem; box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        align-items: flex-start; gap: 1.5rem; border-top: 1px solid #eee;
        z-index: 9999;
    }
    .nav-right.active { display: flex; } /* Show on click */
    
    .nav-links ul { flex-direction: column; width: 100%; gap: 1rem; }
    .btn-cta { width: 100%; text-align: center; display: block; margin-top: 0.5rem; }
    
    /* --- LAYOUT UTAMA (FORCE 1 COLUMN) --- */
    /* Mengubah semua Grid Desktop menjadi 1 Kolom Vertikal */
    .hero-bento, 
    .category-showcase, 
    .dark-grid, 
    .bottom-layout, 
    .detail-layout, 
    .footer-grid, 
    .archive-grid, 
    .related-grid { 
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    /* --- HERO SECTION --- */
    .bento-large { height: 250px; }
    .bento-item { height: 200px; width: 100%; }
    .bento-overlay h2 { font-size: 1.4rem; }
    
    /* --- ARSIP & KATEGORI (FIXED) --- */
    /* 1. Tampilan Grid (Archive Card) */
    .archive-card { 
        width: 100%; 
        margin-bottom: 1rem; 
    }
    .archive-thumb { height: 200px; } /* Tinggi gambar fix di HP */
    .archive-title { font-size: 1.3rem; } /* Judul lebih besar biar jelas */
    
    /* 2. Tampilan List (List Post) */
    .list-post { 
        flex-direction: column; /* Gambar atas, teks bawah */
        gap: 1rem; 
        border-bottom: 1px solid #eee;
    }
    .list-post img { 
        width: 100%; 
        height: 200px; /* Gambar full width */
        border-radius: 8px;
    }
    .list-post h3 { font-size: 1.3rem; line-height: 1.4; }
    
    /* --- DETAIL POST --- */
    .detail-content { padding: 1.5rem; } /* Padding dikurangi */
    .entry-title { font-size: 1.8rem !important; line-height: 1.3; }
    
    /* Sidebar di Mobile */
    aside { margin-top: 2rem; }
    .sidebar-widget { padding: 1.5rem; }
    
    /* --- FOOTER --- */
    .footer-grid { gap: 3rem; text-align: left; }
    
    /* --- IKLAN --- */
    .ad-banner { margin: 2rem 0; font-size: 0.8rem; }
}