/* Top navigation (computers): a glossy, raised menu bar.
   - The menu sits in a light glass capsule with a soft top highlight and shadow.
   - Hover lifts an item into a pearl-white pill; the section you are in is a glossy navy pill.
   - Login / Dashboard / Logout are glossy navy buttons. Drop-down panels get matching rounded glass cards.
   Phones keep their own menu (mobile.css), so everything here is for 992px and wider. */
@media (min-width: 992px) {
    nav.navbar { --g-navy: #0c2a7a; --g-navy-hi: #2148b0; --g-navy-lo: #061a52; --g-mint: #14c9b8; }

    /* The bar itself: frosted, with a hairline and a gentle shadow once you scroll */
    nav.navbar.fixed-top,
    nav.navbar.scrolled {
        background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(244, 248, 253, .80));
        -webkit-backdrop-filter: saturate(160%) blur(14px);
        backdrop-filter: saturate(160%) blur(14px);
        border-bottom: 1px solid rgba(12, 42, 122, .06);
    }
    nav.navbar.scrolled { box-shadow: 0 8px 28px rgba(12, 42, 122, .10); }

    /* The menu capsule */
    #navbarNav > .navbar-nav.m-auto {
        position: relative;
        align-items: center;
        gap: 2px;
        padding: 5px;
        border-radius: 999px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .55) 50%, rgba(232, 239, 249, .65) 51%, rgba(240, 245, 252, .9) 100%);
        border: 1px solid rgba(255, 255, 255, .95);
        box-shadow:
            inset 0 1px 0 #fff,
            inset 0 -1px 0 rgba(12, 42, 122, .06),
            0 1px 2px rgba(12, 42, 122, .08),
            0 10px 26px rgba(12, 42, 122, .10);
    }

    /* Menu items */
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link {
        display: inline-flex;
        align-items: center;
        padding: 7px 16px !important;
        border-radius: 999px;
        color: var(--g-navy) !important;
        font-size: 15.5px;
        line-height: 24px;
        letter-spacing: .005em;
        background: transparent;
        transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
    }
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link::after { opacity: .6; transition: transform .2s ease, opacity .2s ease; }

    /* Hover / keyboard focus / open drop-down: a raised pearl pill */
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link:hover,
    #navbarNav > .navbar-nav.m-auto > .nav-item:hover > .nav-link,
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link:focus-visible {
        color: var(--g-navy) !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .9) 48%, rgba(233, 240, 250, 1) 52%, rgba(246, 249, 254, 1) 100%);
        box-shadow:
            inset 0 1px 0 #fff,
            inset 0 -1px 0 rgba(12, 42, 122, .08),
            0 1px 1px rgba(12, 42, 122, .10),
            0 6px 14px rgba(12, 42, 122, .12);
        transform: translateY(-1px);
    }
    #navbarNav > .navbar-nav.m-auto > .nav-item:hover > .nav-link::after { opacity: 1; transform: rotate(180deg); }
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link:focus-visible { outline: 2px solid var(--g-mint); outline-offset: 2px; }

    /* The section you are in: glossy navy pill */
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link.active,
    #navbarNav > .navbar-nav.m-auto > .nav-item:hover > .nav-link.active {
        color: #fff !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .10) 46%, rgba(255, 255, 255, 0) 50%),
            linear-gradient(180deg, var(--g-navy-hi) 0%, var(--g-navy) 55%, var(--g-navy-lo) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .35),
            inset 0 -2px 3px rgba(0, 0, 0, .22),
            0 2px 3px rgba(6, 26, 82, .22),
            0 8px 18px rgba(12, 42, 122, .28);
        text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
    }
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link.active::after { opacity: .9; }

    /* Login / Dashboard / Logout: glossy navy buttons */
    #navbarNav > .navbar-nav.ms-auto { gap: 8px; align-items: center; }
    #navbarNav > .navbar-nav.ms-auto > .nav-item > .nav-link {
        padding: 8px 20px !important;
        border-radius: 999px;
        color: #fff !important;
        font-size: 15px;
        line-height: 22px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .10) 46%, rgba(255, 255, 255, 0) 50%),
            linear-gradient(180deg, var(--g-navy-hi) 0%, var(--g-navy) 55%, var(--g-navy-lo) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .35),
            inset 0 -2px 3px rgba(0, 0, 0, .22),
            0 2px 3px rgba(6, 26, 82, .22),
            0 8px 18px rgba(12, 42, 122, .26);
        text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
        transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    }
    #navbarNav > .navbar-nav.ms-auto > .nav-item > .nav-link:hover {
        color: #fff !important;
        filter: brightness(1.08);
        transform: translateY(-1px);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .4),
            inset 0 -2px 3px rgba(0, 0, 0, .22),
            0 3px 4px rgba(6, 26, 82, .22),
            0 12px 24px rgba(12, 42, 122, .30);
    }
    #navbarNav > .navbar-nav.ms-auto > .nav-item > .nav-link:active { transform: translateY(0); filter: brightness(.96); }
    #navbarNav > .navbar-nav.ms-auto > .nav-item > .nav-link:focus-visible { outline: 2px solid var(--g-mint); outline-offset: 3px; }

    /* Drop-down panels: rounded glass cards to match */
    #navbarNav .custom-dropdown > .dropdown-menu {
        margin-top: 10px;
        border: 1px solid rgba(12, 42, 122, .08);
        border-top: 1px solid rgba(255, 255, 255, .9);
        border-radius: 18px;
        background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
        box-shadow:
            inset 0 1px 0 #fff,
            0 2px 6px rgba(12, 42, 122, .06),
            0 24px 48px rgba(12, 42, 122, .16);
    }
    #navbarNav .custom-dropdown > .dropdown-menu::before {
        top: -8px; left: 26px; width: 14px; height: 14px; border: 0;
        background: #fff; transform: rotate(45deg); border-radius: 3px 0 0 0;
        box-shadow: -1px -1px 0 rgba(12, 42, 122, .08);
    }
    /* invisible bridge so the panel does not close while the pointer moves down to it */
    #navbarNav .custom-dropdown > .dropdown-menu::after { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
    #navbarNav .custom-dropdown .submenu-list li a { color: #1d2b4f; border-radius: 8px; padding: 5px 8px; margin: 0 2px; transition: color .15s ease, background .15s ease; }
    #navbarNav .custom-dropdown .submenu-list li a:hover,
    #navbarNav .custom-dropdown .submenu-list li a.active { color: var(--g-navy); background: #eef3fb; }
}

@media (min-width: 992px) and (max-width: 1279.98px) {
    #navbarNav > .navbar-nav.m-auto > .nav-item > .nav-link { padding: 6px 10px !important; font-size: 14px !important; }
    #navbarNav > .navbar-nav.ms-auto > .nav-item > .nav-link { padding: 7px 16px !important; }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
    #navbarNav .nav-link { transition: none !important; transform: none !important; }
}
