* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #746c96;
  padding: 40px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: #ddd;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: #000;
  color: #fff;
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  animation: fadeIn 0.5s ease-in;
}

/* Fixed-size card */
.gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Image behavior */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Hover zoom */
.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

/* Fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

/* Arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  font-size: 40px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* Gallery hover (nice effect) */
.gallery-item img {
  cursor: pointer;
  transition: transform 0.25s ease;
}

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