tiles.scss 4.44 KB


.tiles{
  display: grid;
  grid-template-columns: 33.3% 33.3% 33.3%;
  column-width: 33.3%;
  column-gap: 0px;
  grid-auto-flow: dense;
  max-width: 1300px;
  margin: auto;
  margin-top: 40px;
  transition: .5s;
  background: #333;
  @media (max-width: 1300px) {
    max-width:100vw;
  }
  @media (max-width: 800px) {
    width: 100vw;
    display: block;
    height: auto;
  }
}

.tile {
  display:  inline-grid;
  margin: 0px;
  cursor: pointer;
  text-align: center;
  background: #333;
  vertical-align: top;
  grid-column-end: span 1;
  grid-row-end: span 1;
  height: 275px;
  @media (max-width: 800px) {
    display: block;
  }
  .tile_image{    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 275px;
    width: 100%;
  }
  .hover_content{
    opacity: 0;
    @media (max-width: 800px) {
      opacity: 1;
    }
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    padding: 20px;
    background-color: rgba(0,0,0,0.6);
    height: 100%;
    h3{
      color: #fff;
      font-size: 20px;
      line-height: 24px;
      text-transform: uppercase;
      font-family: 'TradeGothic';
      text-align: left;
    }
    p{
      color: #fff;
      font-size: 20px;
      line-height: 24px;
      font-weight: 400;
      font-family: 'TradeGothic';
      max-width: 70%;
      text-align: left;
    }
   
  }
  .tile_content{
    display: none;
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    padding: 70px;
    @media (max-width: 1300px) {
      padding: 40px;
    }
    h3{
      color: #fff;
      font-size: 30px;
      line-height: 36px;
      text-transform: uppercase;
      font-family: 'TradeGothic';
      text-align: left;
      @media (max-width: 800px) {
        text-align: center;
        font-size: 20px;
        line-height: 24px;
        margin-bottom: 30px;
      }
    }
    p{
      color: #fff;
      font-size: 20px;
      line-height: 24px;
      font-weight: 400;
      font-family: 'TradeGothic';
      text-align: left;
      @media (max-width: 800px) {
        text-align: center;
        font-size: 16px;
        line-height: 19px;
      }
    }
    .image{
      height: 100%;
      width: 40%;
      display: inline-block;
      margin-right: 30px;
      @media (max-width: 800px) {
        width: 80%;
        height: auto;
        margin: auto;
      }
    }
    .tile_content.mobile{
      display: none;
    }
    .title-mobile{
      display: none;
      @media (max-width: 800px) {
        display: block;
      }
    }
    .text{
      display:flex;
      flex-direction: column;
      width: 55%;
      justify-content: space-between;
      flex-wrap: wrap;
      height: 90%;
      @media (max-width: 800px) {
        display:block;
        margin-top: 30px;
        height: auto;
        width: 100%;
      }
      h3{
        @media (max-width: 800px) {
          display: none;
        }
      }
      .whole-story{
        align-items: flex-end;
        display: flex;
        align-content: flex-end;
        flex-wrap: wrap;
        font-size: 24px;
        line-height: 29px;
        color: #fff;
        text-decoration: none;
        font-weight: 400;
          @media (max-width: 800px) {
            display: block;
            text-align: center;
            margin-top: 100px;
          }
        }
        .whole-story:hover{
          text-decoration: underline;
        }
    }
  }
}


.tile:hover {
  .hover_content{
    opacity: 1;
  }
}




.tile.expand {
  grid-column-end: span 2;
  grid-row-end: span 2;
  height: 550px;
  @media (max-width: 800px) {
    height: auto;
  }
  .hover_content{
    display: none;
  }
  .tile_content{
    display: flex;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    @media (max-width: 800px) {
      display: none;
    }
  }
  .tile_image{  
    height: 550px;
    @media (max-width: 800px) {
      height: 275px;
    }
  }
  .tile_content.mobile{
    display: none;
    background-color: #333;
    @media (max-width: 800px) {
      display: block;
    }
  }
}

// .tile.expand:hover {
//   .hover_content{
//     display: none;
//   }
//    .tile_content{
//     display: flex;
//     @media (max-width: 800px) {
//       display: none;
//     }
//   }
// }

.last-expand{
  .tile:nth-of-type(4){
    grid-column-end:2;
  }

  .tile:nth-of-type(5){
    grid-row-end:  4;
    grid-column-end:2;
  }
}