/* PRELOADER CSS (Tidak Diubah) */
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;
}

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 */

:root {
    /* Variabel Warna (Sama) */
    --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);
}


.hero-section {
    /* Hero Section (Sama) */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, var(--accent-orange-dark) 40%, var(--accent-yellow) 100%);
}

.hero-section::before {
    /* Pola (Sama) */
    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;
}

.static-background,
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.static-background svg {
    display: none;
}

.static-background {
    z-index: 1;
}

#particle-canvas {
    z-index: 2;
}

.navbar,
.hero-content {
    z-index: 4;
    position: relative;
}

.navbar {
    z-index: 10;
}

/* Naikkan Z-index Navbar */

/* Maskot (Sama) */
.hero-mascot {
    display: none;
    position: absolute;
    bottom: auto;
    right: 5%;
    height: 60vh;
    max-height: 450px;
    width: auto;
    z-index: 3;
    opacity: 0.95;
    transition: opacity 0.5s ease-in-out;
    transform: translateY(100%);
    animation: slideUp 1s 1.5s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

/* AKHIR CSS MASKOT */

/* Navbar Style (Sama) */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    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));
    /* Background gradien */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 50px;
}

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

/* === [PERBAIKAN] CSS BARU UNTUK DUA LOGO === */
.navbar-brand {
    position: absolute;
    top: 0;
    left: 30px;
    height: 100%;
    /* Setinggi navbar */
    display: flex;
    /* Aktifkan flexbox */
    align-items: center;
    /* Sejajarkan logo secara vertikal */
    gap: 15px;
    /* Jarak antara logo UMBJM dan PIMTANAS */
    z-index: 11;
    text-decoration: none;
    /* Hapus garis bawah link jika ada */
}

.navbar-brand .logo {
    height: 55px;
    /* <-- SESUAIKAN TINGGI KEDUA LOGO DI SINI */
    width: auto;
    display: block;
    /* Pastikan gambar block */
}

/* === AKHIR PERBAIKAN DUA LOGO === */

/* Nav Links, Dropdown, Hamburger (Sama) */
.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"] {
    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 {
    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 {
    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);
}

/* Hero Content (Sama) */
.hero-content {
    text-align: center;
    color: var(--text-light);
    margin-top: 60px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h2 {
    font-size: 4.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-content .hero-theme {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 15px 0 30px 0;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.hero-buttons .btn-primary {
    background: linear-gradient(45deg, var(--accent-orange), var(--accent-yellow));
    color: white;
    box-shadow: 0 4px 20px rgba(233, 91, 40, 0.5);
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(233, 91, 40, 0.7);
}

.hero-buttons .btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.hero-buttons .btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--brand-maroon);
}


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

    /* Desktop */
    .navbar-logo-bar {
        display: flex;
    }

    /* .hero-mascot {
        display: block;
    } */

    /* .hero-content {
        width: 50%;
        margin-left: 5%;
        margin-right: auto;
        text-align: center;
    } */

    /* .hero-buttons {
        justify-content: center;
    } */

    .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 */
    .navbar-brand {
        position: static;
        height: auto;
        display: flex;
        /* Tetap flex untuk mobile */
        align-items: center;
        gap: 10px;
        /* Jarak logo mobile */
        left: auto;
        top: auto;
        z-index: auto;
    }

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

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

    .hero-section {
        flex-direction: column;
        justify-content: center;
        height: auto;
        min-height: 100vh;
        padding-bottom: 30px;
        box-sizing: border-box;
    }

    .navbar {
        padding: 10px 20px;
        justify-content: space-between;
        min-height: auto;
    }

    .hero-content {
        margin-top: 40px;
    }

    .hero-content h1 {
        font-size: 1rem;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .hero-content .hero-theme {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .hero-buttons .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .hero-mascot {
        display: block;
        position: relative;
        right: auto;
        bottom: auto;
        height: 30vh;
        max-height: 200px;
        margin-top: 20px;
        transform: none;
        animation: none;
        opacity: 0.95;
    }

    /* Mobile Menu Card (Sama) */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        z-index: 1000;
        width: 90%;
        height: auto;
        top: 70px;
        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: 80vh;
    }

    .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"] {
        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;
    }
}

/* Ini adalah kursor yang berkedip */
.typing::after {
    content: '|'; /* Karakter kursor */
    font-weight: 600;
    font-size: 1.5rem; /* Samakan dengan font-size h1 */
    display: inline-block;
    vertical-align: baseline;
    margin-left: 5px;
    animation: blink-cursor 0.7s infinite;
}

/* Animasi untuk kursor berkedip */
@keyframes blink-cursor {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Kelas ini untuk menyembunyikan H2, P, dan Tombol.
  Mereka akan dibuat terlihat (visible) oleh JavaScript.
*/
.fade-in-delay {
    opacity: 0; /* Mulai dari transparan */
    transition: opacity 0.5s ease-in-out;
}

.fade-in-delay.visible {
    opacity: 1; /* Transisi menjadi terlihat */
}