.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 30px 0 30px;
}

.gallery-item {
  flex: 1 1 calc(16.66% - 30px);
  max-width: 200px;
  height: 220px;
  object-fit: cover;
  transition: 0.3s ease-in-out;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.1);
}

/* Show Popup */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 100000;
}

.popup-content {
  max-width: 90%;
  max-height: 90%;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* Next and Previous button */

.popup-nav {
  display: flex;
  justify-content: space-between;
  width: 200px;
  margin-top: 20px;
}

.nav-btn {
  background-color: #fff;
  border: none;
  margin-top: 10px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.nav-btn:hover {
  background-color: #ccc;
}

/* Filter buttons */

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 30px 30px 30px;
}

.filter-btn {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.filter-btn:hover {
  background-color: #ccc;
}

.gallery-item {
  width: 200px;
  height: 200px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item {
  display: none;
}

.active-btn {
  background-color: #bbb;
  border-color: #888;
}

.active {
  display: block;
}

/* Media Queries */

@media (max-width: 768px) {
  .gallery-item {
    flex: 1 1 calc(33.33% - 20px);
    max-width: none;
  }

  .filter-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .gallery-item {
    flex: 1 1 calc(50% - 15px);
    max-width: none;
  }

  .filter-btn {
    flex: 1 1 100%;
    text-align: center;
  }
}
