/*Sponsoren*/

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: auto;
  grid-auto-flow: dense;
  gap: 2em;
  justify-content: center;
  align-items: center;
}

.gallery a {
  height: min-content;
}

.img-caption {
  text-align: center;
}

img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 350px;
}

a.no-picture {
  display: flex;
  font-family: "Press Start 2P";
}

a.no-picture figure {
  display: flex;
  align-items: center;
  justify-content: center;
}

a.four-grid-cells {
  grid-row: span 2 / auto;
  grid-column: span 2 / auto;
}

a.wide-image {
  grid-column: span 2 / auto;
}

@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 480px) {

  /* changes the grid layout to a single column */
  div.gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* resets the grid placement properties for
  the images spanning four grid cells */
  a.four-grid-cells {
    grid-row: auto;
    grid-column: auto;
  }

  /* resets the grid placement properties for
  the images spanning two grid columns  */
  a.wide-image {
    grid-column: auto;
  }

}
