.book-container {
  display: flex;
  justify-content: center;
  perspective: 2000px;
  margin: 50px 0;
}

.book {
  width: 700px;
  height: 500px;
  position: relative;
}

.page {
  width: 50%;
  height: 100%;
  position: absolute;
  top: 0;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 1s ease;
}

/* Contenido frontal y backface */
.page .front, .page .back {
  width: 100%;
  height: 100%;
  background: #f5e2c0;
  border: 6px solid #4d3b2e;
  border-radius: 5px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 10px 15px rgba(0,0,0,0.2);
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  color: #2a1d0e;
}

/* Back vacío */
.page .back {
  transform: rotateY(180deg);
  background: #f5e2c0;
}

/* Posición inicial */
.left { left: 0; transform-origin: right center; }
.right { left: 50%; transform-origin: left center; }

/* Página volteada */
.page.flipped.left { transform: rotateY(180deg); }
.page.flipped.right { transform: rotateY(-180deg); }

/* Pliegue visual derecha */
.page.right::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(0,0,0,0.25), transparent);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  pointer-events: none;
}

.page.right:hover::after {
  background: linear-gradient(135deg, rgba(0,0,0,0.5), transparent);
}

.page h2 {
  font-family: "Times New Roman", serif;
  font-size: 1.5rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  padding-bottom: 5px;
}