/* Formular-Links */

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

.gallery a {
  height: min-content;
}

.img-caption {
  text-align: left;
  margin-left: 1em;
  overflow-y: auto;
  height: 12em;
}

.gallery figure {
  display: flex;
}

.gallery img {
  width: 180px;
  object-fit: contain;
  height: 180px;
  min-width: 180px;
}

a.no-picture {
  display: flex;
}

a.no-picture h4 {
  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(1, 1fr);
  }

  .gallery img {
    height: 120px;
    width: 120px;
  }
}

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

  .gallery img {
    height: 100px;
    width: 100px;
  }

  /* changes the grid layout to a single column */
  div.gallery {
    grid-template-columns: 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;
  }

}
