/* Fondo del sitio */
body {
  margin: 0;
  padding: 0;
  background: #f5f5f5; /* O tu fondo personalizado */
  overflow-x: hidden;
  position: relative;
}

/* Canvas: fondo animado por encima del background pero debajo del contenido */
canvas#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none; /* Evita que bloquee clics del contenido */
}

.page-title.light-background {
  padding-top: 8rem;
  padding-bottom: 3rem;
}

.page-title h1 {
  margin-bottom: 0.5rem;
}

.breadcrumbs {
  margin: 0; /* reduce espacio extra */
}
  
.wrapper {
  width: 100%;
  height: 700px; /* o 100%, si querés que herede */
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* para probar */
}

.inner {
  --w: 100px;
  --h: 150px;
  --translateZ: calc((var(--w) + var(--h)) * 2);
  --rotateX: -15deg;
  --perspective: 1000px;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: 25%;
  left: calc(50% - (var(--w) / 2) - 2.5px);
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0deg);
  will-change: transform;
  cursor: grab;
  transition: transform 0.5s ease; /* Transición suave para rotaciones */
}

/* Animación automática si tiene esta clase */
.inner.auto-rotate {
  animation: rotating 20s linear infinite reverse;
}

.inner:active {
  cursor: grabbing;
}

.inner.bloqueado {
  animation: none !important;
  pointer-events: none !important;
  cursor: default !important;
}

@keyframes rotating {
  from {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX))
      rotateY(0);
  }
  to {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX))
      rotateY(1turn);
  }
}

.card {
  position: absolute;
  border: 2px solid rgba(var(--color-card));
  border-radius: 12px;
  overflow: hidden;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
    translateZ(var(--translateZ));
  transition: all 0.3s ease; /* Transición suave para efectos */
}

.img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0000
    radial-gradient(
      circle,
      rgba(var(--color-card), 0.2) 0%,
      rgba(var(--color-card), 0.6) 80%,
      rgba(var(--color-card), 0.9) 100%
    );
}

.card {
  position: absolute;
  width: 120px;
  height: 180px;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--translateZ));
  border: 2px solid rgba(var(--color-card));
  border-radius: 12px;
  background-color: rgba(var(--color-card), 0.1);
  overflow: hidden;
  box-sizing: border-box;
  color: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0.4em;
  gap: 0.3em;
}

.name {
  font-weight: 600;
  font-size: 1em;
  margin: 0.2em 0 0;
}

.birthday {
  font-size: 0.85em;
  font-weight: bold;
  color: #fff000;
  margin: 0.1em 0 0.6em;
}

/* =============================== */
/* 🎯 EFECTOS PARA CUMPLEAÑERO CENTRADO */
/* =============================== */

/* Efecto base para cumpleañero */
.card.cumpleanero {
  border: 3px solid gold;
  box-shadow: 0 0 15px 5px gold;
  transform-style: preserve-3d;
}

/* Efecto especial cuando está centrado */
.card.cumpleanero.centrado {
  animation: centradoPulse 1s ease-in-out;
  border: 4px solid #ffd700;
  box-shadow: 
    0 0 20px #ffd700,
    0 0 30px rgba(255, 215, 0, 0.7),
    0 0 40px rgba(255, 215, 0, 0.5),
    inset 0 0 15px rgba(255, 215, 0, 0.3);
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) 
             translateZ(calc(var(--translateZ) * 1.1)) 
             scale(1.05);
  z-index: 10;
}

/* Animación de pulso para el efecto de centrado */
@keyframes centradoPulse {
  0% {
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) 
               translateZ(var(--translateZ)) 
               scale(1);
    box-shadow: 0 0 15px 5px gold;
  }
  50% {
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) 
               translateZ(calc(var(--translateZ) * 1.15)) 
               scale(1.08);
    box-shadow: 
      0 0 25px #ffd700,
      0 0 40px rgba(255, 215, 0, 0.8),
      0 0 60px rgba(255, 215, 0, 0.6);
  }
  100% {
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) 
               translateZ(calc(var(--translateZ) * 1.1)) 
               scale(1.05);
    box-shadow: 
      0 0 20px #ffd700,
      0 0 30px rgba(255, 215, 0, 0.7),
      0 0 40px rgba(255, 215, 0, 0.5);
  }
}

