/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #fbbf24; /* Original accent */
    --accent: #c5a059; /* Modern Gold accent */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --nav-bg: #ffffff;
    --nav-text: #0f172a;
    --primary: #0f172a;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    padding-top: 80px;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    background: var(--nav-bg);
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo i {
    color: var(--accent);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Indikator Menu Aktif & Hover */
nav ul li a:hover,
nav ul li a.active {
    color: var(--accent);
    background: rgba(241, 245, 249, 0.8);
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a.active::after {
    width: 60%;
}

/* ========================================
   DROPDOWN & ALERTS (Rest of your styles)
   ======================================== */
.user-dropdown-nav {
    position: relative;
}
.user-button-nav {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.user-button-nav:hover {
    background: var(--accent);
}

.dropdown-menu-nav {
    position: absolute;
    right: 0;
    top: 120%;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}
.user-dropdown-nav:hover .dropdown-menu-nav {
    display: block;
}

.dropdown-item-nav {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}
.dropdown-item-nav:hover {
    background: #f8fafc;
    color: var(--accent);
}

.alert {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}
.alert-success {
    background: #10b981;
}
.alert-error {
    background: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* FOOTER */
footer {
    background: #0f172a;
    color: white;
    padding: 80px 0 30px;
    margin-top: 100px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}
.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--accent);
}
.footer-section ul {
    list-style: none;
    padding: 0;
}
.footer-section ul li {
    margin-bottom: 12px;
}
.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
}
.footer-section ul li a:hover {
    color: var(--accent);
}
.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #64748b;
}

/* ========================================
   HAMBURGER BUTTON (hidden on desktop)
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    padding: 6px;
    transition:
        border-color 0.25s,
        background 0.25s;
    z-index: 1100;
}
.hamburger:hover {
    border-color: var(--accent);
    background: rgba(197, 160, 89, 0.07);
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition:
        transform 0.35s ease,
        opacity 0.25s ease,
        width 0.25s ease;
    transform-origin: center;
}
/* Animasi X saat aktif */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   OVERLAY
   ======================================== */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.show {
    display: block;
    opacity: 1;
}

/* ========================================
   RESPONSIVE — Mobile (<= 768px)
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    #navMenu {
        position: fixed;
        top: 80px; /* tinggi navbar */
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 0 20px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        transition:
            max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.3s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    #navMenu.open {
        max-height: 90vh;
        padding-top: 12px;
        padding-bottom: 20px;
        overflow-y: auto;
    }

    /* Item menu jadi full-width */
    #navMenu li {
        width: 100%;
    }
    #navMenu li a,
    #navMenu .dropdown-item-nav {
        display: block;
        padding: 14px 28px;
        border-radius: 0;
        font-size: 1rem;
        font-weight: 600;
        border-bottom: 1px solid #f1f5f9;
        color: var(--primary);
    }
    #navMenu li a:last-child {
        border-bottom: none;
    }
    #navMenu li a:hover,
    #navMenu li a.active {
        background: #fdf8ef;
        color: var(--accent);
    }
    #navMenu li a.active::after {
        display: none;
    }

    /* Tombol Login di mobile */
    #navMenu li a[style*="background"] {
        margin: 12px 20px 0;
        border-radius: 10px !important;
        text-align: center;
        border: none;
    }

    /* Dropdown user di mobile — selalu tampil */
    .user-dropdown-nav {
        width: 100%;
    }
    .user-button-nav {
        width: 100%;
        justify-content: flex-start;
        border-radius: 0;
        padding: 14px 28px;
        background: transparent;
        color: var(--primary);
        font-weight: 600;
        font-size: 1rem;
        border-bottom: 1px solid #f1f5f9;
    }
    .user-button-nav:hover {
        background: #fdf8ef;
        color: var(--accent);
    }
    .dropdown-menu-nav {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f8fafc;
        min-width: unset;
    }
    .dropdown-item-nav {
        padding-left: 44px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.15rem;
    }
}
