.gallery a img {
  -webkit-transition: -webkit-transform .15s ease;
  -moz-transition: -moz-transform .15s ease;
  -o-transition: -o-transform .15s ease;
  -ms-transition: -ms-transform .15s ease;
  transition: transform .15s ease;
}

.gallery a:hover img {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  -o-transform: scale(1.05);
  -ms-transform: scale(1.05);
  transform: scale(1.05);
  z-index: 5;
}

/*#grid[data-columns]::before {
  content: '3 .column.size-1of3';
}

.column { float: left; }
.size-1of3 { width: 33.333%; }*/
@media screen and (max-width: 480px){
  #grid[data-columns]::before {
    content: '1 .column.size-1of1';
  }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
  #grid[data-columns]::before {
    content: '2 .column.size-1of2';
  }
}
@media screen and (min-width: 769px) {
  #grid[data-columns]::before {
    content: '3 .column.size-1of3';
  }
}

/* Again, you’re free to use and define the classes: */
.column { float: left; }
.size-1of1 { width: 100%; }
.size-1of2 { width: 50%; }
.size-1of3 { width: 33.333%; }