/* [BARU] Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Variabel Warna Dasar */
:root {
    --bg-light: #FFFFFF;
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    --brand-maroon: #9A1D2A;
    --brand-red-dark: #7A0C16;
    --brand-blue: #007FA9;
    --accent-orange: #E95B28;
    --accent-orange-dark: #C24A1F;
    --accent-yellow: #F9B233;
    --accent-cyan: #00A3C8;
    --neutral-gray-light: #f8f9fa;
    --neutral-gray-dark: #e9ecef;
    --particle-color: rgba(255, 255, 255, 0.3);
}

/* PRELOADER CSS */
body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background-color: var(--neutral-gray-light);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 1s, opacity 0.5s ease-in;
    overflow-x: hidden;
}

body.loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--neutral-gray-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--neutral-gray-dark);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* AKHIR PRELOADER */

/* HEADER SECTION */
.header-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40vh;
    min-height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, var(--accent-orange-dark) 40%, var(--accent-yellow) 100%);
    color: var(--text-light);
}

.header-section::before {
    /* Pola */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.toptal.com/designers/subtlepatterns/uploads/greek-vase.png');
    background-repeat: repeat;
    background-size: 300px;
    opacity: 0.1;
    z-index: 1;
}

#particle-canvas {
    /* Canvas Partikel */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* NAVBAR STYLES (Absolute di desktop) */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-sizing: border-box;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 50px;
    z-index: 10;
}

.navbar-right-side {
    display: flex;
    align-items: center;
    gap: 25px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 11;
    text-decoration: none;
}

.navbar-brand .logo {
    height: 55px;
    width: auto;
    display: block;
}

/* Nav Links, Dropdown, Hamburger (Style dasar) */
.nav-links a, .hamburger {
    color: var(--text-light);
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-image: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    margin-left: 5px;
}

.nav-links li a[href="../login.php"],
/* Sesuaikan path jika login.php di luar folder */
.nav-links li a[href="login.php"] {
    /* Atau jika di folder yg sama */
    background: linear-gradient(45deg, var(--accent-orange), var(--accent-yellow));
    color: white;
    font-weight: 700;
    border-radius: 20px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(233, 91, 40, 0.4);
}

.nav-links li a[href="../login.php"]:hover,
.nav-links li a[href="login.php"]:hover {
    background: linear-gradient(45deg, var(--accent-yellow), var(--accent-orange));
    box-shadow: 0 6px 20px rgba(233, 91, 40, 0.6);
    transform: translateY(-2px);
}

.nav-links li a[href="../login.php"]::after,
.nav-links li a[href="login.php"]::after {
    display: none;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    position: relative;
    display: block;
}

.dropdown {
    position: relative;
}

.dropdown .bi-chevron-down {
    transition: transform 0.3s ease;
    display: inline-block;
}

