/*----------------------------------------*/
/*  02. Header CSS
/*----------------------------------------*/
header.header {
    background-color: $white;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 9999;
    
    // Sticky Header
    &.is-sticky {
        position: fixed;
        box-shadow: 0 5px 10px rgba($black, 0.1);
        animation-duration:1s;
        animation-fill-mode:both;
        animation-name: slideInDown;
        animation-duration: 0.5s;
    }
}
.header-bottom {
    &.menu-right {
        & > .container {
            & > .row {
                align-items: center;
                position: relative;
                & > .col {
                    flex-grow: 0;
                    position: static;
                    &:first-child {
                        flex-grow: 1;
                    }
                }
            }
        }
    }
    &.menu-center {
        & > .container {
            & > .row {
                align-items: center;
                position: relative;
                & > .col {
                    flex-grow: 1;
                    position: static;
                    display: flex;
                    &:first-child, &:last-child {
                        max-width: 180px;
                        flex-grow: 1;
                    }
                    &:first-child {
                        justify-content: flex-start;
                    }
                    &:last-child {
                        justify-content: flex-end;
                    }
                    &:nth-child(2) {
                        justify-content: center;
                    }
                }
            }
        }
    }
}

/*-- Header Logo --*/
.header-logo {
    margin: 15px 0;
    & a {
        display: inline-block;
        & img {
            max-width: 100%;
        }
    }
}
/*-- Header User --*/
.header-user {
    & .user-toggle {
        border: none;
        background-color: transparent;
        padding: 0;
        display: flex;
        color: $heading-color;
        font-weight: 600;
        white-space: nowrap;
        & i {
            display: none;
            font-size: 36px;
            // Responsive
            @media #{$extra-small-mobile}{
                display: block;
            }
        }
        & span {
            // Responsive
            @media #{$extra-small-mobile}{
                display: none;
            }
        }
        &:hover {
            color: $theme-color;
        }
    }
}

/*-- Main Menu --*/
.main-menu {
    & > ul {
        display: flex;
        & > li {
            margin-right: 30px;
            position: static;
            &:last-child {
                margin-right: 0;
            }
            & > a {
                font-size: 16px;
                line-height: 30px;
                font-weight: 600;
                letter-spacing: 0.25px;
                font-family: $heading-font;
                color: $heading-color;
                display: block;
                padding: 30px 0;
                position: relative;
                text-transform: capitalize;
                &::before {
                    content: "";
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    height: 3px;
                    width: 0;
                    background-color: $heading-color;
                    transition: all 0.3s ease 0s;
                }
            }
            &.has-dropdown {
                & > a {
                    &::after {
                        content: "\f107";
                        font-family: Fontawesome;
                        line-height: 30px;
                        margin-left: 3px;
                    }
                }
            }
            &.active, &:hover {
                & > a {
                    color: $theme-color;
                    &::before {
                        width: 100%;
                        background-color: $theme-color;
                    }
                }
            }
            &:hover {
                & > .sub-menu {
                    margin-top: 0;
                    opacity: 1;
                    visibility: visible;
                    z-index: 99;
                }
                & > .mega-menu {
                    margin-top: 0;
                    opacity: 1;
                    visibility: visible;
                    z-index: 99;
                }
            }
        }
    }
}

/*-- Sub Menu --*/
.sub-menu {
    position: absolute;
    left: auto;
    top: 100%;
    margin-left: -20px;
    margin-top: 30px;
    padding: 20px 0;
    background-color: $white;
    box-shadow: 0 5px 10px rgba($black, 0.15);
    transition: all 0.3s ease 0s;
    width: 250px;
    z-index: -99;
    opacity: 0;
    visibility: hidden;
    & li {
        margin-bottom: 5px;
        position: relative;
        &:last-child {
            margin-bottom: 0;
        }
        & a {
            color: $body-color;
            display: block;
            font-size: 14px;
            line-height: 30px;
            font-weight: 500;
            padding: 0 20px;
        }
        &.has-dropdown {
            & > a {
                &::after {
                    content: "\f105";
                    font-family: Fontawesome;
                    line-height: 30px;
                    float: right;
                }
            }
        }
        &.active {
            & > a {
                color: $theme-color;
            }
        }
        & .sub-menu {
            left: 100%;
            top: 0;
            margin-left: 0;
        }
        &:hover {
            & > a {
                color: $theme-color;
                padding-left: 25px;
            }
            & .sub-menu {
                margin-top: -10px;
                opacity: 1;
                visibility: visible;
                z-index: 99;
            }
        }
    }
}

