/**=====================
      Header CSS Start
==========================**/
.offcanvas,
.offcanvas-bookmark {
    .page-wrapper {
        .page-body-wrapper {
            .page-body {
                position: relative;
                filter: blur(5px) grayscale(100%);
            }
        }
    }
}

.header-title {
    font-size: calc(16px + (23 - 16) * ((100vw - 320px) / (1920 - 320)));
}

.logo-wrapper {
    position: relative;

    .toggle-sidebar {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        @include flex_common;
        height: 40px;
        width: 40px;

        svg {
            width: $header-wrapper-nav-icon-size;
            height: $header-wrapper-nav-icon-size;
        }

        i {
            font-size: 22px;
            // color: $white;
        }

        &:before {
            @include pos;
            height: 40px;
            width: 40px;
            background-color: rgba($primary-color, 0.1);
            border-radius: 100%;
            left: -11px;
            z-index: -2;
            top: -8px;
            transform: scale(0);
            transition: all 0.3s ease;
        }

        &:hover {
            &:before {
                height: 100%;
                width: 100%;
                transform: scale(1);
                transition: all 0.3s ease;
                top: 0;
                left: 0;
            }

            >svg {
                color: var(--theme-color) !important;
                stroke: var(--theme-color) !important;
            }
        }
    }
}

.onhover-dropdown {
    cursor: pointer;
    position: relative;

    &:hover {
        .onhover-show-div {
            @extend %for-animated-hover-box;
        }
    }
}

.onhover-show-div {
    top: 80px;
    position: absolute;
    z-index: 8;
    background-color: $white;
    transition: all linear 0.3s;
    @extend %for-animated-hover;

    li {
        a {
            svg {
                margin-top: 0 !important;

                path,
                line {
                    color: $theme-body-font-color !important;
                }
            }
        }
    }
}

