@import "base/header/header";

/* Header
-------------------------------------------------------------- */
.inner-header {
    transition: all 0.6s;
}

.header_sticky .header-sticky {
    background-color: var(--theme-light-color);
    z-index: 10000;
    position: fixed !important;
    width: 100%;
    top: 0;
    box-shadow: 0 3px 6px rgb(0, 0, 0, 6%);
}

#header {
    --padding-wrap: 0;
    width: 100%;
    z-index: 11;
    position: relative;
    @include transition(all 0.3s ease 0s);
    
    .inner-header {
        transition: all 0.6s;
        min-height: var(--theme-height-header);
    }
    
    &.header-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        -webkit-animation-name: fadeInDown; /* Safari 4.0 - 8.0 */
        -webkit-animation-duration: 0.8s; /* Safari 4.0 - 8.0 */
        animation-name: fadeInDown;
        animation-duration: 0.8s;
    }
}

.header-wrap {
    padding-top: var(--padding-wrap);
    padding-bottom: var(--padding-wrap);
    @include d-flex();
    @include align-items-center();
    @include justify-content-center();
    @include flex-wrap();
    width: 100%;
    height: 100%;
    position: relative;
    
    .header-ct-left,
    .header-ct-center,
    .header-ct-right {
        height: 100%;
        @include d-flex();
        @include align-items-center();
    }
    
    .header-ct-left {
        flex-grow: 0;
        @include justify-content-start();
    }
    
    .header-ct-center {
        flex-grow: 1;
        @include justify-content-center();
    }
    
    .header-ct-right {
        flex-grow: 1;
        @include justify-content-end();
    }
}

.header-customize {
    @include d-flex();
    @include align-items-center();
    
    .header-customize-item + .header-customize-item {
        margin-left: 30px;
        
        &:last-child {
            margin-left: 40px;
        }
    }
}

header.header-default,
.header-style-01 {
    .header-customize {
        margin-left: 10px;
    }
    
    .header-custom-html {
        .btn {
            min-width: 228px;
            line-height: 60px;
            
            i {
                font-size: 20px;
                vertical-align: middle;
                margin-left: 7px;
            }
        }
    }
}

/* header-default */
header.header-default {
    background-color: transparent;
    
    .header-ct-left {
        @include flex-grow-0();
        position: relative;
        
        &:before {
            content: "";
            background: var(--theme-color-hover-main-navigation);
            position: absolute;
            right: -100px;
            height: 100%;
            width: 100vw;
            z-index: -1;
        }
        
        &:after {
            content: "";
            position: absolute;
            right: -160px;
            background: transparent;
            height: 100%;
            background: linear-gradient(to left bottom, transparent 50%, var(--theme-color-hover-main-navigation) 50%);
            width: 60px;
            z-index: -1;
        }
    }
    
    .header-ct-center {
        @include flex-grow-1();
        @include d-flex();
        @include justify-content-center();
    }
    
    .header-ct-right {
        @include flex-grow-0();
    }
}

header .inner-header > .container,
.themesflat-top > .container {
    max-width: 95%;
}

@media only screen and (min-width: 1705px) {
    header.header-default .inner-header > .container,
    .header-default .themesflat-top > .container {
        max-width: 1705px;
    }
    
    #header .header-customize {
        margin-left: 118px;
    }
    
    .header-customize {
        .header-customize-item + .header-customize-item {
            margin-left: 51px;
            
            &:last-child {
                margin-left: 60px;
            }
        }
    }
}

//style 01
.header-style-01 {
    background-color: transparent;
    
    .header-ct-left {
        position: relative;
        
        &:before {
            content: "";
            background: var(--theme-color-hover-main-navigation);
            position: absolute;
            right: -150px;
            height: 100%;
            width: 100vw;
            z-index: -1;
        }
        
        &:after {
            content: "";
            position: absolute;
            right: -245px;
            top: -10px;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-bottom: 5px solid var(--theme-color-hover-main-navigation);
            border-width: 70px;
            @include transform(rotate(-45deg))
        }
    }
    
    .header-customize {
        .header-customize-item + .header-customize-item {
            margin-left: 30px;
            
            &.header-modal-menu-left-btn {
                padding-left: 30px;
                border-left: 1px solid #DCDDDE;
            }
        }
    }
}

@media only screen and (min-width: 1366px) {
    .header-style-01 .header-customize {
        .header-customize-item + .header-customize-item {
            margin-left: 70px;
            
            &.header-modal-menu-left-btn {
                padding-left: 60px;
            }
        }
    }
}