/*-- Mobile Menu --*/
.mobile-menu {
    flex: 1 0 100% !important;
    & .mean-bar {
        position: relative;
        & .meanmenu-reveal {
            position: absolute;
            top: -49px;
            & span {
                position: relative;
                
                /*---- Menu Open ----*/
                &.menu-bar {
                    height: 2px;
                    width: 26px;
                    background-color: $heading-color;
                    display: block;
                    margin: 8px 0;
                    &::before, &::after {
                        content: "";
                        position: absolute;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background-color: $heading-color;
                    }
                    &::before {
                        top: -8px;
                    }
                    &::after {
                        bottom: -8px;
                    }
                }
                
                /*---- Menu Close ----*/
                &.menu-close {
                    height: 2px;
                    width: 26px;
                    background-color: transparent;
                    display: block;
                    margin: 8px 0;
                    &::before, &::after {
                        content: "";
                        position: absolute;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background-color: $heading-color;
                    }
                    &::before {
                        top: 0;
                        transform: rotate(45deg);
                    }
                    &::after {
                        bottom: 0;
                        transform: rotate(-45deg);
                    }
                }
            }
        }
        
        /*---- Mean Nav ----*/
        & .mean-nav {
            background-color: $white;
            & > ul {
                margin-bottom: 30px;
                border: 1px solid rgba($black, 0.05);
                overflow-x: hidden;
                max-height: 250px;
                
                // Responsive
                @media #{$large-mobile}{
                    max-height: 180px;
                    overflow-y: auto;
                }
                @media #{$small-mobile}{
                    max-height: 220px;
                    overflow-y: auto;
                }
                & > li {
                    &:first-child > a {
                        border-top: none;
                    }
                }
                
                & li {
                    position: relative;
                    display: block;
                    float: left;
                    width: 100%;
                    & a {
                        font-size: 13px;
                        display: block;
                        font-family: $heading-font;
                        color: $body-color;
                        font-weight: 600;
                        text-transform: uppercase;
                        line-height: 44px;
                        position: relative;
                        border-top: 1px solid rgba($black, 0.05);
                        padding: 0 40px 0 20px;
                        &::after {
                            display: none;
                        }
                        &:hover {
                            color: $theme-color;
                            padding-left: 25px;
                        }
                        &.active {
                            color: $theme-color;
                        }
                        
                        /*---- Menu Expand For Sub Menu ----*/
                        &.mean-expand {
                            border-width: 0 1px;
                            border-style: solid;
                            border-color: rgba($black, 0.05);
                            position: absolute;
                            right: -1px;
                            top: 0;
                            font-size: 20px !important;
                            color: $body-color;
                            line-height: 44px;
                            height: 46px;
                            width: 40px;
                            text-align: center;
                            padding: 0;
                            &.mean-clicked {
                                line-height: 40px;
                            }
                        }
                    }
                    & span {
                        font-size: 13px;
                        display: block;
                        color: $body-color;
                        font-weight: 600;
                        text-transform: uppercase;
                        line-height: 44px;
                        position: relative;
                        border-top: 1px solid rgba($black, 0.05);
                        border-bottom: none;
                        padding: 0 40px 0 20px;
                        margin: 0;
                    }
                    
                    /*---- Sub Menu & Mega Menu ----*/
                    & .sub-menu, .mega-menu, ul {
                        position: static;
                        background-color: rgba(0,0,0,0.03);
                        margin: 0;
                        padding: 0 !important;
                        width: 100%;
                        box-shadow: none;
                        margin: 0;
                        display: none;
                        float: left;
                        width: 100%;
                        opacity: 1;
                        visibility: visible;
                        z-index: 1;
                        transition: none;
                        & li {
                            padding: 0;
                            margin: 0;
                            flex: 0 0 100%;
                            border-right: 0px solid transparent;
                            width: 100%;
                            display: block !important;
                            float: left;
                            width: 100%;
                            & a {
                                font-size: 11px;
                                display: block !important;
                                &::before {
                                    display: none;
                                }
                            }
                            & span {
                                font-size: 11px;
                            }
                            
                            & .sub-menu, ul {
                                background-color: rgba(0,0,0,0.04);
                                & li {
                                    & a {
                                        border-top: 1px solid rgba($black, 0.05);
                                        &.mean-expand {
                                            border-width: 0 1px;
                                            border-style: solid;
                                            border-color: rgba($black, 0.05);
                                        }
                                    }
                                }
                                & .sub-menu, ul {
                                    background-color: rgba(0,0,0,0.05);
                                & li {
                                    & a {
                                        border-top: 1px solid rgba($black, 0.05);
                                        &.mean-expand {
                                            border-width: 0 1px;
                                            border-style: solid;
                                            border-color: rgba($black, 0.05);
                                        }
                                    }
                                }
                                }
                            }
                        }
                    }
                    
                }
            }
        }
    }
    
}
