.banner {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.slider {
  width: 200px;
  height: 250px;
  position: absolute;
  top: 30%;
  left: 50%;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) perspective(1000px) rotateX(-16deg) rotateY(0deg);
  transition: transform 0.3s linear;
  z-index: 2;
}

.item {
  position: absolute;
  inset: 0;
  transform: rotateY(calc(var(--i) * var(--step))) translateZ(550px);
  transition: transform 0.4s ease, z-index 0.3s;
  cursor: pointer;
  pointer-events: auto;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none; /* allow image clicks to reach parent */
}

/* --- Swipe overlay --- */
.swipe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100; /* BELOW .item-clone */
  background: transparent;
  display: block; /* default state */
  pointer-events: auto;
  touch-action: none;
}



/* --- Opened Item Style --- */
.item.opened {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(1.4) !important;
  z-index: 10000;
  width: 300px;
  height: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: none !important;
}

/* Inside the opened item */
.item.opened img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}

.item .bio {
  display: none;
  text-align: center;
  font-family: sans-serif;
  font-size: 0.95em;
  color: #333;
  line-height: 1.5em;
}

.item.opened .bio {
  display: block;
}
.item.opened h3 {
  color:white;
}
.item-clone.opened {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(1.4) !important;
  z-index: 10000;
  width: 300px;
  height: 400px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-clone.opened img {
  width: 100%;
  height: 400px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.item-clone .bio {
  display: block;
  text-align: center;
  font-family: sans-serif;
  font-size: 0.95em;
  color: white;
  line-height: 1.5em;
  position: absolute;
  padding: 10px;
  bottom:0;
  background: #333333;
  background: linear-gradient(90deg,rgba(51, 51, 51, 1) 0%, rgba(100, 168, 147, 1) 50%, rgba(100, 168, 147, 0) 100%);
      border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}
.item.hidden {
  display: none !important;
}
/* --- Responsive --- */

/* Tablet (max-width: 1023px) */
@media screen and (max-width: 1023px) {
  .slider {
    width: 160px;
    height: 200px;
  }

  .item {
    transform: rotateY(calc(var(--i) * var(--step))) translateZ(350px);
  }
}

/* Mobile (max-width: 767px) */
@media screen and (max-width: 767px) {
  .slider {
    width: 100px;
    height: 130px;
  }

  .item {
    transform: rotateY(calc(var(--i) * var(--step))) translateZ(220px);
  }

  .item.opened {
    width: 50%;
    padding: 0;
    height: 300px;
    transform: translate(-50%, -50%) scale(1.1) !important;
    font-size:14px;
  }
  .item.opened h3{
    font-size: 16px;
    margin-top: 0;
  }
}
