/* ===============================
   GALLERIA CILINDRICA 3D
   =============================== */

.cylinder-gallery {
  padding: 100px 0;
  perspective: 1600px;
  background: #000;
  overflow: hidden;
}


.cylinder-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/gallery/bg.jpg"); /* scegli una foto */
  background-size: cover;
  background-position: center;

 
  transform: scale(1.15); /* evita bordi dopo il blur */

  opacity: 0.45; /* controllo intensità */
  z-index: 0;
}


.cylinder-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.75) 70%
  );
  z-index: 1;
}



.cylinder-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}


.cylinder-wrapper {
  position: relative;
  z-index: 2;
}


/* ===============================
   CILINDRO (contenitore 3D)
   =============================== */

.cylinder {
  position: relative;
  width: 380px;
  height: 500px;
  transform-style: preserve-3d;
  isolation: isolate;
}

/* ===============================
   ITEM 3D (JS gestisce il transform)
   =============================== */

.cyl-item {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: opacity 0.35s ease;
}

/* ===============================
   CONTENUTO VISIVO (SOLO STILE)
   =============================== */

.cyl-visual {
  width: 350px;
  height: 495px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

/* immagine */
.cyl-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay simulazione blur */
.cyl-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* ===============================
   STATI VISIVI
   =============================== */

.is-center {
  z-index: 10;
}


.cyl-visual {
  will-change: transform, filter, opacity;
}

.is-center .cyl-visual {
  transform: scale(1);
  opacity: 1;
}

.is-center .cyl-visual::after {
  opacity: 0;
}

.is-side {
  z-index: 5;
}

.is-side .cyl-visual {
  transform: scale(0.9);
  opacity: 1;
}

.is-side .cyl-visual::after {
  opacity: 1;
}

.is-hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}


.is-center .cyl-visual {
  transform: scale(1);
  opacity: 1;
  filter: blur(0px);
  pointer-events: auto;
}


.is-side .cyl-visual {
  transform: scale(0.9);
  opacity: 0.9;
  filter: blur(6px);
  pointer-events: none;
}


/* ===============================
   FRECCE
   =============================== */

.cyl-arrow {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  font-size: 38px;
  width: 60px;
  height: 80px;
  cursor: pointer;
  z-index: 20;
  transition: background 0.3s ease;
}

.cyl-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.cyl-arrow.left {
  margin-right: 40px;
}

.cyl-arrow.right {
  margin-left: 40px;
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 768px) {
  .cylinder {
    width: 260px;
    height: 380px;
  }

  .cyl-visual {
    width: 240px;
    height: 360px;
  }
}
