/* Warna Utama */
:root {
    --color-primary: #004D99; /* Biru Tua - Melambangkan Ilmu */
    --color-secondary: #008000; /* Hijau - Melambangkan Islam/Alam */
    --color-accent: #FFC300; /* Kuning - Aksen */
    --color-light: #f4f4f4;
    --color-dark: #333;
}

/* Reset Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: white;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

a {
    text-decoration: none;
    color: var(--color-dark);
}

ul {
    list-style: none;
}

/* 1. Header */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Ukuran Logo */
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8em;
    color: var(--color-primary);
    font-weight: 700;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li a {
    padding: 10px 15px;
    display: block;
    font-weight: 600;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--color-secondary);
}

.ppdb-button {
    background-color: var(--color-accent) !important;
    color: var(--color-dark) !important;
    border-radius: 5px;
    padding: 8px 15px !important;
    margin-left: 10px;
}

.menu-toggle {
    display: none; /* Sembunyikan di desktop */
    font-size: 1.5em;
    cursor: pointer;
    color: var(--color-primary);
}

/* Tombol Umum */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #006400; /* Hijau lebih gelap */
}

.btn-secondary {
    background-color: var(--color-primary);
    color: white;
}

.btn-secondary:hover {
    background-color: #003366; /* Biru lebih gelap */
}

/* 2. Hero Section */
.hero {
    background: url('https://via.placeholder.com/1600x600/004D99/FFFFFF?text=FOTO+SEKOLAH+ASRI') center/cover no-repeat;
    height: 450px;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay gelap */
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h2 {
    font-size: 2.8em;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    font-weight: 400;
}

/* 3. Keunggulan */
.keunggulan {
    padding: 60px 0;
    background-color: var(--color-light);
}

.keunggulan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.card {
    background: white;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.card i {
    font-size: 2.5em;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 10px;
    color: var(--color-primary);
}

/* 4. Berita */
.berita {
    padding: 60px 0;
}

.berita h2 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 40px;
    font-size: 2em;
}

.berita-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.berita-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.berita-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.berita-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.berita-card h4 {
    padding: 15px;
    font-size: 1.1em;
    color: var(--color-primary);
}

.berita-card .date {
    padding: 0 15px 15px;
    color: #666;
    font-size: 0.9em;
}

.text-center {
    text-align: center;
}

/* 5. Footer */
footer {
    background-color: var(--color-dark);
    color: white;
    padding: 40px 0 10px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    border-bottom: 1px solid #555;
    padding-bottom: 30px;
    margin-bottom: 15px;
}

.footer-info h3, .footer-links h3, .footer-social h3 {
    color: var(--color-accent);
    margin-bottom: 15px;
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.footer-links ul li a {
    color: white;
    display: block;
    margin-bottom: 5px;
}

.footer-social a {
    color: white;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8em;
    color: #aaa;
}


/* =========================== */
/* MOBILE RESPONSIVE DESIGN */
/* =========================== */
@media (max-width: 992px) {
    .main-nav {
        /* Sembunyikan Navigasi Utama */
        display: none;
    }

    .main-nav ul.active {
        /* Tampilkan Navigasi saat menu-toggle diklik */
        display: block;
        position: absolute;
        top: 80px; /* Di bawah header */
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 5px rgba(0,0,0,0.1);
    }

    .main-nav ul li {
        border-bottom: 1px solid var(--color-light);
    }

    .main-nav ul li a {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block; /* Tampilkan tombol menu */
    }

    .keunggulan-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom */
    }

    .berita-grid {
        grid-template-columns: 1fr; /* 1 kolom untuk berita */
    }

    .footer-grid {
        grid-template-columns: 1fr; /* 1 kolom untuk footer */
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 2em;
    }
    
    .keunggulan-grid {
        grid-template-columns: 1fr; /* 1 kolom untuk keunggulan */
    }
}/* ... CSS yang sudah ada ... */

/* Tambahkan style untuk tombol Login agar tidak terlalu mencolok seperti PPDB */
.login-button {
    background-color: transparent !important;
    color: var(--color-primary) !important; /* Biru Tua */
    border: 1px solid var(--color-primary);
    border-radius: 5px;
    padding: 8px 15px !important;
    margin-right: 10px; /* Jarak dari tombol PPDB */
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: var(--color-light) !important; /* Latar belakang abu-abu saat dihover */
}

/* ... CSS yang sudah ada ... */

/* =======================================================
   GAYA ADMIN DASHBOARD & LOGIN
   ======================================================= */

/* -------------------- ADMIN DASHBOARD LAYOUT -------------------- */
.main-content-wrapper {
    flex-grow: 1; /* Konten mengisi sisa ruang */
    display: flex;
    flex-direction: column;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background-color: var(--color-primary); /* Biru Tua */
    padding-top: 20px;
    color: white;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-accent); /* Kuning */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li.active a {
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 5px solid var(--color-accent);
    padding-left: 15px; /* Kompensasi border */
}

.sidebar ul li a i {
    margin-right: 10px;
}

.topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--color-secondary);
}

.topbar-left h2 {
    margin: 0;
    font-size: 1.5em;
    color: var(--color-dark);
}

