/* -------------------------------------------------------------------

Header style

----------------------------------------------------------------------  */


/*
    fix logo alignment for logo in menus
*/
// affix logo alignment
@media (min-width: 768px) {
  .td-header-style-4 .td-main-menu-logo a img,
  .td-header-style-5 .td-main-menu-logo a img,
  .td-header-style-9 .td-main-menu-logo a img {
    top: -2px;
  }
}
// firefox
@-moz-document url-prefix() {
  @media (min-width: 768px) {
    .td-header-wrap .td-affix .td-main-menu-logo img {
      top: -2px;
    }
  }
}

/* -------------------------------------------------------------------
  Style 1
----------------------------------------------------------------------  */
.td-header-style-1 {
  // top bar
  .td-header-top-menu {
    position: relative;
    top: 10px;
  }

  // ad
  .td-header-sp-rec {
    float: right;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      float: none;
    }
  }
}


/* -------------------------------------------------------------------
  Style 2
----------------------------------------------------------------------  */
.td-header-style-2 {
  // top menu
  .td-header-top-menu {
    padding: 0;
  }
  .td-top-bar-container {
    padding: 4px 15px 4px 20px;
  }

  // logo
  .td-header-sp-logo {
    background-color: @td_theme_color;
    position: relative;
    margin-bottom: 0;
    margin-top: 0;
    min-height: 0;

    img {
      bottom: 0;
      max-height: 100%;
      left: 0;
      margin: auto;
      padding: 0;
      position: absolute;
      right: 0;
      top: 0;
      width: auto;
    }
  }

  // ad
  .td-header-sp-rec {
    float: right;
    margin: 0 9px 0 0;
    position: relative;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      margin: 0;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin: 0;
      float: none;
    }
  }
}


/* -------------------------------------------------------------------
  Style 3
----------------------------------------------------------------------  */
.td-header-style-3 {
  // top menu
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: @td_theme_color;
  }

  // ad
  .td-header-sp-rec {
    float: right;
  }
}



/* -------------------------------------------------------------------
  Style 4
----------------------------------------------------------------------  */
.td-header-style-4 {
  // top menu
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: @td_theme_color;
  }

  // logo
  .td-main-menu-logo {
    display: block;
  }

  // ad
  .td-header-sp-rec {
    width: 100%;
  }
}



/* -------------------------------------------------------------------
  Style 5
----------------------------------------------------------------------  */
.td-header-style-5 {
  // top menu
  .td-top-menu-full {
    background-color: #348cbf;
  }
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: #000;
  }

  // logo
  .td-main-menu-logo {
    display: block;

    img {
      margin: 0 21px 0 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin: 0 17px 0 0;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: auto;
      }
    }
  }

  // ad
  .td-header-sp-rec {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;

    .td-header-ad-wrap {
      height: auto;
      width: 100%;
    }

    .td-g-rec,
    .td-a-rec {
      display: table;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }

    .adsbygoogle,
    img {
      position: relative;
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }

  // affix full
  .td-affix {
    width: auto;
  }
}



/* -------------------------------------------------------------------
  Style 6
----------------------------------------------------------------------  */
.td-header-style-6 {
  // top menu
  .td-header-sp-top-menu .top-header-menu > .current-menu-item > a,
  .td-header-sp-top-menu .top-header-menu > .current-menu-ancestor > a,
  .td-header-sp-top-menu .top-header-menu > .current-category-ancestor > a,
  .td-header-sp-top-menu .top-header-menu > li > a:hover,
  .td-header-sp-top-menu .top-header-menu > .sfHover > a {
    color: #000;
  }
  .td-top-menu-full {
    background-color: @td_theme_color;
  }

  // logo
  .td-main-menu-logo {
    img {
      margin: 0 21px 0 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin: 0 17px 0 0;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: auto;
      }
    }
  }

  // affix full
  .td-affix {
    width: auto;
  }

  // main menu
  .sf-menu {
    margin-left: 0;
  }

  // ad
  .td-header-sp-rec {
    float: right;
  }

  // fix the border from header
  .td-header-header .td-make-full {
    border-bottom: 1px solid @td_grid_border_color;
  }
}


