.th-header {
    position: relative;
    z-index: 41;
}

.header-absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.sticky-wrapper {
    transition: 0.4s ease-in-out;

    &.sticky {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        background-color: $white-color;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
        animation: stickyAni 0.4s ease-in-out;
    }
}

@keyframes stickyAni {
    0% {
        transform: translate3d(0, -40px, 0) scaleY(0.8);
        opacity: 0.7;
    }

    100% {
        transform: translate3d(0, 0, 0) scaleY(1);
        opacity: 1;
    }
}

.main-menu {
    a {
        display: block;
        position: relative;
        font-weight: 400;
        font-size: 16px;
        color: #121212;
        font-family: $body-font;
        text-transform: capitalize;

        &:hover {
            color: $theme-color;
        }
    }

    >ul {
        >li {
            margin: 0 14px;

            >a {
                padding: 36.5px 0;

                &:hover {
                    color: $theme-color;
                }
            }
        }
    }

    ul {
        margin: 0;
        padding: 0;

        li {
            list-style-type: none;
            display: inline-block;
            position: relative;

            &.menu-item-has-children {
                >a {
                    &:after {
                        content: "\f078";
                        position: relative;
                        font-family: $icon-font;
                        margin-left: 4px;
                        font-weight: 600;
                        top: 0;
                        font-size: 14px;
                    }
                }
            }

            &:last-child {
                margin-right: 0 !important;
            }

            &:first-child {
                margin-left: 0 !important;
            }

            &:hover {
                >ul.sub-menu {
                    visibility: visible;
                    opacity: 1;
                    transform: scaleY(1);
                    z-index: 9;
                }

                ul.mega-menu {
                    visibility: visible;
                    opacity: 1;
                    z-index: 9;
                    transform: scaleY(1) translateX(-50%);
                }
            }
        }
    }

    ul.sub-menu,
    ul.mega-menu {
        position: absolute;
        text-align: left;
        top: 100%;
        left: 0;
        background-color: $white-color;
        visibility: hidden;
        min-width: 190px;
        width: max-content;
        padding: 7px;
        left: -14px;
        opacity: 0;
        z-index: -1;
        border-top: 3px solid $theme-color;
        box-shadow: 0px 4px 15px rgba(1, 15, 28, 0.06);
        border-radius: 0;
        transform: scaleY(0);
        transform-origin: top center;
        transition: all 0.4s ease 0s;

        a {
            font-size: 16px;
            line-height: 30px;
        }
    }

    ul.sub-menu {
        padding: 18px 20px 18px 18px;
        left: -27px;



        li {
            display: block;
            margin: 0 0;
            padding: 0px 9px;

            &.menu-item-has-children {
                >a:after {
                    content: "\f105";
                    float: right;
                    top: 1px;
                }
            }

            a {
                position: relative;
                padding-left: 23px;
                text-transform: capitalize;

                &:before {
                    content: "\f649";
                    position: absolute;
                    top: 8px;
                    left: 0;
                    font-family: $icon-font;
                    width: 11px;
                    height: 11px;
                    text-align: center;
                    border-radius: 50%;
                    display: inline-block;
                    font-size: 0.9em;
                    line-height: 1;
                    color: $theme-color;
                    font-weight: 500;
                }
            }

            ul.sub-menu {
                left: 100%;
                right: auto;
                top: 0;
                margin: 0 0;
                margin-left: 20px;

                li {
                    ul {
                        left: 100%;
                        right: auto;
                    }
                }
            }
        }
    }

    .mega-menu-wrap {
        position: static;
    }

    ul.mega-menu {
        display: flex;
        justify-content: space-between;
        text-align: left;
        width: 100%;
        max-width: var(--main-container);
        padding: 20px 15px 23px 15px;
        left: 50%;
        transform: scaleY(0) translateX(-50%);

        li {
            display: block;
            width: 100%;
            padding: 0 15px;

            li {
                padding: 2px 0;
            }

            a {
                display: inline-block;
                text-transform: capitalize;
            }
        }

        >li {
            >a {
                display: block;
                padding: 0;
                padding-bottom: 15px;
                margin-bottom: 10px;
                text-transform: capitalize;
                letter-spacing: 1px;
                font-weight: 700;
                color: $title-color;
                border-color: $theme-color;

                &::after,
                &::before {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 15px;
                    height: 1px;
                    background-color: $theme-color;
                }

                &::after {
                    width: calc(100% - 20px);
                    left: 20px;
                }

                &:hover {
                    padding-left: 0;
                }
            }
        }
    }
}

