/* --- Variabel Warna & Reset Dasar --- */
:root {
    --blue-light: #4e95ff;
    --blue-dark: #0d6efd;
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 { font-weight: 600; }

/* =======================================================================
   HEADER & NAVIGASI + HAMBURGER
======================================================================= */
header {
    background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    width: 40px;
    height: auto;
}

/* MENU UTAMA (DESKTOP) */
header nav {
    display: flex;
    gap: 12px;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

header nav a.active {
    background-color: white;
    color: var(--blue-dark);
    font-weight: 500;
}

/* HAMBURGER MOBILE */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

/* SEARCH ICON */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-icon {
    width: 24px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.search-icon:hover { opacity: 0.7; }

/* SEARCH BOX */
.search-box {
    position: absolute;
    right: 20px;
    top: 80px;
    width: 250px;
    display: none;
}
.search-box input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 30px;
    border: 1px solid #ddd;
    outline: none;
    transition: all 0.3s ease;
}

/* =======================================================================
   HERO SECTION
======================================================================= */
.hero {
    position: relative;
    height: 500px;
    width: 100%;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    animation: fadeEffect 18s infinite;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }
.hero-slide:nth-child(5) { animation-delay: 24s; }

@keyframes fadeEffect {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

.hero-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    padding: 40px;
    border-radius: 12px;
}

.hero h1 { font-size: 48px; margin-bottom: 10px; }

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* =======================================================================
   PAGE SECTION & CONTENT
======================================================================= */
.page-section { padding: 80px 0; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
}

/* KARTU STATISTIK */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.stat-card:hover {
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    font-size: 48px;
    color: var(--blue-dark);
    margin-bottom: 5px;
}

.stat-card p {
    color: #6c757d;
    font-size: 16px;
}

/* BUTTON */
.btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn.btn-secondary {
    background: #6c757d;
}

/* CARD BERITA */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.post-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content { padding: 25px; }

.post-card-content h4 a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 18px;
}

.post-card-content p {
    font-size: 14px;
    color: #6c757d;
}

.post-card-content small { color: #adb5bd; }

/* =======================================================================
   FOOTER
======================================================================= */
footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 60px 0 0 0;
    margin-top: 60px;
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--blue-dark);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

/* =======================================================================
   RESPONSIVE MENU (MOBILE)
======================================================================= */
@media (max-width: 768px) {

    .menu-toggle { display: block; }

    header nav {
        display: none;
        flex-direction: column;
        background: var(--blue-dark);
        width: 100%;
        padding: 15px 0;
        border-radius: 0 0 12px 12px;
        margin-top: 10px;
    }

    header nav.show { display: flex; }

    header nav a {
        padding: 12px 0;
        text-align: center;
    }

    .search-box {
        right: 10px;
        top: 100px;
        width: 90%;
    }
}
