.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; /* Mezera mezi fotkami*/
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s ease;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block; /* ✅ přidáno, aby se neztratily */
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  user-select: none;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  z-index: 10001;
}

.lightbox-content {
  position: relative;
  display: inline-block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}

#lightbox-prev { left: 200px; }
#lightbox-next { right: 200px; }

.lightbox-nav:hover {
  background: rgba(0,0,0,0.6);
}

/* Styl pro mobilní zařízení */
@media (max-width: 768px) {
  #lightbox-prev {
    left: 30px;
    right: auto; /* přepsat případné defaulty */
  }

  #lightbox-next {
    right: 30px;
    left: auto;  /* přepsat případné defaulty */
  }
}