/* Gallery container */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
  margin: 2rem 0;
}

/* Gallery items */
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

/* Hover states */
.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover img {
  opacity: 0.9;
}

/* Focus states for keyboard navigation */
.gallery-item:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
  transform: scale(1.05);
}

/* Responsive grid */
@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item img {
    transition: none;
  }

  .gallery-item:hover {
    transform: none;
  }
}

/* GLightbox customizations */
.gslide-description {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1rem;
  border-radius: 4px;
}

/* Ensure GLightbox controls are keyboard accessible */
.gclose,
.gnext,
.gprev {
  outline-offset: 2px;
}

.gclose:focus-visible,
.gnext:focus-visible,
.gprev:focus-visible {
  outline: 3px solid #0066cc;
}
