/* ===================================================================
   File: style.css (Versi Final yang Sudah Dirapikan)
   Struktur:
   1. Font Imports         - Memuat font lokal.
   2. Reset & Global       - Pengaturan dasar.
   3. Komponen Global      - Navbar, Footer, Tombol.
   4. Gaya Halaman Spesifik- Halaman Utama & Halaman Data.
   5. Animasi              - Definisi @keyframes.
   6. Gaya Responsif       - Semua gaya untuk HP dalam satu blok @media.
=================================================================== */

/* ===================================================================
   1. FONT IMPORTS
=================================================================== */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('fonts/material-icons-v143-latin-regular.eot'); /* Diperbarui ke v143 */
  src: local(''),
       url('fonts/material-icons-v143-latin-regular.eot?#iefix') format('embedded-opentype'), /* Diperbarui ke v143 */
       url('fonts/material-icons-v143-latin-regular.woff2') format('woff2'), /* Diperbarui ke v143 */
       url('fonts/material-icons-v143-latin-regular.woff') format('woff'), /* Diperbarui ke v143 */
       url('fonts/material-icons-v143-latin-regular.ttf') format('truetype'), /* Diperbarui ke v143 */
       url('fonts/material-icons-v143-latin-regular.svg#MaterialIcons') format('svg'); /* Diperbarui ke v143 */
}

/* ===================================================================
   2. RESET & GAYA GLOBAL
=================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Montserrat', sans-serif; background-color: #f8f9fa; }
.btn, a { transition: all 0.3s ease; }

html {
    scroll-behavior: smooth;
}

/* ===================================================================
   3. KOMPONEN GLOBAL (Navbar, Footer, dll.)
=================================================================== */

