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

:root {
    /* Palet Warna Gradien */
    --bg-light: #FFFFFF;
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    /* Teks putih */

    /* Warna Primer */
    --brand-maroon: #9A1D2A;
    --brand-red-dark: #7A0C16;
    --brand-blue: #007FA9;

    /* Warna Aksen */
    --accent-orange: #E95B28;
    --accent-orange-dark: #C24A1F;
    --accent-yellow: #F9B233;
    --accent-cyan: #00A3C8;

    /* Warna Netral */
    --neutral-gray-light: #f8f9fa;
    --neutral-gray-dark: #e9ecef;

    /* Warna Partikel */
    --particle-color: rgba(255, 255, 255, 0.3);
}

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

/* Pola samar di atas gradien */
.header-section::before {
    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 {
    /* Canvas Partikel */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* SVG lama tetap disembunyikan */
.static-background svg {
    display: none;
}

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

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

/* NAVBAR STYLES (Absolute di desktop) - DARI SELAYANG.CSS */
.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);
}

/* PERBAIKAN PADA HEADER CONTENT - SPACING LEBIH RAPAT */
.header-content {
    text-align: center;
    color: var(--text-light);
    margin-top: 80px;
    /* DIKURANGI dari 70px */
    padding: 12px;
    width: 100%;
}

.header-content {
    text-align: center;
    color: var(--text-light);
    margin-top: 80px;
    padding: 12px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.header-content h1 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.header-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0px 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.15px;
}

.header-theme {
    font-size: 0.75rem;
    font-weight: 400;
    margin: 6px 0 12px 0;
    opacity: 0.9;
    line-height: 1.3;
    padding: 0 8px;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    margin-bottom: 25px;
}

.page-title h1 {
    font-size: 1.8rem;
    color: var(--brand-maroon);
    margin-bottom: 8px;
}

.page-title p {
    color: var(--text-dark);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
}

/* SCHEDULE SECTION */
.schedule-section {
    margin-bottom: 35px;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 6px;
}

.schedule-tab {
    padding: 8px 14px;
    background-color: white;
    border: 2px solid var(--brand-maroon);
    color: var(--brand-maroon);
    font-weight: 600;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.schedule-tab.active {
    background-color: var(--brand-maroon);
    color: white;
}

.schedule-tab:hover:not(.active) {
    background-color: rgba(154, 29, 42, 0.1);
}

.schedule-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th {
    background: linear-gradient(135deg, var(--brand-maroon), var(--brand-red-dark));
    color: white;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

.schedule-table td {
    padding: 20px 20px;
    border-bottom: 1px solid var(--neutral-gray-dark);
    font-size: 1.05rem;
    line-height: 1.6;
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-table tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

.schedule-table tr:hover {
    background-color: rgba(233, 91, 40, 0.05);
}

.schedule-date {
    font-weight: 600;
    color: var(--brand-maroon);
}

.schedule-event {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.15rem;
}

.schedule-location {
    color: var(--accent-cyan);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Badge Online (Tambahan agar sesuai gambar flyer) */
.badge-online {
    display: inline-block;
    background-color: #28a745;
    /* Warna hijau */
    color: white;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 8px;
    vertical-align: middle;
}

/* IMPORTANT DATES SECTION */
.important-dates {
    margin-top: 35px;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.date-card {
    background: white;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.date-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.date-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--brand-maroon);
}

.date-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-maroon);
    margin-bottom: 6px;
}

.date-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.date-note {
    font-size: 0.75rem;
    color: #6c757d;
}

/* FOOTER */
.footer {
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, var(--accent-orange-dark) 40%, var(--accent-yellow) 100%);
    color: white;
    padding: 35px 15px 18px;
}

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

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 6px;
}

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

.footer-column p, .footer-column a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin-bottom: 6px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

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

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

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

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

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

/* MEDIA QUERIES */

