/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  color: #fff;
  font-size: 2rem;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  text-align: center;
  max-width: 72ch;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.gallery-item {
  cursor: pointer;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-surface-offset-2);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,20,50,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-interactive);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
}
