/* === VARIABEL WARNA (Aliansiena Pro) === */
:root {
    --primary: #004080;       /* Biru Tua */
    --primary-dark: #002a5c;
    --accent: #ff5722;        /* Oranye */
    --secondary: #00bcd4;     /* Cyan */
    
    --bg-body: #f4f6f8;       /* Abu-abu news portal */
    --bg-card: #ffffff;
    --text-main: #111827;     /* Hitam pekat agar terbaca jelas */
    --text-muted: #6b7280;
    --border: #e5e7eb;
    
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #374151;
    --primary: #60a5fa;
    --shadow: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* === HEADER === */
header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 1000;
    border-top: 4px solid var(--accent);
    height: 70px; display: flex; align-items: center;
}
.container { width: 100%; max-width: 1150px; margin: 0 auto; padding: 0 20px; }
.header-content { display: flex; justify-content: space-between; align-items: center; }

/* LOGO */
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-img-icon { height: 40px; width: auto; object-fit: contain; } 
.logo-text-custom { font-size: 1.4rem; font-weight: 800; color: var(--primary); line-height: 1.1; display: flex; flex-direction: column; }
.logo-text-custom span { font-size: 0.7rem; color: var(--accent); font-weight: 600; letter-spacing: 2px; }

/* MENU */
.nav-menu { display: flex; gap: 5px; align-items: center; }
.nav-link { 
    font-weight: 600; color: var(--text-main); padding: 8px 15px; 
    border-radius: 6px; font-size: 0.95rem;
}
.nav-link:hover { background: var(--primary); color: white; }
.nav-link.active { background: var(--primary); color: white; }
.nav-toggle { display: none; background: transparent; border: none; font-size: 1.6rem; color: var(--text-main); cursor: pointer; }

/* TOMBOL SWITCH */
.action-group { display: flex; gap: 10px; margin-left: 15px; }
.action-btn { 
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); 
    background: transparent; color: var(--text-main); cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
}

/* === LAYOUT UTAMA === */
.main-layout { display: grid; grid-template-columns: 2.5fr 1fr; gap: 30px; padding: 30px 0; flex: 1; }

/* HERO (HEADLINE) */
.hero-card { 
    background: var(--bg-card); border-radius: 12px; overflow: hidden; 
    box-shadow: var(--shadow); margin-bottom: 30px; border: 1px solid var(--border);
}
.hero-img { width: 100%; height: 350px; object-fit: cover; }
.hero-body { padding: 25px; }
.hero-title { font-size: 1.8rem; margin-bottom: 10px; line-height: 1.3; font-weight: 800; }
.hero-title a:hover { color: var(--accent); }

