// -----------------------------------------------------------------------------
// This file contains all styles related to the header of the site/application.
// -----------------------------------------------------------------------------


/*================***Mutlipage  Header Section Start Here     ***===================*/

.header-section {
    @extend %w-100;
    z-index: 999;
    position: absolute;

    @include breakpoint(lg) {
        // position: initial;
    }

    &.header-fixed {
        position: fixed;
        @extend %w-100;
        top: 0;
        left: 0;
        animation: fadeInDown .5s;
        -webkit-animation: fadeInDown .5s;
        -moz-animation: fadeInDown .5s;
        border-bottom: 1px solid rgba($theme-color, $alpha: .05);
        z-index: 999;

        .header-bottom {
            background: $primary-color;
            backdrop-filter: blur(20.0px);
            -webkit-backdrop-filter: blur(20.0px);
        }
    }
}

.header-wrapper {
    padding: 23px 0;
    @extend %flex;
    @extend %justify-between;
    @extend %align-items-center;

    @include breakpoint(sm) {
        position: relative;
    }

    .logo {
        a {
            @extend %d-block;

            img {
                max-width: 100%;
            }
        }

        @include breakpoint(max-sm) {
            width: 160px;
        }

        @include breakpoint(max-xl) {
            @include breakpoint(lg) {
                width: 200px;
            }
        }
    }

    .menu-area {
        @extend %flex;
        @extend %align-items-center;

        .header-btn {
            @include breakpoint(max-md) {
                display: none;
            }

            @extend %flex;
            @extend %align-items-center;
            column-gap: 20px;


        }
    }
}

.menu {
    @extend %flex,
    %mb-0;

    @include breakpoint(lg) {
        margin-right: 30px;
        gap: 10px;
    }

    >li {
        >a {
            color: $title-color;
            font-size: $fs-base;
            padding: 15px 22px;
            text-transform: capitalize;
            font-family: $title-font;
            font-weight: 600;

            i {
                margin-right: 5px;
            }



            &:after {
                right: 16px;
            }

            &::before {
                right: 20px;
            }

            @include breakpoint(lg) {
                &:after {
                    right: -2px;
                }

                &::before {
                    right: 2px;
                }
            }

            @include breakpoint(xl) {
                &:after {
                    right: 3px;
                }

                &::before {
                    right: 7px;
                }
            }
        }
    }

    @include breakpoint(lg) {
        li {
            position: relative;

            .submenu {
                @include add-prefix(transition, $transition);
                @include add-prefix(transform, translateY(35px));
                position: absolute;
                top: 100%;
                left: 0;
                z-index: 9;
                background: $white-color;
                width: 220px;
                padding: 0;
                opacity: 0;
                visibility: hidden;
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.18);
                border-radius: .35rem;

                li {
                    padding: 0;

                    a {
                        padding: 10px 20px;
                        text-transform: capitalize;
                        font-family: $title-font;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        font-size: 14px;
                        color: $title-color;
                        border-bottom: 1px solid rgba($theme-color, $alpha: .05);
                        font-weight: 600;
                        border-radius: .25rem;

                        &:hover,
                        &.active {
                            background: $theme-color;
                            padding-left: 22px;
                            color: $white-color;

                            &:after,
                            &:before {
                                background: currentColor;
                            }
                        }
                    }

                    &:last-child {
                        a {
                            border-bottom: none;
                        }
                    }

                    .submenu {
                        left: 100%;
                        top: 0;
                    }
                }
            }

            &:hover {
                >.submenu {
                    -webkit-transform: translateY(15px);
                    -ms-transform: translateY(15px);
                    transform: translateY(15px);
                    opacity: 1;
                    visibility: visible;
                }
            }
        }

        @include breakpoint(max-xl) {
            li {
                a {
                    padding: 10px 12px;
                }
            }
        }
    }

    @include breakpoint(max-lg) {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        overflow: auto;
        max-height: 400px;
        -webkit-transition: all ease 0.3s;
        -moz-transition: all ease 0.3s;
        transition: all ease 0.3s;
        -webkit-transform: scaleY(0);
        -ms-transform: scaleY(0);
        transform: scaleY(0);
        transform-origin: top;

        //glassmorphism
        background: rgba($primary-color, $alpha: .99);
        -webkit-backdrop-filter: blur(20px);

        li {
            width: 100%;
            padding: 0;

            a {
                display: block;
                padding: 10px 25px;
                font-size: 15px;
                text-transform: capitalize;
                border-top: 1px solid rgba($black-color, $alpha: .10);
                color: $text-color;

                &:hover {
                    background: rgba($primary-color, $alpha: .60);
                }
            }

            .submenu {
                padding-left: 20px;
                display: none;

                li {
                    width: 100%;

                    a {
                        font-size: 14px;
                        display: flex;
                        justify-content: space-between;
                    }
                }
            }
        }

        &.active {
            -webkit-transform: scaleY(1);
            -ms-transform: scaleY(1);
            transform: scaleY(1);
        }
    }
}

