.navRoot,
.navSub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navRoot {
    display: flex;
    align-items: center;
    gap: 44px;
}

.navItem {
    position: relative;
}

.navItem > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.navRoot > .navItem.activeBranch > a {
    color: var(--blue);
}

.navRoot > .navItem.activeBranch > a::after {
    content: "";
    height: 3px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    border-radius: 2px;
    background: var(--blue);
}

.navArrow {
    font-size: 13px;
    transition: transform .2s ease;
}

.navSub {
    display: none;
    position: absolute;
    z-index: 20;
    left: -18px;
    top: calc(100% - 5px);
    min-width: 190px;
    padding: 8px;
    border: 1px solid #e1eaf3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 35px #102c5030;
}

.navItem:hover > .navSub,
.navItem:focus-within > .navSub {
    display: block;
}

.navItem:hover > a .navArrow,
.navItem:focus-within > a .navArrow {
    transform: rotate(180deg);
}

.navSub .navSub {
    left: calc(100% + 7px);
    top: -8px;
}

.navSub .navItem > a {
    justify-content: space-between;
    width: 100%;
    padding: 11px 13px;
    border-radius: 5px;
    color: #2d435e;
    font-size: 14px;
    font-weight: 500;
}

.navSub .navItem > a::after {
    display: none;
}

.navSub .navItem > a:hover,
.navSub .activeBranch > a {
    color: var(--blue);
    background: #edf5fc;
}

.navSub .hasChildren > a .navArrow {
    transform: rotate(-90deg);
}

@media (max-width: 900px) {
    .navRoot {
        gap: 18px;
    }

    .navRoot > .navItem.activeBranch > a::after {
        bottom: 11px;
    }
}

@media (max-width: 680px) {
    .navlinks {
        max-height: calc(100vh - 62px);
        overflow-y: auto;
    }

    .navRoot {
        display: block;
        width: 100%;
    }

    .navRoot > .navItem > a {
        padding: 12px 0;
    }

    .navRoot > .navItem.activeBranch > a::after {
        display: none;
    }

    .navSub,
    .navSub .navSub {
        position: static;
        display: block;
        min-width: 0;
        padding: 0 0 3px 15px;
        border: 0;
        border-left: 1px solid #d9e6f1;
        border-radius: 0;
        box-shadow: none;
    }

    .navSub .navItem > a {
        padding: 9px 12px;
        font-size: 13px;
    }

    .navArrow {
        display: none;
    }
}
