.photogallery {
  display: flex;
  flex-wrap: wrap;
  margin: 0.2em;
  padding: 0;
  list-style-type: none;
}

.photogallery::after {
  content: "";
  display: block;
  flex-grow: 10;
}

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
  .photogallery {
    flex-direction: row;
  }
}

.photogallery li {
  flex-grow: 1;
  height: 40vh;
  margin: 0.2em;
}

@media (max-aspect-ratio: 1/1) {
  .photogallery li {
    height: 30vh;
  }
}

@media (max-height: 480px) {
  .photogallery li {
    height: 80vh;
  }
}

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
  .photogallery li {
    height: auto;
    width: 100%;
  }
}

.photogallery li img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  font-family: "object-fit: cover;";
}

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
  .photogallery li img {
    width: 100%;
    max-height: 75vh;
    min-width: 0;
  }
}

.photogallery li img.lazyload {
  opacity: 0;
}

.photogallery li img.lazyload.loaded {
  opacity: 1;
}
