:root {
  /* ================== DA MODIFICARE: DIMENSIONI CARD ==================
     Qui gestisci subito dimensioni e spaziatura delle card del carosello  */
  --item-width-carosello: 35vw;
  /* larghezza card immagine */
  --item-height-carosello: 15vw;
  /* altezza card immagine  */
  --gap-carosello: 20px !important;
  /* distanza orizzontale tra le card */
  --aspect-ratio-carosello: 2.77 / 1;
  /* ==================================================================== */

  --bg-carosello: #0f1115;
  --card-bg: #181b22;
}


body {
  overflow-x: hidden !important;
}

.carousel {
  left: 0px;
  margin-left: -10px;
  /* Full-bleed: sempre a tutta pagina */
  width: calc(100vw + 10px);
  max-width: none;
  /*margin: 0.1vh 0;        /* margine solo verticale */
  overflow: hidden;
  /* fondamentale per il loop visivo */
  border-radius: 0;
  /* niente bordi stondati per full-bleed */
  padding: 10px 0;
  /* niente padding laterale: le immagini entrano dai bordi */
  background: transparent;
  /* sfruttiamo lo sfondo della pagina */
  position: relative;
  /* necessario per i gradienti ai lati */
  box-shadow: none;
  /* niente ombra per non “svelare” i bordi */
}

/* Effetto “appare dal nulla”: gradienti ai lati (non intercettano il mouse) */
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: min(8vw, 120px);
  /* larghezza fade ai lati */
  pointer-events: none;
  z-index: 3;
}

/* .carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-carosello) 0%, rgba(15,17,21,0) 100%);
}
.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-carosello) 0%, rgba(15,17,21,0) 100%);
} */

.track {
  display: flex;
  align-items: center;
  gap: var(--gap-carosello);
  will-change: transform;
}

.item {
  flex: 0 0 auto;
  width: var(--item-width-carosello);
  height: var(--item-height-carosello);
  aspect-ratio: var(--aspect-ratio-carosello);
  border-radius: 30px;
  overflow: hidden;
  background: var(--card-bg);
  position: relative;
  transform-origin: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  /* se .item è un <a> */
  color: inherit;
  /* usa il colore del tema */
  display: block;
}

.carosello-page-1 .item,
[data-page='1'] .item {
  flex: 0 0 auto;
  width: var(--item-width-carosello);
  height: unset !important;
  aspect-ratio: var(--aspect-ratio-carosello);
  border-radius: 30px;
  overflow: hidden;
  background: var(--card-bg);
  position: relative;
  transform-origin: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  /* se .item è un <a> */
  color: inherit;
  /* usa il colore del tema */
  display: block;
}

/* overlay con titolo, sottotitolo e anno */
.item .overlay {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.0);
  color: #e9eef7;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
  pointer-events: none;
  /* il click passa all'anchor */
}

.item .overlay .title {
  font-weight: 700;
  font-size: clamp(20px, 4vw, 36px);
  line-height: 1.15;
}

.item .overlay .subtitle {
  font-weight: 400;
  font-size: clamp(14px, 2.2vw, 20px);
  opacity: 0.85;
}

.item .overlay .year {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  font-weight: 500;
  font-size: clamp(14px, 2vw, 20px);
  opacity: 0.9;
}

.item:hover,
.item.hover {
  /* transform: scale(1.08); */
  /* box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); */
  z-index: 2;
}

/* mostra overlay in hover */
.item:hover .overlay,
.item.hover .overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.45));
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carosello-page-1 .item img,
[data-page="1"] .item img {
  width: 85px !important;
  height: unset !important;
  object-fit: cover;
  display: block;
}

/* Responsive minimi */
@media (max-width: 768px) {
  :root {
    --item-width-carosello: 254px;
    --item-height-carosello: 92px;
    --gap-carosello: 14px;
    --aspect-ratio-carosello: 2.77 / 1;
  }
}

@media (max-width: 480px) {
  :root {
    --item-width-carosello: 254px;
    --item-height-carosello: 92px;
    --gap-carosello: 12px;
    --aspect-ratio-carosello: 2.77 / 1;
  }
}