@media only screen and (min-width: 1733px) {
    header.header-style-01 .inner-header > .container,
    .header-style-01 .themesflat-top > .container {
        max-width: 1733px;
    }
}

.header-sticky {
    @include box-shadow(0 0 65px rgba(0, 0, 0, .09));
}

header.header-style-02 .inner-header > .container,
.header-style-02 .themesflat-top > .container {
    max-width: 100%;
}

.header-02 {
    --theme-color-main-navigation: #fff;
}

.header-style-02 {
    .row > .col-md-12 {
        padding: 0;
    }
    
    .inner-header:not(.header-sticky) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .header-ct-left {
        min-width: 300px;
        background: #1D1D1C;
        @include flex-grow-0();
        @include justify-content-center();
    }
    
    .header-ct-left {
        padding-left: 36px;
    }
    
    .header-ct-right {
        @include flex-grow-0();
    }
    
    .header-ct-center {
        @include flex-grow-1();
    }
    
    .mainnav {
        @include d-flex();
        @include justify-content-center();
    }
    
    .header-custom-html .btn {
        min-width: 320px;
        line-height: var(--theme-height-header);
        font-size: 16px;
    }
    
    .header-customize {
        margin-left: 0 !important;
        
        .header-customize-item {
            + .header-customize-item {
                margin-left: 40px;
                
                &:last-child {
                    margin-left: 78px;
                }
            }
        }
    }
}

@media only screen and (max-width: 1460px) and (min-width: 1367px){
    .header-style-02 {
        #mainnav > ul > li {
            margin-left: 20px;
            margin-right: 20px;
        }
    }
}

@media only screen and (max-width: 1366px) {
    .header-style-02 {
        .header-ct-left {
            min-width: 220px;
        }
        
        .header-custom-html .btn {
            min-width: 220px;
        }
        
        .header-customize {
            .header-customize-item {
                + .header-customize-item {
                    margin-left: 30px;
                    
                    &:last-child {
                        margin-left: 50px;
                    }
                }
            }
        }
    }
}

/* Header Absolute */
.header-absolute {
    #header {
        position: absolute;
        z-index: 999;
    }
    
    .header.widget-header .nav .header-wrap {
        border-bottom: 1px solid rgba(255, 255, 255, 0);
    }
}

//header mobile
.header-mobile {
    display: none;
    
    .show-search:not(.active) a {
        color: var(--theme-dark-color);
    }
    
    .inner-header {
        
        background: #fff;
        padding: 15px 0;
        box-shadow: 0 3px 6px rgb(0 0 0 / 6%);
        
        .header-wrap {
            @include d-flex();
            @include justify-content-between();
            @include align-items-center();
            @include flex-flow-row();
        }
    }
    
    .top-search {
        width: calc(90vw - 115px);
        max-width: 400px;
    }
}

.btn-menu {
    display: none;
    float: right;
    position: relative;
    background: transparent;
    cursor: pointer;
    width: 30px;
    height: 20px;
    @include transition(all ease .238s);
    
    &:before,
    &:after,
    span {
        background-color: var(--theme-dark-color);
        -webkit-transition: all ease .238s;
        -moz-transition: all ease .238s;
        transition: all ease .238s;
    }
    
    &:before,
    &:after {
        content: "";
        position: absolute;
        height: 2px;
        width: 100%;
        left: 0;
        top: 50%;
        @include transform-origin(50% 50%);
    }
    
    span {
        position: absolute;
        width: 100%;
        height: 2px;
        left: 0;
        top: 50%;
        overflow: hidden;
        text-indent: 200%;
        
        &.line-1 {
            top: 50%;
        }
        
        &.line-2 {
            top: 60%;
        }
    }
    
    &:before {
        -webkit-transform: translate3d(0, -9px, 0);
        transform: translate3d(0, -9px, 0);
    }
    
    &:after {
        -webkit-transform: translate3d(0, 9px, 0);
        transform: translate3d(0, 9px, 0);
    }
    
    &.active span {
        opacity: 0;
    }
    
    &.active:before {
        -webkit-transform: rotate3d(0, 0, 1, 45deg);
        transform: rotate3d(0, 0, 1, 45deg);
    }
    
    &.active:after {
        -webkit-transform: rotate3d(0, 0, 1, -45deg);
        transform: rotate3d(0, 0, 1, -45deg);
    }
    
}

