/* =========================================================
   AMJ Lightbox — in-page image popup
   Backdrop: #000053 at 75% opacity
   Panel: 75% of the current viewport
   ========================================================= */

.amj-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 83, 0.75);      /* #000053 @ 75% */
  opacity: 0;
  transition: opacity .22s ease;
}

.amj-lb.is-open {
  display: flex;
  opacity: 1;
}

/* The panel is 75% of the viewport */
.amj-lb__panel {
  position: relative;
  width: 75vw;
  height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(.97);
  transition: transform .22s ease;
}

.amj-lb.is-open .amj-lb__panel {
  transform: scale(1);
}

.amj-lb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;                    /* never distorted */
  background: #fff;
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .5);
  display: block;
}

/* Close — large red X, top right */
.amj-lb__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #d32020;
  color: #fff;
  font-size: 30px;
  line-height: 52px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .45);
  transition: background .2s, transform .2s;
  z-index: 2;
}

.amj-lb__close:hover,
.amj-lb__close:focus {
  background: #ff2b2b;
  transform: scale(1.08);
  outline: none;
}

/* Prev / next arrows */
.amj-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 76px;
  border: 0;
  background: rgba(0, 0, 83, .6);
  color: #fff;
  font-size: 34px;
  line-height: 76px;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  transition: background .2s;
  z-index: 2;
}

.amj-lb__nav:hover,
.amj-lb__nav:focus {
  background: #000053;
  outline: none;
}

.amj-lb__nav--prev { left: -70px; }
.amj-lb__nav--next { right: -70px; }

.amj-lb__count {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  letter-spacing: .04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

/* Clickable images get a pointer */
.amj-lightbox-trigger { cursor: zoom-in; }

body.amj-lb-open { overflow: hidden; }

/* Small screens: arrows move inside, panel grows */
@media (max-width: 900px) {
  .amj-lb__panel { width: 92vw; height: 78vh; }
  .amj-lb__nav--prev { left: 4px; }
  .amj-lb__nav--next { right: 4px; }
  .amj-lb__close { top: -14px; right: -6px; width: 46px; height: 46px; line-height: 46px; font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .amj-lb, .amj-lb__panel { transition: none; }
}
