body {
    background: #141414 !important;
    background-size: 100%;
    min-height: 100vh;
}

/* ===== Masonry Gallery ===== */
.gallery-masonry {
  column-count: 4;     /* number of columns on large screens */
  column-gap: 1rem;    /* horizontal spacing between columns */
}

@media (max-width: 1200px) {
  .gallery-masonry { column-count: 3; }
}
@media (max-width: 800px) {
  .gallery-masonry { column-count: 2; }
}
@media (max-width: 300px) {
  .gallery-masonry { column-count: 1; }
}

.gallery-masonry .gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem; /* bottom spacing between images */
  padding: 0;
}

.gallery-masonry img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}


/* Sleek hover zoom */
.gallery-masonry img:hover {
  transform: scale(1.05);
}

/* ===== Lightbox / Modal Overrides ===== */
#imageModal .modal-dialog {
  max-width: 96vw;
  margin: 1rem auto auto auto; /* Abstand oben */
}

#imageModal .modal-content {
  background: #141414;
  border: none;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

#imageModal .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 1rem 0 !important; /* unten 1rem Abstand */
  min-height: calc(100vh - 5rem);
  overflow: hidden;
}

#imageModal img {
  max-width: 95vw !important;
  max-height: 90vh !important;
  width: auto;
  height: auto;
  object-fit: contain !important;
  display: block;
  margin: auto;
}

#imageModal .img-fluid {
  width: auto !important;
  height: auto !important;
}

@media (orientation: portrait) {
  #imageModal img {
    max-height: 90vh !important;
  }
}

#imageModal .btn-close {
  filter: invert(1);
  opacity: 0.8;
  transition: opacity 0.2s;
}
#imageModal .btn-close:hover {
  opacity: 1;
}
