/*
Theme Name: CatatanPublik Final Fix
Theme URI: http://catatanpublik.com
Description: Tema final dengan Navbar Fixed Stabil.
Version: 12.0
*/

/* 1. RESET & DASAR */
:root {
    --primary: #0056b3; --accent: #ffcc00; --dark: #1e293b; 
    --gray: #64748b; --light: #f8fafc; --white: #ffffff; 
    --placeholder: #e2e8f0; --radius: 8px;
}
* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif; background-color: var(--light);
    color: var(--dark); margin: 0; line-height: 1.6;
    padding-top: 90px; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 2. HEADER (NAVBAR) */
.site-header {
    background: var(--white); border-bottom: 4px solid var(--primary);
    padding: 15px 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 99999; height: auto; display: block;
}
.header-wrap {
    display: flex; justify-content: space-between; align-items: center;
    position: relative; width: 100%;
}
.logo a {
    font-size: 24px; font-weight: 900; color: var(--primary);
    text-transform: uppercase; letter-spacing: -1px; display: block;
}
/* Menu Desktop */
.main-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 700; font-size: 14px; text-transform: uppercase; color: var(--dark); }

/* Tombol Menu HP */
.mobile-menu-btn { display: none; background: transparent; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span {
    display: block; width: 28px; height: 3px; background-color: var(--dark);
    margin: 6px 0; border-radius: 3px; transition: 0.3s;
}

/* 3. HIGHLIGHT */
.highlight-section { margin-bottom: 40px; margin-top: 10px; }
.section-label {
    font-size: 16px; font-weight: 800; color: var(--dark); margin-bottom: 20px;
    text-transform: uppercase; border-left: 5px solid var(--primary); padding-left: 15px;
}
.highlight-wrapper {
    display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px;
    scrollbar-width: thin;
}
.highlight-card {
    min-width: 240px; width: 240px; background: var(--white); 
    border-radius: var(--radius); overflow: hidden; position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); flex-shrink: 0;
}
.highlight-img { height: 140px; background-color: var(--placeholder); }
.highlight-img img { width: 100%; height: 100%; object-fit: cover; }
.highlight-title { font-size: 14px; font-weight: 700; padding: 12px; margin: 0; color: var(--dark); }
.rank-badge {
    position: absolute; top: 0; left: 0; background: var(--accent);
    color: #000; font-size: 12px; font-weight: 800; padding: 4px 8px;
}

/* 4. LAYOUT GRID */
.content-grid {
    display: grid; grid-template-columns: 2.5fr 1fr; 
    gap: 40px; margin-bottom: 60px; align-items: start;
}

/* KUNCI PERBAIKAN GRID: Mencegah kolom utama melebar tak terbatas akibat teks panjang */
.content-grid > main {
    min-width: 0;
}

/* 5. BERITA LIST */
.news-list { display: flex; flex-direction: column; gap: 20px; }

.news-item {
    display: flex; background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: transform 0.2s;
}

.news-item:hover { transform: translateY(-3px); }

/* Gambar diatur agar pas 25% dan tidak menyusut */
.news-item-img { 
    width: 25%; min-height: 160px; background: var(--placeholder); 
    position: relative; flex-shrink: 0; 
}

.news-item-img img { 
    width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; 
}

/* KUNCI PERBAIKAN FLEXBOX: min-width 0 mencegah teks mendorong bingkai ke kanan */
.news-item-body { 
    width: 75%; padding: 20px; display: flex; flex-direction: column; justify-content: center;
    min-width: 0; 
}

.news-cat { font-size: 11px; font-weight: 800; color: var(--primary); text-transform: uppercase; margin-bottom: 8px; }

.news-item-title { 
    font-size: 19px; font-weight: 800; margin: 0 0 10px 0; line-height: 1.3; color: var(--dark); 
}

