


//===========================================================

// Minovate - sections/header.scss

//===========================================================




//======== #search-container ==========

.search-box-wrapper{
  background: #222222;
  overflow: hidden;
  height: 0;
  color: #ccc;

  .container {
    max-width: 100%;
    position: relative;
  }

  .search-form {
    margin-bottom: 0;
    padding: 0 0 0 20px;
  }

  input {
    outline: none;
    font-size: 22px;
    font-style: italic;
    border: 0;
    background: #222222;
    color: #fff;
    height: 50px;
    width: 100%;
  }

  .search-submit {
    display: none;
  }

  i.fa {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 24px;
  }

}



//========= #header ===========

#header {
  position: relative;
  background-color: #FFF;
  @include user-select(none);

  .container {
    width: 100%;
    padding: 0 30px;
    position: relative;
  }
}

//========= #branding ===========

#branding {
  position: relative;
  float: left;
  font-family: $font-raleway;
  font-size: 36px;
  line-height: 100%;
  padding-right: 30px;
  margin-right: 30px;

  a {
    display: block;
    color: #000;
  }

  img {
    display: block;
    max-width: 100%;
  }

  a.brand-normal {
    display: block;
  }

  a.brand-retina {
    display: none;
  }
}

//========= #main-navbar ===========


#main-navbar-toggle {
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-size: 14px;
  position: absolute;
  top: 50%;
  margin-top: -25px;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  @include transition(opacity .3s ease);

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

#main-navbar {
  float: right;
  height: $header-height;

  ul {
    list-style: none;
    height: $header-height;
    margin: 0;
  }

  > ul {
    float: left;
  }

  ul {
    li {
      position: relative;
      float: left;
      margin-left: 4px;

      &.mega-menu {
        position: inherit;
      }

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

      a {
        display: block;
        font-family: $main-navbar-font;
        font-size: $main-navbar-font-size;
        font-weight: $main-navbar-font-weight;
        height: $header-height;
        line-height: $header-height;
        color: $main-navbar-font-color;
        letter-spacing: $main-navbar-font-spacing;
        text-transform: $main-navbar-font-transform;
        padding: 0 15px;
        @include transition(height .4s ease, line-height .4s ease, padding .4s ease);
      }

      &:hover {
        >ul {
          display: block;
        }
      }
    }
  }

  >ul >li {
    &:hover,
    &.active {
      a {
        color: $theme-color;
      }
      .active {
        >a {
          color: $theme-color!important;
        }
      }
    }
  }

  ul {
    ul,
    li .mega-menu-content {
      background-color: #fff;
      width: $main-navbar-submenu-width;
      height: auto;
      display: none;
      position: absolute;
      top: $header-height;
      left: 0;
      margin: 0;
      border: 1px solid #e2e2e2;
      border-top: 1px solid $theme-color;
      box-shadow: 0 10px 35px 5px rgba(0, 0, 0, 0.04);
      z-index: 200;
    }

    ul.menu-right-position,
    li .mega-menu-content.menu-right-position {
      left: auto;
      right: 0;
    }

    ul {
      padding: 0;

      li {
        float: none;
        margin: 0;
      }

      a {
        font-family: $main-navbar-submenu-font;
        font-size: $main-navbar-submenu-font-size;
        font-weight: $main-navbar-submenu-font-weight;
        height: 38px;
        line-height: 38px;
        color: $font-color-70!important;
        letter-spacing: 0;
        @include transition(all .2s ease-in-out);
      }

      li:hover > a {
        background-color: #fafafa;
        padding-left: 20px;
        color: $theme-color !important;
      }
    }
  }
}

//========= mega menu ===========
#main-navbar {
  ul {
    li {
      &.mega-menu-small {
        .mega-menu-content {
          width: 400px;
        }
      }
      &.mega-menu {
        .mega-menu-content {
          margin: 0 30px;
          padding: 0 10px;
          width: 1140px;
          top: $header-height;

          ul {
            display: block !important;
            width: 100%;
            position: relative;
            top: 0;
            left: 0;
            border: 0;
            box-shadow: none;
            opacity: 1!important;

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

            a {
              padding-left: 5px;
              height: 36px;
              line-height: 36px;

              &:hover {
                padding-left: 10px;
              }
            }

            > li.mega-menu-title {
              margin-top: 20px;

              &:first-child {
                margin-top: 0;
              }

              > a {
                font-family: $main-navbar-font;
                font-size: $font-size-sm;
                font-weight: $font-weight-bold;
                letter-spacing: 1px;
                text-transform: uppercase;
                margin-bottom: 15px;
                color: $heading-color !important;
                padding: 0;
                height: auto;
                line-height: 1.3 !important;
              }

              &:hover{
                > a {
                  background-color: transparent;
                }
              }

              > a:hover {
                color: $theme-color !important;
              }
            }
          }

          > ul {
            float: left;
            padding: 20px 30px;
          }

          &.col-2 > ul,
          &.col-3 > ul,
          &.col-4 > ul,
          &.col-5 > ul {
            width: 50%;
            margin: 0;
            border-left: 1px solid #f2f2f2;
          }

          &.col-3 > ul {
            width: 33.33%;
          }

          &.col-4 > ul {
            width: 25%;
          }

          &.col-5 > ul {
            width: 20%;
          }

        }
      }
    }
  }
}

//========= search toggle ===========

#search-toggle {
  float: right;
  margin: 0 15px;
  line-height: $header-height;
  @include transition(height .4s ease, line-height .4s ease, padding .4s ease);

  >a {
    margin-left: 20px;
    color: $main-navbar-font-color;

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

//========= #header transparent ===========

#header {
  &.transparent-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,.1);
    z-index: 99;
    +#slider {
      top: -$header-height;
      margin-bottom: -$header-height;
    }

    &.light {
      border-bottom: 1px solid rgba(255,255,255,.3);

      #main-navbar {
        ul li {
          a {
            color: $main-navbar-font-color-light;
          }
          &:hover,
          &.active {
            a {
              color: $theme-color;
            }
          }
        }
      }
      #search-toggle {
        color: $main-navbar-font-color-light;

        a {
          color: $main-navbar-font-color-light;

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

    #main-navbar > ul > li{
      > ul,
      > .mega-menu-content,
      &.mega-menu > .mega-menu-content{
        top: ($header-height - 1);
      }
    }
  }
}

//========= #header sticky ===========

#header,
#header-wrap,
#branding img {
  height: $header-height;
  @include transition(height .4s ease, opacity .3s ease);
}

#main-navbar > ul > li {
  > ul,
  > .mega-menu-content,
  &.mega-menu > .mega-menu-content {
    @include transition(top .4s ease);
  }
}


#header {
  &.sticky-header {
    height: $sticky-header-height;

    #header-wrap,
    #branding img,
    #main-navbar,
    #main-navbar > ul,
    #main-navbar > ul > li> a {
      height: $sticky-header-height;
    }

    #header-wrap {
      z-index: 99;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background-color: #fff;
      box-shadow: 0 0 10px rgba(0,0,0,0.2);
      -webkit-backface-visibility: hidden;
    }

    #main-navbar > ul > li{
      > a {
        line-height: $sticky-header-height;
      }
      > a i {
        line-height: ($sticky-header-height - 1);
      }
      > ul,
      > .mega-menu-content,
      &.mega-menu > .mega-menu-content{
        top: $sticky-header-height;
      }
    }

    #search-toggle {
      line-height: $sticky-header-height;
    }
  }
}
