/* Masonry Gallery Layout */
.gallery-masonry {
  column-count: 4;
  column-gap: 12px;
  padding: 0 1em;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .gallery-masonry {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .gallery-masonry {
    column-count: 2;
    column-gap: 8px;
    padding: 0 0.5em;
  }
}

@media (max-width: 480px) {
  .gallery-masonry {
    column-count: 2;
    column-gap: 6px;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
  .gallery-item {
    margin-bottom: 8px;
    border-radius: 6px;
  }
}

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

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-item-location {
  font-weight: 600;
  font-size: 13px;
}

.gallery-item-year {
  opacity: 0.8;
}

/* Filter buttons */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5em;
  padding: 0 1em;
}

.filter-btn {
  padding: 8px 18px;
  border: 2px solid #0099cc;
  background: transparent;
  color: #0099cc;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(0, 153, 204, 0.1);
}

.filter-btn.active {
  background: #0099cc;
  color: #fff;
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 6px 14px;
    font-size: 13px;
  }
}

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

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  z-index: 10001;
  line-height: 1;
}

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

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 20px;
  user-select: none;
  z-index: 10001;
}

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

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-caption {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  border-radius: 6px;
  z-index: 10001;
}

@media (max-width: 768px) {
  .lightbox-nav {
    font-size: 36px;
    padding: 15px;
  }

  .lightbox-close {
    font-size: 32px;
    top: 15px;
    right: 15px;
  }

  .lightbox-caption {
    font-size: 12px;
    padding: 8px 16px;
    bottom: 15px;
    max-width: 80%;
  }
}

/* Gallery header */
.gallery-header {
  text-align: center;
  padding: 1em 1em 0.5em;
}

.gallery-header h2 {
  margin-bottom: 0.3em;
}

.gallery-header p {
  color: #666;
  margin-bottom: 1em;
}

/* Stats */
.gallery-stats {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-bottom: 1.5em;
  flex-wrap: wrap;
}

.gallery-stat {
  text-align: center;
}

.gallery-stat-number {
  font-size: 2em;
  font-weight: 700;
  color: #0099cc;
  line-height: 1.2;
}

.gallery-stat-label {
  font-size: 0.85em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