.dropdown:hover>a .bi-chevron-down, .dropdown.active>a .bi-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10;
    list-style: none;
    padding: 10px 0;
    border-radius: 8px;
    margin-top: 5px;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-menu a {
    white-space: nowrap;
    padding: 10px 20px;
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 26px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger .line {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    left: 0;
}

.hamburger .line-1 {
    top: 0;
}

.hamburger .line-2 {
    top: 8px;
}

.hamburger .line-3 {
    top: 16px;
}

.hamburger.active .line-1 {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .line-2 {
    opacity: 0;
}

.hamburger.active .line-3 {
    transform: translateY(-8px) rotate(-45deg);
}

/* KONTEN HEADER (Judul Halaman) */
.header-content {
    text-align: center;
    color: var(--text-light);
    z-index: 4;
    position: relative;
    padding: 20px;
    margin-top: 60px;
}

.header-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* MAIN CONTENT SECTION */
.main-content {
    padding: 60px 20px;
    background-color: var(--neutral-gray-light);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.main-content h2 {
    color: var(--brand-maroon);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 10px;
}

.main-content h3 {
    color: var(--accent-orange-dark);
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.main-content p, .main-content ul, .main-content ol {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
    color: var(--text-dark);
}

.main-content ul, .main-content ol {
    padding-left: 25px;
}

.main-content strong {
    color: var(--brand-maroon);
}

/* FOOTER (Sama) */
.footer {
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, var(--accent-orange-dark) 40%, var(--accent-yellow) 100%);
    color: white;
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: white;
}

.footer-column p, .footer-column a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column i {
    margin-right: 8px;
}

.footer-column a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* --- LETAKKAN INI DI CSS GLOBAL ANDA (misal di baris 378) --- */

/* Aturan hover UMUM (HARUS PERTAMA) */
.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Aturan hover SPESIFIK (Setelah yang umum) */
.social-links a[aria-label="Instagram"]:hover {
    background: #E4405F;
    /* Warna Instagram */
}

.social-links a[aria-label="Facebook"]:hover {
    background: #1877F2;
    /* Warna Facebook */
}

.social-links a[aria-label="Twitter"]:hover {
    background: #1DA1F2;
    /* Warna Twitter */
}

.social-links a[aria-label="Youtube"]:hover {
    background: #FF0000;
    /* Warna YouTube */
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* === MEDIA QUERIES === */
@media (min-width: 993px) {

    /* Desktop */
    .nav-links a:not([href$="login.php"]):hover::after {
        transform: scaleX(1);
    }

    .dropdown:hover>a::after {
        transform: scaleX(1);
    }

    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-menu a:hover {
        background: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow));
        color: var(--text-light);
    }
    
    .nav-links > li:last-child .dropdown-menu {
        left: auto;  /* Matikan posisi kiri default */
        right: 0;    /* Paksa menempel ke sisi kanan tombol */
        transform-origin: top right; /* Memastikan animasi muncul dari kanan atas */
    }

    .nav-links > li:last-child .dropdown-menu {
        right: -10px; 
    }
    
}

@media (max-width: 992px) {

    /* Mobile/Tablet */
    body {
        padding-top: 55px;
        /* Sesuaikan nilainya agar pas */
    }

    .navbar-brand {
        height: auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .navbar-brand .logo {
        height: 35px;
        /* Ukuran logo mobile */
    }

    .navbar-right-side {
        gap: 0;
    }

    .header-section {
        height: auto;
        min-height: 30vh;
        /* [DIHAPUS] padding-top: 20px; */
        /* Hapus padding ini */
        padding-bottom: 20px;
        flex-direction: column;
        margin: 0;
        /* [PERBAIKAN] Reset margin header */
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 10px 20px;
        justify-content: space-between;
        min-height: auto;
        background: rgba(0, 0, 0, 0.8);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .header-content {
        margin-top: 10px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .main-content {
        padding: 30px 15px;
    }

    .container {
        padding: 25px;
        margin: 0 10px;
        width: auto;
    }

    .main-content h2 {
        font-size: 1.7rem;
    }

    .main-content h3 {
        font-size: 1.3rem;
    }

    .main-content p, .main-content ul, .main-content ol {
        font-size: 0.95rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
        /* <-- Diubah dari center */
    }

    .footer-column h3::after {
        left: 0;
        /* <-- Diubah dari 50% */
        transform: none;
        /* <-- Dihapus/diubah dari translateX(-50%) */
    }

    .social-links {
        justify-content: center;
    }

    /* --- LETAKKAN INI DI CSS GLOBAL ANDA (misal di baris 378) --- */

    /* Aturan hover UMUM (HARUS PERTAMA) */
    .social-links a:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
    }

    /* Aturan hover SPESIFIK (Setelah yang umum) */
    .social-links a[aria-label="Instagram"]:hover {
        background: #E4405F;
        /* Warna Instagram */
    }

    .social-links a[aria-label="Facebook"]:hover {
        background: #1877F2;
        /* Warna Facebook */
    }

    .social-links a[aria-label="Twitter"]:hover {
        background: #1DA1F2;
        /* Warna Twitter */
    }

    .social-links a[aria-label="Youtube"]:hover {
        background: #FF0000;
        /* Warna YouTube */
    }

    /* --- AKHIR BLOK PENGGANTI --- */

    /* Mobile Menu Card */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        z-index: 1000;
        width: 90%;
        height: auto;
        top: 60px;
        /* Sesuaikan dengan tinggi navbar fixed */
        left: 50%;
        background-color: #222;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        padding: 20px;
        box-sizing: border-box;
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -20px);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0.3s;
        overflow-y: auto;
        max-height: calc(100vh - 80px);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0s;
    }

    .nav-links li a[href$="login.php"] {
        /* Target link login */
        text-align: left;
        margin: 0;
        font-weight: 600;
        background: none;
        box-shadow: none;
        border-radius: 0;
        padding: 12px 20px;
    }

    .nav-links li a[href$="login.php"]:hover {
        background: none;
        transform: none;
        color: var(--accent-orange);
    }

    .nav-links a {
        color: var(--text-light);
        padding: 12px 20px;
    }

    .nav-links a:hover {
        color: var(--accent-orange);
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        width: 100%;
        background-color: transparent;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
    }

    .dropdown-menu a {
        padding-left: 40px;
        color: #ccc;
    }

    .dropdown-menu a:hover {
        color: var(--accent-orange);
    }

    .dropdown.active>.dropdown-menu {
        max-height: 500px;
        padding: 0;
    }

    .hamburger {
        display: block;
    }

    /* Tampilkan hamburger */
}

/*
===================================================
 STYLES FAQ (Versi V3 - Animasi Buka & Tutup)
 Gantikan style FAQ yang lama dengan yang ini
===================================================
*/

.faq-container {
    margin-top: 30px;
}

.faq-container details {
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--neutral-gray-dark);
    background-color: var(--bg-light);
    transition: background-color 0.2s ease;
}

.faq-container details:first-of-type {
    border-top: 1px solid var(--neutral-gray-dark);
}

.faq-container details[open] {
    background-color: #fdfdfd;
}

.faq-container summary {
    padding: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--brand-red-dark);
    cursor: pointer;
    position: relative;
    list-style: none;
}

