/* Grundlayout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #9de697, #175a11);
  color: #000000;
  min-height: 100vh;
  line-height: 1.6;
  transition: 0.6s ease;
}



main h1 {
  display: block;
  text-align: center;
  width: 100%;
  margin: 2rem 0 1.5rem 0;
  color:#000000;
}



/* Dynamische Galerie */
.gallery {
  columns: 4 250px; /* Anzahl Spalten + Mindestbreite */
  column-gap: 1rem;
  padding: 2rem;
  max-width: 1300px;
  margin: auto;
}

.gallery figure {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  overflow: hidden;
  border-radius: 0.8rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.8rem;
  transition: transform 0.4s ease-in-out;
}

/* Hover-Effekt */
.gallery figure:hover img {
  transform: scale(1.07);
  filter: brightness(1.1);
}

.gallery figure:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 0.5rem;
}

/*Bild große Ansicht*/
.caption {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #9de697;
}

.close, .next, .prev {
  position: absolute;
  color: rgb(250, 250, 250);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  transition: 0.3s;
}

.close { top: 20px; right: 30px; }
.next { right: 30px; top: 50%; transform: translateY(-50%); }
.prev { left: 30px; top: 50%; transform: translateY(-50%); }

.close:hover, .next:hover, .prev:hover {
  color: #9de697;
}

/* Responsive */
@media (max-width: 1200px) {
  .gallery { columns: 3 200px; }
}

@media (max-width: 800px) {
  .gallery { columns: 2 150px; padding: 1rem; }
  .header h1 { font-size: 2rem; }
}

@media (max-width: 500px) {
  .gallery { columns: 1 100px; }
  .header h1 { font-size: 1.6rem; }
}