.left-header {
    .level-menu {
        .nav-link {
            display: inline-block;
            border-radius: 5px;
            background-color: rgba($secondary-color, 0.15%);
            transition: all 0.3s ease;
            color: var(--theme-secondary);

            margin-left: 10px;

            &.active {
                background-color: var(--theme-secondary);
                color: $white;
                transition: all 0.3s ease;

                svg {
                    stroke: $white;
                }
            }

            svg {
                height: 18px;
                margin-right: 5px;
                vertical-align: middle;
                stroke: var(--theme-secondary);
            }
        }

        .header-level-menu {
            position: absolute;
            top: 59px;
            background-color: $white;
            border-radius: 5px;
            width: 180px;
            height: 0;
            padding: 0.7rem 0.5rem;
            box-shadow: 0 0 37px rgba(8, 21, 66, 0.1);
            min-width: 180px;
            opacity: 0;
            visibility: hidden;
            display: block !important;
            transition: all 0.2s ease-in-out;

            &.show {
                opacity: 1;
                visibility: visible;
                height: 225px;
            }

            li {
                padding: 0.5rem 1rem;
                width: 100%;
                transition: all 0.3s ease;

                &:hover {
                    background-color: rgba($primary-color, 0.1);
                    border-radius: 5px;
                    transition: all 0.3s ease;

                    >a {
                        >span {
                            color: var(--theme-color);
                            transition: all 0.3s ease;
                        }

                        >svg {
                            stroke: var(--theme-color);
                            transition: all 0.3s ease;
                        }
                    }
                }
            }

            >li {
                position: relative;
                width: 100%;

                &:hover {
                    .header-level-sub-menu {
                        opacity: 1;
                        box-shadow: 0 0 37px rgba(8, 21, 66, 0.1);
                        animation: fadeInLeft 300ms ease-in-out;
                    }
                }

                a {
                    color: $dark-color;
                }

                svg {
                    width: 16px;
                    vertical-align: middle;
                    margin-right: 5px;
                    stroke: $dark-color;
                }

                span {
                    vertical-align: middle;
                }

                >.header-level-sub-menu {
                    position: absolute;
                    padding: 0.7rem 0.5rem;
                    left: 173px;
                    z-index: 9;
                    background-color: $white;
                    width: 170px;
                    border-radius: 5px;
                    top: 0;
                    opacity: 0;
                    animation: fadeInLeft 300ms ease-in-out;
                }
            }
        }
    }

    .mega-menu {
        .nav-link {
            display: inline-block;
            border-radius: 5px;
            background-color: rgba($primary-color, 0.07%);
            transition: all 0.3s ease;

            &.active {
                transition: all 0.3s ease;
                color: $white;
                background-color: var(--theme-color);
            }

            .according-menu {
                display: none;
            }

            svg {
                height: 18px;
                margin-right: 5px;
                vertical-align: middle;
            }
        }
    }

    .mega-menu-container {
        min-width: 1100px;
        position: absolute;
        width: calc(100vw - 800px);
        height: 0;
        border-radius: 0px;
        background-color: $white;
        top: 59px;
        left: -30px;
        border-top: 1px solid $light-semi-gray;
        padding-bottom: 20px;
        padding-top: 10px;
        padding-left: 20px;
        box-shadow: 0 0 20px rgba(89, 102, 122, 0.1);
        opacity: 0;
        visibility: hidden;
        display: block !important;
        transition: all 0.2s ease-in-out;

        &.show {
            opacity: 1;
            visibility: visible;
            height: 300px;
        }

        .link-section {
            >div {
                h6 {
                    margin-top: 20px;
                }
            }

            li {
                width: 100%;
                padding: 7px 0 7px 15px;

                a {
                    transition: all 0.3s ease;
                }

                &:hover {
                    a {
                        color: var(--theme-color);
                        letter-spacing: 1.5px;
                        transition: all 0.3s ease;
                    }
                }
            }
        }

        .mega-box {
            &+.mega-box {
                padding-left: 30px;
                border-left: 1px solid $light-semi-gray;
            }

            .doted {
                li {
                    position: relative;

                    &:hover {
                        &:before {
                            background-color: var(--theme-color);
                            transition: all 0.3s ease;
                        }
                    }

                    &:before {
                        @include pos;
                        top: 15px;
                        height: 5px;
                        width: 5px;
                        background-color: $light-text;
                        left: 0;
                        border-radius: 100%;
                        transition: all 0.3s ease;
                    }
                }
            }

            .dashed-links {
                li {
                    position: relative;

                    &:hover {
                        &:before {
                            background-color: var(--theme-color);
                            transition: all 0.3s ease;
                        }
                    }

                    &:before {
                        @include pos;
                        top: 16px;
                        height: 2px;
                        width: 6px;
                        background-color: $light-text;
                        left: 0;
                    }
                }
            }

            .icon {
                li {
                    position: relative;

                    &:hover {
                        &:before {
                            color: var(--theme-color);
                            transition: all 0.3s ease;
                        }
                    }

                    &:before {
                        content: "\f101";
                        font-family: fontawesome;
                        position: absolute;
                        top: 7px;
                        left: 0px;
                    }
                }
            }

            .svg-icon {
                &~div {
                    h6 {
                        margin-top: 10px;
                        margin-bottom: 5px;
                    }
                }

                li {
                    padding-left: 0px;

                    &:hover {
                        &:before {
                            color: var(--theme-color);
                            transition: all 0.3s ease;
                        }
                    }

                    a {
                        svg {
                            width: 16px;
                            margin-right: 5px;
                            vertical-align: middle;
                        }
                    }
                }
            }
        }

        .submenu-title {
            margin-top: 20px;
            margin-left: 20px;
        }

        .according-menu {
            display: none;
        }
    }

    .horizontal-menu {
        li {
            display: inline-block;
        }
    }
}

.mega-menu {
    .onhover-show-div {
        width: 1500px;
    }

    .card-body {
        padding: 20px;
    }

    div {
        >div {
            a {
                margin-bottom: 0px;
                display: inline-block;
                color: $theme-body-sub-title-color;
            }
        }
    }

    .list-unstyled {
        div {
            a {
                padding: 8px 35px 8px 0;
                transition: $sidebar-transition;

                &:hover {
                    padding: 8px 35px 8px 10px;
                    transition: $sidebar-transition;
                }
            }
        }
    }
}

.header-btns {
    display: flex;
    align-items: center;
    gap: 15px;

    .btn {
        padding: calc(7px + (9 - 7) * ((100vw - 320px) / (1920 - 320))) calc(14px + (20 - 14) * ((100vw - 320px) / (1920 - 320))) !important;
    }

    .header-button {
        padding: 9px 12px !important;
        line-height: 1;

        &:hover {
            background-color: var(--theme-color);
        }

        img {
            width: 20px;
            filter: invert(1) brightness(100);
        }

        i {
            font-size: 21px;
            font-weight: 100;
        }
    }
}