/* Galerie Styles */

/* Abstand des Galerie-Inhalts zur oberen Kante (anpassen an die Höhe des Headers) */
main {
  padding-top: 50px !important; /* Inhalt unter fixiertem Header */
}

#galerie {
  padding-top: 5px;
  text-align: center; /* Überschrift und Inhalt zentrieren */
}

#galerie h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Abstand unter dem Einführungstext vor der ersten Galerie */
#galerie > p {
  margin-bottom: 20px;
}

/* Galerie-Container: zentriert Bilder und verteilt sie */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Zentriert die Items horizontal */
  gap: 20px;
  padding: 0 10px;
  margin-top: 20px; /* Abstand zwischen der ersten und zweiten Galerie */
}

/* Erste Galerie soll keinen margin-top haben */
#galerie > .gallery:first-of-type {
  margin-top: 0;
  margin-bottom: 40px;
}

/* Einzelne Galerie-Box */
.gallery-item {
  position: relative;
  flex: 1 1 300px; /* Flexibles Basismaß */
  max-width: 350px;
  height: 220px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #faf4e4; /* Optional, harmoniert mit deinem Style */
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Bild passt sich Box an, zoomt leicht beim Hover */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Overlay beim Hover */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 10px;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}


main {
  padding-top: 160px;
}

#galerie {
  padding-top: 5px;
  text-align: center;
}

#galerie h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

#galerie > p {
  margin-bottom: 20px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 10px;
  margin-top: 20px;
}

#galerie > .gallery:first-of-type {
  margin-top: 0;
  margin-bottom: 40px;
}

.gallery-item {
  position: relative;
  flex: 1 1 300px;
  max-width: 350px;
  height: 220px;
  overflow: hidden;
  border-radius: 6px;
  background-color: #faf4e4;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 10px;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}


@media (max-width: 768px) {
  .gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery-item {
    flex: none;
    height: auto;
  }
}
