/* SYSTEM DESIGN: PANCASILA EDU PREMIUM 
   Author: Masnun Suaedi - SMAN 2 Salatiga
   Updated: Perbaikan Footer Permanen & Grid Simetris
*/

:root {
    --primary: #1a237e;
    --primary-light: #283593;
    --secondary: #c5a059;
    --accent: #ffd700;
    --bg-body: #f0f2f5;
    --white: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --success: #2ecc71;
    --danger: #e74c3c;
    --shadow: 0 10px 30px rgba(26, 35, 126, 0.1);
    --glass: rgba(255, 255, 255, 0.9);
    --blue-footer: #e3f2fd;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Memberi ruang agar konten terakhir tidak tertutup footer */
    padding-bottom: 80px; 
    overflow-x: hidden;
}

/* --- HEADER / NAVBAR --- */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 4px solid var(--secondary);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    background: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
}

.nav-title h2 {
    margin: 0;
    font-size: 20px;
    color: white;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- LAYOUT CONTAINER --- */
.container {
    flex: 1; /* Mendorong footer ke bawah jika konten sedikit */
    width: 95%;
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 15px;
    animation: fadeIn 0.8s ease-out;
}

/* --- GRID MATERI (Halaman Index) --- */
.grid {
    display: grid;
    /* Memastikan kartu materi rapi dan simetris */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* --- CARDS STYLE --- */
.card {
    background: var(--white);
    border-radius: 18px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(26, 35, 126, 0.15);
}

/* --- FOOTER PERMANEN (STAY AT BOTTOM) --- */
.footer-tetap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--secondary);
    color: var(--primary);
    text-align: center;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    border-top: 2px solid #bbdefb;
    z-index: 9999;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.footer-tetap span {
    color: var(--secondary);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .navbar { 
        padding: 10px 4%; 
    }
    .nav-title h2 { font-size: 16px; }
    .nav-title small { display: none; } /* Sembunyikan teks kecil di HP agar rapi */
    
    .container { 
        width: 100%; 
        padding: 0 12px; 
    }
    
    .grid { 
        grid-template-columns: 1fr; /* 1 kolom penuh di layar HP */
    }

    .footer-tetap {
        font-size: 11px;
        padding: 10px;
    }
}