/* =========================
   ACF Slick Gallery + Lightbox
   ========================= */

/* Basic wrapper */
.agsl-wrap { width: 100%; }
.agsl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
}
.agsl-count { font-size: 13px; opacity: .8; }

/* Notices */
.agsl-notice {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #f9fafb;
  color: #4b5563;
}
.agsl-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Slider */
.agsl-slider {
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.agsl-slide { padding: 0; }

.agsl-slide-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.agsl-slide-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .25s ease;
}
.agsl-slide-btn:hover img { transform: scale(1.02); }

/* 1rem gap between slides, left flush (no inset on the left) */
.agsl-wrap .agsl-slider .slick-slide {
  padding-left: 0 !important;
  padding-right: 1rem !important;
  box-sizing: border-box;
}
.agsl-wrap .agsl-slider .slick-list {
  margin-left: 0 !important;
  padding-left: 0 !important;
  margin-right: -1rem !important; /* compensate last slide right padding */
}

/* Slick arrow tweaks (slider arrows only) */
.agsl-wrap .slick-prev,
.agsl-wrap .slick-next {
  z-index: 2;
}
.agsl-wrap .slick-prev { left: 10px; }
.agsl-wrap .slick-next { right: 10px; }

/* =========================
   Fullscreen Lightbox
   ========================= */

html.agsl-no-scroll, body.agsl-no-scroll { overflow: hidden !important; }

.agsl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647 !important;
}
.agsl-lightbox.is-hidden { display: none; }

.agsl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
}

/* UI container */
.agsl-lb-ui {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* Image / caption */
.agsl-figure {
  margin: 0;
  max-width: min(1100px, 95vw);
  width: 100%;
  display: grid;
  gap: 12px;
  justify-items: center;
  position: relative;
  z-index: 2;
}

.agsl-lb-img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
  background: rgba(255,255,255,0.02);
}

.agsl-caption {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  text-align: center;
}

/* =========================
   Lightbox Controls (forced visible)
   Uses JS-added classes: .agsl-lb-close / .agsl-lb-prev / .agsl-lb-next
   ========================= */

.agsl-lightbox .agsl-lb-close,
.agsl-lightbox .agsl-lb-prev,
.agsl-lightbox .agsl-lb-next {
  position: fixed !important;
  z-index: 2147483647 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 46px !important;
  height: 46px !important;

  border: 1px solid rgba(255,255,255,0.25) !important;
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;

  border-radius: 999px !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.agsl-lightbox .agsl-lb-close:hover,
.agsl-lightbox .agsl-lb-prev:hover,
.agsl-lightbox .agsl-lb-next:hover {
  background: rgba(255,255,255,0.18) !important;
}

.agsl-lightbox .agsl-lb-close { top: 16px !important; right: 16px !important; }
.agsl-lightbox .agsl-lb-prev  { top: 50% !important; left: 16px !important; transform: translateY(-50%) !important; }
.agsl-lightbox .agsl-lb-next  { top: 50% !important; right: 16px !important; transform: translateY(-50%) !important; }

.agsl-lightbox .agsl-lb-icon {
  font-size: 22px !important;
  line-height: 1 !important;
}

/* Responsive spacing */
@media (min-width: 768px) {
  .agsl-lb-ui { padding: 32px; }
  .agsl-lightbox .agsl-lb-close { top: 24px !important; right: 24px !important; }
  .agsl-lightbox .agsl-lb-prev  { left: 24px !important; }
  .agsl-lightbox .agsl-lb-next  { right: 24px !important; }
}

@media (max-width: 480px) {
  .agsl-lightbox .agsl-lb-prev,
  .agsl-lightbox .agsl-lb-next {
    top: 60% !important;
  }
}