.logout-btn {
    padding: 8px 15px;
    background-color: #e74c3c; /* Merah */
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    font-weight: 600;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.dashboard-body {
    padding: 30px;
}

/* Stat Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--color-secondary);
}

.stat-card .details p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.stat-card .details h3 {
    margin: 5px 0 0;
    font-size: 2em;
    color: var(--color-primary);
}

.stat-card .icon i {
    font-size: 3em;
    color: var(--color-secondary);
    opacity: 0.7;
}


/* -------------------- ADMIN LOGIN -------------------- */
.login-body {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-logo img {
    max-width: 80px;
    margin-bottom: 10px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--color-dark);
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.input-group i {
    margin-right: 8px;
    color: var(--color-primary);
}

.login-btn {
    width: 100%;
}

/* -------------------- BERITA PUBLIK CARD -------------------- */
.berita-card {
    display: block; /* Agar seluruh card bisa diklik */
    text-decoration: none;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.berita-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.berita-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.berita-card h4 {
    color: var(--color-primary);
    padding: 10px 15px 5px;
    margin: 0;
    font-size: 1.2em;
    height: 60px; /* Batasi tinggi judul */
    overflow: hidden;
}

.berita-card .date {
    display: block;
    color: #888;
    font-size: 0.9em;
    padding: 0 15px 15px;
    margin: 0;
}
/* ... CSS yang sudah ada di bagian atas ... */

/* -------------------- START: ADMIN STYLES (Dipindahkan dari admin-dashboard.php dan admin-login.php) -------------------- */

/* Style Umum Halaman Admin */
.admin-body {
    display: flex; /* Menggunakan Flexbox untuk tata letak sidebar dan konten */
    background-color: var(--color-light);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
}

.sidebar {
    width: 250px;
    background-color: var(--color-primary);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    height: 100vh; 
    position: sticky;
    top: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
    color: var(--color-accent);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 5px;
}

.sidebar ul li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar ul li a i {
    margin-right: 10px;
}

.main-content {
    flex-grow: 1; 
    padding: 30px;
    background-color: white;
}

.header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.logout-btn {
    background-color: #e74c3c; /* Merah */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Statistik Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--color-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .details p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.stat-card .details h3 {
    margin: 5px 0 0;
    font-size: 2em;
    color: var(--color-primary);
}

.stat-card .icon i {
    font-size: 2.5em;
    color: var(--color-secondary);
}

.main-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Tabel Aktivitas */
.activity-table {
    width: 100%;
    border-collapse: collapse; 
    margin-top: 20px; 
    border: 1px solid #ddd;
}

.activity-table thead tr {
    background-color: var(--color-light);
}

.activity-table th,
.activity-table td {
    padding: 10px; 
    text-align: left;
    border-bottom: 1px solid #eee;
}

.activity-table tbody tr:hover {
    background-color: #f9f9f9;
}

.action-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.action-tag.add {
    background-color: #d4edda;
    color: #155724;
}

.action-tag.comment {
    background-color: #fff3cd;
    color: #856404;
}

.action-tag.new-reg {
    background-color: #cce5ff;
    color: #004085;
}


/* -------------------- LOGIN STYLES -------------------- */

.login-body {
    background-color: var(--color-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    color: var(--color-primary);
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 100px;
    margin-bottom: 15px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--color-dark);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.input-group i {
    margin-right: 8px;
    color: var(--color-primary);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #006400; /* Hijau lebih gelap */
}

/* Style Pesan Error */
.error-message {
    color: white;
    background-color: #e74c3c; /* Merah terang */
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* -------------------- END: ADMIN STYLES -------------------- */


/* -------------------- START: BERITA PUBLIK STYLES (Dipindahkan dari berita.php) -------------------- */

/* Header Khusus Halaman Daftar Berita */
.page-header {
    background-color: var(--color-light);
    padding: 100px 0 40px; 
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.page-header h1 {
    color: var(--color-dark);
    font-size: 2.5em;
    margin-bottom: 5px;
}

.berita-list {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Mengatur ulang grid agar daftar berita tampil maksimal */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.no-data-message {
    grid-column: 1 / -1; 
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: #777;
}
/* ==================== GAYA KHUSUS ADMIN PANEL ==================== */

/* Tata Letak Utama (Sudah ada di snippet admin-dashboard.php) */
.main-content {
    flex-grow: 1;
    padding: 0;
    transition: margin-left 0.3s;
}

.container-admin {
    padding: 20px 30px;
}

.admin-header {
    background-color: white;
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.8em;
    color: var(--color-primary);
    margin: 0;
}

/* Panel Konten */
.main-panel {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Alert/Pesan */
.alert-success, .alert-error {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Styling */
.post-form .form-group {
    margin-bottom: 20px;
}

.post-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
}

.post-form input[type="text"],
.post-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    resize: vertical;
}

.post-form .hint {
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
}

/* Tombol (General Admin) */
.btn {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--color-secondary); /* Hijau */
    color: white;
}

.btn-primary:hover {
    background-color: #006400; 
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-submit {
    font-size: 1.1em;
}

/* Tabel Data Admin */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--color-light);
    color: var(--color-dark);
    font-weight: 700;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.data-table .action-cell a {
    margin-right: 5px;
}
/* -------------------- END: BERITA PUBLIK STYLES -------------------- */