/* MSPControl global header and Features mega menu. */
.msp-screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.msp-site-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    background: #fff;
}

.admin-bar .msp-site-header {
    top: 32px;
}

/*
 * Keep the desktop mega menu attached to the visible sticky header.
 * Locking page scroll changes the sticky containing block in some browsers,
 * which otherwise sends the open menu back to the document's original top.
 */
body.msp-mega-menu-open .msp-site-header {
    position: fixed;
    right: 0;
    left: 0;
}

.msp-site-header [hidden] {
    display: none !important;
}

.msp-site-header .header-main,
.msp-site-header .header-main.sticky {
    position: static;
    width: 100%;
    padding: 13px 0;
    background: #fff;
    border-bottom: 1px solid #e8edf5;
    box-shadow: none;
}

.msp-header-container,
.msp-mega-container {
    width: min(1300px, calc(100% - 48px));
    max-width: 1300px;
    margin: 0 auto;
}

.msp-header-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 48px;
}

.msp-header-logo,
.msp-mobile-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    border-radius: 7px;
}

.msp-header-logo img,
.msp-mobile-logo img {
    display: block;
    width: 142px;
    max-width: 100%;
    height: auto;
}

.msp-desktop-navigation {
    min-width: 0;
}

.msp-desktop-navigation-list,
.msp-mega-feature-grid,
.msp-mobile-navigation-list,
.msp-mobile-features-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.msp-desktop-navigation-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.msp-navigation-item {
    position: relative;
    flex: 0 0 auto;
}

.msp-navigation-link,
.msp-search-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #111a33;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 15px;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
}

.msp-navigation-link::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #4f6df5;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease;
}

.msp-navigation-link:hover,
.msp-navigation-link:focus-visible,
.msp-navigation-link.is-current {
    color: #284fd3;
}

.msp-navigation-link:hover::after,
.msp-navigation-link:focus-visible::after,
.msp-navigation-link.is-current::after {
    transform: scaleX(1);
}

.msp-navigation-link.is-current {
    font-family: 'Inter-SemiBold.ttf';
}

.msp-navigation-chevron {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 160ms ease, margin 160ms ease;
}

[aria-expanded='true'] > .msp-navigation-chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.msp-header-search {
    position: relative;
}

.msp-header-search summary {
    list-style: none;
}

.msp-header-search summary::-webkit-details-marker {
    display: none;
}

.msp-search-trigger {
    width: 42px;
    border-radius: 10px;
}

.msp-search-trigger img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.msp-header-search[open] .msp-search-trigger,
.msp-search-trigger:hover {
    background: #f1f5ff;
}

.msp-search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 3;
    width: min(360px, calc(100vw - 32px));
    padding: 14px;
    background: #fff;
    border: 1px solid #dfe6f3;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(17, 34, 68, 0.16);
}

.msp-search-panel .is-search-form,
.msp-search-panel .is-search-input {
    width: 100%;
}

.msp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.msp-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 2px solid #111a33;
    border-radius: 999px;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.msp-header-cta-primary {
    background: #4f6df5;
    border-color: #4f6df5;
    color: #fff;
}

.msp-header-cta-primary:hover,
.msp-header-cta-primary:focus-visible {
    background: #294bd8;
    border-color: #294bd8;
    color: #fff;
}

.msp-header-cta-secondary {
    background: #fff;
    color: #111a33;
}

.msp-header-cta-secondary:hover,
.msp-header-cta-secondary:focus-visible {
    background: #111a33;
    color: #fff;
}

.msp-mobile-header-controls,
.msp-mobile-navigation {
    display: none;
}

.msp-features-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 76px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid #e8edf5;
    box-shadow: 0 28px 60px rgba(20, 34, 67, 0.18);
    animation: msp-mega-menu-enter 160ms ease-out both;
}

.msp-mega-container {
    padding-top: 30px;
    padding-bottom: 34px;
}

.msp-mega-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.82fr) minmax(420px, 1.75fr) minmax(235px, 0.92fr);
    gap: 34px;
    align-items: stretch;
}

.msp-mega-intro {
    padding: 8px 6px 8px 0;
}

