body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #white;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.gallery {
  visibility: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  width: 80%;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.gallery .item {
  display: block;
  break-inside: avoid;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  background-color: #f0f0f0;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  background-color: #f0f0f0;
}

/* Lazy loading transitions */
.gallery img.lazyload,
.gallery img.lazyloading {
  opacity: 0;
}

.gallery img.lazyloaded {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: block;
  max-height: 97vh;
  max-width: 97vw;
  object-fit: contain;
  transition: transform 0.25s ease;
  border: 25px solid white !important;
}

@media (min-width: 600px) {
  .modal-content {
    border: 50px solid white !important;
  color-scheme: light;
  box-sizing: border-box;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.15s;
  cursor: pointer;
  z-index: 2;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.zoomed {
  cursor: zoom-out;
}

body.modal-open {
  overflow: hidden;
}

body.modal-closed {
  overflow: auto;
}

/* Next & previous buttons */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 25px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "prev button" to the left */
.prev {
  left: 0;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

#caption,
#date {
  display: none;
}
