:root { 
    --hijau-madrasah: #1a5c37; 
    --kuning-aksen: #ffc107; 
}

.bg-madrasah { background-color: var(--hijau-madrasah) !important; }
.nav-link { color: white !important; font-weight: 500; }
.nav-link:hover { color: var(--kuning-aksen) !important; }
.top-bar { background: #14462a; color: white; font-size: 13px; padding: 5px 0; }

@media (min-width: 1200px) {
    .container-fluid {
        padding-left: 20px !important; /* Mempersempit tepi kiri */
        padding-right: 20px !important; /* Mempersempit tepi kanan */
    }
}

/* Pastikan Body juga menggunakan Inter agar seragam */
body {
    font-family: 'Inter', sans-serif;
}

/* Memastikan kartu berita tidak terlalu renggang */
.card-news .card-body {
    padding: 0.75rem !important;
}


/* --- CSS Berita & Efek Zoom --- */
.img-hover-zoom {
    height: 200px;
    overflow: hidden;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}
.img-hover-zoom img {
    transition: transform .5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card:hover .img-hover-zoom img {
    transform: scale(1.1);
}

/* Container Utama untuk Carousel (Biasanya ID di Bootstrap) */
#heroCarousel {
    position: relative; /* Wajib, agar shadow bisa diposisikan di dalamnya */
    margin-bottom: 20px; /* Jarak dengan konten di bawahnya (seperti Statistik) */
}

/* Efek Bayangan Melengkung di Bawah Carousel */
#heroCarousel::after {
    content: ''; /* Konten kosong */
    position: absolute; /* Posisikan secara absolut */
    bottom: -15px; /* Posisikan sedikit di luar batas bawah carousel */
    left: 5%; /* Beri jarak kiri-kanan agar bayangan tidak kaku */
    width: 90%; /* Lebar bayangan tidak penuh */
    height: 30px; /* Tinggi efek bayangan */
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 70%);
    filter: blur(8px); /* Efek blur agar bayangan halus */
    z-index: -1; /* Posisikan di belakang carousel */
}

/* --- CSS Carousel Caption --- */
.carousel-caption {
    bottom: 25%;
    text-align: left;
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-left: 5px solid var(--kuning-aksen);
    border-radius: 0 15px 15px 0;
    max-width: 600px;
}
.carousel-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease-out;
}

/* Container Utama Seksi Statistik */
.stat-section {
    background: #fdfdfd; /* Putih bersih agak abu dikit */
    padding: 80px 0;
}

.stat-card {
    background: #fff;
    padding: 40px 20px;
    border-radius: 20px;
    border-bottom: 6px solid var(--hijau-madrasah); /* Garis bawah lebih tebal */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animasi membal */
    position: relative;
    overflow: hidden;
}

/* Efek saat kursor di atas kotak */
.stat-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(26, 92, 55, 0.15); /* Bayangan hijau halus */
}

/* Memperbaiki Ikon */
.stat-icon {
    font-size: 3.5rem; /* Lebih besar */
    color: var(--kuning-aksen); /* Warna emas madrasah */
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.2) rotate(5deg); /* Ikon membesar & miring dikit saat hover */
}

/* Memperbaiki Angka */
.stat-number {
    font-size: 3rem;
    font-weight: 900; /* Sangat tebal */
    color: var(--hijau-madrasah);
    margin-bottom: 5px;
    letter-spacing: -1px;
}

/* Memperbaiki Label Teks */
.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Tambahkan Animasi --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CSS Galeri --- */
.gallery-section {
    padding: 60px 0;
    background: #fff;
}
.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 92, 55, 0.7); /* Hijau Madrasah Transparan */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay i {
    color: #fff;
    font-size: 2rem;
}

/* Judul Berita & Pengumuman gaya Latin */
/* Ganti Judul Utama (Berita Terbaru) */
.section-title-script {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800; /* Sangat tebal agar tegas */
    text-transform: uppercase; /* Huruf besar semua agar formal */
    letter-spacing: -0.5px;
    font-style: normal !important; /* Hilangkan miringnya */
    position: relative;
    padding-bottom: 10px;
}