/* Mengatur layout Desktop */
@media (min-width: 993px) {

    /* [BARU] Tampilkan bar logo di desktop */
    .navbar-logo-bar {
        display: flex;
    }

    /* Tampilkan maskot dengan ukuran lebih besar */

    /* Geser teks ke kiri */
    .header-content {
        width: auto;
        margin-left: 0;
        margin-right: 0;
        text-align: center;
        margin-top: 0;
        transform: translate(-50%, -50%);
    }

    .header-content h1 {
        font-size: 1.1rem;
        margin: 0 0 6px 0;
    }

    .header-content h2 {
        font-size: 3rem;
        margin: 8px 0;
    }

    .header-theme {
        font-size: 1rem;
        margin: 8px 0 15px 0;
    }

    .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 a {
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .navbar-brand .logo {
        height: 50px;
    }
    
    .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; 
    }
    
}

/* Mengatur layout Tablet */
@media (min-width: 768px) and (max-width: 992px) {
    .header-section {
        height: 50vh;
    }

    .header-mascot {
        height: 28vh;
        max-height: 180px;
        right: 3%;
    }

    .header-content {
        width: auto;
        margin-left: 0;
        margin-right: 0;
        text-align: center;
        margin-top: 0;
        transform: translate(-50%, -50%);
    }

    .header-content h1 {
        font-size: 0.9rem;
        margin: 0 0 4px 0;
    }

    .header-content h2 {
        font-size: 2.2rem;
        margin: 8px 0;
    }

    .header-theme {
        font-size: 0.85rem;
        margin: 8px 0 12px 0;
    }

    .navbar-logo-bar {
        display: none;
    }
}

/* Mengatur layout Mobile/Tablet */
@media (max-width: 992px) {
    body {
        padding-top: 55px;
        /* Sesuaikan nilainya agar pas */
    }

    .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;
    }

    .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;
        padding-bottom: 20px;
        flex-direction: column;
        margin: 0;
    }

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

    .hamburger {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        z-index: 1000;
        width: 90%;
        height: auto;
        top: 60px;
        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"] {
        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;
    }

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

    .header-content h2 {
        font-size: 1.6rem;
    }

    .header-theme {
        font-size: 0.7rem;
    }

    .header-mascot {
        height: 18vh;
        max-height: 120px;
    }

    .schedule-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        /* Scroll ke samping jika tabel kepanjangan */
        -webkit-overflow-scrolling: touch;
    }

    .schedule-table th {
        padding: 12px 15px;
        font-size: 0.95rem;
        /* DIBESARKAN: dari 0.7rem ke 0.95rem */
        white-space: nowrap;
    }

    .schedule-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
        /* DIBESARKAN: dari 0.7rem ke 0.9rem */
    }

    /* Penyesuaian agar kolom tanggal tidak terlalu lebar di mobile */
    .schedule-date {
        font-size: 0.85rem;
        white-space: normal;
        /* Izinkan tanggal turun baris di HP */
    }

    .schedule-event {
        font-size: 1rem;
        /* Judul kegiatan tetap menonjol di HP */
    }
}

/* Mobile kecil */
@media (max-width: 480px) {
    .header-section {
        height: 45vh;
    }

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

    .header-content h2 {
        font-size: 1.6rem;
    }

    .header-theme {
        font-size: 0.7rem;
    }

    .header-mascot {
        height: 18vh;
        max-height: 120px;
    }

    .schedule-table {
        display: block;
        overflow-x: auto;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 6px 3px;
        font-size: 0.7rem;
    }
}

/* ==== CARD WRAPPER UNTUK MAIN CONTENT ==== */
.content-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    max-width: 1200px;
    margin: 40px auto;
    transition: all 0.3s ease;
}

/* Saat hover, beri efek ringan agar interaktif */
.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

/* Responsif untuk tablet */
@media (max-width: 992px) {
    .content-card {
        padding: 25px 20px;
        margin: 30px 10px;
        border-radius: 12px;
    }
}

/* Responsif untuk mobile */
@media (max-width: 576px) {
    .content-card {
        padding: 20px 15px;
        margin: 20px 8px;
        border-radius: 10px;
    }
}