.header-bar {
    @extend %p-rel;
    @extend %c-pointer;
    width: 25px;
    height: 20px;
    @extend %ml-30;

    span {
        @extend %p-abs;
        @extend %d-inline-block;
        @extend %w-100;
        height: 3px;
        @include add-prefix(transition, $transition);
        background-color: $black-color;
        left: 0;

        &:first-child {
            top: 0;
        }

        &:nth-child(2) {
            top: 52%;
            transform: translateY(-65%);
        }

        &:last-child {
            bottom: 0;
        }
    }

    &.active {
        span {
            &:first-child {
                @include add-prefix(transform, rotate(45deg) translate(3px, 9px));
            }

            &:nth-child(2) {
                opacity: 0;
            }

            &:last-child {
                @include add-prefix(transform, rotate(-45deg) translate(3px, -9px));
            }
        }
    }

    @include breakpoint(max-sm) {
        width: 15px;
        height: 16px;
        margin-right: 20px;

        span {
            height: 2px;
            width: 20px;
        }

        &.active {
            span {
                &:first-child {
                    @include add-prefix(transform, rotate(45deg) translate(4px, 6px));
                }

                &:nth-child(2) {
                    opacity: 0;
                }

                &:last-child {
                    @include add-prefix(transform, rotate(-45deg) translate(4px, -6px));
                }
            }
        }
    }
}

.menu-item-has-children {


    >a {
        @extend %p-rel;

        &::after {
            @extend %p-abs;
            top: 50%;
            transform: translateY(-50%);
            right: 25px;
            width: 10px;
            height: 2px;
            background-color: currentColor;
        }

        &::before {
            @extend %p-abs;
            top: 50%;
            transform: translateY(-50%);
            right: 29px;
            width: 2px;
            height: 10px;
            background-color: currentColor;
            @include add-prefix(transition, $transition);
        }

        @include breakpoint(lg) {
            &::after {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: 11px;
                width: 10px;
                height: 2px;
                background-color: currentColor;
            }

            &::before {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: 15px;
                width: 2px;
                height: 10px;
                background-color: currentColor;
                @include add-prefix(transition, $transition);
            }
        }


    }

    &:hover {
        >a {

            &:before {
                transform: rotate(90deg);
                opacity: 0;
            }
        }
    }

    &.open {
        >a {

            &:before {
                transform: rotate(90deg);
                opacity: 0;
            }
        }
    }
}

/*================*** Multipage Header Section End Here     ***===================*/









/*=-=-=-======< Section header start here >==========-=-=-=-*/
.section-header {
    @extend %text-center;
    margin-top: -5px;
    margin-bottom: 40px;

    @include breakpoint(lg) {
        margin-bottom: 60px;
    }

    h2 {
        @extend %mb-15;
    }
}

/*=-=-=-======< Section header end here >==========-=-=-=-*/




/*=-=-=-======< Page header start here >==========-=-=-=-*/
.page-header {
    @extend %p-rel;
    padding-block-start: 120px;
    padding-block-end: 70px;
    background-size: cover;
    background-position: center;

    &:after {
        @extend %p-abs,
        %w-100,
        %h-100;
        top: 0;
        left: 0;
        background-image: linear-gradient(135deg, $secondary-color 58%, $theme-color);
        opacity: .9;
    }

    @include breakpoint(lg) {
        padding-block-start: 170px;
        padding-block-end: 110px;
    }

    @include breakpoint(xxl) {
        padding-block-start: 180px;
        padding-block-end: 120px;
    }

    &__content {
        @extend %p-rel;
        z-index: 1;
    }

    .breadcrumb-item {
        color: $white-color;

        a {
            color: inherit;
        }

        &:before,
        &.active {
            color: $theme-color;
            font-weight: 600;
        }
    }
}

/*=-=-=-======< Page header end here >==========-=-=-=-*/