.gallery-section {
  display: flex;
  justify-content: center;
}

#lightgallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

#lightgallery img {
  height: 240px;
  width: 240px;
  object-fit: cover;
  margin-top: 1rem;
  transition: 0.5s ease-in-out;
}
#lightgallery > a {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.image {
  opacity: 1;
  display: block;
  width: 100%;
  height: auto;
  transition: 0.5s ease-in-out;
  backface-visibility: hidden;
}

.middle {
  transition: 0.5s ease-in-out;
  opacity: 0;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
}

#lightgallery > a:hover img {
  opacity: 0.3;
}

#lightgallery > a:hover .middle {
  opacity: 1;
}

/* Responsive layout - makes a three column-layout instead of four columns */
@media only screen and (max-width: 1100px) {
  #lightgallery {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Responsive layout - makes a two column-layout instead of four columns */

@media screen and (max-width: 800px) {
  #lightgallery {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */

@media screen and (max-width: 600px) {
  #lightgallery {
    grid-template-columns: 1fr;
  }
}
