/*

  General big grids

*/
.td-pb-span8,
.td-pb-span4 {
  .td-big-grids {
    width: auto !important;
    background-color: transparent !important;
  }
}

// all big grids
.td_block_big_grid,
.td_block_big_grid_2,
.td_block_big_grid_3,
.td_block_big_grid_4,
.td_block_big_grid_5,
.td_block_big_grid_6,
.td_block_big_grid_7 {
  width: 1021px;
  left: -1px;
  position: relative;

  /* 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%;
    left: 0;
  }
}

.td-big-grid-post {
  position: relative;
  overflow: hidden;
  z-index: 1;

  // article title
  .entry-title {
    margin: 0;

    a {
      text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
      font-family: inherit;
    }
  }

  // comment
  .td-module-comments {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;

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

    a:after {
      border-color: #000000 transparent transparent transparent;
    }
  }

  // module thumb
  .td-module-thumb {
    overflow: hidden;
    margin: 0;
    height: 100%;
    background-color: #ccc;
  }

  // image keep unscaled image on desktop
  .entry-thumb {
    width: 100%;
  }

  // meta box
  .td-big-grid-meta {
    position: absolute;
    pointer-events: none;
    bottom: 0;
    padding: 0 8px 11px 8px;
    width: 100%;
    z-index: 1;

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

    .td-post-category,
    .td-post-author-name {
      pointer-events: auto;
    }

    a,
    i,
    span,
    .entry-date {
      color: #ffffff;
    }
  }
}

// empty module
.td-module-empty {
  background-color: #e5e5e5;
}

.td-big-grids {
  border-top: none;
}


/*

  scroll bar


*/
.td_block_wrap .td-big-grid-wrapper .td-big-grid-scroll {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0;
    overflow-y: hidden;
    padding-top: 3px;
    z-index: 0;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 0, 0);
    clear: both;

    .td-big-grid-post {
      margin-left: 3px;
      margin-right: 0;
      margin-bottom: 0;

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

  .td-big-grid-post {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: inline-block;
      white-space: normal;
      float: none;
      vertical-align: top;
      width: 80%;
    }
  }

  // make full scroll when only 2 posts
  &.td-scroll-full {
    .td-big-grid-post {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        width: 100%;
      }
    }
  }
}


/*

  Big grid

*/
.td_block_big_grid {
  .td-big-thumb {
    float: left;
    width: 537px;
    position: relative;
    margin-right: 4px;
    height: 360px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      margin-left: 0;
      margin-bottom: 4px;
      float: none;
      height: auto;
    }
  }

  .td-tiny-thumb {
    float: left;
    width: 238px;
    height: 178px;
    position: relative;
    overflow: hidden;

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

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

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

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

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

  .td-big-grid-post-1,
  .td-big-grid-post-3 {
    margin-right: 4px;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin-right: 0;
    }
  }
  .td-big-grid-post-1,
  .td-big-grid-post-2 {
    margin-bottom: 4px;
  }
  .td-big-grid-post-1:after,
  .td-big-grid-post-3:after {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      content: '';
      width: 3px;
      height: 100%;
      position: absolute;
      top: 0;
      right: 0;
      display: block;
      background-color: #fff;
      z-index: 1;
    }
  }

  // empty module
  .td-module-empty {
    float: left;
    height: 178px;
    width: 238px;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      max-height: 170px;
      display: none;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      width: 50%;
      max-height: 102px;
    }

    &.td-big-grid-post-4.td-post-number-4,
    &.td-big-grid-post-2.td-post-number-2 {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        display: block;
      }
    }
  }
}



/*

  Big grid 2

*/
.td_block_big_grid_2 {
  // general
  .td-big-grid-post {
    height: 398px;
    float: left;
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        height: 294px;
    }

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
        height: 200px;
        width: 100% !important;
        float: none;
    }
  }

  // border
  .td-big-grid-post-0 {
    width: 509px;
    margin-right: 2px;

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

  .td-big-grid-post-1 {
    width: 509px;
    margin-left: 1px;

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

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


/*

  Big grid 3

*/
.td_block_big_grid_3 {
  // general
  .td-big-grid-post {
    height: 336px;
    float: left;

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

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 200px;
      width: 100% !important;
      float: none;
    }
  }

  // border
  .td-big-grid-post-0 {
    width: 338px;
    margin-right: 2px;

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

  .td-big-grid-post-1 {
    width: 338px;
    margin-right: 2px;
    margin-left: 1px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        width: 249px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      margin-right: 0;
      margin-left: 0;
      margin-top: 3px;
    }
  }

  .td-big-grid-post-2 {
    width: 339px;
    margin-left: 1px;

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

  // empty module
  .td-module-empty {

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


/*

  Big grid 4

*/
.td_block_big_grid_4 {
  // general
  // post 0
  .td-big-grid-post-0 {
    width: 509px;
    height: 300px;
    float: left;
    margin-right: 2px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 376px;
      height: 250px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: auto;
      margin-right: 0;
    }
  }
  // post 1
  .td-big-grid-post-1 {
    width: 509px;
    height: 300px;
    float: left;
    margin-left: 1px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 377px;
      height: 250px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: auto;
      clear: both;
      margin: 3px 0 0;
    }
  }

  // post 2
  .td-big-grid-post-2 {
    width: 338px;
    height: 205px;
    float: left;
    margin: 3px 2px 0 0;

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

  // post 3
  .td-big-grid-post-3 {
    width: 338px;
    height: 205px;
    float: left;
    margin: 3px 2px 0 1px;

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

  // post 4
  .td-big-grid-post-4 {
    width: 339px;
    height: 205px;
    float: left;
    margin: 3px 0 0 1px;

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

  .td-big-grid-post-1,
  .td-big-grid-post-2,
  .td-big-grid-post-3,
  .td-big-grid-post-4 {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      max-height: 148px;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      max-height: 102px;
    }
    .td-post-category,
    .td-module-meta-info {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        display: none;
      }
    }
  }
  .td-big-grid-post-1:after,
  .td-big-grid-post-3:after {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      content: '';
      width: 3px;
      height: 100%;
      position: absolute;
      top: 0;
      right: 0;
      display: block;
      background-color: #fff;
      z-index: 1;
    }
  }

  // empty module
  .td-module-empty {
    float: left;

    &.td-big-grid-post-2.td-post-number-1,
    &.td-big-grid-post-3.td-post-number-1,
    &.td-big-grid-post-4.td-post-number-1,
    &.td-big-grid-post-2.td-post-number-2,
    &.td-big-grid-post-3.td-post-number-2,
    &.td-big-grid-post-4.td-post-number-2 {
      display: none;
    }

    &.td-big-grid-post-3.td-post-number-3,
    &.td-big-grid-post-4.td-post-number-3 {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        display: none;
      }
    }
    &.td-big-grid-post-2.td-post-number-2 {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        display: block;
      }
    }
  }
}



