/* =========================================================
   Global Styles & Typography
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f0f2f5; /* Light grey background */
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #2c3e50; /* Darker blue-grey for headings */
    margin-bottom: 1rem;
}

p {
    font-weight: 300;
}

.container {
    max-width: 1200px; /* Lebarkan sedikit container utama */
}

/* =========================================================
   Header & Navbar
   ========================================================= */
.navbar {
    /* Hapus background-color lama jika ingin gambar full */
    background-color: transparent !important; /* Buat transparan agar gambar terlihat */
    background-image: url('/uploads/head.png') !important; /* Ganti dengan URL gambar Anda */
    background-size: cover !important; /* Agar gambar menutupi seluruh area header */
    background-position: center center !important; /* Posisikan gambar di tengah */
    background-repeat: no-repeat !important; /* Agar gambar tidak berulang */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: relative; /* Penting untuk overlay jika ingin ada */
}

/* Opsional: Tambahkan overlay gelap agar teks lebih mudah dibaca */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay hitam transparan */
    z-index: 0; /* Pastikan di belakang konten navbar */
}

/* Pastikan konten navbar berada di atas overlay */
.navbar .container,
.navbar-brand,
.navbar-nav,
.navbar-toggler,
.navbar-form {
    position: relative;
    z-index: 1; /* Agar konten navbar tampil di atas overlay */
}

.navbar-brand {
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    margin-right: 10px;
    border-radius: 50%; /* Membuat logo bulat */
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #cee8ff !important; /* Warna lebih terang saat hover/aktif */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}
/* =========================================================
   Hero Section (Slideshow)
   ========================================================= */
.hero-section {
    margin-bottom: 3rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-section .carousel-item img,
.hero-section .carousel-item video,
.hero-section .carousel-item embed {
    border-radius: 15px; /* Sesuaikan dengan border-radius section */
    min-height: 400px; /* Minimal tinggi agar tidak terlalu kecil */
    object-fit: cover; /* Pastikan gambar/video mengisi area */
    width: 100%;
    height: auto;
}

/* =========================================================
   Cards & Sections
   ========================================================= */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

section {
    padding: 3rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
}
section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
    width: 80px;
    height: 4px;
    background-color: #4a90e2;
    border-radius: 2px;
}

/* =========================================================
   Quick Menu
   ========================================================= */
.quick-menu .card {
    background-color: #ffffff;
    color: #333;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}
.quick-menu .card:hover {
    background-color: #4a90e2;
    color: #ffffff;
}
.quick-menu .card:hover .quick-icon {
    color: #ffffff;
}
.quick-icon {
    font-size: 3rem;
    color: #4a90e2;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

/* =========================================================
   News & Announcements
   ========================================================= */
.news-item img {
    border-radius: 10px;
    margin-bottom: 1rem;
    max-height: 200px; /* Batasi tinggi gambar berita */
    object-fit: cover;
    width: 100%;
}
.news-item h5 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.news-item .text-muted {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1rem;
}
.news-item p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.news-item .btn {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
}

/* Announcement specific styles */
.announcement-item {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.announcement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.announcement-item .btn {
    border-radius: 20px;
}

/* Attachment rendering for announcements */
.announcement-item img.img-fluid {
    max-height: 250px; /* Ukuran gambar lampiran */
    object-fit: contain;
    width: auto;
    display: block;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.announcement-item .btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}


/* =========================================================
   Galeri
   ========================================================= */
.filter-btn {
    border-radius: 20px;
    padding: 0.6rem 1.5rem;
    margin: 5px;
    transition: all 0.3s ease;
    background-color: #e0e7ee;
    color: #4a90e2;
    border: none;
}
.filter-btn:hover, .filter-btn.active {
    background-color: #4a90e2;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.masonry-item {
    border-radius: 10px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.masonry-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.masonry-item img {
    height: 220px; /* Sedikit lebih tinggi */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.masonry-item h6 {
    padding: 10px;
    font-size: 1rem;
    color: #333;
}

/* Modal Galeri */
#galleryModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
}
#galleryModal .modal-content img {
    border-radius: 15px 15px 0 0;
    max-height: 70vh; /* Batasi tinggi gambar di modal */
    object-fit: contain;
    background-color: #000; /* Background hitam untuk gambar yang tidak full */
}
#galleryModal .p-3 {
    background-color: #ffffff;
    border-radius: 0 0 15px 15px;
}
#galleryModal #modalTitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
#galleryModal #modalDesc {
    font-size: 1rem;
    color: #555;
}
#galleryModal #modalCategory {
    font-size: 0.85rem;
    padding: 0.3em 0.7em;
    border-radius: 10px;
}
#galleryModal .btn-dark {
    background-color: rgba(0,0,0,0.5);
    border-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#galleryModal .btn-dark:hover {
    background-color: rgba(0,0,0,0.7);
    border-color: rgba(0,0,0,0.7);
}

/* =========================================================
   Pagination
   ========================================================= */
.pagination .page-item .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
    color: #4a90e2;
    transition: all 0.3s ease;
}
.pagination .page-item.active .page-link {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #ffffff;
}
.pagination .page-item .page-link:hover {
    background-color: #e9ecef;
    border-color: #e9ecef;
    color: #4a90e2;
}


/* =========================================================
   Footer
   ========================================================= */
footer {
    background-color: #2c3e50; /* Darker background for footer */
    color: #ecf0f1; /* Light text for contrast */
    padding: 3rem 0 1rem;
    margin-top: 5rem;
    font-size: 0.9rem;
}
footer a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #4a90e2;
}
footer .text-body-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
}
footer iframe {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 100%; /* Pastikan peta responsif */
    height: 250px; /* Batasi tinggi peta di footer */
}

/* =========================================================
   Flag Icons (Translate)
   ========================================================= */
.flag-icon {
    width: 30px; /* Ukuran sedikit lebih besar */
    height: 20px;
    cursor: pointer;
    margin-left: 8px; /* Sesuaikan jarak antar bendera */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Border putih transparan */
    border-radius: 4px; /* Sudut sedikit lebih tumpul */
    transition: transform 0.2s, box-shadow 0.2s;
}
.flag-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5); /* Shadow saat hover */
}


/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
    section h2 {
        font-size: 2rem;
    }
    .quick-icon {
        font-size: 2.5rem;
    }
    .hero-section .carousel-item img,
    .hero-section .carousel-item video,
    .hero-section .carousel-item embed {
        min-height: 250px;
    }
    /* Sesuaikan tampilan kolom video dan galeri pertama di mobile */
    .row.d-flex.align-items-stretch > div {
        max-height: none !important;
        overflow-y: visible !important;
    }
}
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    .navbar-brand img {
        width: 70px; /* Ukuran logo lebih kecil di mobile */
        height: 70px;
    }
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    section h2 {
        font-size: 1.8rem;
    }
    .quick-menu .card {
        min-height: 120px;
    }
    .quick-icon {
        font-size: 2rem;
    }
    footer iframe {
        height: 200px;
    }
}

/* Override existing inline styles that conflict */
.navbar .nav-link { color: #000000 !important; font-weight: 900; }
.navbar .nav-link:hover { color: blue !important; }
/* This needs to be overridden for the new white text */
.navbar .nav-link { color: #ffffff !important; font-weight: 500; }
.navbar .nav-link:hover { color: #cee8ff !important; }