/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: rgba(250, 250, 250, 0.8);
}

/* === Header / Navigation === */
.hauptseite {
  position: fixed;
  left: 1px;
  top: 3px;
  z-index: 100;
  padding: 10px 8px 7px 8px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: #0c70dd;
  background-color: #000;
}

.oben {
  font-size: 110%;
  margin: 2%;
  margin-top: 5%;
  padding: 3%;
  letter-spacing: 0.03em;
  word-spacing: 0.1em;
  text-align: center;
  background-color: #eee;
}

.titel {
  font-size: 130%;
  letter-spacing: 0.1em;
}

/* === Galerie === */
.body2 {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  text-align: center;
}

ul#galerie {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Trennung Bild / Untertitel --- */
ul#galerie li {
  margin: 30px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.img-wrap {
  padding: 3px;
  background-color: #ebebeb;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  line-height: 0;
}

ul#galerie li:hover .img-wrap {
  border-color: #333;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.06);
}

.img-wrap img {
  display: block;
  border: none;
  height: 300px;
  width: auto;
  max-width: 96vw;
}

.caption {
  display: block;
  margin-top: 0;
  padding: 0px 3px 4px 3px;
  text-align: center;
  font-size: 12px;
  color: #555;
  background-color: #ebebeb;
  white-space: nowrap;
  min-width: 100%;
  max-width: 95vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pixmass {
  max-width: 900px;
}

/* === Lightbox Overlay === */
#lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

#lightbox.active {
  display: flex;
}

#lightboxImg {
  max-width: 80%;
  max-height: 96vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  /* Fade-Transition */
  opacity: 1;
  transition: opacity 0.25s ease;
}

#lightboxImg.fade-out {
  opacity: 0;
}

/* --- Info-Block: Name + EXIF unten rechts --- */
#lightboxInfo {
  position: fixed;
  bottom: 20px;
  right: 25px;
  text-align: right;
  z-index: 1010;
}

#lightboxCaption {
  color: #fff;
  opacity: 0.15;
  font-size: 22px;
  font-weight: normal;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: opacity 0.3s ease;
  user-select: none;
}

#lightboxCaption:hover {
  opacity: 0.5;
}

#lightboxExif {
  color: #fff;
  opacity: 0;
  font-size: 13px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.02em;
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}

#lightboxExif.visible {
  opacity: 0.4;
  max-height: 60px;
}

#closeBtn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 1010;
}

#closeBtn:hover {
  opacity: 1;
}

/* === Navigation Zones (volle Höhe links/rechts) === */
.nav-zone {
  position: absolute;
  top: 0;
  width: 15%;
  min-width: 60px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 1005;
}

#prevZone {
  left: 0;
  justify-content: flex-start;
  padding-left: 20px;
}

#nextZone {
  right: 0;
  justify-content: flex-end;
  padding-right: 20px;
}

.navBtn {
  font-size: 40px;
  color: #fff;
  user-select: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-zone:hover .navBtn {
  opacity: 1;
}

/* === Cursor-Idle: Pfeile und Close ausblenden === */
#lightbox .nav-zone,
#lightbox #closeBtn {
  transition: opacity 0.4s ease;
}

#lightbox.cursor-hidden .nav-zone,
#lightbox.cursor-hidden #closeBtn {
  opacity: 0;
  pointer-events: none;
}

#lightbox.cursor-hidden {
  cursor: none;
}

/* === Responsive === */
@media (max-width: 768px) {
  ul#galerie li {
    margin: 10px;
  }

  .img-wrap img {
    height: 180px;
  }

  .nav-zone {
    width: 20%;
  }

  .navBtn {
    font-size: 30px;
  }

  #closeBtn {
    top: 10px;
    right: 15px;
    font-size: 24px;
  }

  .oben {
    margin-top: 12%;
  }

  #lightboxCaption {
    font-size: 16px;
  }

  #lightboxExif {
    font-size: 11px;
  }
}
