
/* Gallery Container & Filter Controls */
.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  /*background-color: #f1f3f5;*/
  background-color: #f1f3f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.25s ease-in-out;
}

.filter-btn:hover {
  background-color: #e2e8f0;
}

.filter-btn.active {
  /*background-color: #0066cc;*/
  background-color: #8364E8;
  color: #fff;
  /*border-color: #0066cc;*/
  border-color: #8364E8;
}

/* CSS Grid Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
  margin: 10px auto;
  max-height: calc(100vh - 90px);
  overflow: auto;
}

/* Gallery Card Styling */
.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  padding: 12px;
  font-size: 0.95rem;
  color: #444;
  text-align: center;
}

/* Hidden state for filtering */
.gallery-item.hide {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 3;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 85%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: #fff;
  margin-top: 12px;
  font-size: 1.1rem;
  text-align: center;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  transition: background 0.2s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: 20px;
  z-index: 4;
}

.lightbox-next {
  right: 20px;
}

.lightbox-close {
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
  background: transparent;
}

.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 25px;
  color: #ccc;
  font-size: 1rem;
}