/*  ----------------------------------------------------------------------------
    header grid container
*/
.td-header-wrap {
  position: relative;
  z-index: 2000;
}

/* header rows */
.td-header-row {
  .mx-row-and-span(td-header-sp);
  font-family: @font1;
}


/*  ----------------------------------------------------------------------------
    logo
*/
.td-header-sp-logo {

  img {
    margin: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

}

.td-main-menu-logo {
  display: none;
  float: left;
  margin-right: 10px;
  height: 48px;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: block;
    margin-right: 0;
    height: 0;
  }

  a {
    line-height: 46px;
  }

  img {
    padding: 3px 0;
    position: relative;
    vertical-align: middle;
    max-height: 48px;

    @media (max-width: @responsive_p_phone_max) {
      margin: auto;
      bottom: 0;
      top: 0;
      left: 0;
      right: 0;
      position: absolute;
      padding: 0;
    }


    @media (max-width: @responsive_l_tablet_max) {
      max-width: 138px;
    }
  }
}

@media (min-width: @responsive_p_tablet_min) {
  .td-affix .td-logo-sticky {
    display: block;
  }


//Small height for menu with affix
  .td-header-wrap {

    .td-affix {

      .td-main-menu-logo {
        height: 48px !important;

        a {
          line-height: 46px !important;
        }

        img {
          max-height: 48px !important;
        }
      }

      .sf-menu > li > a {
        line-height: 48px !important;
      }
    }
  }
}


/* -------------------------------------------------------------------------------

      logo on sticky menu

*/
.td-main-menu-logo .td-sticky-mobile {
  &.td-mobile-logo {
    display: inherit;
  }

  &.td-header-logo {
    display: none;
  }
}
.td-main-menu-logo .td-sticky-header {
  &.td-mobile-logo {
    display: none;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: inherit;
    }
  }

  &.td-header-logo {
    display: inherit;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}




/*  ----------------------------------------------------------------------------
    header menu affix
*/
.td-header-menu-wrap.td-affix {
  -webkit-transform: translate3d(0, 0, 0); //chrome / safari / ios fix for 3d parallax
  transform: translate3d(0, 0, 0);

  margin-right: auto;
  margin-left: auto;
  width: 100%;
  z-index: 9999;
  position: fixed !important;
  background-color: rgb(255,255,255);
  background-color: rgba(255,255,255,0.95);
  top: 0;
}

// fix menu affix when admin bar + responsive
.admin-bar .td-header-menu-wrap.td-affix {
  top: 32px;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    top: 46px;
  }

  @media (max-width: 602px) {
    top: 0;
  }
}

// main menu gradient = shadow
.td-header-gradient:before {
  content:"";
  background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMBAMAAABRpcpkAAAAD1BMVEUAAAAAAAAAAAAAAAAAAABPDueNAAAABXRSTlMGAhQQCyEd++8AAAAUSURBVAjXY1AAQgMgdABCCBAAQQAT6AFRBPHcWgAAAABJRU5ErkJggg==');


  width: 100%;
  height: 12px;
  position: absolute;
  bottom: -12px;
  z-index: 1;
}


// boxed layout - menu fix

.td-boxed-layout {
  #td-outer-wrap {
    z-index: 1;
  }

  .td-header-menu-wrap.td-affix {
    width: 1164px;
    margin-right: auto;
    margin-left: auto;

    @media (max-width: @responsive_l_tablet_max) {
        width: 100%;
    }
  }
}

