
/* RESET & GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* WARNA UTAMA - TEMA HIJAU BAPPEDA */
:root {
    --primary-color: #1a7a3a;   /* Hijau Tua Institusional */
    --accent-color: #4CAF50;    /* Hijau Cerah Aksen */
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #fff;
    --secondary-bg: #e8f5e9;    
    --border-color: #ddd;       
}

/* --- HEADER & NAVIGASI UMUM --- */
.header {
    background: var(--bg-light);
    border-bottom: 3px solid var(--primary-color); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.logo-img {
    height: 50px; 
    width: auto;
    border-radius: 50%; 
}

.logo h1 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin: 0;
}
.logo span {
    display: block;
    font-size: 0.8em;
    color: #666;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    position: relative; 
}

.navbar ul li a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 15px;
    display: block;
    font-weight: bold;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 6px;
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s;
}

.navbar ul li a:hover {
    color: var(--accent-color);
    background-color: var(--secondary-bg); 
}

/* --- DROPDOWN MENU - STYLES UMUM --- */
.dropdown-menu {
    list-style: none;
}

.dropdown-menu li {
    width: 100%;
    position: static; 
}

.dropdown-menu li a {
    padding: 10px 20px;
    font-weight: normal;
    color: var(--text-dark);
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: var(--secondary-bg);
    color: var(--primary-color);
}

/* TOMBOL MOBILE TOGGLE */
.menu-toggle {
    display: none; 
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
}

/* --- DESKTOP STYLES (LEBAR > 768px) --- */
@media (min-width: 769px) {
    
    /* Terapkan positioning dan hiding hanya di desktop */
    .dropdown-menu {
        display: none !important; 
        position: absolute; 
        top: 100%; 
        left: 0;
        min-width: 200px;
        background: var(--bg-light);
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        padding: 10px 0;
        border-radius: 0 0 8px 8px;
        z-index: 10;
        /* Reset properti mobile */
        max-height: none !important; 
        overflow: visible !important;
        transition: none !important;
    }

    /* Tampilkan Dropdown saat hover di desktop */
    .has-dropdown:hover > .dropdown-menu {
        display: block !important;
    }

    .has-dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Grid Konten Utama - Desktop Default */
    .main-content-grid {
        display: grid;
        grid-template-columns: 2fr 1fr; /* 2/3 untuk main, 1/3 untuk sidebar */
        gap: 30px; 
    }
    
    /* Grid Data Kunci - Desktop Default */
    .data-widgets-grid { 
        display: grid; 
        grid-template-columns: repeat(4, 1fr); 
        gap: 20px; 
        text-align: center; 
    }

    /* Document Focus Grid - Desktop Default */
    .document-focus-grid { 
        display: grid; 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px; 
        margin-bottom: 20px; 
    }

    /* Footer - Desktop Default */
    .footer .container { 
        border-bottom: 1px solid #444; 
        padding-bottom: 30px; 
        display: flex; 
        justify-content: space-between; 
        flex-wrap: wrap; 
        gap: 20px; 
    }
    .footer-info { flex-basis: 40%; max-width: 40%; }
    .footer-nav { flex-basis: 30%; max-width: 30%; }
    .social-links { flex-basis: 20%; max-width: 20%; text-align: right; }
}

