/* Masonry image gallery styling */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery .images {
  gap: 15px;
  max-width: 85%;
  margin: 20px 0;
  columns: 5 310px;
  list-style: none;
}
.gallery .images .img {
  display: flex;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  border-radius: 4px;
}
.gallery .images img {
  width: 100%;
  transition: transform 0.2s ease;
}

.gallery .images .img:hover img {
  transform: scale(1.1);
}

/* Image lightbox styling */
.lightbox {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  position: fixed;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.75);
}
.lightbox.show {
  visibility: visible;
}
.lightbox .wrapper {
  position: fixed;
  left: 50%;
  top: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox.show .wrapper {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.lightbox .close-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox .close-icon:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}
.lightbox .preview-img {
  display: flex;
  justify-content: center;
}
.lightbox .preview-img .img {
  display: flex;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox .preview-img img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Responsive media query code */
@media screen and (max-width: 688px) {
  .lightbox .close-icon {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  .lightbox .preview-img .img,
  .lightbox .preview-img img {
    max-width: calc(100vw - 26px);
  }
  .gallery .images {
    max-width: 100%;
    padding: 0 13px;
    margin-top: 20px;
  }
}
