/* Masonry Photo Grid – Perfect 3-column layout */
.mpg-grid {
  max-width: 1300px;
  margin: 0 auto;
}

.mpg-sizer {
  width: 32.333%;
}

.mpg-item {
  width: 32.333%;
  margin-bottom: 16px;
  cursor: pointer;
}

.mpg-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0px;
  object-fit: cover;
}

.mpg-desc {
  text-align: center;
  margin-top: 6px;
  font-size: 13px;
  color: #555;
}

/* Responsive */
@media (max-width: 900px) {
  .mpg-sizer,
  .mpg-item {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .mpg-sizer,
  .mpg-item {
    width: 100%;
  }
}

/* Force bottom alignment fix for Masonry */
.mpg-grid:after {
  content: "";
  display: block;
  clear: both;
}

.mpg-item {
  float: left;
}

/* Lightbox */
.mpg-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  text-align: center;
}

.mpg-lightbox img {
  max-width: 90%;
  max-height: 80vh;
  margin-top: 5%;
  border-radius: 0px;
}

.mpg-lightbox .mpg-caption {
  color: #fff;
  margin-top: 10px;
  font-size: 14px;
}

/* Arrows */
.mpg-prev,
.mpg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  padding: 6px 10px;
}

.mpg-prev { left: 25px; }
.mpg-next { right: 25px; }

/* Close Button (fixed top-right) */
.mpg-close {
  position: absolute;
  top: 25px;
  right: 30px;
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  padding: 6px 12px;
  transform: none;
}