/* Gallery - uniform grid layout */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-tile {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(10, 106, 120, 0.15);
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(10, 106, 120, 0.25);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 51, 61, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 90vh;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  opacity: 0.9;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--cream);
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
