/* --- Variables --- */
:root {
    --primary: #047857; /* Emerald Green */
    --dark-green: #064E3B; /* Dark Green */
    --gold: #D4AF37; /* Soft Gold */
    --white: #ffffff;
    --light-bg: #F8FAFC;
    --dark-navy: #0F172A;
    --text-main: #334155;
    --text-light: #64748B;
    --shadow-soft: 0 10px 25px rgba(4, 120, 87, 0.08);
    --shadow-hover: 0 20px 40px rgba(4, 120, 87, 0.15);
    --radius: 16px;
    --transition: all 0.3s ease;
}

/* --- Base & Scroll Fix --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }

/* FIX 1: Memisahkan HTML dan Body agar JavaScript scroll (warna putih navbar) tetap terbaca */
html {
    overflow-x: hidden;
}

body { 
    color: var(--text-main); 
    background-color: var(--white); 
    line-height: 1.6; 
    width: 100%;
    position: relative;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.bg-light { background-color: var(--light-bg); }
.gold-text { color: var(--gold); }
.text-center { text-align: center; }

/* Typography */
h1, h2, h3, h4 { color: var(--dark-navy); font-weight: 700; }
.section-subtitle { color: var(--primary); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; font-weight: 600;}
.section-title { font-size: 2.5rem; margin-bottom: 40px; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 14px 30px; border-radius: 50px; font-weight: 600; text-decoration: none; transition: var(--transition); cursor: pointer; border: none; font-size: 1rem;}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 15px rgba(4, 120, 87, 0.3); }
.btn-primary:hover { background: var(--dark-green); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(4, 120, 87, 0.4); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* --- Navbar --- */
.navbar { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 20px 0; transition: var(--transition); }
.navbar.scrolled { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 15px 0; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1400px !important; }
.logo { text-decoration: none; font-size: 1.5rem; font-weight: 800; color: var(--white); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo img { height: 45px; object-fit: contain; }
.navbar.scrolled .logo { color: var(--dark-navy); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 15px; }
.nav-links a { text-decoration: none; color: var(--white); font-weight: 500; font-size: 0.85rem; transition: var(--transition); white-space: nowrap; }
.navbar.scrolled .nav-links a { color: var(--text-main); }
.nav-links a:hover { color: var(--gold); }
.btn-login { background: var(--gold); color: var(--white) !important; padding: 8px 20px; border-radius: 30px; box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3); }
.btn-login:hover { background: #bfa131; transform: translateY(-2px); }


/* --- Hero Section --- */
.hero { height: 100vh; background: url('../images/Sekolah.jpg') no-repeat center center/cover; position: relative; display: flex; align-items: center; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(6, 78, 59, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%); }
.hero-content { position: relative; z-index: 1; color: var(--white); max-width: 800px; }
.hero-title { font-size: 4rem; line-height: 1.2; margin-bottom: 20px; color: var(--white); animation: fadeInUp 1s ease; }
.hero-subtitle { font-size: 1.2rem; font-weight: 300; margin-bottom: 40px; opacity: 0.9; animation: fadeInUp 1s ease 0.2s backwards; }
.hero-buttons { animation: fadeInUp 1s ease 0.4s backwards; }

/* --- About Section --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image-wrapper { position: relative; }
.about-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.experience-badge { position: absolute; bottom: -20px; right: -20px; background: var(--gold); color: var(--white); padding: 30px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-hover); }
.experience-badge .number { font-size: 2.5rem; font-weight: 800; display: block; line-height: 1; }
.experience-badge .text { font-size: 0.9rem; font-weight: 600; }

/* --- Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { background: var(--white); padding: 40px 30px; border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: var(--transition); text-align: center; border: 1px solid rgba(0,0,0,0.02); }
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); border-color: rgba(4, 120, 87, 0.1); }
.icon-box { width: 70px; height: 70px; background: rgba(4, 120, 87, 0.1); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; transition: var(--transition); }
.feature-card:hover .icon-box { background: var(--primary); color: var(--white); }
.feature-card h3 { margin-bottom: 15px; font-size: 1.3rem; }

/* --- Stats --- */
.stats { background: var(--primary); padding: 60px 0; color: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: center; gap: 30px; }
.stat-item h2 { color: var(--gold); font-size: 3rem; margin-bottom: 10px; }
.stat-item p { font-size: 1.1rem; font-weight: 500; opacity: 0.9; }

/* --- Cinematic Masonry Gallery --- */
.masonry-gallery { column-count: 3; column-gap: 20px; padding: 20px 0; }
@media (max-width: 992px) { .masonry-gallery { column-count: 2; } }
@media (max-width: 576px) { .masonry-gallery { column-count: 1; } }

.masonry-item {
    position: relative; break-inside: avoid; margin-bottom: 20px; border-radius: var(--radius);
    overflow: hidden; cursor: pointer; box-shadow: var(--shadow-soft); transform: translateZ(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.masonry-item img { width: 100%; height: auto; display: block; transition: transform 0.6s ease; }

.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(4, 120, 87, 0.2), rgba(15, 23, 42, 0.85));
    display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.4s ease;
}
.gallery-overlay i {
    color: var(--white); font-size: 2.5rem; transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}
.masonry-item:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(4, 120, 87, 0.25); }
.masonry-item:hover img { transform: scale(1.08); }
.masonry-item:hover .gallery-overlay { opacity: 1; }
.masonry-item:hover .gallery-overlay i { transform: scale(1); }

/* --- Cinematic Lightbox --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 9999999 !important; /* Memaksa lightbox di lapisan paling depan */
    display: flex; justify-content: center; align-items: center; 
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}
.lightbox.active { 
    opacity: 1; 
    pointer-events: auto !important; /* Gunakan 'auto' agar klik tidak bocor ke navbar */
}
.lightbox-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
}
.lightbox-content { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.lightbox-img-wrapper { width: 80%; height: 85vh; display: flex; justify-content: center; align-items: center; }
#lightboxImg {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6); transform: scale(0.9); opacity: 0; transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox.active #lightboxImg { transform: scale(1); opacity: 1; }
#lightboxImg.slide-transition { transform: scale(0.95); opacity: 0.3; filter: blur(8px); }

.lightbox-close {
    position: absolute; top: 30px; right: 40px; background: transparent; border: none; color: rgba(255,255,255,0.6);
    font-size: 2.5rem; cursor: pointer; transition: all 0.3s; 
    z-index: 99999999 !important; /* Memastikan tombol X anti tertimpa elemen navbar */
}
.lightbox-close:hover { color: var(--white); transform: rotate(90deg) scale(1.1); filter: drop-shadow(0 0 10px white); }

.glass-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 65px; height: 65px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--white); font-size: 1.5rem; cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 10;
}
.glass-nav:hover { background: rgba(255, 255, 255, 0.15); box-shadow: 0 0 20px rgba(4, 120, 87, 0.6), inset 0 0 10px rgba(255,255,255,0.2); border-color: rgba(4, 120, 87, 0.5); color: var(--gold); }
.lightbox-prev { left: 40px; } .lightbox-prev:hover { transform: translateY(-50%) translateX(-8px); }
.lightbox-next { right: 40px; } .lightbox-next:hover { transform: translateY(-50%) translateX(8px); }

