/* ================================
   SIMPLE ORIGIN - NAV (Bootstrap 5)
   ================================ */

:root {
    --so-nav-bg: #222;
    --so-nav-text: #fff;
    --so-nav-accent: #FA9632;
    --so-nav-height: 76px; /* adjust once, used everywhere */
    --so-nav-drop-w: 320px; /* mobile dropdown width */
}

/* Nav container */
#mainNav.navbar-custom {
    background: var(--so-nav-bg);
    border-color: transparent;
    height: var(--so-nav-height);
    line-height: normal;
}

/* Make the inner row fill the nav and vertically center content */
#mainNav .container-fluid.bottomBorder {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Brand */
#mainNav .navbar-brand img {
    display: block; /* avoids baseline weirdness */
}

/* Links (your markup is <ul class="nav navbar-nav ..."> with <a class="page-scroll">) */
#mainNav .navbar-nav a {
    color: var(--so-nav-text);
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: capitalize;
    text-decoration: none;
}

    #mainNav .navbar-nav a:hover {
        color: var(--so-nav-accent);
    }

    /* Active link */
    #mainNav .navbar-nav a.active {
        color: var(--so-nav-accent) !important;
    }

/* Orange hamburger (Font Awesome icon inside the button) */
#mainNav .navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    #mainNav .navbar-toggler i {
        color: var(--so-nav-accent) !important;
        font-size: 1.25rem;
        line-height: 1;
        display: block;
    }

    #mainNav .navbar-toggler:focus {
        box-shadow: none;
    }

/* Keep section headers from hiding under fixed nav */
html {
    scroll-padding-top: var(--so-nav-height);
}

/* ================================
   Mobile: dropdown under hamburger
   ================================ */

#mainNav .container-fluid.bottomBorder {
    position: relative; /* anchor for absolute dropdown */
}

@media (max-width: 991.98px) {
    #mainNav .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: min(82vw, var(--so-nav-drop-w));
        background: var(--so-nav-bg);
        padding: 0.75rem 1rem;
        border-radius: 0; /* square corners */
        box-shadow: 0 10px 28px rgba(0,0,0,.35);
        z-index: 1050;
    }

    #mainNav .navbar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

        #mainNav .navbar-nav > li > a {
            display: block;
            padding: 0.4rem 0;
            margin: 0 !important; /* overrides me-3 on mobile */
        }
}


/* Desktop: hide hamburger (since navbar-expand-lg should show full menu) */
@media (min-width: 992px) {
    #mainNav .navbar-toggler {
        display: none !important;
    }
}

/* Mobile: show hamburger */
@media (max-width: 991.98px) {
    #mainNav .navbar-toggler {
        display: inline-flex !important;
    }
}