/* Mercer Library Photo Gallery Slider */
.mercer-gallery {
  margin: 2rem 0;
  position: relative;
}

.mercer-gallery__slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md, 8px);
  background: #000;
  /* Fixed 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
  width: 100%;
}

.mercer-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.mercer-gallery__slide.active {
  opacity: 1;
  z-index: 1;
}

.mercer-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Expand icon overlay */
.mercer-gallery__slide::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.55) url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%23fff stroke-width=2 stroke-linecap=round stroke-linejoin=round%3E%3Cpolyline points=15 3 21 3 21 9/%3E%3Cpolyline points=9 21 3 21 3 15/%3E%3Cline x1=21 y1=3 x2=14 y2=10/%3E%3Cline x1=3 y1=21 x2=10 y2=14/%3E%3C/svg%3E) center/18px no-repeat;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

.mercer-gallery__slide:hover::after {
  opacity: 1;
}

/* Prev/Next Buttons */
.mercer-gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.mercer-gallery__btn:hover {
  background: rgba(0,0,0,0.75);
}

.mercer-gallery__btn--prev { left: 0.75rem; }
.mercer-gallery__btn--next { right: 0.75rem; }

.mercer-gallery__btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Dot indicators */
.mercer-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0.75rem;
}

.mercer-gallery__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gmu-light-gray, #ddd);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.mercer-gallery__dot.active {
  background: var(--gmu-primary-green, #005239);
}

/* Caption */
.mercer-gallery__caption {
  text-align: center;
  font-size: var(--font-size-14, 14px);
  color: var(--gmu-dark-gray, #555);
  margin-top: 0.4rem;
  min-height: 1.4em;
}

/* Lightbox */
.mercer-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.mercer-lightbox.open {
  display: flex;
}

.mercer-lightbox__img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm, 4px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  cursor: default;
  display: block;
}

.mercer-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.2s;
}

.mercer-lightbox__close:hover {
  background: rgba(255,255,255,0.3);
}

.mercer-lightbox__prev,
.mercer-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.mercer-lightbox__prev { left: 1rem; }
.mercer-lightbox__next { right: 1rem; }

.mercer-lightbox__prev:hover,
.mercer-lightbox__next:hover {
  background: rgba(255,255,255,0.3);
}

.mercer-lightbox__prev svg,
.mercer-lightbox__next svg,
.mercer-lightbox__close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mercer-lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: var(--font-size-14, 14px);
}

@media (max-width: 600px) {
  .mercer-gallery__btn { width: 36px; height: 36px; }
  .mercer-lightbox__prev, .mercer-lightbox__next { width: 40px; height: 40px; }
}