.msp-mega-eyebrow {
    margin: 0 0 10px;
    color: #4f6df5;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.msp-mega-intro h2 {
    margin: 0 0 14px;
    color: #111a33;
    font-family: 'Inter-SemiBold.ttf';
    font-size: clamp(26px, 2.15vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.msp-mega-intro > p:last-child {
    margin: 0;
    color: #5b657a;
    font-family: 'Inter-Regular.ttf';
    font-size: 14px;
    line-height: 1.55;
}

.msp-mega-feature-navigation {
    min-width: 0;
}

.msp-mega-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.msp-mega-feature-link {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 82px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #111a33;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.msp-mega-feature-copy {
    display: block;
    min-width: 0;
}

.msp-mega-feature-copy strong,
.msp-mega-feature-copy span {
    display: block;
}

.msp-mega-feature-copy strong {
    margin-bottom: 5px;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 14px;
    line-height: 1.3;
}

.msp-mega-feature-copy span {
    color: #697388;
    font-family: 'Inter-Regular.ttf';
    font-size: 12px;
    line-height: 1.4;
}

.msp-mega-feature-arrow {
    flex: 0 0 auto;
    margin: 1px 0 0 10px;
    color: #4f6df5;
    font-size: 17px;
    line-height: 1;
    transition: transform 150ms ease;
}

.msp-mega-feature-link:hover,
.msp-mega-feature-link:focus-visible,
.msp-mega-feature-link.is-current {
    background: #f4f7ff;
    border-color: #dce4ff;
    color: #1e43c3;
    transform: translateY(-1px);
}

.msp-mega-feature-link:hover .msp-mega-feature-arrow,
.msp-mega-feature-link:focus-visible .msp-mega-feature-arrow {
    transform: translateX(3px);
}

.msp-mega-feature-link.is-current {
    box-shadow: inset 3px 0 0 #4f6df5;
}

.msp-mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0 13px;
    color: #284fd3;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 14px;
    text-decoration: none;
}

.msp-mega-promo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #edf2ff 0%, #f8faff 58%, #eef8ff 100%);
    border: 1px solid #dce4ff;
    border-radius: 18px;
}

.msp-mega-promo-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 134px;
    padding: 12px 15px 2px;
}

.msp-mega-promo-image {
    display: block;
    width: 100%;
    max-width: 250px;
    height: 138px;
    object-fit: contain;
}

.msp-mega-promo-copy {
    padding: 13px 18px 18px;
}

.msp-mega-promo-copy h3 {
    margin: 0 0 7px;
    color: #111a33;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 18px;
    line-height: 1.25;
}

.msp-mega-promo-copy p {
    margin: 0;
    color: #616b80;
    font-family: 'Inter-Regular.ttf';
    font-size: 12px;
    line-height: 1.45;
}

.msp-mega-promo-copy a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: #284fd3;
    font-family: 'Inter-SemiBold.ttf';
    font-size: 13px;
    text-decoration: none;
}

.msp-header-logo:focus-visible,
.msp-mobile-logo:focus-visible,
.msp-navigation-link:focus-visible,
.msp-search-trigger:focus-visible,
.msp-header-cta:focus-visible,
.msp-mega-feature-link:focus-visible,
.msp-mega-view-all:focus-visible,
.msp-mega-promo-copy a:focus-visible,
.msp-mobile-menu-toggle:focus-visible,
.msp-mobile-navigation a:focus-visible,
.msp-mobile-features-toggle:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

body.msp-navigation-open .overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(12, 22, 43, 0.38);
    pointer-events: none;
}

@keyframes msp-mega-menu-enter {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1220px) and (min-width: 992px) {
    .msp-header-container,
    .msp-mega-container {
        width: calc(100% - 32px);
    }

    .msp-header-layout {
        gap: 16px;
    }

    .msp-header-logo img {
        width: 124px;
    }

    .msp-desktop-navigation-list {
        gap: 15px;
    }

    .msp-navigation-link {
        font-size: 13px;
    }

    .msp-header-cta {
        padding-right: 15px;
        padding-left: 15px;
        font-size: 12px;
    }

    .msp-mega-layout {
        grid-template-columns: minmax(175px, 0.72fr) minmax(410px, 1.72fr) minmax(220px, 0.82fr);
        gap: 22px;
    }
}