/* -------------------------------------------------------------------
  Style 7
----------------------------------------------------------------------  */
.td-header-style-7 {
  // logo full
  .td-header-sp-logo {
    margin-bottom: 0;
    margin-top: 0;
    width: 100%;

    a {
      height: auto;
    }

    img {
      position: relative;
      max-height: none;
    }
  }

  // ad
  .td-header-sp-rec {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;

    .td-header-ad-wrap {
      height: auto;
      width: 100%;
    }

    .td-g-rec,
    .td-a-rec {
      display: table;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }

    .adsbygoogle,
    img {
      position: relative;
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
}


/* -------------------------------------------------------------------
  Style 8
----------------------------------------------------------------------  */
.td-header-style-8 {
  // top menu
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: @td_theme_color;
  }

  // logo full
  .td-header-sp-logo {
    margin-bottom: 0;
    margin-top: 0;
    width: 100%;

    a {
      height: auto;
    }

    img {
      position: relative;
      max-height: none;
    }
  }
  // logo
  .td-main-menu-logo {
    img {
      margin: 0 21px 0 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin: 0 17px 0 0;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: auto;
      }
    }
  }

  // main menu
  .td-header-border #td-top-search {
    margin-top: -22px; // fix search icon alignment
  }

  // affix full
  .td-affix {
    width: auto;
  }


  // ad
  .td-header-sp-rec {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;

    .td-header-ad-wrap {
      height: auto;
      width: 100%;
    }

    .td-g-rec,
    .td-a-rec {
      display: table;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }

    .adsbygoogle,
    img {
      position: relative;
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
}

// fix the header when boxed version
.td-boxed-layout .td-header-style-8 .td-header-menu-wrap,
.td-boxed-layout .td-header-style-8 > .td-header-header {
  margin-left: auto;
  margin-right: auto;
  width: 1021px;

  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    width: 756px;
  }

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    width: 100%;
  }
}


/* -------------------------------------------------------------------
  Style 9
----------------------------------------------------------------------  */
.td-header-style-9 {
  // top menu
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: @td_theme_color;
  }

  // logo
  .td-main-menu-logo {
    display: block;

    img {
      margin: 0 21px 0 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin: 0 17px 0 0;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: auto;
      }
    }
  }

  // fix search icon alignment
  .td-header-border #td-top-search {
    margin-top: -22px;
  }

  // affix full
  .td-affix {
    width: auto;
  }

  // ad
  .td-header-sp-rec {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;

    .td-header-ad-wrap {
      height: auto;
      width: 100%;
    }

    .td-g-rec,
    .td-a-rec {
      display: table;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }

    .adsbygoogle,
    img {
      position: relative;
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
}


/* -------------------------------------------------------------------
  Style 10
----------------------------------------------------------------------  */
.td-header-style-10 {

  // affix full
  .td-affix {
    width: auto;
  }

  // top menu
  .top-header-menu > .current-menu-item > a,
  .top-header-menu > .current-menu-ancestor > a,
  .top-header-menu > .current-category-ancestor > a,
  .top-header-menu > li > a:hover,
  .top-header-menu > .sfHover > a {
    color: @td_theme_color;
  }
  .top-header-menu {
    .sub-menu {
      border-top: 1px solid @td_grid_border_color;
    }
  }

  // logo
  .td-header-text-logo {
    margin: 0;

    img {
      margin-left: auto;
      margin-right: auto;
    }

    span {
      display: block;
      text-align: center;
    }
  }

  .td-main-menu-logo {
    img {
      margin: 0 21px 0 0;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        margin: 0 17px 0 0;
      }
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin: auto;
      }
    }
  }

  .td-logo-sticky {
    @media (min-width: @responsive_p_tablet_min) {
      position: absolute;
      left: 0;

      img {
        max-width: 102px;
      }
    }
    @media (min-width: @responsive_p_tablet_min) {
      img {
        max-width: inherit;
      }
    }
  }

  // fix sticky settings
  .td-affix .td-logo-sticky.td-main-menu-logo .td-main-logo {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }
  .td-main-menu-logo .td-main-logo {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
  .td-logo-in-header .td-header-logo {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }

  // center the menu
  #td-header-menu {
    display: table;
    margin: 0 auto;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }

  .td-header-menu-wrap {
    position: relative;
  }
  .menu-main-menu-container {
    display: inherit;
  }

  .td-logo-wrap {
    display: block;
    margin: 60px 10px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin: 10px 0;
    }
  }

  // ad
  .td-header-sp-rec {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;

    .td-header-ad-wrap {
      height: auto;
      width: 100%;
    }

    .td-g-rec,
    .td-a-rec {
      display: table;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }

    .adsbygoogle,
    img {
      position: relative;
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
}

.white-menu .td-header-style-10 {
  .td-header-main-menu {
    border-top: 1px solid @td_grid_border_color;
  }

  #td-top-search {
    margin-top: -22px;
  }
}

// text logo
.td-logo-text {
  font-size: 75px;
  line-height: 60px;
  margin: 0;
  font-family: serif;
  color: #222;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    font-size: 36px;
    line-height: 36px;
  }
}

.td-tagline-text {
  letter-spacing: 1.8px;
  font-size: 11px;
  color: rgba(34, 34, 34, 0.5);
  margin: 0;
  font-family: serif;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: none;
  }
}


/*
    Some fixes

*/
// used to hide on mobile if a mobile logo is loaded
.td-logo-mobile-loaded {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: none;
  }
}
// fix all headers if the grid is white
.white-grid.white-menu {
  .td-header-menu-wrap .td-header-main-menu {
    border-color: @td_grid_border_color;
  }
}
.white-grid.white-menu {
  .td-header-style-3 .td-header-main-menu,
  .td-header-style-4 .td-header-main-menu {
    border-top: 1px solid @td_grid_border_color;
  }
}

// white menu border
.white-menu .td-header-main-menu {
  border-bottom: 1px solid @td_grid_border_color;
}