

.gallery-page {
  max-width: 1000px;
  margin: auto;
  padding: 2em;
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1em;
  margin-top: 1.5em;
  max-width: 1000px;
}


.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  border-radius: .1em;
  transition: transform 0.3s ease;
  cursor: pointer;
}

@media (min-width: 601px) {
    .gallery {
        padding-left: 2%;
        padding-right: 2%;
    }
    .gallery img:hover {
      transform: scale(1.8);
      object-fit: contain;
    }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: .5em;
  margin: auto;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Navigation arrows */
.prev, .next {
  color: #FFFBF4;
  font-size: 2.5em;
  text-decoration: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: .2em .4em;
  border-radius: .2em;
  background: rgba(0,0,0,0.4);
  transition: background 0.3s;
  z-index: 1001;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.7);
}

.prev {
  left: 2%;
}

.next {
  right: 2%;
}

/* Close area (click anywhere outside image) */
.close {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  z-index: 900;
}

/* Make sure the arrows stay clickable */
.prev, .next, img {
  pointer-events: auto;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .prev, .next {
    font-size: 2em;
  }
}
