/* ===================== ASLI KAMU (TANPA PERUBAHAN) ===================== */
/* Container styling */
.navbar {
    background-color: rgba(10, 15, 31, 0);
    padding: 5px 5px;
    position: relative;
    z-index: 100;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    transition: color 0.3s ease;
}

.navbar.scrolled .logo {
    color: #000;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

/* Default: desktop nav */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 400px;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    color: #fff;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-size: 15px;
}

.dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(1000%) invert(1) grayscale(1);
}

/* scrol */
/* Saat di-scroll, background putih + teks/ikon gelap */
.navbar.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-links a {
    color: #111 !important;
}


.navbar.scrolled .dropdown img {
    filter: none !important; /* tampilkan warna asli ikon */
}

.navbar.scrolled .dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0);
}

.navbar.scrolled .dropdown a {
    color: #111;
}

.navbar.scrolled .dropdown a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ======================= Responsive for Mobile========================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: #0a0f1f;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .dropdown {
        position: static;
        grid-template-columns: 1fr;
        padding: 10px 0;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        background: none;
        backdrop-filter: none;
    }

    .has-dropdown .dropdown {
        display: none;
    }

    .has-dropdown.open .dropdown {
        display: grid;
    }

    .dropdown a {
        padding: 12px;
        color: #000 !important;
    }

    .dropdown img {
        filter: none !important;
    }
}

/* ===================== DESKTOP-ONLY OVERRIDES ===================== */
/* HANYA aktif di desktop. Mobile tetap 100% seperti awal. */
@media (min-width: 769px) {
    /* Saat JS memberi .light-bg (di atas background putih), ubah dropdown jadi terang */
    .navbar.light-bg .dropdown {
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .navbar.light-bg .dropdown a {
        color: #111 !important;
        text-shadow: none;
    }
    .navbar.light-bg .dropdown a:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    .navbar.light-bg .dropdown img {
        filter: none !important;
    }

    /* Jika kamu masih pakai .scrolled, batasi efek putihnya hanya saat .light-bg */
    .navbar.scrolled.light-bg .dropdown {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: none;
    }
    .navbar.scrolled.light-bg .dropdown a { color: #111; }
    .navbar.scrolled.light-bg .dropdown a:hover { background-color: rgba(0,0,0,0.05); }
    .navbar.scrolled.light-bg .dropdown img { filter: none !important; }
}
