/* [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 BARU UNTUK "BENTO GRID" SELAYANG PANDANG
=================================================
*/

/* [BARU] Latar belakang utama halaman */
.main-content-sp {
    padding: 60px 20px;
    background-color: var(--neutral-gray-light);
    /* Latar abu-abu muda */
    overflow-x: hidden;
    /* Penting untuk animasi */
}

/* [BARU] BENTO GRID CONTAINER */
.bento-grid {
    display: grid;
    /* Ini adalah grid 2 kolom */
    grid-template-columns: repeat(2, 1fr);
    /* Sesuaikan 'auto' agar tinggi kotak dinamis */
    grid-auto-rows: auto;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* [BARU] Style dasar untuk setiap item di grid */
.bento-item {
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    /* Penting untuk gambar dan border-radius */
}

/* [BARU] Modifier untuk Teks */
.bento-item.text-block {
    background-color: var(--bg-light);
    /* Kotak putih */
    padding: 40px;
}

.bento-item.text-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-maroon);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.bento-item.text-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-orange-dark);
    margin: 0 0 15px 0;
}

.bento-item.text-block p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin: 0;
    text-align: justify;
}

/* [BARU] Modifier untuk Gambar */
.bento-item.image-block {
    /* Menjaga rasio aspek gambar */
    height: 100%;
    min-height: 300px;
    /* Tinggi minimum agar tidak gepeng */
}

.bento-item.image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Memastikan gambar memenuhi kotak tanpa distorsi */
    display: block;
    transition: transform 0.4s ease-out;
}

.bento-item.image-block:hover img {
    transform: scale(1.05);
    /* Efek zoom halus saat di-hover */
}


/* [BARU] Modifier untuk Span (Ukuran Kotak) */
.bento-item.span-2 {
    grid-column: span 2;
    /* Kotak ini memakan 2 kolom */
}


/* [BARU] Bagian CTA (Sama, tapi pastikan style container-sp ada) */
.container-sp.cta-section {
    max-width: 900px;
    margin: 60px auto 0 auto;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, var(--accent-orange-dark) 100%);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.07);
}

.cta-section p {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 20px 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-orange), var(--accent-yellow));
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(233, 91, 40, 0.4);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 91, 40, 0.6);
}


/* [BARU] CSS UNTUK ANIMASI SCROLL */
.animated {
    /* State Awal: Tersembunyi */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animated.is-visible {
    /* State Akhir: Terlihat */
    opacity: 1;
    transform: translateY(0);
}


/* === [BARU] MEDIA QUERY UNTUK MOBILE === */
@media (max-width: 992px) {
    .main-content-sp {
        padding: 30px 15px;
    }

    /* Ubah grid jadi 1 kolom di mobile */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Paksa semua item jadi 1 kolom */
    .bento-item.span-2 {
        grid-column: span 1;
    }

    .bento-item.text-block {
        padding: 30px 25px;
    }

    .bento-item.text-block h2 {
        font-size: 2rem;
    }

    .bento-item.text-block p {
        font-size: 1rem;
    }

    .bento-item.image-block {
        /* Tetapkan tinggi agar tidak terlalu besar di mobile */
        min-height: 250px;
        height: 250px;
    }

    .container-sp.cta-section {
        margin: 40px 0 0 0;
        width: auto;
    }
}