@charset "utf-8";
/* CSS Document */

/* CONTENEDOR PRINCIPAL */
.rotador {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 55vw;
  max-height: 420px;
  perspective: 1000px;
  overflow: hidden;
}

/* POLAROID BASE */
.polaroid {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%);
  background: white;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  border: 0.8vw solid white;
  border-bottom: 2vw solid white;
  border-radius: 6px;
  overflow: hidden;
  transition: all 1s ease;
  opacity: 0;
  z-index: 0;
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* POSICIONES VISIBLES */
.polaroid.left {
  transform: translate(-135%, -50%) scale(0.85) rotate(-6deg);
  opacity: 0.8;
  z-index: 1;
}

.polaroid.center {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
  z-index: 3;
}

.polaroid.right {
  transform: translate(35%, -50%) scale(0.85) rotate(6deg);
  opacity: 0.8;
  z-index: 2;
}

/* ANIMACIÓN SLIDE */
.polaroid.transitioning {
  transition: transform 0.8s ease, opacity 0.8s ease;
}

/* RESPONSIVIDAD: en pantallas pequeñas las fotos se adaptan */
@media (max-width: 768px) {
  .rotador {
    height: 70vw;
  }
  .polaroid {
    width: 45%;
    border: 1vw solid white;
    border-bottom: 2.5vw solid white;
  }
  .polaroid.left {
    transform: translate(-130%, -50%) scale(0.8) rotate(-5deg);
  }
  .polaroid.right {
    transform: translate(30%, -50%) scale(0.8) rotate(5deg);
  }
}

@media (max-width: 480px) {
  .polaroid {
    width: 60%;
  }
  .polaroid.left,
  .polaroid.right {
    opacity: 0.6;
  }
}

