.photo-gallery {
  padding: 20px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.gallery img {
  width: 350px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
  border: 2px solid #ddd;
}

.gallery img:hover {
  transform: scale(1.1);
  border-color: #007bff;
}

/* Animation for images */
.gallery img.fade-in {
  opacity: 1;
  animation: fadeIn 1.5s ease-in-out;
}

.gallery img.slide-in {
  opacity: 1;
  animation: slideIn 1.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Lightbox Styling */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Make sure it's on top */
}

.lightbox img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  border: 4px solid white;
}

.lightbox:target {
  display: flex;
}

/* ===== Responsive Design ===== */

/* For Tablets (768px and below) */
@media (max-width: 768px) {
  .gallery img {
      width: 280px; /* Reduce image size */
      height: 250px;
  }
}

/* For Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .gallery {
      flex-direction: column; /* Stack images vertically */
      align-items: center;
  }

  .gallery img {
      width: 90%; /* Make images fit the screen */
      height: auto;
  }
}
