.ftco-gallery  .gallery{
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: center;
}

.ftco-gallery .image{
  flex: 25%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid #f4f6f1;
}

.ftco-gallery .image img{
  width: 100%;
  height: 300px;
  transition: 0.4s;
  border: 5px solid #ffffff;
}

.ftco-gallery .image:hover img{
  transform: scale(1.4) rotate(15deg);
} 

@media screen and (max-width:1099px) {
  .ftco-gallery .image{
    flex: 33.33%;
  }
}

@media screen and (max-width:991px) {
  .ftco-gallery .image{
    flex: 50%;
  }
}

@media screen and (max-width:599px) {
  .ftco-gallery .image{
    flex: 100%;
  }
}