.footer-main, .footer-bottom{
    display: none;
}

.revista-header { 
    display: block;
    position: relative;
   z-index: 0;
}




.revista-info {
    text-align: center;
}

.revista-info h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.revista-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.revista-meta .fa-4x {
    opacity: 0.9;
}

/* Contenedor principal */
.revista-content {
    padding: 40px 0;
    min-height: 600px;
    overflow: visible;
    z-index: 1;
}

.revista-content .container {
    overflow: visible;
}

/* Visor de PDF */
.pdf-viewer-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.pdf-canvas-container {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 60px 20px 120px 20px;
    perspective: 2500px;
    perspective-origin: center center;
}

/* Pila de hojas - todas en la misma posición */
.magazine-stack {
    position: relative;
    transform-style: preserve-3d;
    display: inline-block;
    margin: 0 auto;
}

/* Páginas simples (tipo simple) - sin efecto de volteo */
.simple-page {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateX(0);
    z-index: var(--page-z-index);
    transform-origin: left center;
}

.simple-page:first-child {
    position: relative;
}

.simple-page.active {
    opacity: 1;
    z-index: 999;
}

/* Ir hacia adelante: página actual se desliza a la izquierda y desaparece */
.simple-page.leaving-forward {
    
    animation: moverPerspectiva 0.3s forwards;
   
}



@keyframes moverPerspectiva {
    0% {
        transform: translateX(0) rotateY(0deg);
         opacity: 1;
    }
    90%{
         opacity: 1;
    }
    100% {
        transform:  translateX(-30px)  rotateY(-90deg) translateZ(-30px);
        opacity: 0;
          
    }
}

/* Ir hacia atrás: página nueva aparece desde la derecha */
.simple-page.entering-backward {
    opacity: 0;
    transform: translateX(50%);
    z-index: 1000;
}

.simple-page.active.entering-backward {
    opacity: 1;
    transform: translateX(0);
}

.simple-page canvas {
    display: block;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    max-width: 100%;
    height: auto;
}


/* Estilos según tipo de hoja */
canvas.tipo-doble {
    max-width: 70vw;
    max-height: 80vh;
    object-fit: contain;
}

canvas.tipo-simple {
    max-width: 70vw;
    max-height: 85vh;
    object-fit: contain;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 16px;
}

/* Controles de navegación - sticky abajo centrados */
.pdf-controls {
    position: sticky;
    bottom: 30px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: fit-content;
    z-index: 500;
}

.pdf-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-divider {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
}

.pdf-zoom-btn,
.pdf-toggle-btn,
.pdf-download-btn {
    background: none;
    border: none;
    color: #1e3c72;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s ease;
    opacity: 0.6;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdf-zoom-btn:hover,
.pdf-toggle-btn:hover,
.pdf-download-btn:hover {
    opacity: 1;
    background: rgba(30, 60, 114, 0.1);
    color: #1e3c72;
}

.pdf-toggle-btn.active {
    background: rgba(30, 60, 114, 0.15);
    opacity: 1;
}

.pdf-download-btn {
    color: #059669;
}

.pdf-download-btn:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.pdf-zoom-level {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.pdf-nav-btn {
    background: none;
    border: none;
    color: #1e3c72;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.3s ease;
    opacity: 0.5;
    user-select: none;
}

.pdf-nav-btn:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.1);
}

.pdf-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.pdf-page-info {
    font-size: 16px;
    color: #666;
    min-width: 100px;
    text-align: center;
    font-weight: 500;
}

.pdf-page-current {
    color: #1e3c72;
    font-weight: 700;
    font-size: 18px;
}

/* Miniaturas laterales - dentro del contenedor de la hoja */
.pdf-thumbnails {
    position: absolute;
    right: -130px;
    top: 50%;
    transform: translateY(-50%);
    width: 110px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    transition: all 0.3s ease;
}

.pdf-thumbnails.visible {
    right: 0;
    opacity: 1;
}

.pdf-thumbnails::-webkit-scrollbar {
    width: 4px;
}

.pdf-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.pdf-thumb {
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, .1);
    border-radius: 6px; 
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
}

.pdf-thumb:hover {
    border-color: #1e3c72;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.2);
}

.pdf-thumb.active {
    border-color: #1e3c72;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.pdf-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-thumb-number {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(30, 60, 114, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
}

/* Hint para móviles */
.swipe-hint {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 15px;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out 0.5s;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 0.8; }
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.empty-state .fa-4x {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: #94a3b8;
    margin-bottom: 25px;
}

.empty-state .btn {
    background: #1e3c72;
    border-color: #1e3c72;
}

.empty-state .btn:hover {
    background: #2a5298;
    border-color: #2a5298;
}



@media (max-width: 768px) {
    .revista-header {
        padding: 30px 0;
    }

    .revista-info h1 {
        font-size: 24px;
    }

    .revista-meta {
        font-size: 14px;
    }

    .revista-content {
        padding: 20px 0;
    }

    .pdf-canvas-container {
        min-height: 400px;
        padding: 40px 10px 120px 10px;
    }

    .pdf-controls {
        bottom: 20px;
        gap: 12px;
        padding: 12px 16px;
        flex-wrap: wrap;
        max-width: 95%;
    }

    .pdf-control-group {
        gap: 8px;
    }

    .pdf-divider {
        display: none;
    }

    .pdf-nav-btn {
        font-size: 28px;
        padding: 6px 12px;
    }

    .pdf-zoom-btn,
    .pdf-toggle-btn,
    .pdf-download-btn {
        font-size: 16px;
        padding: 6px 10px;
    }

    .pdf-zoom-level {
        font-size: 12px;
        min-width: 40px;
    }

    .pdf-page-info {
        font-size: 14px;
        min-width: 80px;
    }

    .pdf-page-current {
        font-size: 16px;
    }

    .pdf-thumbnails {
        width: 90px;
        right: 0;
        padding: 8px;
        max-height: 60vh;
    }


    .pdf-thumb {
        width: 64px;
    }
}

@media (max-width: 480px) {
    .revista-info h1 {
        font-size: 20px;
    }

    .pdf-nav-btn {
        font-size: 24px;
    }
}