.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container summary::after {
    content: '+';
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-orange);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease-in-out;
}

.faq-container details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}


/* --- [INI BAGIAN PERUBAHAN UTAMA] --- */

/* Ini adalah bagian 'A' (Jawaban) */
.faq-container details p {
    /* State Awal (Tertutup) */
    padding: 0 20px;
    /* Padding atas/bawah 0, kiri/kanan 20px */
    margin: 0;
    line-height: 1.7;
    color: var(--text-dark);
    text-align: justify;
    border-top: 1px solid var(--neutral-gray-dark);

    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-15px);
    /* [DIUBAH] -15px (Turun dari atas) */

    /* Transisi untuk SEMUA state */
    transition:
        max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.3s ease-out,
        transform 0.3s ease-out,
        padding 0.4s ease-out;
}

/* State Akhir (Saat Terbuka) */
.faq-container details[open] p {
    max-height: 500px;
    /* Atur ke nilai yg lebih besar dari konten */
    opacity: 1;
    transform: translateY(0);
    padding-top: 20px;
    /* Tambahkan padding atas/bawah */
    padding-bottom: 20px;

    /* Tunda animasi fade/slide HANYA saat membuka */
    transition:
        max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.3s ease-out 0.1s,
        /* Delay 0.1s */
        transform 0.3s ease-out 0.1s,
        /* Delay 0.1s */
        padding 0.4s ease-out;
}

/* [BARU] State Saat Menutup (dipicu oleh JS) */
.faq-container details.is-closing p {
    /* Menganimasi kembali ke state tertutup */
    max-height: 0;
    opacity: 0;
    transform: translateY(-15px);
    /* [DIUBAH] -15px (Kembali ke atas) */
    padding-top: 0;
    padding-bottom: 0;

    /* Transisi TANPA delay untuk opacity/transform saat menutup */
    transition:
        max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.3s ease-out,
        transform 0.3s ease-out,
        padding 0.4s ease-out;
}

