
.prev,
.next {
  position: fixed;
  top: 0;
  width: 15%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 999;
  color: rgba(255,255,255,.5);
  font-size: 8rem;
  font-family: monospace;
  transition: all .2s;
}

.prev:hover,
.next:hover {
  color: rgba(255,255,255,.8);
}

.prev {left: -25%;}
.next {right: -25%;}

.active .prev {left: 0;}
.active .next {right: 0;}

.gallery .container {
  margin: 10vh auto;
  max-width: 80%;
  display: grid;
  grid-gap: 5px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
}

.gallery div {
  text-align: center;
  padding: 1rem 0;
  color: white;
  font-size: 3rem;
  text-transform: uppercase;
  background: rgba(0,0,0,.2);
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.gallery div img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: all .5s;
}

.gallery div.show::before {
  content: '';
  display: block;
  position: fixed;
  z-index: 555;
  width: 100vw;
  height: 100vh;
  top: 0; left: 0;
  background: rgba(0,0,0,.6);
}

.gallery div.show img {
  position: fixed;
  top: 0; left: 0;
  margin: 30px;
  align-self: center;
  object-fit: contain;
  z-index: 666;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  filter: drop-shadow(0 3px 15px black);
  cursor: url(close-button.png), grab; /* custom cursor to signal close on click */
}

.gallery div:not(.show):hover img {
  cursor: pointer;
  transform: scale(1.3);
}


.horizontal {
  grid-column: span 2;
}

.vertical {
  grid-row: span 2;
}

.big {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery .active div:not(.show) img {
  filter: blur(3px);
}