/* Mobile */
@media screen and (width < 1024px) {
    .gen-hamburger {
        display: flex;
        margin-left: 0;
    }

    .gen-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .gen-logo {
        margin-right: auto;
        margin-left: 0;
        justify-self: unset;
        order: -1;
    }

    .gen-nav>ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(90deg, #1e40af, #2563eb);
        border-radius: 0 0 13px 13px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
        z-index: 9999;
        padding: 8px 0;
        overflow: hidden;
    }

    .gen-nav>ul.open {
        display: flex;
    }

    /* Remove nav bottom radius when dropdown is open so they flow together */
    .gen-nav.mobile-open {
        border-radius: 13px 13px 0 0;
    }

    .gen-nav>ul>li>a {
        height: auto;
        padding: 14px 20px;
    }

    /* Reset desktop last-child rounding — not needed on mobile */
    .gen-nav>ul>li:last-child {
        border-radius: 0;
        overflow: visible;
    }

    .gen-nav>ul>li:last-child>a {
        border-radius: 0;
    }

    .gen-nav>ul>li>ul {
        display: block;
        position: static;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
        background: rgba(0, 0, 0, .15);
        min-width: 0;
    }

    /* No rounding on submenu items in mobile */
    .gen-nav>ul>li>ul>li:last-child {
        border-radius: 0;
        overflow: visible;
    }

    .gen-nav>ul>li>ul>li:last-child>a {
        border-radius: 0;
    }

    .gen-nav>ul>li>ul>li>a {
        padding: 10px 32px;
    }

    /* Hamburger animates to X when open */

    .gen-nav.mobile-open .gen-hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .gen-nav.mobile-open .gen-hamburger span:nth-child(2) {
        opacity: 0;
    }

    .gen-nav.mobile-open .gen-hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

}

/* Desktop */
@media screen and (width >=1024px) {
    .gen-nav {
        display: flex;
        align-items: center;
        background: linear-gradient(90deg, #1e40af, #2563eb);
        min-height: 52px;
        border-radius: 13px;
        border: 0px solid #1e3a8a;
        box-shadow: none;
        padding: 0 16px;
        position: relative;
        flex-wrap: wrap;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        box-sizing: border-box;

        display: flex;
    }

    .gen-nav *, .gen-nav *::before, .gen-nav *::after {
        box-sizing: border-box;
    }

    .gen-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .gen-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin-right: auto;
    }

    .gen-logo-text {
        color: #ffffff;
        font-size: 18px;
        font-weight: 600;
        white-space: nowrap;
    }

    .gen-hamburger {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0;

    }

    .gen-hamburger span {
        display: block;
        background: #ffffff;
        transition: all .3s;
        width: 22px;
        height: 3px;
        border-radius: 2px;
        margin: 2.5px 0;
    }

    .gen-nav>ul {
        display: flex;
        justify-content: center;
        flex: 1;
        flex-wrap: wrap;
    }

    .gen-nav>ul>li {
        position: relative;
    }

    .gen-nav>ul>li>a {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 20px;
        height: 52px;
        color: #ffffff;
        font-size: 14px;
        font-weight: 400;
        text-transform: lowercase;
        text-decoration: none;
        transition: background .2s, color .2s;
        white-space: nowrap;
    }

    .gen-nav>ul>li>a:hover,
    .gen-nav>ul>li:hover>a {
        background: #1d4ed8;
        color: #bfdbfe;
    }

    .gen-arrow {
        font-size: .7em;
        opacity: .8;
        vertical-align: middle;
    }

    /* Dropdown */
    .gen-nav>ul>li>ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #1e3a8a;
        min-width: 170px;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
        z-index: 1000;
        overflow: hidden;
    }

    .gen-nav>ul>li:hover>ul {
        display: block;
    }

    .gen-nav>ul>li>ul>li>a {
        display: block;
        padding: 10px 18px;
        color: #dbeafe;
        font-size: 14px;
        text-decoration: none;
        transition: background .15s, color .15s;
    }

    .gen-nav>ul>li>ul>li>a:hover {
        background: #1d4ed8;
        color: #ffffff;
    }

    .gen-nav>ul>li>ul>li:last-child {
        border-radius: 0 0 6px 6px;
        overflow: hidden;
    }

    .gen-nav>ul>li>ul>li:last-child>a {
        border-radius: 0 0 6px 6px;
    }
}


#menu {
    background: #083D77;
    height: auto;
    width: 50%;
    margin: auto;
    margin-bottom: 20px;
    border-radius: 50px;
}

    #menu ul, #menu li {
        margin: 0 auto;
        padding: 0;
        list-style: none
    }

    #menu ul {
        width: 100%;
        text-align: center;
    }

    #menu li {
        display: inline-block;
        position: relative;
    }

    #menu a {
        display: block;
        line-height: 44px;
        padding: 0 14px;
        text-decoration: none;
        color: #F2F2F2;
        font-size: 16px;
    }

        #menu a.dropdown-arrow:after {
            content: "\25BE";
            margin-left: 5px;
        }

    #menu li a:hover {
        color: #0099CC;
        background: #F2F2F2;
    }

    #menu input {
        display: none;
        margin: 0;
        padding: 0;
        height: 50px;
        width: 100%;
        opacity: 0;
        cursor: pointer
    }

    #menu label {
        display: none;
        line-height: 44px;
        text-align: center;
        position: absolute;
        left: 35px
    }

        #menu label:before {
            font-size: 1.6em;
            color: #FFFFFF;
            content: "\2261";
            margin-left: 20px;
        }

    #menu ul.sub-menus {
        height: auto;
        overflow: hidden;
        width: 170px;
        background: #444444;
        position: absolute;
        z-index: 99;
        display: none;
    }

        #menu ul.sub-menus li {
            display: block;
            text-align: left;
            width: 100%;
        }

        #menu ul.sub-menus a {
            color: #FFFFFF;
            font-size: 16px;
        }

    #menu li:hover ul.sub-menus {
        display: block
    }

    #menu ul.sub-menus a:hover {
        background: #F2F2F2;
        color: #444444;
    }

@media screen and (max-width: 1024px) {
    #menu {
        position: relative
    }

        #menu ul {
            background: #444444;
            position: absolute;
            top: 100%;
            right: 0;
            left: 0;
            z-index: 3;
            height: auto;
            display: none;
            text-align: left;
        }

            #menu ul.sub-menus {
                width: 100%;
                position: static;
            }

                #menu ul.sub-menus a {
                    padding-left: 30px;
                }

        #menu li {
            display: block;
            float: none;
            width: auto;
        }

        #menu input, #menu label {
            position: absolute;
            top: 0;
            left: 0;
            display: block
        }

        #menu input {
            z-index: 4
        }

            #menu input:checked + label {
                color: #FFFFFF
            }

                #menu input:checked + label:before {
                    content: "\00d7"
                }

            #menu input:checked ~ ul {
                display: block
            }
}