/* Efecto de brillo en la foto del perfil cuando está centrado */
.card.cumpleanero.centrado .profile-photo {
  animation: fotoBrillo 2s ease-in-out;
}

@keyframes fotoBrillo {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px gold, 0 0 30px rgba(255, 215, 0, 0.8);
  }
}

/* Destacar el texto del cumpleañero centrado */
.card.cumpleanero.centrado .name {
  color: #fff;
  text-shadow: 0 0 10px gold, 0 0 20px rgba(255, 215, 0, 0.7);
  font-weight: 700;
}

.card.cumpleanero.centrado .birthday {
  color: #ffeb3b;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  font-size: 0.9em;
  animation: birthdayFlash 2s infinite;
}

@keyframes birthdayFlash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.inner.cumpleanero-activo {
  animation-play-state: paused !important;
}

.toggle-cont {
  width: 100px;
  height: 50px;
  border-radius: 9999px;
  position: fixed;
  bottom: 20px;           /* Distancia desde la parte inferior */
  left: 50%;              /* Centrado horizontal */
  transform: translateX(-50%); /* Compensa el 50% para centrar perfectamente */
  z-index: 100;
  background: #272727;    /* Mantener el fondo por si acaso */
}

.toggle-cont .toggle-input {
  display: none;
}

.toggle-cont .toggle-label {
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 6px;
  width: 100%;
  height: 100%;
  background: #272727;
  border-radius: 9999px;
  box-sizing: content-box;
  box-shadow: 0px 0px 16px -8px #fefefe;
}

.toggle-cont .toggle-label .cont-label-play {
  position: relative;
  width: 50px;
  aspect-ratio: 1 / 1;
  background: #5e5e5e;
  border-radius: 9999px;
  transition: all 0.5s cubic-bezier(1, 0, 0, 1);
}

.toggle-cont .toggle-input:checked + .toggle-label .cont-label-play {
  background: #f43f5e;
  transform: translateX(50px);
}

.toggle-cont .toggle-label .label-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  width: 24px;
  aspect-ratio: 1 / 1;
  background: #fefefe;
  border-radius: 4px;
  clip-path: polygon(25% 0, 75% 50%, 25% 100%, 25% 51%);
  transition: all 0.5s cubic-bezier(1, 0, 0, 1);
}

.toggle-cont .toggle-input:checked + .toggle-label .label-play {
  width: 20px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 50;
  padding: 0 20px;
}

.carousel-controls button {
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  pointer-events: auto;
  padding: 0.5em 1em;
  border-radius: 0.3em;
  transition: background 0.2s;
}

.carousel-controls button:hover {
  background: rgba(0,0,0,0.8);
}

/* =============================== */
/* 🎯 BOTÓN PARA CENTRAR CUMPLEAÑERO */
/* =============================== */
#centrar-cumpleanero {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  z-index: 100;
  transition: all 0.3s ease;
}

#centrar-cumpleanero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
  background: linear-gradient(135deg, #ffed4e, #ffd700);
}

#centrar-cumpleanero:active {
  transform: translateY(0);
}

/* =============================== */
/* 📱 RESPONSIVE */
/* =============================== */
@media (max-width: 768px) {
  .wrapper {
    height: 500px;
  }
  
  .carousel-controls {
    padding: 0 10px;
  }
  
  .carousel-controls button {
    font-size: 1.5rem;
    padding: 0.3em 0.7em;
  }
  
  #centrar-cumpleanero {
    bottom: 80px;
    right: 15px;
    padding: 10px 20px;
    font-size: 0.9em;
  }
  
  .toggle-cont {
    bottom: 15px;
    right: 15px;
    transform: scale(0.9);
  }
  
}

/* Opcional: Ajustes para móviles */
@media (max-width: 768px) {
  .toggle-cont {
    bottom: 15px;
    transform: translateX(-50%) scale(0.9); /* Mantener centrado y escalar */
  }
}