/* ============================================ */
/*           Navigation Fixes Only              */
/* ============================================ */

#sb-navigation .sb-drop-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#sb-navigation .sb-dropdown {
    position: relative;
}

#sb-navigation .sb-drop-ul {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 0.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);

    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;

    min-width: 15rem;
    padding: 0.5rem;
}

#sb-navigation .sb-drop-icon {
    transition: transform 0.2s ease;
}

#sb-navigation .sb-dropdown.sb-active .sb-drop-icon {
    transform: rotate(180deg);
}

/* Make active link feel more "blue brand" */
#sb-navigation .sb-li-link.sb-active {
    color: var(--primary);
}

@media only screen and (min-width: 64rem) {
    #sb-navigation .sb-dropdown:hover .sb-drop-ul {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

#sb-navigation .sb-dropdown.sb-active .sb-drop-ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#sb-navigation .sb-drop-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0.875rem;
    border-radius: 0.375rem;
    text-decoration: none;
}

#sb-navigation .sb-drop-link:hover {
    background: rgba(0,0,0,0.06);
}

#sb-navigation .sb-li-link,
#sb-navigation .sb-drop-link {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#sb-navigation .sb-drop-link {
    letter-spacing: 0.02em;
}

#sb-navigation .sb-li-link:focus-visible,
#sb-navigation .sb-drop-link:focus-visible,
#sb-navigation .sb-toggle:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
    border-radius: 0.25rem;
}

#sb-navigation .sb-li-link.sb-active {
    text-decoration: underline;
    text-underline-offset: 0.35em;
    text-decoration-thickness: 0.12em;
}

@media only screen and (max-width: 63.9375rem) {
    #sb-navigation .sb-logo {
        width: 50%;
        max-width: 12rem;
    }

    #sb-navigation .sb-logo img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Mobile dropdown should be in-flow, not floating */
    #sb-navigation .sb-drop-ul {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        min-width: 0;
        width: 100%;
        border: none;
        box-shadow: none;
        padding: 0.25rem 0 0.5rem 0;

        /* Mobile open/close animation */
        display: block;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease;
        border-radius: 0;
        background: transparent;
    }

    #sb-navigation .sb-dropdown.sb-active .sb-drop-ul {
        max-height: 20rem;
        opacity: 1;
        pointer-events: auto;
    }

    #sb-navigation .sb-drop-link {
        padding: 0.75rem 1.25rem;
        border-radius: 0;
        text-align: left;
        font-size: 0.95rem;
        opacity: 0.95;
    }
}

#sb-navigation .sb-container {
    display: flex;
    align-items: center;
}

/* Subtle hamburger button animation feedback */
#sb-navigation .sb-toggle {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#sb-navigation .sb-toggle:active {
    transform: scale(0.96);
}

body.dark-mode #sb-navigation,
body.dark-mode #sb-navigation .sb-drop-ul {
    background: #1a1a1a;
}

body.dark-mode #sb-navigation .sb-li-link,
body.dark-mode #sb-navigation .sb-drop-link {
    color: #fff;
}

body.dark-mode #sb-navigation .sb-drop-ul {
    border-color: rgba(255,255,255,0.12);
}

body.dark-mode #sb-navigation .sb-drop-link:hover {
    background: rgba(255,255,255,0.10);
}