@media only screen and (max-width: 1366px) {
    header #mainnav > ul > li {
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media only screen and (max-width: 1200px) {
    header #mainnav > ul > li {
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media only screen and (max-width: 1024px) {
    .btn-menu {
        display: block;
    }
    
    #mainnav-mobi .menu {
        overflow-y: auto;
        max-height: 100vh;
    }
    
    #mainnav {
        display: none;
    }
    #header {
        display: none;
    }
    
    .header-mobile {
        display: block;
    }
}

/* logo */
#logo a,
#logo-mobi a {
    display: inline-block;
}

.logo img,
.logo svg,
.logo {
    @include transition(all 0.3s ease 0s);
    image-rendering: -moz-crisp-edges; /* Firefox */
    image-rendering: -o-crisp-edges; /* Opera */
    image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}

#logo.has-logo-sticky {
    .logo-sticky {
        display: none;
    }
}

.header-sticky #logo.has-logo-sticky {
    .logo-sticky {
        display: block;
    }
    
    .site-logo:not(.logo-sticky) {
        display: none;
    }
}

#header #logo a, .modal-menu__panel-footer .logo-panel a, .header-mobile #logo-mobi a {
    max-width: 88px;
}

.header-mobile {
    .inner-canvas-nav .logo {
        padding: 25px 25px !important;
        line-height: unset;
        text-align: left;
        margin-bottom: 50px;
        
        a {
            max-width: 150px;
            display: block;
        }
    }
}

/* Show search */
.header-style1 .show-search,
.header-style3 .show-search,
.header-style1 .flat-language {
    float: right;
}

.show-search {
    position: relative;
    min-width: 20px;
    margin-left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    
    > a {
        position: relative;
        font-size: 20px;
        color: var(--theme-color-main-navigation);
        
        &:hover {
            color: var(--theme-color-hover-main-navigation);
        }
    }
    
    &.active a > .fa-search:before {
        content: "\f00d";
    }
}


.inner-header.header-sticky {
    .show-search > a {
        color: var(--theme-header-sticky-color-main-navigation);
    }
    
    .show-search > a:hover {
        color: var(--theme-header-sticky-color-hover-main-navigation);
    }
}

.top-search {
    line-height: normal;
    position: absolute;
    right: 0;
    top: 120%;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    @include transition(all 0.3s ease-in-out);
    
    .search-form {
        border: 1px solid var(--theme-accent-color);
    }
}

.top-search.show {
    visibility: visible;
    opacity: 1;
    z-index: 1;
    top: 100%;
}

/* Modal Menu Left
-------------------------------------------------------------- */
.header-modal-menu-left-btn .text {
    margin-right: 15px;
}


.modal-menu-left-btn {
    position: relative;
    cursor: pointer;
    margin: 0;
    transform: rotateY(180deg);
}

.modal-menu-left-btn .line {
    padding: 0;
    width: 40px;
    height: 2px;
    background: var(--theme-color-main-navigation);
    @include transition(all 0.3s ease 0s);
    border-radius: 10px;
}

.modal-menu-left-btn .line--2 {
    width: 30px;
    margin: 10px 0;
}

.header-modal-menu-left-btn:hover .modal-menu-left-btn .line {
    background: var(--theme-color-hover-main-navigation);
}

.inner-header.header-sticky {
    .header-modal-menu-left-btn .modal-menu-left-btn .line {
        background: var(--theme-header-sticky-color-main-navigation);
    }
    
    .header-modal-menu-left-btn:hover .modal-menu-left-btn .line {
        background: var(--theme-header-sticky-color-hover-main-navigation);
    }
}

.modal-menu-left {
    visibility: hidden;
    transition: visibility 0s .25s;
}

.modal-menu--open {
    visibility: visible;
    transition-delay: 0s;
}

.modal-menu__backdrop,
.modal-menu__body {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 99999;
}

.modal-menu__body {
    left: auto;
    right: 0;
}

.modal-menu__backdrop {
    right: 0;
    background: rgba(0, 0, 0, .9);
    opacity: 0;
    will-change: opacity;
    transition: opacity .25s cubic-bezier(.25, .46, .45, .94);
}

.modal-menu-left .modal-menu__body {
    background: #fff;
    width: 445px;
    transition: transform .25s cubic-bezier(.25, .46, .45, .94);
    will-change: transform;
    overflow: hidden;
    transform: translateX(100%);
    -webkit-overflow-scrolling: touch;
    -webkit-transition-duration: .8s;
    transition-duration: .8s;
    -webkit-transition-timing-function: ease;
    transition-timing-function: ease;
}

.modal-menu--open .modal-menu__backdrop {
    opacity: 1;
}

.modal-menu--open .modal-menu__body {
    transform: translateX(0);
}
