/* Contenedor principal con perspectiva 3D */
.book-container {
  width: 100%;
  max-width: 380px;
  perspective: 1200px;
}

.book {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Estilo base de cada página */
.page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  transform-origin: left center; /* El eje de giro simula el lomo del libro */
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.page .card {
  background-color: #ffffff;
  border-left: 4px solid #1a428a !important; /* Lomo azul rey */
}

/* Página actual */
.page.active {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
  z-index: 2;
}

/* Página enviada a la izquierda al pasar la hoja */
.page.turned {
  opacity: 0;
  transform: rotateY(-180deg);
  z-index: 1;
}



/* Wrapper principal con alineación flexible */
.book-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

/* Contenedor del Libro 3D */
.book-container {
  flex: 1;
  perspective: 1200px;
}

.book {
  position: relative;
  width: 100%;
  height: 280px;
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.page .card {
  background-color: #ffffff;
  border-left: 4px solid gray !important;
}

.page.active {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
  z-index: 2;
}

.page.turned {
  opacity: 0;
  transform: rotateY(-180deg);
  z-index: 1;
}

/* Botones con estilo de iconos circulares */
.nav-arrow {
  background-color: white;
  color: var(--Primary);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
  z-index: 10;
}

.nav-arrow:hover:not(:disabled) {
  background-color: white;
  transform: scale(1.08);
}

.nav-arrow:disabled {
  background-color: #ccc;
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}