* {
  box-sizing: border-box;
  font-family: "Suisse";
}

.gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 25px;
  width: 100%;
}

.gallery--home-page {
  margin: 50px 0 0 0;
}

.gallery img {
  width: 100%;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gallery img:hover { transform: scale(1.03); }

/* Scroll sperren wenn Lightbox offen */
body.lightbox-open {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(100px) saturate(50%);
  -webkit-backdrop-filter: blur(25px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.lightbox.show {
  opacity: 1;
}

.lightbox-img {
  width: 90%;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s cubic-bezier(0.19, 1, 0.22, 1), transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  position: absolute;
  opacity: 0;
  margin: 100px 0;
}

.lightbox.show .lightbox-img.active {
  transform: scale(1) translateX(0);
  opacity: 1;
}

.lightbox.show .lightbox-img { transform: scale(1); }

.lightbox .close {
  position: absolute;
  top: 20px; right: 35px;
  color: black;
  font-size: 40px;
  cursor: pointer;
}

.lightbox .prev,
.lightbox .next {
  position: absolute;
  bottom: 0;
  color: black;
  font-size: 25px;
  padding: 25px;
  cursor: pointer;
  user-select: none;
  z-index: 99999;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .lightbox .prev,
  .lightbox .next {
    bottom: 50%;
  }

  .lightbox-img {
    width: auto;
    max-height: 80%;
  }
}

@media (min-width: 2000px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery img {
    aspect-ratio: 5 / 4;
  }
  .lightbox-img {
    max-width: 100%;
  }
}