body {
  font-family: sans-serif;
  background-color: #f0f0f0;
  color: #333;
  margin: 0;
  padding: 1em;
}

h1 {
  text-align: center;
  color: #111;
}

p {
  text-align: center;
}

#gallery-container {
  /* Masonry layout with CSS Columns */
  column-width: 280px;
  column-gap: 15px;
  padding: 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  width: 100%;
  margin-bottom: 15px; /* Vertical gap between items */
  display: inline-block; /* Important for column layout */
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
  overflow: hidden; /* Keep the border-radius on the image */
}

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

.gallery-item img {
  width: 100%;
  height: auto; /* Let the image define its own height */
  display: block; /* Remove bottom space */
  cursor: pointer;
}

/* Lightbox Styles */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

#lightbox-overlay.hidden {
  display: none;
}

#lightbox-image {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

#close-btn {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

#close-btn:hover {
  color: #ccc;
}

.back-link {
  display: block;
  max-width: 1200px;
  margin: 0 auto 1em;
  padding: 0 15px;
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}
