.flip-boxes {
  justify-content: center;
  text-align: center;
  margin-top: 30px;
}

.flip-box {
  display: flex;
  align-content: stretch;
  min-height: 300px;
  flex-wrap: wrap;
  position: relative;
  border: 10px solid transparent;
  padding:0;
  border-top: 0;  
  -webkit-perspective: 1000;
          perspective: 1000;
          text-align: center;
  
  &:hover {
    .back {
      transform: rotateY(0deg);
      z-index: 10;
      text-align: center;
    }
    
    .front {
      transform: rotateY(180deg);
      z-index: -1;
      text-align: center;
    }
    
  }
  
  
  .back, .front {
    position: relative;
    background-color: #fff;
    color: white;
    display: flex;
    justify-content: center;
    align-content: center;
    flex: 0 0 100%;
    -webkit-transition: all 1s cubic-bezier(.5,1,.5,1);
    transition: all 1s cubic-bezier(.5,1.3,.5,1.3);
    transform-style: preserve-3d;
    background-size: cover;
    background-position: center;
    text-align: center;
  }
  
  .back {
    background-color: #cecece;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
    transform: rotateY(-180deg);
    font-size: 24px;
    text-align: center;
    
    &:after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 30px;
      height: 30px;
      border: 15px solid transparent;
      border-bottom-color: white;
      border-left-color: white
      text-align: center;    }
  }
  
  .front {
    z-index: 10;
    text-align: center;
    
    .content {
      font-size: 1.7rem;
      text-align: center;
    }
    
    &:after {
      content: "";
      position: absolute;
      bottom: 0;
      right: 0;
      width: 30px;
      height: 30px;
      border: 15px solid #cecece;
      border-bottom-color: white;
      border-right-color: white;
      text-align: center;
    }
  }
  
  .content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    -webkit-transform: translateZ(50px);
            transform: translateZ(50px);
    text-shadow: 0px 0px 22px #000;
    padding-left: 5%;
    padding-right: 5%;
    text-align: center;
  }
}
@media only screen and (max-width: 767px){
  .flip-boxes {
  justify-content: center;
  text-align: center;
 margin-top: 20px;
        }
   .flip-box{
    display: flex;
  align-content: stretch;
  min-height: 150px;
  flex-wrap: wrap;
  position: relative;
  border: 3px solid transparent;
  padding:0;
  border-top: 0; 
  text-align: left;
  margin-top: 40px;
   }     
  }