/* Lightbox-Stile */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.629);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999999; /* Extra hoher z-index um über alles zu liegen */
  opacity: 0;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.lightbox.active {
  opacity: 1;
}

.lightbox-content {
    margin-bottom:2%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80%;
  height: 80%;
  max-width: 1200px;
  z-index: 10000000; /* Noch höherer z-index */
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0);
  color: white;
   font-size: larger;
  font-family:  "M PLUS 1p", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  z-index: 10000001;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}


.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0);
  color: white;
  border: none;
   font-size:larger;
  font-family:  "M PLUS 1p", sans-serif;
  font-weight: 800;
  cursor: pointer;
  z-index: 10000001;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  padding: 0;
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}



.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: "M PLUS 1p", sans-serif;
  font-size: larger;
   font-weight: 800;
  padding: 5px 15px;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 20px;
  z-index: 10000001;
}

/* Maus-Cursor für klickbare Bilder im Grid */
.image-grid img {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-grid img:hover {
  transform: scale(1.02);
}

/* Responsive Anpassungen */
@media screen and (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    height: 90%;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  
  .lightbox-nav.prev {
    left: 10px;
  }
  
  .lightbox-nav.next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  .lightbox-counter {
    font-size: 14px;
    padding: 3px 10px;
  }
}

/* Verhindern, dass andere Elemente die Lightbox überlagern */
body.has-lightbox .name-banner,
body.has-lightbox .project-list,
body.has-lightbox .container {
  z-index: 1 !important;
}