/* ==========================================================================
   TK AL-HUSAINIYYAH - GLOBAL STYLESHEET
   ========================================================================== */

/* --- 1. GLOBAL RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    overflow-x: hidden; 
    font-family: 'Poppins', sans-serif; 
    color: #333;
}

/* --- 2. NAVBAR MODERN --- */
.navbar { 
    transition: all 0.3s ease; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}
.navbar-hidden { top: -80px; }

.nav-link { 
    transition: all 0.2s ease; 
    padding: 0.5rem 1rem !important; 
    font-weight: 500;
}
.nav-link:hover { color: var(--bs-success) !important; }

.dropdown-menu { padding: 0.5rem !important; margin-top: 0.5rem !important; border-radius: 12px !important; border: none !important; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.dropdown-item { border-radius: 8px; transition: background 0.2s; }
.dropdown-item:hover { background-color: #f8f9fa; color: var(--bs-success); }

/* --- 3. RESPONSIVE MOBILE --- */
@media (max-width: 991px) {
    .navbar-collapse {
        padding-top: 1rem;
        border-top: 1px solid #eee;
        margin-top: 1rem;
    }
    .nav-link { padding: 0.5rem 0 !important; }
}

/* --- 4. GAMBAR RESPONSIVE SAMBUTAN --- */
@media (max-width: 767px) {
    #content-sambutan img { aspect-ratio: 1/1 !important; }
}
@media (min-width: 768px) {
    #content-sambutan img { aspect-ratio: 4/5 !important; }
}

/* --- 5. KOMPONEN KARTU (GALERI & GURU) --- */
.gallery-item, .gallery-card, .teacher-card { 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border-radius: 1rem;
}
.gallery-item:hover, .gallery-card:hover, .teacher-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .15) !important; 
}

/* --- 6. GALERI & GAMBAR --- */
.img-wrapper { position: relative; cursor: pointer; overflow: hidden; aspect-ratio: 1/1; }
.transition-img { transition: transform 0.5s ease; }
.img-wrapper:hover .transition-img { transform: scale(1.1); }
.gallery-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(25, 135, 84, 0.4); opacity: 0; transition: opacity 0.3s ease; 
}
.img-wrapper:hover .gallery-overlay { opacity: 1; }
.img-fit-cover { object-fit: cover; object-position: center; }

/* --- 7. UTILITIES --- */
.stripe-red { 
    width: 60px; 
    height: 4px; 
    background: var(--bs-success); 
    margin: 0 auto; 
    transition: width 0.3s ease; 
}
.content-sambutan-text p { margin-bottom: 1.5rem; }
#modalCaption { max-width: 90%; word-wrap: break-word; margin: 0 auto; }

#hero {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* --- DI STYLE.CSS --- */
main {
    padding-top: 80px; /* Ini akan memberi ruang di semua halaman kecuali Hero */
}

/* Tapi untuk halaman Beranda, kita matikan padding-top main agar Hero menempel ke atas */
body:has(#hero) main {
    padding-top: 0 !important;
}