#lightgallery {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%; }

#lightgallery a {
  display: block;
  height: 20vh;
  flex-grow: 1;
  border: 1px solid white; }

#lightgallery img {
  max-height: 100%;
  min-width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  vertical-align: bottom; }

@media (max-aspect-ratio: 1) {
  #lightgallery a {
    height: 30vh; } }

@media (max-height: 480px) {
  #lightgallery a {
    height: 80vh; } }

@media (max-aspect-ratio: 1) and (max-width: 480px) {
  #lightgallery {
    flex-direction: row; }
  #lightgallery a {
    height: auto;
    width: 100%; }
  #lightgallery img {
    width: 100%;
    max-height: 75vh;
    min-width: 0; } }
