/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f0f8ff; 
    color: #333;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Shapes untuk efek Glassmorphism */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
}

.shape1 {
    width: 400px;
    height: 400px;
    background: #4facfe;
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: #00f2fe;
    bottom: -150px;
    right: -100px;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: #43e97b;
    top: 40%;
    left: 40%;
}

/* Reusable Glassmorphism Class */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
}

/* Navbar Layout (Kiri Kanan Luas) */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 4%; 
    background: rgba(255, 255, 255, 0.4); 
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
    transition: 0.3s;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0; 
}

.logo-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.logo-text {
    font-weight: 400; 
    font-size: 1.3rem;
    color: #555;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px; 
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px; 
    white-space: nowrap; 
    transition: 0.3s;
}

.nav-links a:hover {
    color: #27ae60;
}

/* --- CSS DROPDOWN MENU (SUDAH DIPERBAIKI AGAR BISA DIKLIK) --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%; /* Menempel pas di bawah bar, agar tidak ada celah mati */
    left: 0;
    background-color: #2c2c2c; 
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 9999; /* Diperbesar agar tampil paling depan */
    list-style: none;
    padding: 15px 0;
    border-radius: 8px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    display: block;
    width: 100%;
    margin-bottom: 0 !important;
}

.dropdown-menu li a {
    color: #ffffff; /* Teks putih */
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 400;
    transition: 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #444444; 
    color: #ffffff;
}
/* ------------------------ */

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}

/* Hero Section */
.hero {
    padding: 120px 50px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-text {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

.hero-title-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.4);
    padding: 20px 40px;
    border-radius: 15px;
    display: inline-flex;
    margin-bottom: 30px;
}

.hero-title-text h1 {
    font-size: 1.8rem;
    color: #004d40;
    text-align: left;
    line-height: 1.2;
}

.hero-title-text p {
    text-align: left;
    color: #333;
    font-weight: 600;
}

.hero-students {
    width: 100%;
    max-width: 700px;
    border-radius: 15px;
    margin-top: 20px;
}

/* Admission Section */
.admission {
    padding: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 1.5rem;
}

.admission-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.admission-poster {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admission-poster img {
    width: 100%;
    border-radius: 10px;
}

.admission-text {
    flex: 1.5;
    min-width: 300px;
    padding: 40px;
}

.admission-text h3 {
    margin-bottom: 20px;
    color: #004d40;
}

.admission-text p {
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: justify;
}

/* Footer */
.glass-footer {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px 50px 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.social-links {
    text-align: center;
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    color: #333;
    border-radius: 50%;
    margin: 0 5px;
    transition: 0.3s;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: #27ae60;
    color: #fff;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 15px;
}

/* Responsive Design Khusus Navigasi */
@media (max-width: 1100px) {
    .nav-links {
        display: none; 
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links li {
        width: 100%;
        margin-bottom: 15px;
    }

    .dropdown-menu {
        position: relative;
        box-shadow: none;
        background-color: transparent;
        margin-top: 0;
        padding-left: 20px;
    }

    .dropdown-menu li a {
        color: #333;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-title-box {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title-text h1, .hero-title-text p {
        text-align: center;
    }
    
    .logo-text {
        font-size: 1.1rem; 
    }
}

/* --- CSS KHUSUS HALAMAN GALERI --- */

/* Banner Galeri dengan Tema Hijau Gelap */
.galeri-banner {
    margin-top: 75px; /* Menghindari tabrakan dengan navbar */
    position: relative;
    /* Ganti URL dengan gambar gedung pesantren yang gelap sebagai latar belakang */
    background: url('https://via.placeholder.com/1500x500/1e4d41/ffffff') center/cover;
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    display: flex;
    justify-content: center;
}

.galeri-banner-inner {
    border: 3px solid #fff; /* Kotak garis putih */
    padding: 40px 60px;
    background: rgba(17, 78, 62, 0.85); /* Warna hijau gelap semi-transparan */
    max-width: 1000px;
    width: 100%;
}

.galeri-banner-inner p {
    letter-spacing: 3px;
    font-size: 1.1rem;
    font-weight: 500;
}

.galeri-banner-inner h1 {
    font-size: 3.5rem;
    letter-spacing: 4px;
    margin: 20px 0;
    font-weight: 700;
}

/* Grid Foto Galeri */
.galeri-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.galeri-item {
    background: #fff;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s;
}

.galeri-item:hover {
    transform: translateY(-5px);
}

.galeri-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 15px;
}

.galeri-item h4 {
    font-size: 0.95rem;
    color: #222;
    font-weight: 600;
    text-transform: uppercase; /* Memastikan teks judul kegiatan menjadi huruf kapital */
}