/* Gallery grid */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.gallery-filter-button{
  width: 8rem;
  @media (max-width: 900px) {
    width: 5rem;
    font-size: small;  
  }
}

.gallery-filter-button.active {
  background-color: var(--accent);
  color: var(--background);
}

.gallery-section {
  margin-bottom: 2.5rem;
}

.gallery-category-title {
  margin-bottom: 0.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }
}

.gallery-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  display: block;
  background-color: #111;
  position: relative;
  border-radius: 6px;
  border: 2px solid black;
  box-shadow: 5px 3px 3px black;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}

/* Lightbox */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 3rem;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .gallery-lightbox__inner {
    padding: 0 2.5rem;
  }
}

.gallery-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.gallery-lightbox__caption {
  color: #eee;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
  padding: 0 1rem;
}

.gallery-lightbox__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.5rem;
}

.gallery-lightbox__event {
  font-size: 0.85rem;
  text-align: center;
  color: #eee;
}

.gallery-lightbox__event a {
  color: var(--accent);
  text-decoration: none;
}

.gallery-lightbox__event a:hover {
  text-decoration: underline;
}

.gallery-lightbox__photographer {
  color: #aaa;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  text-align: center;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  z-index: 1001;
}

.gallery-lightbox__close:hover {
  color: var(--accent);
}

.gallery-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  user-select: none;
  z-index: 1001;
  transition: color 0.15s;
}

.gallery-lightbox__arrow:hover {
  color: var(--accent);
}

.gallery-lightbox__prev {
  left: 0;
}

.gallery-lightbox__next {
  right: 0;
}