/* GRID ARTIKEL */
.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { 
    background: var(--bg-card); border-radius: 10px; overflow: hidden; 
    box-shadow: var(--shadow); border: 1px solid var(--border); 
    display: flex; flex-direction: column; transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card-img { height: 160px; width: 100%; object-fit: cover; }
.card-body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.card-date { font-size: 0.75rem; color: var(--secondary); font-weight: 700; margin-bottom: 5px; text-transform: uppercase; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; color: var(--text-main); }
.card-link { color: var(--accent); font-weight: 700; font-size: 0.85rem; margin-top: auto; }

/* SIDEBAR WIDGET */
.widget { background: var(--bg-card); padding: 20px; border-radius: 10px; margin-bottom: 25px; border: 1px solid var(--border); }
.widget-title { 
    font-size: 1.1rem; font-weight: 800; color: var(--primary); 
    border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 15px; 
}

/* WIDGET POPULER (KOTAK KECIL) */
.pop-item { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.pop-item:last-child { border: none; margin: 0; padding: 0; }
.pop-img { width: 70px; height: 70px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.pop-info h4 { font-size: 0.9rem; margin: 0 0 5px; line-height: 1.3; }
.pop-info h4 a:hover { color: var(--accent); }
.pop-date { font-size: 0.7rem; color: var(--text-muted); }

/* PAGINATION (Gaya Block) */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.page-btn {
    background: var(--bg-card); border: 1px solid var(--border); padding: 10px 20px;
    border-radius: 6px; color: var(--text-main); font-weight: 700; cursor: pointer;
}
.page-btn:hover:not(:disabled) { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === ARTIKEL BACA (PRO NEWS STYLE) === */
.reader-container { 
    max-width: 800px; margin: 0 auto; background: var(--bg-card); 
    padding: 40px; border-radius: 12px; box-shadow: var(--shadow); 
}
.article-header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.article-title { font-size: 2.2rem; line-height: 1.25; color: var(--primary); margin-bottom: 10px; }

/* Isian Artikel */
.markdown-body { 
    font-size: 1.125rem; /* 18px standar berita */
    line-height: 1.8; color: var(--text-main); text-align: left; 
}
.markdown-body p { margin-bottom: 1.5em; }
.markdown-body h2 { font-size: 1.5rem; color: var(--text-main); margin-top: 1.5em; font-weight: 800; }
.markdown-body a { color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--secondary); }
.markdown-body a:hover { background: var(--secondary); color: white; text-decoration: none; }
.markdown-body img { width: 100%; border-radius: 8px; margin: 20px 0; }

/* SHARE BUTTON (Sesuai Permintaan) */
.share-section { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.share-label { font-weight: 700; margin-bottom: 15px; display: block; }
.share-icons { display: flex; gap: 10px; }
.share-icon { 
    width: 40px; height: 40px; border-radius: 50%; color: white; 
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; 
    transition: transform 0.2s; 
}
.share-icon:hover { transform: translateY(-3px); filter: brightness(1.1); }

/* Warna Fix */
.sh-wa { background: #25d366; }
.sh-fb { background: #1877f2; }
.sh-vk { background: #0077ff; }
.sh-tg { background: #0088cc; }
.sh-ig { background: linear-gradient(45deg, #f09433, #bc1888); } /* IG Gradient */

/* FOOTER */
footer { background: #0f172a; color: white; padding: 60px 0 20px; margin-top: auto; border-top: 5px solid var(--secondary); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: var(--secondary); margin-bottom: 20px; font-weight: 700; }
.footer-links a { color: #94a3b8; display: block; margin-bottom: 8px; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }

/* SOSMED FOOTER (Warna Asli) */
.social-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.soc-item { 
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; 
    border-radius: 8px; color: white; font-size: 1rem; transition: 0.3s;
}
.soc-item:hover { transform: scale(1.1); }

/* Brand Colors */
.bg-mas { background: #6364ff; }
.bg-ig { background: linear-gradient(45deg, #f09433, #bc1888); }
.bg-fb { background: #1877f2; }
.bg-tg { background: #0088cc; }
.bg-vk { background: #0077ff; }
.bg-med { background: #000; border: 1px solid white; }
.bg-tum { background: #36465d; }
.bg-red { background: #ff4500; }
.bg-dis { background: #5865f2; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .nav-menu { 
        display: none; position: absolute; top: 70px; left: 0; right: 0; 
        background: var(--bg-card); flex-direction: column; padding: 15px; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); gap: 10px;
    }
    .nav-menu.active { display: flex; }
    .nav-link { width: 100%; text-align: left; background: var(--bg-body); border: 1px solid var(--border); }
    
    .nav-toggle { display: block; }
    .main-layout { grid-template-columns: 1fr; gap: 30px; padding: 20px 0; }
    
    /* Tombol Switch Pindah ke Bawah Menu di HP */
    .mobile-actions { display: flex; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
    .desktop-actions { display: none; }
    
    /* Layout Artikel HP (Anti Gepeng) */
    .reader-container { padding: 20px; box-shadow: none; border-radius: 0; width: 100%; }
    .article-title { font-size: 1.8rem; }
    .hero-img { height: 220px; }
}