@media (max-width: 1060px) and (min-width: 992px) {
    .msp-header-layout {
        gap: 11px;
    }

    .msp-desktop-navigation-list {
        gap: 11px;
    }

    .msp-header-cta {
        padding-right: 12px;
        padding-left: 12px;
    }

    .msp-mega-layout {
        grid-template-columns: 180px minmax(390px, 1fr) 215px;
        gap: 18px;
    }

    .msp-mega-feature-link {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 991px) {
    .msp-site-header,
    .admin-bar .msp-site-header {
        top: 0;
    }

    .admin-bar .msp-site-header {
        top: 32px;
    }

    .msp-site-header .header-main,
    .msp-site-header .header-main.sticky {
        display: block;
        padding: 10px 0;
    }

    .msp-header-container {
        width: calc(100% - 32px);
    }

    .msp-header-layout {
        display: block;
        min-height: 48px;
    }

    .msp-header-logo,
    .msp-desktop-navigation,
    .msp-header-actions,
    .msp-features-mega-menu {
        display: none !important;
    }

    .msp-mobile-header-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
    }

    .msp-mobile-logo img {
        width: 142px;
        max-height: 42px;
        object-fit: contain;
    }

    .msp-mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 48px;
        height: 48px;
        padding: 0;
        background: #f2f5fb;
        border: 1px solid #dce3ef;
        border-radius: 12px;
    }

    .msp-mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #111a33;
        border-radius: 999px;
        transition: transform 160ms ease, opacity 160ms ease;
    }

    .msp-mobile-menu-toggle[aria-expanded='true'] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .msp-mobile-menu-toggle[aria-expanded='true'] span:nth-child(2) {
        opacity: 0;
    }

    .msp-mobile-menu-toggle[aria-expanded='true'] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .msp-mobile-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        display: block;
        width: 100%;
        max-height: calc(100vh - 69px);
        overflow-x: hidden;
        overflow-y: auto;
        background: #fff;
        border-top: 1px solid #e3e9f3;
        box-shadow: 0 24px 45px rgba(20, 34, 67, 0.2);
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .admin-bar .msp-mobile-navigation {
        max-height: calc(100vh - 101px);
    }

    .msp-mobile-navigation nav {
        width: min(100%, 640px);
        margin: 0 auto;
        padding: 8px 20px 24px;
    }

    .msp-mobile-navigation-list > li {
        border-bottom: 1px solid #e6ebf3;
    }

    .msp-mobile-navigation-list > li > a,
    .msp-mobile-features-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 54px;
        padding: 13px 4px;
        background: transparent;
        border: 0;
        color: #111a33;
        font-family: 'Inter-SemiBold.ttf';
        font-size: 18px;
        line-height: 1.3;
        text-align: left;
        text-decoration: none;
    }

    .msp-mobile-navigation-list [aria-current='page'] {
        color: #284fd3;
        box-shadow: inset 4px 0 0 #4f6df5;
        padding-left: 14px;
    }

    .msp-mobile-features-list {
        padding: 3px 0 12px 14px;
    }

    .msp-mobile-features-list a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 9px 12px;
        color: #4d596f;
        font-family: 'Inter-Regular.ttf';
        font-size: 15px;
        line-height: 1.35;
        text-decoration: none;
        border-radius: 9px;
    }

    .msp-mobile-features-list a:hover,
    .msp-mobile-features-list a:focus-visible {
        background: #f2f5ff;
        color: #284fd3;
    }

    .msp-mobile-navigation-cta {
        padding-top: 20px;
    }

    .msp-mobile-navigation-cta a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 52px;
        padding: 13px 20px;
        background: #4f6df5;
        border-radius: 999px;
        color: #fff;
        font-family: 'Inter-SemiBold.ttf';
        font-size: 16px;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
    }
}

@media (max-width: 782px) {
    .admin-bar .msp-site-header {
        top: 46px;
    }

    .admin-bar .msp-mobile-navigation {
        max-height: calc(100vh - 115px);
    }
}

@media (max-width: 390px) {
    .msp-header-container {
        width: calc(100% - 24px);
    }

    .msp-mobile-navigation nav {
        padding-right: 16px;
        padding-left: 16px;
    }

    .msp-mobile-logo img {
        width: 132px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .msp-site-header *,
    .msp-site-header *::before,
    .msp-site-header *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
