
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 1;
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.lightbox .prev, .lightbox .next {
  position: absolute;
  top: 50%;
  font-size: 50px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  transform: translateY(-50%);
}

.lightbox .prev {
  left: 30px;
}

.lightbox .next {
  right: 30px;
}

/* Slide animation */
.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}

.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
  animation: slideInLeft 0.4s forwards;
}

.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
  animation: slideInRight 0.4s forwards;
}

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}