/* Gallery page styles */

.page-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.page-header h1 {
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  color: var(--dark-gray);
  font-size: 1.1rem;
}

/* Filters */
.gallery-filters {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.filter-group select {
  margin-bottom: 0;
}

.reset-filters {
  align-self: flex-end;
  background-color: var(--dark-gray);
}

.reset-filters:hover {
  background-color: #6c7a89;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--light-gray);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.gallery-item-info {
  padding: var(--spacing-md);
  background-color: var(--white);
}

.gallery-item-location {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.gallery-item-date {
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* Empty state */
.gallery-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--dark-gray);
}

.gallery-empty h2 {
  color: var(--dark-gray);
  margin-bottom: var(--spacing-md);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-info {
  background-color: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-md);
  margin-top: var(--spacing-md);
  border-radius: 4px;
  text-align: center;
  min-width: 300px;
}

.lightbox-location {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.lightbox-date {
  color: var(--dark-gray);
  margin-bottom: var(--spacing-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.lightbox-nav:hover {
  background-color: var(--white);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Loading state */
.loading {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--dark-gray);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
  }

  .gallery-item img {
    height: 200px;
  }

  .lightbox-content {
    max-width: 95%;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

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

  .gallery-filters {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }
}