.main-menu {
    &.style2 {
        >ul>li {
            margin: 0;

            >a {
                position: relative;
                padding: 2px 20px;
                background-color: transparent;
                transition: all 0.4s ease-in-out;
                z-index: 2;

                @include xl {
                    padding: 2px 10px;
                }

                &:before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    transform: scaleX(0);
                    background-color: transparent;
                    transition: all 0.4s ease-in-out;
                    z-index: -1;
                }

                &:hover {
                    color: $title-color;

                    &:before {
                        background-color: $theme-color;
                        transform: scaleX(1);
                    }

                }
            }
        }

        ul.sub-menu {
            padding: 18px 20px 18px 18px;
            left: -27px;
            margin-top: 15px;
        }
    }
}

.header-button {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 22px;

    .icon-btn {
        position: relative;
        color: $white-color;

        &:hover {
            color: $title-color;
            background-color: $theme-color;
            border-color: $theme-color;

            .badge {
                background-color: $white-color;
                color: $title-color;
            }
        }
    }
}

.header-links {
    ul {
        margin: 0;
        padding: 0;
        list-style-type: none;
    }

    li {
        display: inline-block;
        position: relative;
        font-size: 16px;
        font-weight: 400;

        &:not(:last-child) {
            margin: 0 26px 0 0;
        }

        >i {
            margin-right: 6px;
        }
    }

    li,
    span,
    p,
    a {
        color: $body-color;
    }

    a:hover {
        color: $theme-color;
    }

    i {
        color: $body-color;
    }

    b,
    strong {
        font-weight: 600;
    }
}

.header-social {
    .social-title {
        font-weight: 500;
        font-size: 16px;
        display: inline-block;
        margin: 0 15px 0 0;
        color: $body-color;
    }

    a {
        font-size: 16px;
        display: inline-block;
        color: $body-color;
        margin: 0 15px 0 0;

        &:last-child {
            margin-right: 0;
        }

        &:hover {
            color: $theme-color;
        }
    }
}

.header-logo {
    padding-top: 15px;
    padding-bottom: 15px;

    @include xs {
        max-width: 150px;

        .icon-masking .mask-icon {
            mask-size: cover;
        }
    }
}

@include lg {
    .main-menu>ul>li>a {
        padding: 37px 0;
    }
}

.header-button {
    .th-btn {
        min-width: 160px;

        @include lg {
            display: none;
        }
    }
}

/* default-header start  ---------------------------------- */
.default-header {
    .menu-area {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 10px 22px 10px 30px;
        margin-top: 30px;

        @include lg {
            padding: 10px 22px 10px 22px;
        }
    }

    .header-logo {
        position: relative;
        z-index: 2;
    }

    .header-button {
        @include xl {
            gap: 15px;
        }

        .icon-btn {
            border-radius: 0;
        }
    }

    .main-menu>ul>li>a {
        color: $white-color;
    }

    .sticky-wrapper.sticky {
        background: $title-color;

        .menu-area {
            background: transparent;
            padding: 0;
            margin: 0;
            backdrop-filter: none;
        }
    }
}

/* header layout1 start  ---------------------------------- */
.header-layout1 {
    .menu-area {
        margin-top: 40px;
        background-color: #F0EFE9;
        padding: 10px 22px 10px 30px;

        @include xs {
            margin-top: 20px;
        }
    }

    .sticky-wrapper.sticky {

        .menu-area {
            background: transparent;
            padding: 0;
            margin: 0;
        }
    }

    .header-logo {
        position: relative;
        z-index: 2;
    }

    .header-button .icon-btn {
        position: relative;
        color: $title-color;
        border-radius: 0;
    }
}

/* header layout1 end  ---------------------------------- */

