/*  ----------------------------------------------------------------------------
    Template 1
*/
.td-post-template-1 {
  .td-post-content {
    border-top: 1px solid @td_grid_border_color;
    padding-top: 21px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding-top: 15px;
    }
  }

  .td-post-featured-image {
    float: left;
    width: 300px;
    margin-right: 21px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 40%;
      margin-right: 15px;
    }
  }

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

  footer {
    clear: both;
  }
}


/*  ----------------------------------------------------------------------------
    Template 2
*/
.td-post-template-2 {
  .post h1 {
    font-size: 48px;
    line-height: 58px;
    margin-top: 6px;
    margin-bottom: 5px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      font-size: 40px;
      line-height: 48px;
    }

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


  .meta-info {
    margin-bottom: 14px;
  }

  .td-post-sub-title {
    font-size: 16px;
    line-height: 26px;

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


/*  ----------------------------------------------------------------------------
    Template 3
*/
.td-post-template-3 {
  header h1 {
    font-size: 48px;
    line-height: 58px;
    margin-top: 6px;
    margin-bottom: 5px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      font-size: 40px;
      line-height: 48px;
    }

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

  .td-post-featured-image {
    figure {
      img {
        margin-bottom: 0px;
      }
    }

    .wp-caption-text {
      margin-right: 21px;
      margin-bottom: 0px;
    }
  }

  .td-post-content {
    //border-top: none;
    padding-top: 10px;
  }

  // hack when you don't have featured image
  .td-post-featured-image:after {
    background-color: #FFFFFF;
    bottom: -2px;
    content: "";
    display: block;
    height: 3px;
    position: relative;
    width: 679px;
  }


  .meta-info {
    margin-bottom: 14px;
  }

  .td-post-sub-title {
    font-size: 16px;
    line-height: 26px;
  }

  .td-post-featured-image {
    width: 681px;

    img {
      z-index: 1;
    }

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

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

    .entry-thumb {
      left: -1px;
      position: relative;
      margin-bottom: 7px;
      margin-left: auto;
      margin-right: auto;

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

  // fix featured image when no sidebar
  .td-pb-span12 {
    .td-post-featured-image {
      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%;
      }

      &:after {
        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%;
        }
      }
    }
  }
}

// hide top border of the post content when is video
.single-format-video .td-post-template-3 {
  .wpb_video_wrapper iframe {
    margin-bottom: 0px;
  }
  .td-post-content {
    border-top: 0px;
  }
}


/*  ----------------------------------------------------------------------------
    Template 4
*/
.td-post-template-4 {
  header {
    position: absolute;
    bottom: 0;
    z-index: 1;

    .entry-title,
    .td-post-sub-title,
    .meta-info,
    .entry-date,
    .td-post-author-name a,
    .td-post-comments a {
      color: #ffffff;
    }

    h1 {
      font-size: 48px;
      line-height: 58px;
      margin-top: 7px;
      margin-bottom: 5px;
      position: relative;
      right: 2px;

      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        font-size: 40px;
        line-height: 48px;
      }

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

  .meta-info {
    margin-bottom: 16px;

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

  .entry-thumb {
    padding-bottom: 0px;
    margin-bottom: 0px;
  }

  .entry-crumbs {
    top: 0px;
    padding: 15px 0px 15px 0px;
  }

  .td-post-header {
    padding-top: 0px;
    border-bottom: 0px;
  }

  .td-post-sharing-top {
    border-top: 0px;
    border-bottom: 1px solid @td_grid_border_color;
  }

  // fix when no featured image
  .td-post-featured-image {
    min-height: 200px;
    background-color: #444444;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      min-height: 182px;
    }

    .wp-caption-text {
      bottom: 0;
      color: #FFFFFF;
      position: absolute;
      right: 0;
      margin-right: 20px;
      max-width: 400px;
      height: 17px;
      overflow: hidden;

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

  .td-post-content {
    border-top: none;
    margin-top: 0px;
    padding-top: 14px;

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

  .td-post-sub-title {
    font-size: 16px;
    line-height: 26px;
    border: 0px;
    padding: 0px;

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


/*  ----------------------------------------------------------------------------
    Template 5
*/
.td-post-template-5 {
  header {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 680px;
    background-color: #ffffff;
    padding-top: 19px;
    border-left: 1px solid @td_grid_border_color;
    z-index: 1;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      padding-top: 12px;
      width: auto;
      position: relative;
    }

    h1 {
      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        font-size: 28px;
        line-height: 36px;
      }
    }
  }

  // fix when no featured image
  .td-post-featured-image {
    min-height: 200px;
    background-color: #444444;

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

    .wp-caption-text {
      bottom: 0;
      color: #FFFFFF;
      position: absolute;
      right: 0;
      margin-right: 20px;
      width: 300px;

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

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

  .entry-thumb {
    padding-bottom: 0px;
    margin-bottom: 0px;
  }

  .td-post-header {

    .meta-info {
      border-bottom: 1px dashed @module-dashed-line;
      margin-bottom: 0px;
      padding-bottom: 15px;
    }
  }

  .entry-crumbs {
    top: 0px;
    padding: 15px 0px 15px 0px;
  }

  .td-post-header {
    padding-top: 0px;
    border-bottom: 0px;
  }

  .td-post-sharing-top {
    border-top: none;
    border-bottom: 1px dashed @module-dashed-line;
    padding-left: 0px;
    padding-right: 0px;
    margin: 0px 19px 0px 20px;

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

  .td-post-content {
    padding-top: 15px;
    border-top: none;
  }

  .td-post-sub-title {
    margin: 17px 0px 17px 0px;
  }
}


/*  ----------------------------------------------------------------------------
    Template 6
*/
.td-post-template-6 {
  .entry-crumbs {
    color: #ffffff;

    a {
      color: #ffffff;
    }
  }

  // read down icon
  .td-read-down {
    text-align: center;
    margin-top: 33px;

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

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

    i {
      font-size: 46px;
      opacity: 0.8;
      color: #ffffff;

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

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

  .td-post-header {
    background-color: transparent;
    position: absolute;
    left:0px;
    bottom:0px;
    right: 0px;
    border-bottom: none;
    padding-bottom: 15px;

    //performance gain on 3d transform?
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    backface-visibility: hidden;
    perspective: 1000;
  }

  .td-post-content {
    border-top: none;
  }

  .td-post-header h1 {
    font-size: 42px;
    font-weight: 600;
    line-height: 50px;
    margin-top: 9px;
    margin-bottom: 6px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      font-size: 38px;
      line-height: 48px;
    }

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

  .template6-header {
    .entry-title a,
    .td-post-sub-title,
    .meta-info,
    .entry-date,
    .td-post-author-name a,
    .td-post-comments a {
      color: #ffffff;
    }
  }


  .td-post-sharing-top {
    border-top: none;
    padding: 10px 0px 10px 0px;
    border-bottom: 1px dashed @module-dashed-line;
    margin: 0px 20px 0px 20px;

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

  .td-post-sub-title {
    font-size: 16px;
    line-height: 26px;
    border: 0px;
    padding: 0px;

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

//wrapper for parallax effect - @todo poate trebuie scoasa pozitionarea de pe header image mai jos
.td-full-screen-header-image-wrap {
  position: absolute;
  top:0px;
  right:0px;
  left:0px;
  height: 900px;
  overflow: hidden;
  z-index: -1;

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

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    height: 400px;
  }
}


#td-full-screen-header-image {
  position: absolute;
  top:0px;
  right:0px;
  left:0px;
  //background-color: transparent;
  min-height: 900px;
  height: 900px;

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

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    height: 400px;
    min-height: 400px !important;
  }

  img {
    display: block;
  }

  .backstretch {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      height: 680px !important;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 400px;
    }
  }

  // image overlay
  .backstretch:after {
    content:'';
    position: absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    background-color: #000;
    opacity: 0.12;
  }
}

.single_template_6 {
  .td-header-wrap {
    height: 900px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 400px;
    }
  }

  // remove bottom border
  .td-header-style-5 .td-ad-m,
  .td-header-style-7 .td-ad-m,
  .td-header-style-8 .td-ad-m,
  .td-header-style-9 .td-ad-m,
  .td-header-style-10 .td-ad-m {
    border-bottom: 0px;
  }

  // remove the border on template 6 full
  .td-header-container,
  .td-header-style-6 .td-make-full {
    border: none;
  }
}

// fix when logged it - top wp bar
.admin-bar.single_template_6 {
  .td-header-wrap {
    height: 868px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 354px;
    }
  }
}

.template6-header {
  position: absolute;
  top:840px;
  right:0px;
  left:0px;
  //z-index: 2;
  //z-index: 1; // the mega menu issue over the post header 6

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

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    top: 406px;
    //z-index: 0;
  }

  a,
  .entry-title {
    color: #ffffff;
  }
}

.admin-bar .template6-header {
  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    top: 640px;
  }

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    top: 360px;
  }
}



/*  ----------------------------------------------------------------------------
    Template 8
*/
.td-post-template-8 {
  .entry-thumb {
    padding-bottom: 0px;
    margin-bottom: 0px;
  }

  .entry-crumbs {
    top: 0;
    padding: 15px 0 15px 0;
  }

  .td-post-header {
    border-bottom: 0;
  }

  .wpb_video_wrapper iframe {
    margin-bottom: 0;
    display: table;
  }

  .td-post-featured-image .wp-caption-text {
    display: none;
  }
}




/*  ----------------------------------------------------------------------------
    Image gradient
*/
.td-image-gradient:before {
  bottom: 0;
  content: "";
  display: block;
  height: 40%;
  width: 100%;
  position: absolute;
  z-index: 1;
  background: -moz-linear-gradient(top,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%); /* FF3.6+ */
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.7))); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%); /* IE10+ */
  background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#b3000000',GradientType=0 ); /* IE6-9 */

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


#td_parallax_header_6,
#td-full-screen-header-image
{
  -webkit-backface-visibility: hidden;
  backface-visibility:hidden;
}

