body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Header mit Überschrift und Button */
header {
  display: flex;
  align-items: center;
  background-color: #9EF58C;
  color: #1C128C;
  padding: 10px 20px;
  position: relative
}
header h1 {
  flex: 1;
  margin: 0;
}
header a {
  position: absolute; /* Absolute Position innerhalb des Headers */
  right: 20px; /* Abstand vom rechten Rand */
  top: 50%;
  transform: translateY(-50%); /* Vertikale Zentrierung */
  background-color: transparent; /* Kein Hintergrund, damit nur der Text sichtbar ist */
  color: white; /* Textfarbe weiß */
  padding: 8px 16px; /* Platz um den Text */
  text-decoration: none; /* Kein Unterstrich */
  font-weight: bold;
  border-radius: 4px;
}
header a:hover {
  background-color: #1C128C; /* Optional: hover Effekt */
}

/* Raster-Galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  overflow-y: scroll;
  height: 80vh; /* flexible Höhe für Scrollen */
}
.gallery img {
  width: 100%;
  aspect-ratio: 1; /* quadratische Bilder */
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s;
}
.gallery img:hover {
  transform: scale(1.05);
}

/* Overlay für großes Bild */
.overlay {
  display: none; /* verborgen standardmäßig */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.overlay.active {
  display: flex;
}

/* Großes Bild im Overlay */
.large-img-container {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}
.large-img-container img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Pfeile für Navigation */
.nav-left, .nav-right {
  position: absolute;
  top: 50%;
  font-size: 2em;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 50%;
  transform: translateY(-50%);
}
.nav-left {
  left: -50px;
}
.nav-right {
  right: -50px;
}

/* Schließen-Button */
.close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2em;
  color: white;
  cursor: pointer;
}