﻿.site-header {
    padding: 36px 0 27px;
}

.as-main-navigation-middle {
    --primary-300: #9A98F0;
    --hover: #D2D2D2;
    --primary-font: "Eudoxus Sans", system-ui, sans-serif;

    font-family: var(--primary-font);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: static;

    .menu-primary-menu-container {
        @media(max-width: 991px) {
            width: calc(100% - 70px);
        }
    }



    .as-main-navigation {
        &.is-scrolling {
            .sub-menu-wrapper {
                top: calc(100% - 1px) !important;
            }
        }

        .mobile-top-line {
            margin-top: 32px;
            padding-bottom: 0;
            margin-bottom: 70px;

            &:after {
                display: none;
            }
        }

        ul#primary-menu {
            position: static;

            @media(max-width: 991px) {
                /* padding-right: 0; */
                position: relative;
                height: 100%;
                overflow-y: scroll;
                scrollbar-width: thin;
                scrollbar-color: #a5a5a5 #444;
                display: flex;
                flex-direction: column;
            }

            /* First-level menu items */
            >li {
                line-height: 1;
                display: inline-block;

                @media (max-width: 575.98px) {
                    display: block;
                }

                &:not(:first-child) {
                    margin-top: 0;
                }

                a {
                    line-height: inherit;
                    text-decoration: none;
                    color: #fff;
                    font-weight: 500;
                    font-size: 14px;

                    &:hover {
                        text-decoration: none;
                        color: var(--hover);
                    }

                    @media(max-width: 991px) {
                        font-size: 16px;
                    }
                }

                &:hover {
                    >a {
                        &:after {
                            width: calc(100% + 12px);
                        }
                    }
                }

                >a {
                    display: flex;
                    margin: 0 15px;
                    font-size: 14px;
                    padding: 30px 0;

                    @media(max-width: 991px) {
                        font-size: 18px;
                        line-height: 22.68px;
                        padding: 24px 0;
                        border-bottom: 1px solid #3C3C3C;
                        margin: 0 0;
                    }

                    &::after {
                        position: absolute;
                        content: "";
                        left: -6px;
                        bottom: 15px;
                        width: 0;
                        background-color: var(--menu-color-var);
                        height: 3px;
                        border-radius: 1px;
                        transition: width 0.3s;
                    }
                }

                &.menu-item-has-children {

                    &.is-active {
                        >a {
                            &:after {
                                rotate: 180deg;
                            }
                        }
                    }

                    >a {
                        @media(max-width: 991px) {
                            padding: 24px 0;
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                        }

                        &:after {

                            @media(max-width: 991px) {
                                width: 15px;
                                height: 9px;
                                position: static;
                                left: auto;
                                border-radius: 0;
                                background-color: transparent;
                                transition: all .25s;
                                background-image: url("data:image/svg+xml,%0A%3Csvg width='15' height='9' viewBox='0 0 15 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.7017 1.97936L8.22017 8.46089C7.82243 8.85863 7.17757 8.85863 6.77983 8.46089L0.298304 1.97937C-0.0994345 1.58163 -0.0994346 0.936766 0.298304 0.539027C0.696043 0.141288 1.3409 0.141288 1.73864 0.539026L7.5 6.30038L13.2614 0.539024C13.6591 0.141286 14.304 0.141285 14.7017 0.539024C15.0994 0.936763 15.0994 1.58162 14.7017 1.97936Z' fill='white'/%3E%3C/svg%3E%0A");
                            }
                        }
                    }

                    /* Show second-level navigation on hover */
                    &:hover>.sub-menu-wrapper {

                        @media(min-width: 991px) {
                            display: block;
                        }
                    }

                    .sub-menu-wrapper {
                        overflow: hidden;
                        display: none;
                        position: absolute;
                        left: 50%;
                        top: calc(100% - 28px);
                        z-index: 999;
                        width: var(--window-width);
                        transform: translateX(-50%);
                        background-color: #1F1F24;
                        padding: 40px 0;
                        border-top: 1px solid #3c3c3c;
                        border-bottom: 1px solid #3c3c3c;
                        box-shadow: 2px 2px 6px 0px #00000040;

                        @media(max-width: 991px) {
                            background-color: #6765E80D;
                            padding: 34px 12px 24px;
                            position: static;
                            left: auto;
                            top: auto;
                            width: 100%;
                            transform: none;
                        }

                        &.is-active {
                            display: block;
                        }

                        .sub-menu__inner {
                            width: min(1270px, 100%);
                            margin: 0 auto;

                            &.has-featured-2-cols-full {
                                width: 100%;
                            }

                            ul {
                                &.sub-menu {
                                    /* position: relative; */

                                    .menu-item__icon {
                                        width: 14px;
                                        height: 15px;
                                        line-height: 0;

                                        img {
                                            width: 100%;
                                            height: 100%;
                                        }
                                    }

                                    &.sub-menu--single,
                                    &.sub-menu--multiple {
                                        display: flex;
                                        gap: 90px;

                                        @media(max-width: 991px) {
                                            flex-direction: column;
                                            gap: 24px;
                                        }

                                        &.count-2:not(.sub-menu--megamenu) {
                                            >li {
                                                min-width: 50%;
                                                max-width: 50%;
                                            }
                                        }

                                        &.count-3:not(.sub-menu--megamenu) {
                                            >li {
                                                min-width: 33.333%;
                                                max-width: 33.333%;
                                            }
                                        }

                                        >li {

                                            position: relative;

                                            &:not(:last-child) {
                                                &:after {
                                                    content: '';
                                                    display: block;
                                                    width: 1px;
                                                    height: 100%;
                                                    background-color: #282828;
                                                    position: absolute;
                                                    right: -45px;
                                                    top: 0;
                                                }
                                            }

                                            &.menu-item-has-children,
                                            &.menu-item-has-featured {
                                                >a {
                                                    text-transform: uppercase;
                                                    font-weight: 700 !important;
                                                    padding: 0;

                                                    &+.sub-menu {
                                                        margin-top: 30px;
                                                        display: grid;
                                                        gap: 24px;

                                                        @media(max-width: 991px) {
                                                            margin-top: 14px;
                                                            gap: 20px;
                                                        }
                                                    }

                                                    &+.mega-menu-featured {
                                                        margin-top: 30px;
                                                    }
                                                }
                                            }

                                            &.menu-item-has-featured {
                                                >a {
                                                    pointer-events: none;

                                                    .menu-item__content-title {
                                                        font-size: 16px;
                                                        line-height: 20px;
                                                        text-transform: uppercase;
                                                        font-weight: 700 !important;
                                                        padding: 0;
                                                    }
                                                }

                                                .mega-menu-featured {
                                                    img {
                                                        margin-bottom: 12px;
                                                    }

                                                    p {
                                                        margin-bottom: 12px;

                                                        &.section-title {
                                                            font-size: 18px;
                                                            font-weight: 500;
                                                        }

                                                        &.section-content {
                                                            color: #D2D2D2;
                                                            font-weight: 300;
                                                            font-size: 16px;
                                                            line-height: 19.2px;
                                                        }
                                                    }

                                                    .section-link {
                                                        color: var(--primary-300);
                                                        font-size: 12px;
                                                        line-height: 14.52px;
                                                        font-weight: 600;
                                                    }
                                                }
                                            }

                                        }
                                    }

                                    &.has-featured-2-cols {
                                        height: 100%;
                                        display: grid;
                                        grid-template-columns: repeat(12, 1fr);
                                        gap: 90px;
                                        margin: 0 auto;
                                        padding-left: calc((100% - 1270px) / 2);

                                        @media(max-width: 991px) {
                                            display: flex;
                                            flex-direction: column;
                                            gap: 24px;
                                        }

                                        >li {

                                            &:first-child {
                                                grid-column: 1 / span 3;

                                                @media(max-width: 991px) {
                                                    grid-column: inherit;
                                                }
                                            }

                                            &:nth-child(2) {
                                                grid-column: 4 / span 3;

                                                @media(max-width: 991px) {
                                                    grid-column: inherit;
                                                }
                                            }

                                            >a {
                                                &+.sub-menu {
                                                    gap: 18px !important;
                                                }
                                            }

                                            &.menu-item-has-featured-2-cols {
                                                height: 100%;
                                                width: 100%;
                                                grid-column: 7 / -1;
                                                position: static;

                                                @media(max-width: 991px) {
                                                    grid-column: inherit;
                                                }

                                                .mega-menu-featured-2-cols {
                                                    display: flex;
                                                    align-items: center;
                                                    height: 100%;
                                                    background-image: none !important;

                                                    @media(max-width: 991px) {
                                                        flex-direction: column;
                                                    }

                                                    .featured-col-left {
                                                        width: min(283px, 100%);

                                                        @media(max-width: 991px) {
                                                            width: 100%;
                                                        }

                                                        .section-title {
                                                            font-size: 36px;
                                                            line-height: 45px;
                                                            font-weight: 800;
                                                            margin-bottom: 16px;

                                                            @media(max-width: 991px) {
                                                                font-size: 24px;
                                                                line-height: 30.24px;
                                                            }
                                                        }

                                                        .section-content {
                                                            font-size: 16px;
                                                            line-height: 20px;
                                                            color: #D2D2D2;
                                                            font-weight: 300;
                                                            margin-bottom: 16px;
                                                        }

                                                        .btn {
                                                            display: inline-flex;
                                                            align-items: center;
                                                            gap: 6px;
                                                            font-size: 14px;
                                                            line-height: 18px;
                                                            font-weight: 500;
                                                            padding: 8px 38px 8px 18px !important;

                                                            &:after {
                                                                content: '';
                                                                display: inline-flex;
                                                                width: 14px;
                                                                height: 8px;
                                                                background-size: contain;
                                                                background-repeat: no-repeat;
                                                                background-image: url("data:image/svg+xml,%0A%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3536 4.35355C13.5488 4.15829 13.5488 3.84171 13.3536 3.64645L10.1716 0.464467C9.97631 0.269205 9.65973 0.269205 9.46447 0.464467C9.2692 0.659729 9.2692 0.976312 9.46447 1.17157L12.2929 4L9.46447 6.82843C9.2692 7.02369 9.2692 7.34027 9.46447 7.53553C9.65973 7.7308 9.97631 7.7308 10.1716 7.53553L13.3536 4.35355ZM-4.37114e-08 4.5L13 4.5L13 3.5L4.37114e-08 3.5L-4.37114e-08 4.5Z' fill='white'/%3E%3C/svg%3E%0A");
                                                            }
                                                        }
                                                    }

                                                    img {
                                                        position: absolute;
                                                        bottom: 0;

                                                        @media(max-width: 991px) {
                                                            position: static;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }

                                    li {
                                        a {
                                            display: flex;
                                            gap: 5px;
                                            padding: 0;
                                            font-weight: 500;
                                            margin: 0;

                                            &:first-child {
                                                margin-top: 0;
                                            }

                                            @media (max-width: 575.98px) {
                                                padding: 10px;
                                            }
                                        }

                                        .menu-item__content {
                                            display: flex;
                                            flex-direction: column;

                                            .menu-item__icon {
                                                min-width: 26px;
                                                max-width: 26px;
                                                line-height: 0;

                                                img {
                                                    height: 16px;
                                                    width: auto;
                                                    display: block;
                                                    margin-right: auto;
                                                }
                                            }

                                            .menu-item__content-title {
                                                font-family: "Inter";
                                                font-weight: 500;
                                                line-height: 1.25;
                                            }

                                            .menu-item__content-description {
                                                margin-top: 5px;
                                                font-family: "Inter";
                                                font-size: 12px;
                                                font-weight: 500;
                                                line-height: 1.25;
                                                color: #fff
                                        }
                                    }

                                }
                            }
                        }

                    }
                }

                &.megamenu-item {
                    .sub-menu-wrapper {
                        .sub-menu__inner {
                            .sub-menu--megamenu {
                                >.menu-item {
                                    width: calc(100% / 3);

                                    @media(max-width: 991px) {
                                        width: 100%;
                                    }
                                }
                            }
                        }

                        .sub-menu__inner {
                            &.has-featured-2-cols-full {
                                .sub-menu--megamenu {
                                    >.menu-item {
                                        width: 100%;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}