/* Reset CSS dasar dan font global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 2100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. Navbar */
.navbar {
    background-color: #fff;
    color: #333;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #030067; /* Warna biru khas universitas */
    text-decoration: none;
}

.navbar .nav-links ul {
    list-style: none;
    display: flex;
}

.navbar .nav-links li {
    margin-left: 20px;
}

.navbar .nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
}

.navbar .nav-links a:hover {
    color: #0056b3;
    
}

.navbar .nav-links a.active{
    font-weight: bold;
    color: #030067;
}

/* 2. Tombol Hamburger (untuk mobile) */
.hamburger {
    display: none; /* Sembunyikan di desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s;
}

/* 3. Menu Mobile */
.mobile-menu {
    display: none; /* Sembunyikan di desktop */
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    
    /* --- Perubahan Kunci: Fixed Position --- */
    position: fixed; 
    top: 60px; /* Atur posisi tepat di bawah navbar (asumsi navbar tingginya sekitar 60px) */
    width: 100%; /* Pastikan lebarnya penuh */
    z-index: 999; /* Z-index sedikit di bawah navbar (1000) */
}
.mobile-menu ul {
    list-style: none;
    text-align: center;
}
.mobile-menu li {
    padding: 10px;
}
.mobile-menu li:hover{
    background-color: #d5d5d5;
}
.mobile-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
}
.mobile-menu a:hover {
    color: #0056b3;
}
.mobile-menu a:active {
    font-weight: bolder;
    color: #030067;
}

/* 4. Hero Section */
.hero {
    background-color: #030067; /* Warna default jika gambar gagal */
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    position: relative; 
    overflow: hidden; /* Penting: Sembunyikan slide yang di luar area */
}

/* Kontainer untuk Gambar Slideshow */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Gambar individu (Slide) */
.hero-slide {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    position: absolute;
    top: 0;
    left: 0;
    
    /* PENTING: Mulai dari luar layar (sebelah kanan) */
    transform: translateX(100%); 
    
    /* Atur transisi HANYA untuk transform */
    transition: transform 1.0s cubic-bezier(0.45, 0.05, 0.55, 0.75); /* Animasi slide yang halus */
    
    /* Sembunyikan (opacity) jika tidak aktif untuk menghindari tumpu kan */
    opacity: 0; 
}

/* Gambar yang sedang aktif (di tengah layar) */
.hero-slide.active {
    transform: translateX(0); /* Pindah ke tengah */
    opacity: 1; /* Tampilkan */
}

/* Kelas BARU: Untuk slide yang sedang keluar (ke kiri) */
.hero-slide.exiting {
    transform: translateX(-100%); /* Geser ke luar layar (kiri) */
    opacity: 1; /* Biarkan terlihat saat bergeser keluar */
}


/* Overlay Gelap di atas Gambar (Tetap sama) */
.slideshow-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1; 
}

/* Konten Hero (teks) harus di atas gambar dan overlay (Tetap sama) */
.hero-content {
    position: relative;
    z-index: 2; 
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 300;
}

/* 5. Konten Utama */
.content {
    padding: 40px 20px;
}

.page-section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-section h3 {
    font-size: 1.8rem;
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
}

.page-section p {
    text-align: center;
}

.page-section p.align-left{
    text-align: left;
}

/* 6. Layout Kolom (Visi Misi) */
.columns {
    display: flex;
    gap: 20px;
}
.column {
    flex: 1;
}
.column h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.column ul {
    margin-left: 20px;
}

/* 7. Grid Kartu (Berita) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-content p {
    margin-bottom: 15px;
}

.btn-readmore {
    display: inline-block;
    background-color: #030067;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
}
.btn-readmore:hover {
    background-color: #0800ff;
}


/* 8. Footer */
.footer {
    background-color: #333;
    color: #f4f4f4;
    text-align: center;
    padding: 30px 20px;
}
.footer .social-media {
    margin-top: 10px;
}
.footer .social-media a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

.footer .social-media a:hover {
    font-weight: bolder;
}


/* 9. Responsif (untuk HP) */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none; /* Sembunyikan nav desktop di mobile */
    }
    .hamburger {
        display: flex; /* Tampilkan tombol hamburger */
    }

    .columns {
        flex-direction: column; /* Kolom Visi Misi jadi tumpukan */
    }

    .hero h1 {
        font-size: 2rem;
    }
    .hero h2 {
        font-size: 1.3rem;
    }
}


/* --- Tambahan untuk Halaman Pengurus --- */

