/* default transparent */
#navbar {
    background: transparent;
}

/* after scroll */
#navbar.scrolled {
    background: rgb(5, 7, 13);
    backdrop-filter: blur(14px);
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.08); */
}

/* nav links */
.nav-link {
    color: rgba(255, 255, 255, 0.952);
    transition: all .25s ease;
    font-weight: 600;
    letter-spacing: 1.05px;
    font-size: 16px;
}

.nav-link:hover {
    color: oklch(62.3% 0.214 259.815);
}

/* CTA glow */
.cta-btn {
    box-shadow: 0 0 0 rgba(45, 212, 191, 0);
    transition: all .3s ease;
}

.cta-btn:hover {
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.5);
}

#navbar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    /* height: 20px; */
    pointer-events: none;

    background: linear-gradient(to bottom,
            rgba(5, 7, 13, 0.25),
            rgba(5, 7, 13, 0));

    opacity: 0;
    transition: opacity .4s ease;
}

#navbar.scrolled::after {
    opacity: 1;
}

.dropdown {
    position: relative;
    /* invisible hover bridge */
}

/* menu */
.dropdownMenu {
    position: absolute;
    top: 100%;
    /* IMPORTANT: attach directly */
    left: 0;
    min-width: 240px;
    background: white;
    border-radius: 14px;
    padding: 12px 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all .25s ease;
}

/* keep visible when hovering menu also */
.dropdown:hover .dropdownMenu,
.dropdownMenu:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* items */
.dropdownMenu a {
    display: block;
    padding: 10px 18px;
    color: #374151;
    transition: background .2s ease, padding-left .2s ease;
}

.dropdownMenu a:hover {
    background: #f1f5f9;
    padding-left: 22px;
}

.dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 14px;
    /* hover bridge */
}

/* MOBILE DROPDOWN */
.mobileDropdown {
    display: flex;
    flex-direction: column;
}

.mobileToggle {
    text-align: left;
    font-weight: 600;
    color: white;
    padding: 6px 0;
}

.mobileSubmenu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-left: 14px;
    transition: max-height .35s ease;
}

.mobileSubmenu a {
    padding: 6px 0;
    color: #cbd5e1;
}

.active {
    color: oklch(62.3% 0.214 259.815);
    transition: all .25s ease;
    font-weight: 700;
    letter-spacing: 1.1px;
}

.nav-gap {
    gap: 32px;
}

#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}

@media (max-height: 820px) {
    .nav-link {
        font-size: 14px;
    }

    .nav-gap {
        gap: 16px
    }
}

@media (max-width:768px) {

    #mobileMenu a {
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobileToggle {
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobileSubmenu a {
        font-size: 16px;
        padding: 8px 0;
    }

    #mobileMenu {
        backdrop-filter: blur(20px);
    }

    #menuBtn {
        font-size: 28px;
        transition: transform .3s ease;
    }

}

@media (max-width:640px) {

    .nav-container {
        height: 70px;
    }

    #mobileMenu {
        top: 70px;
        height: calc(100dvh - 70px);
    }

    .nav-link img {
        height: 28px;
    }

}