/* =========================================
   [BARU] STYLE GALLERY POSTER PIMTANAS
   ========================================= */

.gallery-section {
    background-color: var(--neutral-gray-light);
    padding-bottom: 60px;
}

.gallery-container {
    /* Diperlebar dari 1100px ke 1400px agar muat 5 poster */
    max-width: 1400px;
    margin-top: 40px;
    /* Tambahan padding agar di layar kecil tidak terlalu mepet pinggir */
    padding-left: 20px;
    padding-right: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--brand-maroon);
    border-bottom: none;
    /* Override default h2 style */
    padding-bottom: 0;
    margin-bottom: 10px;
}

.section-title p {
    color: #6c757d;
    text-align: center;
}

/* Filter Buttons */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--brand-maroon);
    color: white;
    border-color: var(--brand-maroon);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(154, 29, 42, 0.2);
}

/* Grid Layout */
.gallery-grid {
    display: grid;
    /* UBAH DISINI: minmax dikecilkan jadi 210px (sebelumnya 250px) 
       agar browser mengizinkan 5 kolom di layar lebar */
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 25px;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    font-style: italic;
    color: #888;
    padding: 20px;
}

/* Poster Card */
.poster-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.poster-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.poster-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 141.4%;
    /* Aspect Ratio Kertas A4/Poster (1:1.414) */
    background-color: #eee;
    overflow: hidden;
}

.poster-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Agar gambar memenuhi kotak */
    transition: transform 0.5s ease;
}

.poster-card:hover .poster-img-wrapper img {
    transform: scale(1.05);
}

/* Overlay saat hover */
.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(154, 29, 42, 0.8);
    /* Brand Maroon transparent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.poster-card:hover .poster-overlay {
    opacity: 1;
}

.poster-overlay i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.poster-overlay span {
    font-weight: 600;
    letter-spacing: 1px;
}

/* Info Card */
.poster-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.badge-scheme {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 10px;
    align-self: flex-start;
}

.poster-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: var(--text-dark);
    flex-grow: 1;
}

.poster-info .univ {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   [UPDATED] MODAL (LIGHTBOX) STYLE - FINAL VERSION
   ========================================= */

.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.85);
    /* Black w/ opacity */
    display: flex;
    /* Use flexbox for centering */
    align-items: center;
    /* Center vertically */
    justify-content: center;
    /* Center horizontally */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    /* Disable interaction when hidden */
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
    /* Enable interaction when shown */
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    /* Above modal content */
    transition: color 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--brand-maroon);
}

