body.endlos-galerie {
  height: 100vh;
  overflow: hidden;
  scrollbar-width: none;
}
 
body.endlos-galerie .endlos-reihe {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: start;
  gap: 2.5vw;
  width: max-content;
  max-width: none;
  flex-shrink: 0;
  margin: 0;
  padding: 7vh 0 0;
  list-style: none;
  transition: none;
  will-change: transform;
}
 
body.endlos-galerie .endlos-reihe > *,
body.endlos-galerie .endlos-reihe a {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.endlos-galerie .endlos-reihe > .project-card--touching {
  margin-left: -2.5vw;
}
 
body.endlos-galerie .endlos-reihe img {
  display: block;
  width: auto;
  height: auto;
  max-width: 36vw;
  margin: 0;
}

body.endlos-galerie .endlos-klein img { max-height: calc((100vh - var(--oben, 0px) - 7vh) * 0.6); max-width: 400px;}
body.endlos-galerie .endlos-mittel img { max-height: calc((100vh - var(--oben, 0px) - 7vh) * 0.75); }
body.endlos-galerie .endlos-gross img { max-height: calc((100vh - var(--oben, 0px) - 7vh) * 0.92); }

body.endlos-galerie .site-header {
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  align-items: center;
  padding: 1.875rem;
  font-size: 16px;
  line-height: 1;
}

body.endlos-galerie .site-header a:first-child {
  grid-column: 1;
  justify-self: start;
}

body.endlos-galerie .site-header a:nth-child(2) {
  grid-column: 12;
  justify-self: end;
}

@media (max-width: 40rem) {
  body.endlos-galerie .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0;
    row-gap: 0.5rem;
  }

  body.endlos-galerie .site-header a:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  body.endlos-galerie .site-header a:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  body.endlos-galerie .endlos-reihe {
    --gallery-top: max(7vh, 6.25rem);
    padding-top: var(--gallery-top);
  }

  body.endlos-galerie .endlos-klein img {
    max-height: calc((100vh - var(--oben, 0px) - var(--gallery-top)) * 0.6);
  }

  body.endlos-galerie .endlos-mittel img {
    max-height: calc((100vh - var(--oben, 0px) - var(--gallery-top)) * 0.75);
  }

  body.endlos-galerie .endlos-gross img {
    max-height: calc((100vh - var(--oben, 0px) - var(--gallery-top)) * 0.92);
  }
}

