.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: end;
}

.menu > .menu-item > a {
    font-family: var(--menu-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-black);
    padding: 30px 13px;
    display: block;
    transition: all 0.2s;
    position: relative;
}

.menu > .menu-item > a::before {
    content: '';
    width: 0;
    height: 2px;
    background: #0056A8;
    left: 0;
    bottom: 0;
    position: absolute;
    z-index: 1;
    transition: all 0.2s ease;
}
.menu > .menu-item > a:hover::before {width: 100%;}

.menu > .menu-item > a:hover {color: var(--cyan);}
.menu-item-has-children {position: relative;}
.menu-item-has-children > a {padding-right: 30px !important;}

.menu-item-has-children > a::after {
    content: '';
    border: 1px solid;
    border-color: var(--dark-black);
    border-top: none;
    border-left: none;
    width: 7px;
    height: 7px;
    position: absolute;
    /* top: 6px; */
    right: 10px;
    transform: translateY(60%) rotate(45deg);
}

.menu-item-has-children:hover > a::after, .menu-item-has-children:hover > a::before {border-color: var(--cyan);}
.menu-item-has-children:hover a {color: var(--cyan);}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    top: 100%;
    visibility: visible;
    transition: all 0.4s;
}

.sub-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: -10px;
    z-index: 9;
    min-width: 210px;
    background-color: #fff;
    border-radius: 0 0 5px 5px;
    border-top: 4px solid var(--cyan);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
}

.sub-menu::before {
    content: "";
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,#0056A8,#0090D4);
    position: absolute;
    top: -3px;
    left: 0;
    z-index: 1;
    border-radius: 10px 10px 0 0;
}

.sub-menu .menu-item a {
    display: block;
    font-family: var(--menu-font);
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
    color: var(--dark-black);
    border-bottom: 1px dashed #f1f1f1;
    padding: 20px 10px !important;
    transition: all 0.3s;
}
.sub-menu .menu-item:last-child a {border: none;}

.sub-menu .menu-item a:hover {
    color: var(--cyan);
    background-color: #f9f9f9;
}

/*****************************************************************************
******************************************************************************
            R E S P O N S I V E   C S S
******************************************************************************
*****************************************************************************/

@media screen and (min-width: 320px) and (max-width: 767px) {
    #mobile-menu {
        font-size: 23px;
        line-height: 100%;
        border: 1px solid #b3b3b3;
        color: #797979;
        padding: 4px 10px;
        border-radius: 3px;
    }

    #overlay-bg {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9998;
        background-color: rgba(0, 0, 0, 0.5);
        min-width: 100%;
        min-height: 100%;
        height: 100vh;
        opacity: 0;
    }    

    #close-menu {
        color: #707070;
        font-size: 14px;
        font-weight: 400;
        border-bottom: 1px solid #dadada;
        background-color: var(--light-gray-color);
        padding: 8px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    #close-menu span {font-size: 20px;}

    #navbar-menu {
        position: fixed;
        top: -100%;
        left: 5%;
        z-index: 9999;
        width: 90%;
        min-height: 90%;
        height: 90vh;
        background-color: #fff;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 8px 28px rgba(10,34,64,0.12) !important;
        transition: all 0.3s;
    }
    #navbar-menu.active {top: 5%;}

    .menu {
        flex-direction: column;
        align-items: start;
        gap: 8px;
        padding: 20px;
    }
    .menu > .menu-item {width: 100%;}

    .menu > .menu-item > a {
        display: block;
        font-size: 15px;
        color: #2c2e35;
        border-bottom: 1px solid #f7f7f7;
        padding: 8px 0;
        border-radius: 4px;
    }
    .menu > .menu-item > a::before {display: none;}

    .menu-item-has-children > a::before {
        content: "";
        border: 1px solid #585858;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        position: absolute;
        top: 7px;
        right: 0;
    }

    .menu-item-has-children > a::after {
        top: 13px;
        right: 7px;
        transform: rotate(-45deg);
        transition: all 0.1s linear;
    }

    .menu-item-has-children.active > a::after {
        top: 11px;
        right: 6px;
        transform: rotate(45deg);
        transition: all 0.1s linear;
    }
    .menu-item-has-children:hover .sub-menu {transition: none;}

    .sub-menu {
        background-color: #f7f7f7;
        position: static;
        max-width: 100%;
        min-width: 100%;
        border-radius: 0;
        border-top: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .sub-menu::before, .sub-menu::after {display: none;}
    .sub-menu .menu-item a {color: #2c2e35;}
}