/* mansory grid */
.mansory {
  transition: all .5s ease-in-out;
  column-gap: 10px;
  column-fill: initial;
}

/* mansory item */
.mansory .brick {
  position: relative;
    overflow: hidden;
  margin-bottom: 30px;
  display: inline-block; /* Fix the misalignment of items */
  vertical-align: top; /* Keep the item on the very top */
}

/* mansory image effects */
.mansory .brick img {
  width: 100%;
  transition: all .5s ease-in-out;
  backface-visibility: hidden; /* Remove Image flickering on hover */
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
  -webkit-transition: all .5s ease;
  transition: all .5s ease;
  -webkit-backface-visibility: hidden;
}

.mansory .brick:hover img {
  -webkit-transform: scale(1);
    transform: scale(1);
}

/* Bordered mansory */
.mansory.bordered {
  column-rule: 1px solid #eee;
  column-gap: 50px;
}

.mansory.bordered .brick {
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
}

/* Gutterless mansory */
.mansory.gutterless {
  column-gap: 0;
}

.mansory.gutterless .brick {
  margin-bottom: 0;
}

/* mansory on tablets */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .mansory {
    column-count: 2;
    -webkit-column-count:2;
  -moz-column-count:2;
  }
}

/* mansory on big screens */
@media only screen and (min-width: 1024px) {
  .mansory {
    column-count: 3;
    -webkit-column-count:3;
 -moz-column-count:3;
  }
}