/* ============================================================
   LiveNetwork – Pubbliredazionali Slider
   - layout controllato da JS via CSS vars:
     --perview  (es. 3.25 = 3 card + peek)
     --count    (numero card, usato in fit mode)
   - mantengo le tue altezze: desktop 450, <=1024 480, <=640 480
   ============================================================ */

.lnv-pubbl-slider{
  --gap: 12px;
  --radius: 8px;

  /* fallback (se JS non parte) */
  --perview: 3.25;
  --count: 1;
}

/* Track */
.lnv-pubbl-track{
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 0 2px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: auto;
}
.lnv-pubbl-track::-webkit-scrollbar{ display: none; }

/* Card */
.lnv-pubbl-card{
  scroll-snap-align: start;
  flex: 0 0 calc((100% - (var(--gap) * (var(--perview) - 1))) / var(--perview));
  position: relative;
  height: 450px; /* ✅ tua altezza desktop */
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background-image: var(--lnv-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* ✅ Modalità fit: se pochi post (1–N <= slides) riempi senza spazi vuoti */
.lnv-pubbl-slider.is-fit .lnv-pubbl-track{
  overflow-x: hidden;
}

.lnv-pubbl-slider.is-fit .lnv-pubbl-card{
  flex: 0 0 calc((100% - (var(--gap) * (var(--count) - 1))) / var(--count));
}

/* ✅ Mantengo SOLO le altezze per breakpoint, NON il flex-basis */
@media (max-width: 1024px){
  .lnv-pubbl-card{ height: 480px; }
}
@media (max-width: 640px){
  .lnv-pubbl-card{ height: 480px; }
}

/* Overlay */
.lnv-pubbl-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(#0000 64.19%, #000c 84.03%);
}

/* Titolo */
.lnv-pubbl-title{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  line-height: 26px;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dots wrapper */
.lnv-pubbl-dots{
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 8px 0 0;
}

/* Dot button: touch target grande */
.lnv-pubbl-dot{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* Puntino vero (8x8) */
.lnv-pubbl-dot::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  display: block;
  transform: scale(1);
  transition: transform .12s ease, background-color .12s ease;
}

/* Stato attivo */
.lnv-pubbl-dot[aria-current="true"]::before,
.lnv-pubbl-dot.is-active::before{
  background: rgba(0,0,0,.65);
  transform: scale(1.05);
}

/* Focus tastiera */
.lnv-pubbl-dot:focus-visible{
  outline: 2px solid rgba(0,0,0,.65);
  outline-offset: 2px;
}
