/* Cronoscalate Gallery Manager 2.2.0 - Frontend (standalone) */

.crono-gm{
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 5px 0;
}

/* Horizontal track: one item per view */
.crono-gm__track{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0;
  padding: 0;
  margin: 0;
}

/* Hide scrollbar (keeps scroll) */
.crono-gm__track::-webkit-scrollbar{ height: 0; }
.crono-gm__track{ scrollbar-width: none; }

/* Each item occupies exactly 100% */
.crono-gm__item{
  flex: 0 0 100%;
  max-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}

/* Image */
.crono-gm__img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  cursor: zoom-in;
}

/* Nav buttons */
.crono-gm__nav{
  position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(6 9 145 / 62%);
    color: #fff;
    width: 46px;
    height: 46px;
    line-height: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
    outline: 2px solid rgba(255, 255, 255, .22);
    border: 0;
    cursor: pointer;
    z-index: 9999;
}

.crono-gm__prev{ left: 8px; }
.crono-gm__next{ right: 8px; }

@media (max-width: 768px){
  .crono-gm__nav{
    width: 40px;
    height: 48px;
    line-height: 48px;
    border-radius: 10px;
  }
}

/* =====================================================
   LIGHTBOX
   ===================================================== */

.crono-gm-lightbox{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}
.crono-gm-lightbox.is-open{ display: block; }

.crono-gm-lightbox__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.88);
}

/* 🔴 CONTENITORE CENTRALE */
.crono-gm-lightbox__content{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}

/* ✅ CONTENITORE IMMAGINE + DIDASCALIA */
.crono-gm-lightbox__figure{
  position: relative;
  display: inline-block;
}

/* Immagine */
.crono-gm-lightbox__img{
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  display:block;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

/* ❗ DIDASCALIA ANCORATA ALL'IMMAGINE */
.crono-gm-lightbox__caption{
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  padding: 10px 10px;
  color: #fff;
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  line-height: 1.25;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.65) 45%,
    rgba(0,0,0,.25) 100%
  );
  border-radius: 0px;
  pointer-events: none;
}

/* Close + nav */
.crono-gm-lightbox__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 30px;
  border: 0;
  cursor: pointer;
}

.crono-gm-lightbox__nav{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 34px;
  border: 0;
  cursor: pointer;
}
.crono-gm-lightbox__prev{ left: 14px; }
.crono-gm-lightbox__next{ right: 14px; }

html.crono-gm--lb-open,
html.crono-gm--lb-open body{
  overflow: hidden !important;
}

/* -------------------------------------------------------
   CAPTION OVERLAY (gallery normale) – INVARIATA
   ------------------------------------------------------- */
.crono-gm__item{ position: relative; }

.crono-gm__caption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  color: #fff;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  line-height: 1.2;
  background: linear-gradient( to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0.25) 100% );
  pointer-events: none;
}
