/* Kontener lightboxa */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  touch-action: none; /* blokada scrolla mobilnego */
  animation: fadeIn 0.25s ease-out;
}

/* Ukrywanie gdy nieaktywne */
.lightbox[style*="display: none"] {
  display: none !important;
}

/* Obrazek w lightboxie */
.lightbox-content {
  display: block;
  margin: 0 auto;
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(0,0,0,0.7);
  object-fit: contain;
  cursor: zoom-out; /* klik = zamknij */
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.show .lightbox-content {
  transform: scale(1);
  opacity: 1;
}

/* X do zamknięcia */
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  line-height: 1;
}

.lightbox .close:hover {
  color: #bbb;
}

/* Strzałki */
.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  transition: 0.3s;
}

.lightbox .prev:hover,
.lightbox .next:hover {
  color: #bbb;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

/* Mobile fix */
@media (max-width: 768px) {
  .lightbox .prev,
  .lightbox .next {
    font-size: 2.2rem;
  }
  .lightbox .close {
    font-size: 2.2rem;
    right: 15px;
  }
}

/* Animacje */
@keyframes fadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.9); }
}

.lightbox .close, .lightbox .prev, .lightbox .next {
	text-decoration: none; 
}