/* Memaksa link teks judul untuk turun ke baris baru jika mentok */
.news-item-title a {
    display: block;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-item-excerpt { 
    font-size: 14px; color: var(--gray); margin-bottom: 10px; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; 
}

.news-meta { font-size: 12px; color: #94a3b8; }

/* 6. SIDEBAR & WIDGETS */
.sidebar-widget {
    background: var(--white); padding: 25px; border-radius: var(--radius);
    margin-bottom: 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.widget-header {
    font-size: 16px; font-weight: 800; color: var(--dark); border-bottom: 2px solid var(--primary);
    padding-bottom: 12px; margin-bottom: 20px; text-transform: uppercase;
}
/* Search Form */
.search-form { display: flex; width: 100%; }
.search-input { 
    width: 100%; padding: 12px; border: 1px solid #cbd5e1; 
    border-radius: 4px 0 0 4px; border-right: none;
}
.search-btn { 
    background: var(--primary); color: white; border: none; 
    padding: 0 20px; border-radius: 0 4px 4px 0; font-weight: bold; cursor: pointer;
}
/* Trending List */
.trending-list { list-style: none; padding: 0; margin: 0; }
.trending-item { display: flex; gap: 15px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.trend-number { font-size: 32px; font-weight: 900; color: #e2e8f0; line-height: 0.8; }
.trend-title { font-size: 14px; font-weight: 700; color: var(--dark); }
/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { background: #f1f5f9; color: var(--primary); padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 700; }
/* Social */
.social-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn { text-align: center; padding: 12px; border-radius: 4px; font-size: 13px; font-weight: 700; color: white; }
.soc-ig { background: #E1306C; } .soc-fb { background: #1877F2; } 
.soc-tw { background: #000; } .soc-yt { background: #FF0000; }

/* 7. RESPONSIF HP */
@media (max-width: 768px) {
    .header-wrap { flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
    .mobile-menu-btn { display: block; }
    .main-nav {
        display: none; width: 100%; background: var(--white);
        border-top: 1px solid #eee; margin-top: 15px; padding: 0;
        position: absolute; top: 100%; left: 0; right: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 15px 20px; border-bottom: 1px solid #f1f5f9; }
    
    .content-grid { grid-template-columns: 1fr; gap: 30px; }
    .news-item { flex-direction: column; }
    .news-item-img { width: 100%; height: 200px; }
    .news-item-body { width: 100%; }
}

/* =========================================
   8. FOOTER MODERN UI (V2 - GRID SYSTEM)
   ========================================= */

/* Container Utama Footer */
.site-footer {
    background-color: #0f172a; 
    color: #94a3b8; 
    margin-top: 120px; 
    font-size: 15px;
    position: relative;
}

/* Hiasan Garis Aksen di Pucuk */
.footer-top-accent {
    height: 4px;
    background: linear-gradient(to right, var(--primary) 30%, var(--accent) 30%, var(--accent) 70%, var(--primary) 70%);
    width: 100%;
}

/* --- GRID LAYOUT (KUNCI KERAPIAN) --- */
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 40px;
    padding: 70px 0 50px;
}

/* Judul Widget */
.footer-title {
    color: #ffffff;
    font-size: 18px; font-weight: 800;
    margin-bottom: 25px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* === WIDGET 1: Brand === */
.footer-logo {
    font-size: 26px; font-weight: 900; color: #fff;
    margin-bottom: 20px; letter-spacing: -1px;
}
.text-primary { color: var(--primary) !important; }
.footer-about { line-height: 1.7; margin-bottom: 25px; }

/* Sosmed */
.footer-social { display: flex; gap: 10px; }
.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1); color: #fff;
    border-radius: 50%; transition: 0.3s; text-decoration: none;
}
.social-icon:hover { transform: translateY(-3px); background: var(--primary); }

/* === WIDGET 2: Menu === */
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 14px; }
.footer-menu a {
    color: #cbd5e1; text-decoration: none; transition: 0.3s;
    display: flex; align-items: center;
}
.footer-menu a:hover { color: var(--accent); padding-left: 8px; }
.footer-menu a::before {
    content: '›'; margin-right: 8px; font-size: 18px; color: var(--primary);
}

/* === WIDGET 3: Kontak === */
.footer-contact-list { list-style: none; padding: 0; margin: 0; }
.footer-contact-list li {
    display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px;
    color: #cbd5e1; line-height: 1.5;
}
.footer-contact-list .icon {
    color: var(--primary); font-size: 22px; margin-top: 2px;
    background: rgba(0, 86, 179, 0.1); padding: 8px; border-radius: 8px;
}

/* === WIDGET 4: Newsletter === */
.newsletter-widget {
    background: rgba(255,255,255,0.05); padding: 25px; 
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
}
.newsletter-desc { font-size: 14px; margin-bottom: 20px; }
.footer-newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-newsletter-form input {
    width: 100%; padding: 12px 15px; border-radius: 6px; border: none;
    background: rgba(255,255,255,0.1); color: #fff; margin-bottom: 10px;
}
.footer-newsletter-form button {
    width: 100%; background: var(--primary); color: #fff; border: none; 
    padding: 12px 20px; border-radius: 6px; font-weight: 700; cursor: pointer;
}
.footer-newsletter-form button:hover { background: var(--accent); color: #000; }

/* === COPYRIGHT === */
.site-info-bar {
    background: #090f1b; padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px;
}
.info-bar-flex {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.footer-legal-links { display: flex; gap: 25px; }
.footer-legal-links a { color: #94a3b8; font-weight: 600; }

/* === RESPONSIF HP/TABLET === */
@media (max-width: 992px) {
    .footer-widgets-grid { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 768px) {
    .footer-widgets-grid { grid-template-columns: 1fr; text-align: center; gap: 50px; } 
    .footer-social { justify-content: center; }
    .footer-menu a { justify-content: center; }
    .footer-contact-list li { justify-content: center; text-align: left; }
    .info-bar-flex { flex-direction: column; text-align: center; }
    .footer-legal-links { justify-content: center; }
}