/* --- RESPONSIVENESS (MOBILE <= 768px) --- */
@media (max-width: 768px) {
    
    .container {
        width: 95%; /* Sedikit lebih lebar di mobile */
        padding: 10px 0;
    }

    /* Logo - Ubah ukuran di mobile */
    .logo h1 { font-size: 1.5em; }
    .logo span { font-size: 0.7em; }
    .logo-img { height: 40px; }

    /* Tampilkan Toggle Button */
    .menu-toggle {
        display: block; 
    }
    
    /* Sembunyikan Navbar secara default di mobile */
    .navbar {
        position: absolute;
        top: 70px; /* Jarak dari header setelah logo kecil */
        left: 0;
        width: 100%;
        max-height: 0; 
        background: var(--primary-color); 
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 4px 5px rgba(0,0,0,0.2);
    }
    .navbar.active {
        max-height: 100vh; 
        overflow-y: auto; 
    }
    .navbar ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    .navbar ul li a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-light); 
    }

    /* Pengaturan Sub-menu (Dropdown) Mobile */
    .has-dropdown {
        position: static; 
    }
    
    .dropdown-menu {
        display: block; 
        position: static; 
        max-height: 0; 
        overflow: hidden;
        transition: max-height 0.3s ease-in-out; 
        
        background: rgba(0, 0, 0, 0.15); 
        box-shadow: none;
        padding: 0; 
        border-radius: 0;
        min-width: unset;
    }
    
    .dropdown-menu.mobile-open {
        max-height: 1000px; 
        padding: 10px 0; 
    }

    .dropdown-menu li a {
        padding: 10px 40px; 
        color: var(--text-light);
    }
    
    .has-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-arrow {
        display: inline-block; 
        float: right; 
        margin-top: 2px;
    }
    
    /* --- RESPONSIVE GRID CONTENT (Wajib Stacked) --- */
    
    /* 1. Konten Utama: Stack Main dan Sidebar */
    .main-content-grid { 
        grid-template-columns: 1fr; /* Stacked */
        gap: 40px;
    }
    
    /* 2. Pintasan Data (Sidebar): Ubah ke 1 kolom (sudah default, tapi diulang untuk kejelasan) */
    .sidebar-block ul {
        grid-template-columns: 1fr; 
    }
    
    /* 3. WIDGET DATA KUNCI: 4 kolom menjadi 1 kolom */
    .data-widgets-grid {
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    /* 4. Dokumen Fokus: Ubah 2 kolom menjadi 1 kolom */
    .document-focus-grid { 
        grid-template-columns: 1fr; 
    }

    /* Hero Section Teks dan Padding */
    .hero-slide {
        padding: 80px 0; /* Kurangi padding di mobile */
    }
    .hero-slide h2 { font-size: 1.8em; }
    .hero-slide p { font-size: 1em; }
    
    /* --- FOOTER PERBAIKAN GRID MOBILE (Wajib Stacked) --- */
    .footer .container {
        flex-direction: column; 
        align-items: center;    
        gap: 20px; 
    }
    .footer-info, .footer-nav, .social-links { 
        flex-basis: 100%; 
        max-width: 100%; 
        text-align: center; 
        padding-bottom: 50px;
    }
    .footer-nav ul {
        display: inline-block; /* Agar list item tetap di tengah */
        text-align: center; 
    }
    .social-links {
        text-align: center; /* Ikon berada di tengah */
    }
    .social-links a {
        margin: 0 10px;
    }
    /* --- END FOOTER PERBAIKAN MOBILE --- */
}