/*

  Big grid 5

*/
.td_block_big_grid_5 {
  // general
  .td-small-thumb {
    width: 338px;
    height: 198px;
    float: left;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 250px;
      height: 144px;
    }
  }
  .td-medium-thumb {
    width: 339px;
    height: 399px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 250px;
      height: 291px;
    }
  }
  .td-big-grid-post-0 {
    margin-right: 2px;

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

  .td-big-grid-post-1 {
    margin-right: 2px;
    margin-left: 1px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      clear: both;
      max-height: 148px;
      margin: 3px 0 0;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      max-height: 102px;
    }
  }

  .td-big-grid-post-2 {
    clear: left;
    margin-right: 2px;
    margin-top: 3px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      clear: none;
      max-height: 148px;
      margin: 3px 0 0;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      max-height: 102px;
    }
  }

  .td-big-grid-post-3 {
    margin-right: 2px;
    margin-left: 1px;
    margin-top: 3px;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      max-height: 148px;
      margin: 3px 0 0;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      max-height: 102px;
    }
  }

  .td-big-grid-post-4 {
    position: absolute;
    top: 0;
    right: 0;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 50%;
      position: relative;
      float: left;
      max-height: 148px;
      margin: 3px 0 0;
    }
    /* responsive portrait phone */
    @media (max-width: 474px) {
      max-height: 102px;
    }
  }

  .td-big-grid-post-1:after,
  .td-big-grid-post-3:after {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      content: '';
      width: 3px;
      height: 100%;
      position: absolute;
      top: 0;
      right: 0;
      display: block;
      background-color: #fff;
      z-index: 1;
    }
  }

  // empty module
  .td-module-empty {
    float: left;

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

    &.td-big-grid-post-4 {
      width: 339px;
      height: 399px;

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

      &.td-post-number-2 {
        height: 198px;

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

    &.td-big-grid-post-3.td-post-number-3 {
      width: 338px;
      height: 198px;
      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        width: 250px;
        height: 144px;
      }
    }

    &.td-big-grid-post-1.td-post-number-1,
    &.td-big-grid-post-4.td-post-number-1 {
      width: 340px;
      height: 198px;
      /* responsive portrait tablet */
      @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
        width: 252px;
        height: 144px;
      }
    }

    &.td-big-grid-post-2.td-post-number-2,
    &.td-big-grid-post-4.td-post-number-4 {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        display: block;
        height: 148px;
        max-height: none;
        width: 50%;
        margin-top: 3px;
      }
      /* responsive portrait phone */
      @media (max-width: 474px) {
        display: block;
        height: 102px;
        max-height: none;
      }
    }
  }
}



/*

  Big grid 6

*/
.td_block_big_grid_6 {
  background-color: #e5e5e5;
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    background-color: #fff;
  }

  // general
  .td-big-grid-post {
    float: left;
  }
  .td-small-thumb {
    height: 180px;

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

  .td-big-grid-post-0 {
    width: 680px;
    height: 360px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 506px;
      height: 284px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: auto;
    }
  }

  .td-big-grid-post-1 {
    width: 341px;

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

  .td-big-grid-post-2 {
    width: 341px;

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

  .td-big-grid-post-3 {
    width: 340px;

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

  .td-big-grid-post-4 {
    width: 340px;

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

  .td-big-grid-post-5 {
    width: 341px;

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


  // empty module
  .td-module-empty {
    float: left;
    height: 180px;
    display: none !important;
  }
}


/*

  Big grid 7

*/
.td_block_big_grid_7 {
  background-color: #e5e5e5;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    background-color: #fff;
  }

  // general
  .td-grid-columns {
    float: left;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      float: none;
      width: 100%;
      display: inline;
    }
  }

  .td-medium-thumb {
    width: 340px;
    height: 360px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 252px;
      height: 284px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: 150px;
    }
  }

  .td-small-thumb {
    width: 341px;
    height: 180px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 252px;
      height: 142px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: 150px;
    }
  }

  .td-big-grid-post-0 {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 180px;
    }
  }

  .td-big-grid-post-1 {
    width: 340px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 252px;
      height: 142px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      height: 180px;
    }

    .td-module-thumb {
      /* responsive portrait phone */
      @media (max-width: @responsive_p_phone_max) {
        margin-top: 3px;
      }
    }
  }

  .td-big-grid-post-5 {
    width: 340px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      width: 252px;
      height: 142px;
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      height: 150px;
      margin-left: 3px !important;
    }
  }

  // empty module
  .td-module-empty {
    display: none !important;
  }
}