/* --- Footer --- */
.footer { background: var(--dark-navy); color: var(--white); padding: 80px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.about-footer p { opacity: 0.8; margin: 20px 0; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: var(--white); border-radius: 50%; margin-right: 10px; transition: var(--transition); }
.social-links a:hover { background: var(--gold); }
.footer-col h4 { color: var(--white); margin-bottom: 25px; font-size: 1.2rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul a { color: rgba(255,255,255,0.8); text-decoration: none; transition: var(--transition); }
.footer-col ul a:hover { color: var(--gold); padding-left: 5px; }
.contact-footer p { margin-bottom: 15px; opacity: 0.8; display: flex; gap: 15px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); opacity: 0.7; font-size: 0.9rem; }

/* --- Animations & Responsive --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* FIX 2: Menghapus 'transform' pada animasi Body agar tidak merusak position: fixed Navbar */
body {
    animation: pageFadeIn 0.5s ease-in-out forwards;
}

@keyframes pageFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

body.page-fade-out {
    animation: pageFadeOut 0.4s ease-in-out forwards;
}

@keyframes pageFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ======================================================
   PENGATURAN MENU MOBILE & RESPONSIVE HP
   ====================================================== */
.menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--white);
    transition: 0.3s;
}

.navbar.scrolled .menu-btn {
    color: var(--dark-navy);
}