/* header layout2 start  ---------------------------------- */
.header-layout2 {
    .menu-area {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 0px 22px 0px 30px;
    }

    .sticky-wrapper.sticky {
        background-color: $title-color;

        .menu-area {
            background: transparent;
            padding: 0;
            margin: 0;
        }
    }

    .main-menu>ul>li {
        margin: 0 22px;

        @include xl {
            margin: 0 14px;
        }
    }

    .main-menu>ul>li>a {
        &:not(:hover) {
            color: $white-color;
        }
    }

    .header-button .icon-btn {
        position: relative;
        border: 1px solid #4B5261;

        &:not(:hover) {
            color: $white-color;
        }
    }

    .header-logo {
        position: relative;
        z-index: 2;
    }
}

/* header layout2 end  ---------------------------------- */
/* header layout3 start  ---------------------------------- */
.header-layout3 {
    .header-top {
        padding: 20px 0;
    }

    .sticky-wrapper.sticky {
        background-color: $title-color;

        .menu-area {
            background: transparent;
            padding: 0;
            margin: 0;
        }
    }

    .header-button .icon-btn {
        border: 1px solid #4B5261;
    }

    .header-links {
        li {
            color: $white-color;
            font-weight: 300;

            &:not(:last-child) {
                margin: 0 58px 0 0;

                &:after {
                    content: '';
                    height: 20px;
                    width: 1px;
                    background-color: rgba(255, 255, 255, 0.2);
                    position: absolute;
                    top: 5px;
                    right: -32px;
                }
            }

            a {
                &:not(:hover) {
                    color: $white-color;
                }

            }
        }

        i {
            color: $white-color;
        }
    }

    .header-right {
        display: flex;
        align-items: center;

        .title {
            color: $white-color;
            margin-bottom: 0;

            @media(max-width: 480px) {
                display: none;
            }
        }
    }

    .social-links {
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 30px;
        margin-left: 48px;
        height: 20px;
        line-height: 20px;

        @media(max-width: 480px) {
            padding-left: 0;
            margin-left: 0;
            border: none;
        }

        a {
            font-size: 16px;
            display: inline-block;
            color: $white-color;
            margin: 0 10px 0 0;
            transition: all 0.4s ease;


            &:last-child {
                margin-right: 0 !important;
            }

            &:hover {
                color: $theme-color;

                i {
                    animation: slideTop 0.5s;
                }
            }
        }
    }

    .menu-area {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 100px;
        padding: 0px 22px 0px 30px; 
    }

    .main-menu>ul>li>a {
        &:not(:hover) {
            color: $white-color;
        }
    }
    .main-menu>ul>li {
        margin: 0 22px;

        @include xl {
            margin: 0 14px; 
        }
    }
}

/* header layout3 end  ---------------------------------- */
/* header-layout4 start ------------------- */
.header-layout4 {
    border-bottom: 1px solid #C8CDD1;

    .menu-area {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(24.9px);
        border-radius: 50px;
        padding: 0px 0px 0px 0px;

        @include vxs {
            padding: 16px 15px;
        }

    }

    .main-menu {
        position: relative;

        &:before,
        &:after {
            content: "";
            position: absolute;
            background-color: #C8CDD1;
            top: 0px;
            width: 1px;
            height: 100px;

            @media(max-width: 1399px) {
                display: none;
            }
        }

        &:before {
            left: -150px;
        }

        &:after {
            right: -150px;
        }
    }

    .main-menu>ul>li>a {
        padding: 36.5px 0;

        &:hover {
            color: #6D2CF8;
        }
    }

    .header-button {

        .icon-btn {
            --btn-size: 55px;
            color: $title-color;
            border-color: $smoke-color;

            &:hover {
                border-color: $theme-color;
            }
        }
    }
}

@media (min-width: 1300px) {
    .header-layout4 {
        .th-container {
            --main-container: 1720px;
        }
    }
}

