/* Gallery Page Styles */
main.gallery {
  padding-block: var(--s-3) var(--s-5);
}
/* Filter Buttons */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid rgba(205, 187, 166, 0.3);
}
.filter-btn {
  background: transparent;
  color: var(--color-text);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-duration) var(--transition-ease);
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
@media screen and (max-width: 768px) {
  .gallery-filters {
    gap: var(--s-0);
  }
  .filter-btn {
    font-size: 0.8em;
    padding: var(--s-0) var(--s-1);
  }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}
@media screen and (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media screen and (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.gallery-item {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: all 0.6s ease;
  /* border-radius: var(--radius); */
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
}
.gallery-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.gallery-item.hide {
  opacity: 0;
  transform: translateY(-30px) scale(0.8);
  pointer-events: none;
}
.image-container {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-duration) var(--transition-ease);
}
.gallery-item:hover .image-container img {
  transform: scale(1.05);
}
.gallery-item:hover .image-overlay {
  opacity: 1;
}
.gallery-item:hover .image-info {
  transform: translateY(0);
}
.gallery-item p {
  text-align: center;
  margin-block: .6em;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-duration) var(--transition-ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content {
  position: relative;
  text-align: center;
}
.lightbox-image {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  /* border-radius: var(--radius); */
}
.lightbox-info {
  color: white;
  padding: var(--s-2);
  max-width: 500px;
  margin: 0 auto;
}
.lightbox-title {
  font-family: var(--serif);
  font-size: 1.5em;
  margin-bottom: var(--s-1);
}
.lightbox-description {
  opacity: 0.8;
  margin: 0;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2em;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-duration) var(--transition-ease);
  backdrop-filter: blur(10px);
  width: 50px;
  height: 50px;
  padding-block: 5px;
  text-align: center;
}
.lightbox-close {
  top: -50px;
  right: -50px;
}
.lightbox-prev {
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-close:hover {
  transform: scale(1.1);
}
@media screen and (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 20px;
    transform: none;
    position: fixed;
  }
  .lightbox-next {
    left: auto;
    right: 10px;
  }
  .lightbox-close {
    top: -70px;
    right: 0;
  }
}