@media (max-width: 768px) {
    /* Menampilkan Tombol Menu */
    .menu-btn {
        display: block;
    }

    /* MENU SIDEBAR (Transform Sidebar) */
    .nav-links {
        position: fixed;
        top: 70px;
        right: 0;
        transform: translateX(100%); 
        width: 250px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: transform 0.4s ease-in-out;
        gap: 0;
        display: flex !important;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0); 
    }

    .nav-links li {
        width: 100%;
        margin: 15px 0;
    }

    .nav-links a {
        color: var(--dark-navy) !important;
        font-size: 1.1rem;
        display: block;
    }

    /* PERBAIKAN VIDEO AGAR TIDAK ZOOM BERLEBIHAN */
    .hero {
        height: auto !important; 
        min-height: 60vh; 
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.1rem);
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .hero-buttons .btn {
        margin-bottom: 12px;
        width: 100%;
        text-align: center;
        padding: 13px 20px;
        font-size: 0.95rem;
    }

    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .about-grid, .footer-grid { grid-template-columns: 1fr; gap: 35px; }
    .experience-badge { bottom: 10px; right: 10px; padding: 15px; }
    .lightbox-img-wrapper { width: 95%; height: 75vh; }
    .glass-nav { width: 45px; height: 45px; font-size: 1.2rem; }
    .lightbox-prev { left: 10px; } .lightbox-next { right: 10px; }
    .lightbox-close { top: 15px; right: 20px; font-size: 1.8rem; }
}
/* ======================================================
   FAQ ACCORDION SECTION
   ====================================================== */
/* ======================================================
   FAQ ACCORDION SECTION (DIUBAH JADI 2 KOLOM)
   ====================================================== */
.faq {
    background-color: var(--white);
}

.faq-container {
    max-width: 1100px; /* Lebar ditambah agar 2 kolom muat sempurna */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Membagi jadi 2 kolom sejajar */
    gap: 15px 25px; /* Jarak antar kotak (Atas-Bawah 15px, Kiri-Kanan 25px) */
    align-items: start; /* Mencegah kotak ikut memanjang jika kotak di sebelahnya dibuka */
}

.faq-item {
    background: var(--light-bg);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(4, 120, 87, 0.05);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    text-align: left;
    font-size: 0.95rem; /* Dikecilkan sedikit agar rapi di dalam 2 kolom */
    font-weight: 600;
    color: var(--dark-navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    padding: 0 25px 20px;
    color: var(--text-main);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* State Aktif (Saat Diklik) */
.faq-item.active {
    background: var(--white);
    border-color: var(--gold);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* KEMBALIKAN KE 1 KOLOM JIKA DIBUKA DI HP */
@media (max-width: 768px) {
    .faq-container {
        grid-template-columns: 1fr; /* Jadi 1 kolom bersusun bawah */
        gap: 15px;
    }
}
@media (max-width: 420px) {
    .hero {
        padding-top: 90px;
        padding-bottom: 30px;
        min-height: 55vh;
    }
    .section-padding {
        padding: 45px 0;
    }
    .hero-title {
        font-size: clamp(1.4rem, 8vw, 1.7rem);
    }
}