/* header-layout 5 start ------------------------*/
.header-layout5 {
    .sticky-wrapper {
        &.sticky {
            .menu-area {
                padding: 15px 0;

                .th-btn {
                    &:hover {
                        color: $white-color;

                        &:before,
                        &:after {
                            background-color: $title-color;
                        }
                    }
                }
            }

            .header-button .icon-btn {
                color: $title-color;
                border: 1px solid $title-color;

                &:hover {
                    border-color: $title-color;
                    color: $white-color;
                }
            }
        }
    }

    .menu-area {
        padding: 44px 0;

        @media(max-width: 1699px) {
            padding: 15px 0;
        }
    }

    .main-menu>ul>li>a:hover {
        color: $title-color;
    }

    .main-menu.style2>ul>li>a:hover:before {
        background-color: $title-color;
        opacity: 0.1;
    }

    .header-button {
        .icon-btn {
            color: $white-color;
            border: 1px solid $white-color;

            &:hover {
                background-color: $title-color;
                border-color: $title-color;
                color: $white-color;
            }
        }
    }
}

/* header-layout6 start -------------------------*/
.header-layout6 {
    .sticky-wrapper {
        &.sticky {
            background-color: $title-color;

            .menu-area {
                padding: 15px 0;
            }
        }
    }

    .menu-area {
        padding: 44px 0;

        @media(max-width: 1699px) {
            padding: 15px 0;
        }
    }

    .main-menu>ul>li>a:hover {
        color: $title-color;
    }

    .main-menu.style2>ul>li {
        >a {
            color: $white-color;

            &:hover:before {
                background-color: $white-color;
                opacity: 0.1;
            }
        }
    }

    .header-button {
        .icon-btn {
            color: $white-color;
            border: 1px solid $white-color;

            &:hover {
                border-color: $theme-color;
            }
        }
    }
}

/* header-layout7 start -------------------*/
.header-layout7 {
    padding: 20px 0;
    z-index: 10;

    @include lg {
        padding: 10px 0;
    }

    .menu-area {
        position: relative;
        z-index: 3;
        padding: 5px 13px 5px 20px;
        border-radius: 50px;

        &:before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: url("../img/shape/header-border.png");
            background-repeat: no-repeat;
            max-width: 1620px;
            background-size: 100% 100%;
            display: block;
            margin: auto;

            @media(max-width: 1600px) {
                max-width: 100%;
            }

            @include lg {
                display: none;
            }

        }

        &:after {
            content: "";
            position: absolute;
            top: 0;
            right: -1px;
            width: 38%;
            height: 80px;
            background-color: $title-color;
            z-index: 1;
            border-radius: 0 50px 50px 0px;
            clip-path: path("M575 0H156.354C146.771 0 137.506 3.44058 130.246 9.69565L125.25 14L120.254 9.69565C112.994 3.44058 103.729 0 94.1455 0H29.7031L0.550781 80H94.1455C103.729 80 112.994 76.5594 120.254 70.3044L125.25 66L130.246 70.3043C137.506 76.5594 146.771 80 156.355 80H575C597.091 80 615 62.0914 615 40C615 17.9086 597.091 0 575 0Z");

            @media(max-width: 1699px) {
                width: 36.8%;
            }

            @include xxl {
                display: none;
            }
        }
    }

    .main-menu {
        position: relative;
        padding-left: 80px;
        z-index: 4;

        @include lg {
            padding-left: 0;
        }

        ul.sub-menu {
            padding: 18px 20px 18px 18px;
            left: -27px;
            margin-top: 25px;
        }
    }

    .main-menu.style2> {
        ul {
            li {
                &.menu-item-has-children {
                    &:last-child {
                        a {
                            color: $white-color;

                            @include xxl {
                                color: $title-color;
                            }
                        }
                    }
                }

                .sub-menu {
                    li {
                        a {
                            color: $title-color !important;
                        }
                    }
                }

            }


        }
    }

    .main-menu.style2>ul>li>a {
        &:hover {
            color: $title-color;

            &:before {
                background-color: $title-color;
                opacity: 0.1;
            }
        }

    }

    .th-btn {
        color: $white-color;

        &:hover {
            color: $title-color;
        }

        @include xl {
            display: none;
        }
    }

    .icon-btn {
        color: $white-color;
        border: 1px solid $white-color;
        z-index: 3;

        @include xxl {
            border-color: $body-color;
            color: $body-color;
        }
    }
}
.unittest-header {
    .header-button .icon-btn {
        position: relative;
        color: $title-color;
    }

    .header-logo {
        @include md {
            padding-top: 20px; 
            padding-bottom: 20px;  
        }
    }
}