.ms-navigation {
    position: relative;
    z-index: 50;
    background: #fff;
    border-block: 1px solid #DFE8EF;
}

.ms-nav-wrap {
    position: relative;
}

.ms-main-menu {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 5px;
}

.ms-nav-item {
    display: flex;
    align-items: stretch;
}

.ms-nav-trigger,
.ms-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    color: #153C60;
    border: 0;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    padding: 18px 10px 15px;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.ms-nav-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform .18s ease;
}

.ms-home-link svg {
    width: 19px;
    height: 19px;
}

.ms-nav-trigger:hover,
.ms-home-link:hover,
.ms-home-link[aria-current="page"],
.ms-nav-item.is-current > .ms-nav-trigger,
.ms-nav-trigger[aria-expanded="true"] {
    color: #1769AA;
    border-bottom-color: #249ED4;
}

.ms-nav-trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.ms-mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: #fff;
    border: 1px solid #DFE8EF;
    border-top: 3px solid #249ED4;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 22px 65px rgba(21,60,96,.12);
    overflow: hidden;
}

.ms-mega-panel[hidden] {
    display: none !important;
}

.ms-mega-intro {
    padding: 32px;
    background: #F4F8FC;
    border-right: 1px solid #DFE8EF;
}

.ms-mega-icon {
    width: 56px;
    height: 56px;
    padding: 13px;
    background: #E3F2FD;
    border-radius: 12px;
    color: #1769AA;
    margin-bottom: 25px;
}

.ms-mega-icon svg {
    width: 100%;
    height: 100%;
}

.ms-mega-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #1769AA;
    margin-bottom: 12px;
}

.ms-mega-intro h2 {
    font-size: 26px;
    letter-spacing: -.8px;
    margin: 0 0 15px;
}

.ms-mega-intro p {
    color: #526779;
    font-size: 14px;
    margin-bottom: 25px;
}

.ms-mega-all {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    font-weight: 650;
    color: #1769AA;
}

.ms-mega-links {
    padding: 32px;
    max-height: min(65vh, 620px);
    overflow-y: auto;
}

.ms-mega-heading {
    font-size: 11px;
    font-weight: 700;
    color: #526779;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.ms-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
}

.ms-mega-grid-large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ms-mega-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #153C60;
    font-size: 13px;
    font-weight: 500;
    transition: background .18s ease;
}

.ms-mega-grid a:hover,
.ms-mega-grid a:focus-visible {
    background: #F4F8FC;
    color: #1769AA;
}

.ms-mega-grid a svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #249ED4;
}

.ms-mobile-toggle {
    display: none;
}

@media (max-width: 1250px) {

    .ms-nav-trigger,
    .ms-home-link {
        font-size: 12px;
        padding-inline: 5px;
        gap: 4px;
    }

    .ms-home-link span {
        display: none;
    }

    .ms-mega-grid-large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {

    .ms-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        background: transparent;
        color: #153C60;
        font-size: 14px;
        padding: 16px 0;
        border: 0;
    }

    .ms-mobile-toggle svg {
        width: 22px;
        height: 22px;
        color: #1769AA;
    }

    .ms-main-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: 15px;
    }

    .ms-main-menu.is-open {
        display: flex;
    }

    .ms-nav-item {
        display: block;
        border-bottom: 1px solid #DFE8EF;
    }

    .ms-nav-trigger,
    .ms-home-link {
        justify-content: space-between;
        width: 100%;
        padding: 15px 8px;
        font-size: 14px;
        border-bottom: 0;
    }

    .ms-home-link {
        justify-content: flex-start;
        gap: 12px;
    }

    .ms-home-link span {
        display: inline;
    }

    .ms-mega-panel {
        position: static;
        grid-template-columns: 1fr;
        box-shadow: none;
        border: 0;
        border-radius: 8px;
        background: #F4F8FC;
        margin-bottom: 12px;
    }

    .ms-mega-intro {
        padding: 20px;
        border-right: 0;
        border-bottom: 1px solid #DFE8EF;
    }

    .ms-mega-icon,
    .ms-mega-label,
    .ms-mega-intro p {
        display: none;
    }

    .ms-mega-intro h2 {
        font-size: 19px;
        margin-bottom: 10px;
    }

    .ms-mega-links {
        padding: 12px;
        max-height: none;
        overflow: visible;
    }

    .ms-mega-heading {
        padding: 10px;
        margin-bottom: 0;
    }

    .ms-mega-grid,
    .ms-mega-grid-large {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ms-mega-grid a {
        background: #fff;
        margin-bottom: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-navigation * {
        transition: none !important;
    }
}
