.filter-btns {
  margin-bottom: 2rem;
}

.filter-btns .btn {
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.filter-btns .btn.active {
  background-color: #212529;
  color: white;
  border-color: #212529;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  opacity: 1;
  transform: scale(1);
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

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

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.category-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(33, 37, 41, 0.9);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.no-images {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.image-modal.show {
  display: flex;
  opacity: 1;
}

.modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.3);
  border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255,255,255,0.5);
}

.modal-content {
  max-width: 95%;
  max-height: none;
  margin: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  cursor: grab;
}

.modal-content:active {
  cursor: grabbing;
}

.close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  user-select: none;
}

.close:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}

.zoom-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.zoom-indicator.show {
  opacity: 1;
}

.modal-open {
  overflow: hidden;
  height: 100vh;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .gallery-item img {
    height: 150px;
  }
  
  .filter-btns .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .gallery-overlay {
    padding: 0.5rem;
  }

  .gallery-overlay h5 {
    font-size: 1rem;
  }

  .close {
    top: 15px;
    right: 15px;
    font-size: 30px;
    width: 45px;
    height: 45px;
  }

  .modal-container {
    padding: 10px;
  }

  .modal-content {
    max-width: 98%;
  }
}