/* ================================================
   LIGHTBOX — Bootstrap-modal image viewer
   Used by standort_gallery.inc.php, artikel.inc.php and the shared
   inc/lightbox.inc.php (Komfortzimmer, Eingliederungshilfe).
   ================================================ */

#standort_lightboxModal,
#artikel_lightboxModal,
#pm_lightboxModal {
  z-index: 20000 !important;
}

.modal-backdrop {
  z-index: 19990 !important;
}

#standort_lightboxModal.modal,
#artikel_lightboxModal.modal,
#pm_lightboxModal.modal {
  --bs-modal-bg: transparent;
  --bs-modal-border-color: transparent;
}

.modal-backdrop.show {
  opacity: 1;
  background-color: rgba(240, 242, 238, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pm-lightbox-content {
  background: rgba(0, 0, 0, 0.75) !important;
  border: 0;
}


.pm-lightbox-figure {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 5rem 2rem 3.5rem;
  box-sizing: border-box;
}

.pm-lightbox-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 0.25rem;
}

@media (max-width: 575.98px) {
  .pm-lightbox-figure {
    padding: 4rem 1rem 3rem;
  }

  .pm-lightbox-img {
    max-height: calc(100vh - 120px);
  }
}

.pm-lightbox-caption {
  display: block;
  margin-top: 0.75rem;
  color: #fff;
  font-size: 1.5rem;
  font-style: italic;
  text-align: center;
}

.pm-lightbox-caption:empty {
  display: none;
}

.pm-lightbox-counter {
  display: inline-flex;
  align-items: center;
  margin-top: 0.6rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-style: italic;
  pointer-events: none;
}

/* Close button — identical to mega menu .pm-mega__close */
.pm-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, background .16s ease;
}

.pm-lightbox-close::before {
  content: "×";
  font-size: 26px;
  line-height: 1;
  transform: translateY(-1px);
}

.pm-lightbox-close:hover {
  transform: scale(1.06);
  background: var(--secondary);
  border-color: var(--secondary);
}

/* Nav arrows */
.pm-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.pm-lightbox-nav:hover {
  background: rgba(255,255,255,0.32);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-50%) scale(1.06);
}

.pm-lightbox-prev {
  left: 1rem;
}

.pm-lightbox-next {
  right: 1rem;
}
