.gallery-container {
    padding: 10px;
    display: flex;
    margin: 30px auto 30px auto;
}

.gallery-top {
    margin-top: 100px;
}

#gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 9px;
  max-width: 1200px;
}

#gallery > div {
  overflow: hidden;
  position: relative;
}

#gallery > div:nth-child(5n+1) {
  grid-column: span 1;
  grid-row: span 2;
}

#gallery > div:nth-child(3n+1) {
  grid-column: span 1;
  grid-row: span 2;
}

#gallery > div > a {
  opacity: 0;
  position: absolute;
  color: #000;
  background-color: #000;
  font: bold 4em 'Rubik', sans-serif;
  text-shadow: 0 -1px 5px #000, -1px 0px 5px #000, 0 1px 5px #000, 1px 0px 5px #000;
  padding: 2rem;
  mix-blend-mode: difference;
  width: 100%;
  height: 100%;
  transition: all ease 1s;
}

#gallery > div > img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform ease-in-out 300ms;
  -webkit-transition: transform ease-in-out 300ms;
  -moz-transition: transform ease-in-out 300ms;
  -ms-transition: transform ease-in-out 300ms;
  -o-transition: transform ease-in-out 300ms;
}

    #gallery > div:hover img {
        filter: grayscale(0.7);
        -webkit-filter: grayscale(0.7);
        transform: scale(1.05);
        -webkit-transform: scale(1.05);
        -moz-transform: scale(1.05);
        -ms-transform: scale(1.05);
        -o-transform: scale(1.05);
    }

#gallery > div:hover a {
  opacity: 1;
}

#gallery p {
  color: #000;
  text-align: left;
  font-size: 0.8em;
  max-width: 300px;
}

#gallery p span {
  display: block;
  padding-bottom: 5px;
  text-align: left;
  font-weight: 700;
  font-size: 1.2em;
}

#gallery div {
  display: flex;
  justify-content: start;
  align-items: center;
  text-decoration: none;
}

#gallery a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

[id^="lightbox-"] {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  opacity: 0;
  transition: opacity 450ms ease-in-out;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  -webkit-transition: opacity 450ms ease-in-out;
  -moz-transition: opacity 450ms ease-in-out;
  -ms-transition: opacity 450ms ease-in-out;
  -o-transition: opacity 450ms ease-in-out;
}

[id^="lightbox-"]:target {
  opacity: 1;
  pointer-events: inherit;
}

[id^="lightbox-"]:target img {
  filter: blur(0);
}

[id^="lightbox-"] .content {
  max-width: 90%;
  position: relative;
  color: #fff;
}

[id^="lightbox-"] .content:hover > a.close {
  opacity: 1;
  transform: scale(1, 1);
}

[id^="lightbox-"] .content:hover > .title {
  opacity: 1;
  transform: translateY(-3px);
}

[id^="lightbox-"] .content:hover > .title::after {
  opacity: 1;
}

[id^="lightbox-"] .content > * {
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  -ms-transition: all 300ms ease-in-out;
  -o-transition: all 300ms ease-in-out;
}

[id^="lightbox-"] .title {
  display: block;
  margin: 0;
  padding: 1em;
  position: absolute;
  bottom: 0;
  width: 100%;
  transform: translateY(50%);
  font-size: 1.5em;
  opacity: 0;
}

[id^="lightbox-"] .title::after {
  content: ' ';
  background-color: rgba(0, 0, 0, 0.8);
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  position: absolute;
  transition: all 350ms ease-in-out 250ms;
  opacity: 0;
  transform-origin: bottom;
  mix-blend-mode: soft-light;
}

[id^="lightbox-"] img {
  max-height: 90vh;
  max-width: 100%;
  margin: 0;
  padding: 0;
  filter: blur(50px);
}

[id^="lightbox-"] a.close {
  width: 2em;
  height: 2em;
  position: absolute;
  right: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0, 0);
  opacity: 0;
  transform-origin: right top;
  text-decoration: none;
  color: #fff;
}

[id^="lightbox-"] a.close::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background-image: url("../images/icons/close.svg");
  display: block;
  background-position: center;
  background-size: cover;
}

/* Phones, 576px and up */
@media (min-width: 576px) {
  #gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktops, 992px and up */
@media (min-width: 992px) {
  #gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
