/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #ff9a9e, #fad0c4);
  color: #333;
  text-align: center;
  padding: 20px;
}

/* Header */
header h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: white;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Keeps images square and uniform */
  object-fit: cover; /* Makes images fill the box without distortion */
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 4px solid white;
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Lightbox */
.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: 999;
  padding: 20px;
}

.lightbox img {
  max-width: 95%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.lightbox .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* 🔥 Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  .gallery img {
    aspect-ratio: 1 / 1;
    border: 3px solid white;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
  }

  .lightbox img {
    max-width: 90%;
    max-height: 75%;
  }
}