/* --- STYLES LAINNYA (Non-Responsive Structural) --- */
.hero { position: relative; padding: 0; overflow: hidden; background-color: var(--primary-color); }
.slideshow-container { max-width: 100%; position: relative; margin: auto; }
.hero-slide { display: none; color: var(--text-light); padding: 120px 0; text-align: center; background-size: cover; background-position: center; position: relative; z-index: 1; }
.hero-slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); z-index: 2; }
.hero-slide .container { position: relative; z-index: 3; }
.hero-slide h2 { margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.hero-slide p { margin-bottom: 30px; }
.cta-button { display: inline-block; background: var(--accent-color); color: var(--text-light); padding: 12px 25px; text-decoration: none; border-radius: 8px; font-weight: bold; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transition: background 0.3s, transform 0.2s; }
.cta-button:hover { background: #66bb6a; transform: translateY(-2px); }
.dot { cursor: pointer; height: 15px; width: 15px; margin: 0 4px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; }
.active-dot { background-color: var(--accent-color); }
.fade { animation-name: fade; animation-duration: 1.5s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }
.widget-section { padding: 30px 0; background-color: var(--secondary-bg); border-bottom: 3px solid var(--border-color); }

.widget-item { background: var(--bg-light); padding: 20px 10px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-top: 5px solid var(--accent-color); transition: transform 0.3s; }
.widget-item:hover { transform: scale(1.03); }
.widget-item i { font-size: 1.8em; color: var(--primary-color); margin-bottom: 5px; }
.widget-item h4 { font-size: 0.9em; color: #666; margin-bottom: 5px; }
.data-value { display: block; font-size: 1.8em; font-weight: bold; color: var(--primary-color); margin-bottom: 5px; }
.widget-item p { font-size: 0.75em; color: #999; margin: 0; }
.portal-grid-area { padding: 40px 0; background-color: var(--bg-light); }
h3 { font-size: 1.5em; color: var(--primary-color); margin: 25px 0 15px 0; border-left: 5px solid var(--accent-color); padding-left: 10px; line-height: 1.2; }

/* STYLES TAMBAHAN UNTUK NEWS CAROUSEL */
.news-carousel-container { position: relative; max-width: 100%; margin: 0 auto; margin-bottom: 10px; }
.news-slide { display: none; }
.featured-article { background: var(--bg-light); padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.featured-article img { max-width: 100%; height: auto; border-radius: 8px; margin-bottom: 15px; }
.category-tag { display: inline-block; background: var(--accent-color); color: var(--text-light); padding: 3px 8px; border-radius: 4px; font-size: 0.75em; font-weight: bold; margin-bottom: 10px; }
.read-more { color: var(--primary-color); font-weight: bold; text-decoration: none; }
.news-prev, .news-next { cursor: pointer; position: absolute; top: 50%; width: auto; margin-top: -22px; padding: 16px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; background-color: rgba(0,0,0,0.5); z-index: 5; }
.news-next { right: 0; border-radius: 3px 0 0 3px; }
.news-prev:hover, .news-next:hover { background-color: rgba(0,0,0,0.8); }
.news-dot { cursor: pointer; height: 10px; width: 10px; margin: 0 4px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; }
.active-news-dot { background-color: var(--primary-color); }
.fade-news { animation-name: fade; animation-duration: 1.5s; }
/* END STYLES NEWS CAROUSEL */

/* Document Focus Grid Card */
.card-compact { background: var(--secondary-bg); padding: 20px; border-radius: 6px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: background 0.3s; }
.card-compact:hover { background: #d4e8d5; }
.card-compact i { font-size: 2em; color: var(--primary-color); margin-bottom: 10px; }
.card-compact h4 { color: var(--text-dark); font-size: 1.1em; }
.btn-block-link { display: block; background: var(--accent-color); color: var(--text-light); padding: 8px; border-radius: 4px; text-decoration: none; margin-top: 15px; font-weight: bold; transition: background 0.3s; }
.btn-block-link:hover { background: #66bb6a; }

/* --- SIDEBAR PINTASAN DATA (CARD STYLE) --- */
.sidebar-block ul {
    list-style: none;
    padding: 0;
    display: grid; 
    grid-template-columns: 1fr; /* Default 1 kolom, agar di mobile tidak perlu diubah */
    gap: 10px; 
}

.sidebar-block ul li a {
    display: block; 
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.sidebar-block ul li a:hover {
    background-color: #f0f8ff; 
    transform: translateX(5px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* --- END SIDEBAR STYLES --- */

.footer { background: #222; color: #ccc; padding-top: 40px; }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav a { color: #ccc; text-decoration: none; display: block; padding: 3px 0; font-size: 0.9em; }
.footer-nav a:hover { color: var(--accent-color); text-decoration: underline; }
.footer-info h4, .footer-nav h4, .social-links h4 { color: var(--text-light); margin-bottom: 15px; }
.footer-info p { margin: 5px 0; font-size: 0.9em; }
.footer-info i { margin-right: 10px; color: var(--accent-color); }
.social-links a { color: var(--text-light); font-size: 1.5em; margin-left: 15px; transition: color 0.3s; }
.social-links a:hover { color: var(--accent-color); }
.copyright { text-align: center; padding: 15px 0; background: #111; }
.copyright p { margin: 0; font-size: 0.8em; }

