/* =================================================================
 * themes/tema1/style.css
 * Styling Lengkap, Responsif, dan Modern (Flexbox Only)
 * ================================================================= */

/* 1. VARIABEL dan RESET */
:root {
    --primary-color: #0069d9; 
    --secondary-color: #495057; 
    --accent-color: #20c997; 
    --light-bg: #f8f9fa;
    --info-bg: #e0f7fa; 
    --font-color: #212529;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--font-color);
    background-color: #fff;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 95%; 
    max-width: 1300px;
    margin: auto;
    padding: 0 15px;
}

/* 2. UTILITY DAN TYPOGRAPHY */
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.bg-light { background-color: var(--light-bg); }
.text-center { text-align: center; }
.mb-5 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1rem; }
.d-block { display: block; }
.text-muted { color: #6c757d; }

h1, h2, h3 { line-height: 1.2; margin-bottom: 0.5rem; }

.display-3 { font-size: 2.8rem; font-weight: 700; }
.display-4 { font-size: 2rem; font-weight: 600; }
.lead { font-size: 1.15rem; font-weight: 300; }

/* 3. TOMBOL DAN INTERAKSI */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-lg { padding: 15px 30px; font-size: 1.1rem; }
.btn-sm { padding: 8px 15px; font-size: 0.9rem; }

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: var(--secondary-color); color: white; }
.btn-mandiri, .btn-accent { background-color: var(--accent-color); color: white; }

.read-more { font-weight: bold; }

/* 4. HEADER DAN NAVIGASI */
#main-header {
    background: #fff;
    border-bottom: 3px solid var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text { font-weight: 900; font-size: 1.8rem; color: var(--primary-color); }
.logo-text-small { display: none; } 

#main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

#main-nav ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--font-color);
    font-weight: 500;
    transition: background-color var(--transition-speed);
    border-radius: 4px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* 5. SECTIONS (Home.php) */

/* Hero Section */
#hero-slider {
    background-color: var(--info-bg);
    padding: 5rem 0;
}
#hero-slider h1 { font-size: clamp(2rem, 5vw, 3.5rem); }

/* Statistik Grid (PERBAIKAN TOTAL DENGAN FLEXBOX) */
#informasi-statistik { background-color: var(--light-bg); }

.statistik-grid {
    display: flex; 
    justify-content: space-between; /* Menyebar item secara horizontal */
    flex-wrap: wrap; /* Penting untuk responsivitas */
    gap: 30px; 
    margin-top: 30px;
    align-items: flex-start; /* Mengatur item dari atas */
}

.stat-item {
    /* Flex Basis: 22% memastikan 4 kolom dengan ruang di antara mereka */
    flex: 0 0 calc(25% - 25px); 
    max-width: 300px;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    background: white;
    transition: transform var(--transition-speed);
    text-align: center;
}
.stat-item i {
    color: var(--primary-color);
    margin-bottom: 15px;
}
.stat-item .display-4 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* Layanan Cepat Grid */
.service-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.service-card {
    /* 4 kolom di desktop */
    flex: 1 1 calc(25% - 25px); 
    background: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    border-top: 5px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}
.service-card h4 { margin-top: 10px; }

/* Bottom Content (Pembangunan & Berita - Menggunakan Flexbox) */
.desktop-split-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; 
}
.desktop-split-grid .col-item {
    flex: 1 1 45%; /* 2 kolom di desktop */
}

.proyek-card {
    padding: 15px;
    border-left: 4px solid var(--accent-color);
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.status { 
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 5px;
}
.status.realisasi { background-color: #ffc107; color: #333; }
.status.selesai { background-color: var(--accent-color); }
.status.perencanaan { background-color: var(--primary-color); }

.berita-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

/* 6. FOOTER */
#main-footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}
.footer-grid .col {
    flex: 1 1 300px;
}

/* 7. BACK TO TOP BUTTON */
#back-to-top {
    display: none; 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    z-index: 999; 
    background-color: var(--primary-color); 
    color: white; 
    cursor: pointer; 
    width: 50px;
    height: 50px;
    border-radius: 50%; 
    font-size: 1.5rem;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* =================================================================
 * 8. MEDIA QUERIES (Responsif Penuh)
 * ================================================================= */

/* Tablet Vertikal (Max 992px) */
@media (max-width: 992px) {
    
    .display-3 { font-size: 2.5rem; }
    
    /* HEADER */
    .menu-toggle { display: block; }
    #main-nav {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 75px; 
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: 10px;
    }
    #main-nav.open { display: flex; }
    #main-nav ul { 
        flex-direction: column; 
        width: 100%; 
        padding: 0 20px;
    }
    
    /* GAYA MENU CARD DI MOBILE/TABLET */
    #main-nav ul li { 
        width: 100%; 
        text-align: left;
        margin-bottom: 8px; 
    }
    #main-nav ul li a {
        padding: 15px; 
        border: 1px solid #eee;
        background-color: var(--light-bg);
        border-radius: var(--border-radius);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        display: flex;
        align-items: center;
    }
    .nav-button { width: 100%; margin: 8px auto; text-align: center; }
    .nav-button .btn { width: 95%; padding: 12px; font-size: 1rem; }

    /* GRIDS */
    .statistik-grid,
    .service-grid {
        justify-content: space-evenly;
    }
    .stat-item { flex: 0 0 45%; } /* 2 kolom di tablet */
    .service-card { flex: 0 0 45%; } /* 2 kolom di tablet */
    
    /* FOOTER */
    .footer-grid {
        justify-content: center;
        text-align: center;
    }
}

/* Mobile (Max 576px) */
@media (max-width: 576px) {
    
    /* TYPOGRAPHY */
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.5rem; }
    
    /* HEADER */
    .logo-text { display: none; } 
    .logo-text-small { display: inline-block; font-size: 1.5rem; } 
    
    /* GRIDS (Stacked) */
    .statistik-grid,
    .service-grid,
    .desktop-split-grid {
        flex-direction: column; /* Stacked */
        gap: 15px;
    }
    .stat-item, .service-card, .desktop-split-grid .col-item {
        flex: 1 1 100%; /* 1 kolom penuh */
        max-width: none;
    }

    /* FOOTER */
    .footer-grid {
        flex-direction: column; 
        text-align: center;
        gap: 15px;
    }
}