.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.gallery-filter-btn {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--btn-border-color, #dee2e6);
  background: transparent;
  color: var(--text-color, #333);
  cursor: pointer;
  transition: all 0.2s;
}
.gallery-filter-btn.active,
.gallery-filter-btn:hover {
  background: var(--sidebar-active-color, #6c5ce7);
  color: #fff;
  border-color: transparent;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--card-bg, #f8f9fa);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item .gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-overlay .gallery-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.gallery-overlay .gallery-meta {
  font-size: 0.75rem;
  opacity: 0.85;
}
.gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted-color, #868e96);
}
/* Lightbox */
.gallery-lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gallery-lightbox.show { display: flex; }
.gallery-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.25rem;
}
.gallery-lightbox .lb-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
}
.gallery-lightbox .lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