.modal-content {
    position: relative;
    background-color: transparent;
    /* Konten modal itu sendiri transparan */
    margin: auto;
    padding: 0;
    width: 90%;
    /* Lebar default */
    max-width: 1200px;
    /* Maksimal lebar */
    max-height: 90vh;
    /* Maksimal tinggi viewport */
    display: flex;
    /* Flexbox untuk layout gambar & detail */
    flex-direction: row;
    /* Default: gambar di kiri, detail di kanan */
    gap: 20px;
    /* Jarak antara gambar dan detail */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    /* Rounded corners for the entire modal block */
    overflow: hidden;
    /* Penting untuk radius dan image scale */
    transform: translateY(20px);
    /* Animasi masuk */
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-image-container {
    flex: 3;
    /* Ambil 3 bagian ruang */
    min-width: 50%;
    /* Pastikan gambar tidak terlalu kecil */
    background-color: black;
    /* Background jika gambar tidak full */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    /* Untuk overlay */
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    /* Menjaga rasio aspek dan mengisi ruang */
    transition: transform 0.3s ease;
}

/* Kalo mau ada zoom di gambar modal (opsional) */
/* .modal-image-container img:hover {
    transform: scale(1.03);
} */

.modal-details {
    flex: 1;
    /* Ambil 1 bagian ruang */
    background-color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Konten dimulai dari atas */
    gap: 15px;
    /* Spasi antar elemen detail */
    border-radius: 0 12px 12px 0;
    /* Hanya sudut kanan yang rounded */
    box-sizing: border-box;
    /* Padding dihitung dalam lebar */
    min-width: 300px;
    /* Minimal lebar kolom detail */
    overflow-y: auto;
    /* Scroll jika konten detail terlalu panjang */
}

.badge-scheme-modal {
    display: inline-block;
    background-color: var(--brand-maroon);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.modal-details h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-details .detail-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.modal-details .detail-row i {
    font-size: 1.5rem;
    color: var(--neutral-gray-dark);
    flex-shrink: 0;
    /* Jangan ciut */
    margin-top: 2px;
    /* Penyesuaian vertikal ikon */
}

.modal-details .detail-row div {
    flex-grow: 1;
}

.modal-details .detail-row small {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-details .detail-row p {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
}

/* =========================================
   RESPONSIVE MODAL
   ========================================= */

@media (max-width: 992px) {

    /* Untuk Tablet Landscape / Kecil */
    .modal-content {
        flex-direction: column;
        /* Stacking vertikal */
        width: 95%;
        max-height: 95vh;
        gap: 0;
        border-radius: 12px;
        /* Sudut membulat penuh */
    }

    .modal-image-container {
        flex: none;
        /* Nonaktifkan flex sizing */
        width: 100%;
        max-height: 70%;
        /* Gambar ambil 70% tinggi modal */
        border-radius: 12px 12px 0 0;
        /* Hanya atas yang rounded */
        overflow: hidden;
    }

    .modal-image-container img {
        object-fit: contain;
        /* Tetap contain */
    }

    .modal-details {
        flex: none;
        /* Nonaktifkan flex sizing */
        width: 100%;
        max-height: 30%;
        /* Detail ambil 30% tinggi modal */
        padding: 25px;
        border-radius: 0 0 12px 12px;
        /* Hanya bawah yang rounded */
    }

    .modal-details h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .modal-details .detail-row {
        margin-bottom: 8px;
    }

    .modal-details .detail-row i {
        font-size: 1.3rem;
    }

    .modal-details .detail-row small {
        font-size: 0.75rem;
    }

    .modal-details .detail-row p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {

    /* Untuk Mobile */
    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
        /* Margin atas bawah agar ada sedikit ruang */
        max-height: calc(100vh - 40px);
        /* Kurangi margin */
        gap: 0;
    }

    .modal-image-container {
        max-height: 60%;
        /* Gambar lebih kecil di mobile */
    }

    .modal-details {
        max-height: 40%;
        /* Detail lebih besar di mobile */
        padding: 20px;
    }

    .modal-details h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .badge-scheme-modal {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

/* [BARU] Style Khusus Thumbnail PDF */
.pdf-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    /* Warna abu-abu muda */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--brand-maroon);
    /* Warna Maroon sesuai brand */
    transition: transform 0.5s ease;
}

.pdf-thumbnail i {
    font-size: 4rem;
    /* Ukuran ikon PDF besar */
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.pdf-thumbnail span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Efek Hover pada PDF Thumbnail (Sama seperti gambar) */
.poster-card:hover .pdf-thumbnail {
    transform: scale(1.05);
}

/* =========================================
   [UPDATED] STYLE PAGINATION ADVANCED
   ========================================= */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 5px;
    /* Jarak antar tombol sedikit rapat */
    flex-wrap: wrap;
    /* Agar responsif di layar kecil */
    background-color: white;
    border-radius: 12px;
    /* Lebih rounded */
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    /* Shadow yang lebih lembut */
    max-width: fit-content;
    /* Sesuai lebar konten */
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #f0f0f0;
}

.page-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    /* Lebar minimum untuk sentuhan */
    height: 44px;
    /* Tinggi sama dengan lebar */
    border: none;
    /* Hilangkan border */
    background-color: transparent;
    /* Awalnya transparan */
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    /* Lebih tipis dari sebelumnya */
    font-size: 0.95rem;
    border-radius: 8px;
    /* Sudut agak membulat */
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 8px;
    /* Padding horizontal untuk icon */
}

/* Hover State */
.page-btn:not(.active):not(:disabled):hover {
    background-color: var(--neutral-gray-light);
    /* Warna hover lembut */
    color: var(--brand-maroon);
}

/* Active State */
.page-btn.active {
    background-color: var(--brand-maroon);
    /* Warna aktif PIMTANAS */
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(154, 29, 42, 0.25);
    /* Shadow lebih menonjol */
    transform: translateY(-1px);
    /* Efek sedikit naik */
    cursor: default;
}

/* Disabled State */
.page-btn:disabled {
    opacity: 0.4;
    /* Lebih transparan saat disable */
    cursor: not-allowed;
    background-color: transparent;
    color: #999;
    transform: none;
}

/* Style untuk Ellipsis (...) */
.page-btn.ellipsis {
    cursor: default;
    background-color: transparent;
    color: #777;
    pointer-events: none;
    /* Tidak bisa diklik */
    font-weight: 500;
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .pagination-wrapper {
        padding: 8px;
        gap: 3px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0 6px;
    }
}

/* =========================================
   [FIXED] LAYOUT KARTU VERTIKAL (PORTRAIT CARD)
   ========================================= */

.layout-pimtanas {
    /* Tetap Flex Column (Atas-Bawah) */
    display: flex;
    flex-direction: column;
    
    /* KUNCI PERUBAHAN: Batasi lebar agar bentuknya Persegi Panjang Vertikal */
    max-width: 750px; 
    width: 100%;
    
    /* Agar posisi kartu ada di TENGAH halaman */
    margin: 30px auto; 
    
    background-color: #ffffff;
    /* Shadow dibuat lebih menonjol agar kartu terlihat "melayang" */
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); 
    border-radius: 24px; /* Sudut lebih bulat */
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.02);
}

