/*
 * ===============================================
 * FILE CSS UTAMA (GABUNGAN)
 * Menggabungkan style asli.php dan style halaman artikel.
 * ===============================================
*/

/* * --- BAGIAN 1: STYLE UTAMA DARI ASLI.PHP ---
*/
:root {
    --primary: #1b5e20;
    --primary-light: #4caf50;
    --primary-dark: #0d3c10;
    --secondary: #e8f5e9;
    --accent: #ffc107;
    --white: #ffffff;
    --text: #212121;
    --text-light: #757575;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px; /* Ditambahkan */
    --gray-light: #f5f5f5; /* Ditambahkan */
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text);
    line-height: 1.6;
    background-color: #f8f9fa; /* Warna latar belakang utama */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 5px 8px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--text);
}

.btn-accent:hover {
    background-color: #ff9800;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-dark);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent);
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    /* Menerapkan max-width container */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 15px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    font-weight: 600;
    padding: 10px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
}

.emergency-number {
    background-color: var(--accent);
    color: var(--text);
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 700;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.emergency-number i {
    margin-right: 5px;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* --- Styles Tambahan dari semua_layanan.php yang penting (Contoh: Service Card) --- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card-img {
    height: 200px;
    overflow: hidden;
    background-color: var(--gray-light);
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
    transform: scale(1.05);
}
/* ... (Sisa style service card, filter, recent services, dan lain-lain dari asli.php) ... */


/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    gap: 5px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--primary);
}

.pagination a:hover {
    background-color: var(--primary);
    color: white;
}

.pagination .current, .pagination a.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* * --- RESPONSIVE STYLE (PENTING UNTUK MENU MOBILE) ---
*/

@media (max-width: 992px) {
    /* Menu Navigasi (Sembunyikan dan geser) */
    .nav-menu {
        position: fixed;
        top: 80px; 
        left: -100%;
        background-color: var(--white);
        width: 80%;
        height: calc(100vh - 80px);
        flex-direction: column;
        padding: 40px 20px;
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }
    
    /* Tombol Toggle Menu (Harus FLEX untuk center) */
    .mobile-toggle {
            /* [PERBAIKAN KUAT] Paksa properti tampilan dan bingkai */
            display: flex !important; /* <--- PAKSA FLEX */
            
            border: 1px solid var(--primary) !important; /* <--- PAKSA BORDER */
            padding: 5px 10px !important; /* <--- PAKSA PADDING */
            border-radius: var(--border-radius) !important; /* <--- PAKSA RADIUS */
            align-items: center !important;
            justify-content: center !important;
            
            /* Properti dasar lainnya */
            font-size: 1.5rem;
            cursor: pointer;
        }
    

    .emergency-number span {
        display: none;
    }
}

@media (max-width: 768px) {
    /* ... (style responsive lainnya dari asli.php) ... */
}


/* * --- BAGIAN 2: STYLE ARTIKEL KHUSUS (.article-container) ---
*/

.article-container { 
    max-width: 700px;
    margin: 20px auto 20px auto; 
    background: var(--white); 
    border-radius: var(--border-radius); 
    padding: 25px; 
    box-shadow: var(--shadow);
}

@media (max-width: 768px) { 
    .article-container { 
        margin-left: 15px; 
        margin-right: 15px; 
        padding: 20px;
    }
}

.article-container h2 {
    text-align: center; 
    color: var(--primary-dark); 
    margin-bottom: 25px; 
    font-size: 1.8rem;
}

/* Style Gambar Header Artikel (Metode Background-Image) */
.article-header-image {
    width: 100%;
    height: 200px; /* Tinggi gambar (sesuai permintaan terakhir) */
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    
    background-size: cover;       
    background-position: center center; /* Atur fokus gambar di tengah */
    background-repeat: no-repeat;
}

.folder-list { list-style: none; padding-left: 0; }
.folder-list li { margin-bottom: 10px; }
.folder-list a { 
    display: block; 
    padding: 15px 20px; 
    background-color: var(--secondary);
    color: var(--primary-dark);
    text-decoration: none; 
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}
.folder-list a:hover { 
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.back-button { 
    display: inline-block; 
    padding: 10px 20px; 
    background-color: var(--primary-light);
    color: var(--white); 
    text-decoration: none; 
    border-radius: var(--border-radius); 
    margin-bottom: 20px; 
    font-size: 0.9rem; 
    border: none; 
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}
.back-button:hover { 
    background-color: var(--primary-dark);
}

.error-message { color: red; text-align: center; margin-top: 20px; font-weight: bold; }
.message-info { text-align: center; margin-top: 20px; color: var(--text-light); }

.filter-toggles { margin-bottom: 20px; text-align: center; }
.filter-toggles a { 
    display: inline-block; 
    padding: 8px 16px; 
    border: 1px solid var(--primary-light); 
    background: var(--white); 
    color: var(--primary-light); 
    text-decoration: none; 
    font-size: 0.9rem;
    font-weight: 500;
}
.filter-toggles a:first-child { border-radius: 20px 0 0 20px; }
.filter-toggles a:last-child { border-radius: 0 20px 20px 0; margin-left: -1px; }
.filter-toggles a.active { 
    background-color: var(--primary-light); 
    color: var(--white); 
    z-index: 2; 
    position: relative; 
}

.search-form { display: flex; margin-bottom: 25px; }
.search-box { 
    flex-grow: 1; 
    padding: 12px 15px; 
    font-size: 1rem; 
    border: 1px solid #ddd; 
    border-radius: var(--border-radius) 0 0 var(--border-radius); 
    min-width: 0; 
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--secondary);
}
.search-button { 
    padding: 12px 18px; 
    font-size: 1rem; 
    border: 1px solid var(--primary); 
    background-color: var(--primary); 
    color: var(--white); 
    cursor: pointer; 
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: background-color 0.3s;
}
.search-button:hover { 
    background-color: var(--primary-dark); 
}

@media (max-width: 640px) { 
    .search-form {
        width: 100%; 
        margin-left: auto;
        margin-right: auto;
    }
}

.article-pagination { 
    text-align: center; 
    margin-top: 25px; 
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.article-pagination a { 
    color: var(--primary); 
    padding: 8px 14px; 
    text-decoration: none; 
    border: 1px solid #ddd; 
    margin: 0;
    border-radius: var(--border-radius); 
    transition: all 0.3s;
}
.article-pagination a.active { 
    background-color: var(--primary); 
    color: var(--white); 
    border-color: var(--primary);
}
.article-pagination a:hover:not(.active) { 
    background-color: var(--secondary); 
    border-color: var(--primary-light);
}



@media (max-width: 576px) {
    .logo-text {
        font-size: 1.2rem;
    }
            
    .hero h1 {
        font-size: 1.8rem;
    }
            
    .section-title h2 {
        font-size: 1.8rem;
    }
            
    .stat-item {
        min-width: 100px;
    }
}
        