/* Gallery page styles */

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Performance optimizations */
.gallery-container {
  max-width: 48rem;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
  will-change: opacity, transform;
}

.gallery-header {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out 0.1s forwards;
  will-change: opacity, transform;
}

.gallery-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.gallery-subtitle {
  color: rgb(148, 148, 148);
  font-size: 14px;
  font-weight: 400;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(148, 148, 148);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.back-link:hover {
  color: #111827;
  transform: translateX(-4px);
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out 0.2s forwards;
  will-change: opacity, transform;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.thumbnail:hover {
  opacity: 1;
  transform: scale(1.02);
  border-color: #e5e7eb;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.thumbnail.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  will-change: opacity, visibility;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  transform: scale(0.9);
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  will-change: transform;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-image {
  width: 100%;
  max-width: 500px;
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  will-change: transform;
  backface-visibility: hidden;
}

.modal-metadata {
  text-align: center;
}

.modal-location {
  font-size: 18px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.modal-location strong {
  color: #111827;
  font-weight: 600;
}

.modal-details {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .gallery-container {
    max-width: 100%;
  }
  
  .thumbnails-grid {
    gap: 1rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
} 