/* Tambahkan garis bawah kecil khas web berita modern */
.section-title-script::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #198754; /* Warna Hijau Madrasah */
}



/* List Pengumuman */
.announcement-item {
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.announcement-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s;
}
.announcement-title:hover {
    color: var(--hijau-madrasah);
}
.announcement-meta {
    font-size: 0.8rem;
    color: #999;
}

/* Styling Kartu Guru */
.teacher-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
    padding: 20px;
}
.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.teacher-img-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #f8f9fa;
}
.teacher-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.teacher-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hijau-madrasah);
    margin-bottom: 5px;
}
.teacher-role {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}
.card-news {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.card-news:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.card-news .card-title {
    line-height: 1.4;
    font-size: 0.95rem;
    height: 2.8em; /* Memastikan tinggi judul seragam maksimal 2 baris */
    overflow: hidden;
}

/* Container Utama */
.ticker-content {
    position: relative;
    white-space: nowrap;
}

/* Wrapper yang Bergerak */
.ticker-wrapper {
    display: inline-block;
    padding-left: 100%; /* Mulai dari luar kanan */
    animation: ticker-move 25s linear infinite;
}

.ticker-item {
    display: inline-block;
    margin-right: 50px;
}

/* Keyframes untuk Gerakan */
@keyframes ticker-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Berhenti saat kursor diarahkan (pengganti onmouseover) */
.ticker-content:hover .ticker-wrapper {
    animation-play-state: paused;
}

.ticker-title {
    position: relative;
    z-index: 2;
    box-shadow: 5px 0 10px rgba(0,0,0,0.5);
}


/* Memaksa semua teks di dalam footer agar berwarna terang */
.footer-section p, 
.footer-section span, 
.footer-section li {
    color: #e9ecef !important; /* Warna abu-abu sangat terang */
}

.footer-section a {
    color: #adb5bd !important;
}

.footer-section {
    background-color: #111 !important; /* Hitam pekat lebih elegan */
    color: #d2e7dd !important; /* Hijau saat hover */
    font-family: 'Inter', sans-serif;
}

.footer-links a:hover {
    color: #198754 !important; /* Hijau saat hover */
    padding-left: 5px;
    transition: 0.3s;
}

.social-links .btn:hover {
    background-color: #198754;
    border-color: #198754;
    transform: translateY(-3px);
    transition: 0.3s;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    z-index: 100;
}

.whatsapp-float:hover {
    color: #FFF;
    background-color: #128c7e;
    transform: scale(1.1);
    transition: 0.3s;
}

/* Warna Background Dropdown Hitam Elegan */
.dropdown-menu-dark {
    background-color: #111 !important;
    min-width: 250px;
    border-radius: 8px;
    padding: 0; /* Agar border-bottom pas ke pinggir */
}

/* Efek Hover Item */
.dropdown-item {
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding-left: 20px;
}

.dropdown-item:hover {
    background-color: #198754 !important; /* Hijau Madrasah saat hover */
    padding-left: 25px; /* Efek geser sedikit */
    color: #fff !important;
}

/* Panah Dropdown Putih */
.dropdown-toggle::after {
    vertical-align: middle;
}


    /* Mengatur jarak antar menu agar muat dalam satu baris */
    .navbar-nav .nav-link {
        padding-left: 8px !important;
        padding-right: 8px !important;
        color: #ffffff !important;
        transition: 0.3s;
    }

    .navbar-nav .nav-link:hover {
        color: #ffc107 !important; /* Warna kuning saat hover */
    }

    /* Dropdown ala SI-KOMITE */
    .dropdown-menu {
        min-width: 200px;
        background-color: #1a1a1a !important; /* Hitam solid */
        border-top: 3px solid #198754 !important; /* Aksen hijau di atas dropdown */
    }

    .dropdown-item {
        font-size: 0.85rem;
        transition: 0.2s;
    }

    .dropdown-item:hover {
        background-color: #198754 !important; /* Hijau saat di-select */
        padding-left: 20px !important; /* Efek geser sedikit */
    }

    /* Tombol Login */
    .btn-warning {
        background-color: #ffc107;
        border: none;
        color: #000 !important;
    }
