* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 8px 16px;
  margin: 0 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #4caf50;
  color: white;
  border-color: #4caf50;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

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

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

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease;
  transform: translateY(100%);
}

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

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.caption {
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 18px;
}

.close-btn,
.prev-btn,
.next-btn {
  color: white;
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  transition: all 0.3s ease;
}

.close-btn {
  top: 20px;
  right: 30px;
}

.prev-btn {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.next-btn {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.close-btn:hover,
.prev-btn:hover,
.next-btn:hover {
  color: #4caf50;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .lightbox-content {
    max-width: 95%;
  }

  .prev-btn,
  .next-btn {
    font-size: 24px;
  }
}

@media screen and (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .filter-btn {
    padding: 6px 12px;
    margin: 0 3px 8px;
    font-size: 14px;
  }

  h1 {
    font-size: 24px;
  }
}
