/* ============================================================
   GALLERY.CSS
   ============================================================ */

#galerija {
  background: var(--white);
}

/* Masonry Grid */
.gallery-grid {
  columns: 3;
  column-gap: clamp(14px, 2vw, 22px);
  margin-bottom: 36px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: clamp(14px, 2vw, 22px);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  display: inline-block;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,29,53,0.0);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  transition: background 0.35s ease;
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(11,29,53,0.52);
}

.gallery-caption {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Placeholder cards */
.gallery-placeholder {
  break-inside: avoid;
  margin-bottom: clamp(14px, 2vw, 22px);
  border-radius: var(--radius-md);
  border: 2px dashed rgba(11,29,53,0.15);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--off-white);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.gallery-placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.35;
}

/* Location Banner */
.gallery-location {
  background: var(--blue-pale);
  border-radius: 20px;
  padding: 30px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.gallery-location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--navy);
  font-weight: 400;
  line-height: 1.4;
}

.gallery-location-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11,29,53,0.94);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--navy);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(11,29,53,0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev svg,
.lightbox-next svg {
  stroke: var(--gold);
  width: 22px;
  height: 22px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--navy);
  transform: translateY(-50%) scale(1.08);
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 2;
  }

  .gallery-location {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
  }

  .gallery-location-item {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 1;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .gallery-placeholder {
    aspect-ratio: 3/2;
  }
}
