* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #f0faff;
  color: #333;
}

.gallery-container {
  padding: 50px 20px;
  text-align: center;
}

.gallery-container h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #ff6f61;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  animation: fadeIn 1s ease;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 15px;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::after {
  content: attr(data-title);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1rem;
  opacity: 0;
  transition: 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-img {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 10px;
}

.caption {
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.nav span {
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  margin: 0 40px;
  user-select: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