/* --- Navbar Utama (Desktop) --- */
.custom-navbar { position: fixed; width: 100%; top: 0; z-index: 1020; padding: 0 1rem; background: transparent; transition: background 0.4s ease, box-shadow 0.4s ease; }
.custom-navbar.scrolled { background: linear-gradient(to bottom, #444, #333); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.custom-navbar .nav-container { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.custom-navbar .nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.custom-navbar .nav-brand img { height: 70px; animation: moveLeftRight 4s ease-in-out infinite;} /* untuk logo */
.custom-navbar .brand-text { color: #E0C56E; line-height: 1.2; }
.custom-navbar .brand-text strong { display: block; font-size: 20px; font-weight: 600; }
.custom-navbar .nav-menu { list-style: none; display: flex; align-items: center; height: 100%; margin-bottom: 0; padding-left: 0; }
.custom-navbar .nav-menu li { position: relative; }
.custom-navbar .nav-menu a { color: #FFFFFF; text-decoration: none; padding: 0 1.5rem; display: flex; align-items: center; height: 60px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: color 0.3s ease-in-out; position: relative; overflow: hidden; }
.custom-navbar.scrolled .nav-menu a { text-shadow: none; }
.custom-navbar .dropdown-menu { opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; position: absolute; top: 100%; left: 0; min-width: 200px; background-color: #3a3a3a; list-style: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2); border-radius: 0 0 8px 8px; padding: 0.5rem 0; margin-top: 0; }
.custom-navbar .dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-navbar .dropdown-menu a { height: auto; padding: 0.75rem 1.5rem; text-shadow: none; }
.custom-navbar .dropdown-menu .dropdown-menu { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; position: static; background-color: transparent; padding: 0; box-shadow: none; border-radius: 0; }
.custom-navbar .dropdown-menu .dropdown-menu.show { max-height: 500px; }
.custom-navbar .dropdown-menu .dropdown-menu li { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.custom-navbar .hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger-bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #E0C56E; transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; }
.hamburger.active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.custom-navbar .material-icons { font-family: 'Material Icons'; font-size: 1.2rem; margin-left: 4px; transition: transform 0.3s ease; }
.custom-navbar .dropdown-toggle.active > .material-icons { transform: rotate(180deg); }
.custom-navbar .dropdown-toggle::after { display: none; }
.menu-title { display: none; color: #E0C56E; text-transform: uppercase; font-family: 'Oswald', sans-serif; height: 60px; padding-left: 1.5rem; margin-bottom: 0; border-bottom: 1px solid #444; align-items: center; }
.custom-navbar .nav-menu a:hover { color: #E0C56E; }
.custom-navbar .nav-menu > li > a::after { content: ''; position: absolute; bottom: 5px; left: 0; width: 100%; height: 2px; background-color: #E0C56E; transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease-in-out; }
.custom-navbar .nav-menu > li > a:hover::after { transform: scaleX(1); }

/* --- Footer & Tombol Lainnya --- */
.site-footer { background-color: #222; color: #ecd360; text-align: center; font-size: 0.9rem; margin-top: 4rem; padding: 1rem 1rem; }
.site-footer p { margin-bottom: 0; }
#back-to-top { position: fixed; bottom: 20px; right: 20px; display: none; border-radius: 50%; width: 50px; height: 50px; font-size: 1.2rem; padding: 0; line-height: 50px; text-align: center; }
.whatsapp-button { display: inline-block; background: linear-gradient(45deg, #25D366, #128C7E); color: white; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); animation: pulse 2s ease-in-out infinite; }
.whatsapp-button:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }

/* ===================================================================
   4. GAYA HALAMAN SPESIFIK
=================================================================== */

/* --- Halaman Utama --- */
.title-section { position: relative; padding-bottom: 2rem; }
.title-section h2 { font-family: 'Oswald', sans-serif; font-weight: 500; text-transform: uppercase; background: linear-gradient(45deg, #e0c56e, #b88a34); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title-section p { color: #6c757d; }
.title-section::after { content: ''; position: absolute; display: block; width: 100px; height: 3px; background: linear-gradient(45deg, #e0c56e, #b88a34); bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 2px; }
#tim-kami .team-photo { width: 130px; height: 130px; object-fit: cover; border-radius: 50%; border: 4px solid #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); animation: floatText 5s ease-in-out infinite; }
#tim-kami .team-photo:hover { transform: scale(1.05) translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
#tim-kami .row .col-lg-3:nth-child(even) .team-photo { animation-delay: 0.3s; }
#tim-kami .row .col-lg-4 .team-photo { animation-delay: 0.6s; }
.focus-card { border: none; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.focus-card:hover { transform: translateY(-10px); box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.focus-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background-color: #fdd20033; color: #b88a34; }
#berita .card-img-top { height: 300px; object-fit: cover; }

/* --- gambar atau warna Halaman Data --- */
.data-header { padding: 7rem 0; background-color: #343a40; background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/2.png'); background-size: cover; background-position: center; }
.data-header h2, .data-header h3 { color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.data-header h2 { font-family: 'Oswald', sans-serif; text-transform: uppercase; background: none; -webkit-background-clip: unset; background-clip: unset; }
.data-header h3 { color: rgba(255, 255, 255, 0.8); }
.stat-card .card-body { padding: 1.5rem; text-align: center; }
.stat-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.5rem; }
.stat-value { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 2.25rem; color: #343a40; }
#data-table thead th { background-color: #2d3748; color: #ffffff; font-weight: 600; text-transform: uppercase; padding: 16px 24px; }
#data-table tbody td { color: #4a5568; padding: 14px 24px; border-bottom: 1px solid #edf2f7; }
#data-table tbody tr:hover { background-color: #f7fafc; }
#data-table tbody tr:first-child { display: none; }

/* ===================================================================
   5. ANIMASI (@keyframes)
=================================================================== */
@keyframes floatText { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); } 50% { transform: scale(1.05); box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4); } }

/* ===================================================================
   6. GAYA RESPONSIVE (MOBILE)
=================================================================== */
/* ===================================================================
   GAYA RESPONSIVE (MOBILE) - FINAL
=================================================================== */
@media (max-width: 992px) {
    /* Menampilkan tombol hamburger */
    .custom-navbar .hamburger {
        display: block;
    }

    /* Mencegah scroll saat menu terbuka */
    body.menu-open {
        overflow: hidden;
    }

    /* Mengatur panel menu yang akan bergeser (slide) */
    .custom-navbar .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: rgba(51, 51, 51, 0.9); /* Latar belakang transparan */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding-top: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        z-index: 1010;
        transform: translateX(100%); /* Sembunyikan di luar layar kanan */
        transition: transform 0.4s ease-in-out;
    }

    /* Aturan saat menu aktif (terlihat) */
    .custom-navbar .nav-menu-wrapper.active {
        transform: translateX(0); /* Pindahkan ke posisi semula (terlihat) */
    }

    /* Efek overlay gelap di belakang menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Menampilkan judul "Menu" di HP */
    .menu-title {
        display: flex;
    }

    /* Mengatur tata letak item menu di HP */
    .custom-navbar .nav-menu {
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    .custom-navbar .nav-menu li {
        width: 100%;
        border-top: 1px solid #444;
    }
    .custom-navbar .nav-menu a {
        height: auto;
        padding: 1rem 1.5rem; /* Jarak yang sudah disamakan */
        justify-content: space-between;
        width: 100%;
        text-shadow: none;
    }
    
    /* Mengubah dropdown menjadi model accordion di HP */
    .custom-navbar .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    .custom-navbar .nav-menu > li > .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.2);
    }
    .custom-navbar .dropdown-menu .dropdown-menu {
        background-color: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .custom-navbar .dropdown-menu.show {
        max-height: 500px;
    }
}

/* ===================================================================
   Garis Pemisah Antar Seksi
=================================================================== */
.section-divider {
    height: 3px;
    width: 100px;
    background: linear-gradient(45deg, #e0c56e, #b88a34);
    margin: 4rem auto; /* Memberi jarak atas dan bawah */
    border-radius: 2px;
}

/* Animasi untuk logo bergerak kiri-kanan */
@keyframes moveLeftRight {
  0%, 100% {
    transform: translateX(-5px); /* Posisi awal (kiri) */
  }
  50% {
    transform: translateX(5px);  /* Posisi tengah (kanan) */
  }
}

/* AWAL HERO CAROUSEL OVERLAY */
/* ============================================= */
.hero-slide-item {
    height: 100vh; /* Membuat tinggi slide 100% dari layar */
    width: 100%;
    position: relative; /* Diperlukan untuk lapisan overlay */
    
    /* Properti untuk gambar latar */
    background-size: cover;
    background-position: center;

    /* Menengahkan konten (judul, teks, tombol) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    color: #ffffff; /* Warna default teks di dalam slide */
}

/* Ini adalah lapisan gelap di atas gambar */
.hero-slide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Warna hitam transparan 50% */
    z-index: 1; /* Pastikan overlay di bawah teks */
}

/* Memastikan konten teks berada di atas lapisan gelap */
.hero-slide-item .hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.hero-slide-item h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
/* ============================================= */
/* AKHIR HERO CAROUSEL OVERLAY */

/* --- SOLUSI STICKY FOOTER --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Minimal tinggi body adalah 100% tinggi layar */
}

main {
    flex-grow: 1; /* Biarkan konten utama tumbuh mengisi sisa ruang */
}

/* untuk halaman pustaka */
/* --- Perbaikan Jarak Filter di Mode HP --- */
@media (max-width: 767.98px) {
  .pustaka-filters > div {
    margin-bottom: 1rem; /* Memberi jarak bawah sekitar 16px */
  }

  /* Menghilangkan jarak pada elemen terakhir agar rapi */
  .pustaka-filters > div:last-child {
    margin-bottom: 0;
  }
}