/* --- 1. STYLE GAMBAR (DI ATAS) --- */
.img-pimtanas {
    width: 100%;
    /* Tinggi gambar disesuaikan agar proporsional dengan kartu vertikal */
    height: 400px; 
    object-fit: cover; /* Crop gambar agar rapi */
    object-position: center; /* Fokus ke tengah gambar */
    display: block;
    transition: transform 0.5s ease;
}

.layout-pimtanas:hover .img-pimtanas {
    transform: scale(1.03); /* Efek zoom halus saat hover */
}

/* Pembungkus gambar untuk menjaga overflow saat zoom */
.img-pimtanas-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

/* --- 2. STYLE TEKS (DI BAWAH) --- */
.text-card-pimtanas {
    padding: 50px; /* Padding luas agar teks enak dibaca */
    background-color: #fff;
}

.text-card-pimtanas h2 {
    font-size: 2.4rem; /* Judul Besar */
    font-weight: 800;
    color: var(--brand-maroon);
    margin: 0 0 25px 0;
    line-height: 1.2;
    position: relative;
    padding-bottom: 15px;
    text-align: center; /* Judul rata tengah agar estetik */
}

/* Garis hiasan di bawah judul (Tengah) */
.text-card-pimtanas h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--brand-maroon);
    border-radius: 2px;
}

.text-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify; /* Paragraf rata kanan-kiri */
}

/* Highlight Tema */
.theme-highlight {
    background-color: #fffbf0; 
    border-left: 5px solid var(--accent-orange);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 0 10px 10px 0;
}

.theme-highlight p {
    font-size: 1.2rem;
    font-weight: 700;
    font-style: italic;
    color: var(--text-dark);
    margin: 0;
    text-align: center; /* Tema rata tengah */
}

/* =========================================
   RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    .layout-pimtanas {
        max-width: 100%; /* Di HP, lebar kartu dipenuhi */
        margin: 20px 0;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .img-pimtanas, .img-pimtanas-wrapper {
        height: 250px; /* Gambar lebih pendek di HP */
    }

    .text-card-pimtanas {
        padding: 30px 20px;
    }

    .text-card-pimtanas h2 {
        font-size: 1.8rem;
    }
    
    .theme-highlight p {
        font-size: 1rem;
    }
}

