.book-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3/4; /* Mantiene proporción de libro */
    overflow: hidden;
    background-color: #f0f0f0;
    padding: 20px;
    margin: 0 auto;
}

.book-container .page {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: scale(0.9);
}

.book-container .current {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.book-container .previous, .book-container .next {
    opacity: 0.5;
    z-index: 1;
}

.book-container .previous {
    transform: translateX(-100%);
}

.book-container .next {
    transform: translateX(100%);
}

.book-container embed {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mantiene proporción y adapta tamaño */
    border: 2px solid #6A0F49;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: var(--morado);
}

/* Responsividad para pantallas más pequeñas */
@media (max-width: 768px) {
    .book-container {
        aspect-ratio: auto; /* Ajusta automáticamente según ancho/alto */
        min-height: 50vh;
        padding: 10px;
    }

    .book-container embed {
        height: auto;
        max-height: 100%;
    }
}

@media (max-width: 480px) {
    .book-container {
        min-height: 40vh;
        padding: 5px;
    }

    .book-container embed {
        height: auto;
    }
}
