* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0px;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
  color: #222;
}

h1 {
  text-align: center;
  margin: 0 0 32px;
}

/* Each gallery with its heading */
.gallery-set {
  max-width: 1000px;
  margin: 0 auto 48px;
	padding-left: 10px;
	padding-right: 10px;
}

.gallery-set h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  padding-top: 60px;
  border-bottom: 2px solid #ccc;
  text-align: center;
}

/* 4 columns x 4 rows */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Enlarged (lightbox) view */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Arrow and close buttons */
.lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lb-btn:hover,
.lb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.35);
}

/* Desktop: arrows at the sides, close top right */
.lb-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-close {
  top: 16px;
  right: 20px;
  font-size: 34px;
}

/* Mobile: 2 columns, and arrows move to the top beside the close button */
@media (max-width: 600px) {
  body {
    padding: 16px;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox {
    align-items: center;
    padding-top: 40px;
  }

  .lightbox img {
    max-height: 78vh;
  }

  .lb-prev,
  .lb-next {
    top: 12px;
    transform: none;
  }

  .lb-prev {
    left: 12px;
  }

  .lb-next {
    left: 68px;
    right: auto;
  }

  .lb-close {
    top: 12px;
    right: 12px;
  }
}