/* =========================================
   STYLE KHUSUS HALAMAN PEMENANG (PODIUM)
   ========================================= */

/* Navigasi Tab Kelas */
.winner-tabs-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.winner-tab-btn {
    padding: 10px 25px;
    border: 1px solid var(--brand-maroon);
    background: white;
    color: var(--brand-maroon);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.winner-tab-btn:hover, .winner-tab-btn.active {
    background: var(--brand-maroon);
    color: white;
    box-shadow: 0 4px 10px rgba(154, 29, 42, 0.3);
}

/* Toggle Switch Poster/Presentasi */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.toggle-switch {
    background: #e9ecef;
    padding: 5px;
    border-radius: 50px;
    display: inline-flex;
    position: relative;
}

.toggle-opt {
    padding: 10px 30px;
    border-radius: 40px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
}

.toggle-opt.active {
    background: white;
    color: var(--brand-maroon);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Container Konten */
.category-content {
    display: none;
    animation: fadeInUp 0.6s ease;
}
.category-content.active {
    display: block;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PODIUM SECTION (JUARA 1, 2, 3) --- */
.podium-section {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Supaya rata bawah */
    gap: 20px;
    margin-bottom: 60px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.winner-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 320px; /* Lebar kartu */
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.winner-card:hover {
    transform: translateY(-10px);
}

/* Styling Khusus Per Juara */
.rank-1 {
    order: 2; /* Juara 1 di Tengah */
    z-index: 10;
    transform: scale(1.1); /* Lebih besar */
    border: 3px solid #FFD700; /* Emas */
    max-width: 340px;
}
.rank-1:hover { transform: scale(1.1) translateY(-10px); }

.rank-2 {
    order: 1; /* Juara 2 di Kiri */
    border: 3px solid #C0C0C0; /* Perak */
    margin-bottom: -20px; /* Sedikit turun */
}

.rank-3 {
    order: 3; /* Juara 3 di Kanan */
    border: 3px solid #CD7F32; /* Perunggu */
    margin-bottom: -40px; /* Lebih turun */
}

/* Komponen Kartu */
.winner-img-box {
    position: relative;
    width: 100%;
    height: 250px;
    background: #eee;
}

.winner-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.univ-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.univ-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.medal-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.rank-1 .medal-icon { color: #FFD700; }
.rank-2 .medal-icon { color: #C0C0C0; }
.rank-3 .medal-icon { color: #CD7F32; }

.winner-body {
    padding: 30px 20px 20px;
}

.winner-cat {
    display: inline-block;
    padding: 4px 12px;
    background: var(--neutral-gray-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-maroon);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.winner-body h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 5px 0;
}

.winner-body .judul-karya {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}

/* --- LIST SECTION (HARAPAN & FAVORIT) --- */
.honorable-list {
    max-width: 900px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid transparent;
    transition: transform 0.2s;
}

.list-card:hover { transform: translateX(5px); }

/* Warna border kiri */
.list-card[data-rank="HARAPAN"] { border-left-color: var(--brand-blue); }
.list-card[data-rank="FAVORIT"] { border-left-color: var(--accent-orange); }

.list-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 20px;
    background: #eee;
}

.list-info { flex-grow: 1; }

.list-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand-maroon);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list-info h4 {
    margin: 5px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.list-univ {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.list-univ img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .podium-section {
        flex-direction: column;
        align-items: center;
    }
    
    /* Urutan di HP: Juara 1 -> 2 -> 3 */
    .rank-1 { order: 1; transform: scale(1); margin-bottom: 20px; max-width: 100%; }
    .rank-2 { order: 2; margin-bottom: 20px; max-width: 100%; }
    .rank-3 { order: 3; margin-bottom: 0; max-width: 100%; }
    
    .list-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .list-img { margin: 0 0 15px 0; width: 100px; height: 100px; }
    .list-univ { justify-content: center; }
}