/* 1. Grid untuk daftar pengurus */
.member-grid {
    display: grid;
    /* Membuat 2, 3, atau 4 kolom tergantung lebar layar */
    grid-template-columns: repeat(auto-fit, 290px);
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

/* 2. Kartu Pengurus */
.member-card {
    background: #ffffff;
    height: auto;
    max-width: max-content;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 10px;
    padding-bottom: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.member-card:hover {
    background-color: #0057b32c;
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.member-card:focus {
    background-color: #030067;
    transform: translateY(-7px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 3. Foto Pengurus (kotak) */
.member-card img {
    width: 250px; /* Ukuran diperbesar sedikit dari 250px agar tampak lebih dominan */
    height: 250px;
    border-radius: 5px; /* Sudut membulat */
    background-color: #e0e0e0; 
    margin-top: 10px;
    margin-bottom: 15px;
    margin-left: 5px;
    margin-right: 5px;

    object-fit: cover; 
    object-position: center; 

    cursor: pointer; 
    box-shadow: 0 0 0 rgba(0,0,0,0); 
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.member-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 8px rgba(0, 86, 179, 0.4); /* Efek bayangan biru saat hover */
}

/* 4. Jabatan - Penyesuaian warna dan berat font */
.member-card p.jabatan {
    font-size: 1rem;
    color: #292929; /* Warna biru */
    font-weight: 500; /* Sedikit lebih tebal dari lighter, tapi tidak full bold */
}

/* Pemisah Visual */
.grid-separator {
    width: 100%;
    height: 1px;
    background-color: #ccc;
    margin: 20px auto; /* Jarak antara Ketua/Wakil dengan Sekre/Benda */
    max-width: 5000px;
}

/* --- CSS untuk Modal/Popup Preview --- */
.modal {
    display: none; /* TETAPKAN display: none; sebagai default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7); /* Latar belakang gelap transparan */
    
    /* Hapus 'display: flex;' di sini. Ini akan diaktifkan oleh JavaScript! */
    /* Jika Anda ingin konten modal tetap di tengah, kita akan buat kelas tambahan
       untuk dipanggil oleh JS saat modal ditampilkan. */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Agar di tengah secara vertikal */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%; /* Lebar konten modal */
    max-width: 500px; /* Batasan lebar */
    text-align: center;
    position: relative;
    animation-name: animatetop;
    animation-duration: 0.4s;
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.modal-content img {
    width: 400px; /* Ukuran gambar di modal menjadi 400px */
    height: 400px;
    border-radius: 5px;
    object-fit: cover;
    object-position: center; 
    margin-bottom: 20px;
}
.modal-content img.member-azalia {
    object-position: 0% 100%; /* Posisi khusus untuk Azalia */
}

.modal-content h4 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.modal-content p.jabatan {
    font-size: 1.2rem;
    color: #292929;
    font-weight: lighter;
    margin-bottom: 15px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Sesuaikan media query agar tidak terlalu besar di mobile */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-content img {
        /* Tetap kecil di mobile */
        width: 250px; 
        height: 250px;
    }
    .modal-content h4 {
        font-size: 1.5rem;
    }
    .modal-content p.jabatan {
        font-size: 1rem;
    }
}

/* --- Galeri Gaya Pinterest (Masonry Sederhana) --- */
.gallery-grid {
    column-count: 4;
    column-gap: 15px;
    padding: 15px 0;
}

/* Kontainer untuk setiap item/gambar di galeri */
.gallery-grid img {
    width: 100%; /* Gambar mengisi lebar kolom */
    height: auto; /* Tinggi menyesuaikan proporsi asli gambar */
    display: block; /* Menghindari celah default pada gambar inline */
    margin-bottom: 15px; /* Jarak vertikal antar gambar */
    border-radius: 12px; /* Sudut membulat yang lebih halus */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Bayangan lembut */
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    
    /* Penting: Mencegah gambar terpotong di antara dua kolom */
    break-inside: avoid; 
    -webkit-column-break-inside: avoid;
    
    /* Opsional: Efek grayscale sedikit agar terlih at elegan, berwarna saat di-hover */
    /* filter: grayscale(20%); */ 
}

/* Efek Hover pada Gambar */
.gallery-grid img:hover {
    transform: scale(1.03); /* Sedikit membesar saat di-hover */
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); /* Bayangan lebih menonjol */
    filter: grayscale(0%); /* Kembali berwarna penuh */
    z-index: 2; /* Agar gambar yang di-hover ada di atas */
    position: relative;
}

/* --- Responsif untuk Galeri --- */
/* Layar Tablet (max-width: 1024px) -> 3 Kolom */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 3;
    }
}

/* Layar Tablet Kecil / HP Besar (max-width: 768px) -> 2 Kolom */
@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 10px;
    }
    .gallery-grid img {
        margin-bottom: 10px;
    }
}

/* Layar HP Kecil (max-width: 480px) -> 1 Kolom (opsional, bisa tetap 2 jika mau) */
@media (max-width: 480px) {
    .gallery-grid {
        column-count: 2; /* Tetap 2 kolom di HP agar lebih mirip Pinterest */
        column-gap: 8px;
    }
    .gallery-grid img {
        margin-bottom: 8px;
        border-radius: 8px; /* Sudut sedikit lebih kecil di layar kecil */
    }
}

/* --- 5. Lightbox Modal (Preview Gambar Penuh) --- */
.modal-lightbox {
    display: none; /* Tersembunyi secara default */
    position: fixed; 
    z-index: 9999; /* Pastikan di atas semua elemen lain */
    padding-top: 50px;
    padding-left: 90px;
    padding-right: 90px;
    padding-bottom: 50px;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; /* Mengizinkan scroll jika gambar terlalu besar */
    background-color: rgba(0, 0, 0, 0.9); /* Latar belakang hitam transparan */
    
    flex-direction: column;      /* Konten disusun vertikal (caption di bawah gambar) */
    justify-content: center;     /* Mengatur perataan vertikal ke tengah */
    align-items: center;
}

/* Konten Gambar di dalam modal */
.modal-content-lightbox {
    margin: auto;
    display: block;
    align-items: center;
    max-width: relative;
    max-height: 85vh;
    
    width: auto; /* Memastikan gambar menyesuaikan diri */
    height: auto;
    border-radius: 8px;
}

/* Tombol Tutup */
.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Keterangan Gambar (Opsional) */
.caption-lightbox {
    display: block;
    width: 100%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    margin: 10px 0 0 0; /* Jarak antara gambar dan teks */
    font-size: 1.1rem;

    order: -1;
    
}

/* Animasi untuk modal */
.modal-content-lightbox, #caption {  
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Responsif untuk Layar Kecil */
@media only screen and (max-width: 700px) {
    .modal-content-lightbox {
        width: 100%;
        max-height: 90%;
    }
}