/* Estilos para la sección de cuentos */
.suga-cuentos-section {
    width: 100%;
    background: #f3f4ea;
    position: relative;
    overflow: hidden;
    padding-top: 0;
    font-family: "Helvetica Rounded LT Std", Sans-serif;
}

.suga-cuentos-section * {
	font-family: "Helvetica Rounded LT Std", Sans-serif;
}
.suga-cuentos-section .suga-desktop-fullscreen-text{
    font-size: 14px;
    line-height: 1.2;
}

/* Fondo decorativo con paisaje */
.suga-cuentos-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: #f3f4ea;
    background-size: 1200px 200px;
    pointer-events: none;
    z-index: 0;
}

.suga-cuentos-titulo {
    text-align: center;
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: 48px;
    color: #002559;
    margin-top: 0px;
    margin-bottom: 85px;
    position: relative;
    z-index: 1;

}

.suga-cuentos-container {
    /* max-width: 1440px; */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Separador del libro: oculto en desktop, visible solo en móvil */
.suga-libro-separador {
    display: none;
}

/* Wrapper de cada tomo */
.suga-tomo-wrapper {
    margin-bottom: 60px;
    position: relative;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom center;
    padding-top: 123px;
    padding-bottom: 112px;
}
.suga-tomo-wrapper-inner {
  max-width: 1172px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.suga-tomo-wrapper .suga-cuentos-titulo {
  position: relative;
  z-index: 1;
}

.suga-tomo-wrapper.suga-tomo-first{
    padding-top: 65px; 
}

.suga-tomo-wrapper:last-child {
    margin-bottom: 0;
}

/* Tarjeta del tomo */
.suga-tomo-card {
    display: flex;
    align-items: flex-end;
    max-width: 580px;
    margin: 0 auto;
    gap: 20px;
    background: #E7EEF1;
    padding: 0 26px 0 0;
    border-radius: 20px;
    margin-bottom: 48px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.suga-tomo-personaje {
    flex-shrink: 0;
    width: 135px;
    height: auto;
    margin: 0;
    position: relative;
}


.suga-tomo-personaje img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Miniatura móvil: oculta por defecto, se muestra solo en mobile (salvo si es la única) */
.suga-tomo-personaje-mobile {
    display: none;
}

.suga-tomo-personaje-desktop {
    display: block;
}

/* Si solo hay miniatura móvil, mostrarla también en desktop */
.suga-tomo-wrapper.suga-tomo-only-thumb-mobile .suga-tomo-personaje-mobile {
    display: block !important;
    position: static;
}

/* Fondo móvil: capa que solo se muestra en mobile */
.suga-tomo-bg-mobile {
    display: none;
}

.suga-tomo-info {
    flex: 1;
    padding: 44px 5px 44px 36px;
}

.suga-tomo-titulo {
  font-size: 30px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.1;
    color: #01C5C6;
    margin: 0 0 10px 0;

}
.suga-tomo-info p,
.suga-tomo-descripcion {
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
    color: #4A586E;
    margin: 0;

}

/* Wrapper del visor */
.suga-tomo-viewer-wrapper {
    position: relative;
    z-index: 2;
}



/* Toolbar personalizado */
.suga-epub-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #1565c0;
    color: white;
    flex-wrap: wrap;
    gap: 15px;
}


.suga-epub-branding {
    color: white;
    color: #FFF;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.suga-epub-toolbar-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2;
    justify-content: center;
}

.suga-epub-toolbar-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.suga-epub-toolbar-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

/* Botones de zoom (acercar / alejar) */
.suga-epub-zoom-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.epub-btn.epub-btn-zoom-in,
.epub-btn.epub-btn-zoom-out {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--Celeste-marino-Lighter, #DDF7FF);
    color: var(--Azul-Azul-primario, #002559);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.epub-btn.epub-btn-zoom-in:hover,
.epub-btn.epub-btn-zoom-out:hover {
    background: #b8eaf5;
    transform: scale(1.08);
}

.epub-btn.epub-btn-zoom-in:active,
.epub-btn.epub-btn-zoom-out:active {
    transform: scale(0.95);
}

.epub-btn.epub-btn-zoom-in svg,
.epub-btn.epub-btn-zoom-out svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
}

/* Indicador de paginación (Página X / Y) en el toolbar */
.epub-page-info.suga-epub-page-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 4em;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    user-select: none;
}

.epub-page-info .epub-page-separator {
    opacity: 0.8;
    margin: 0 1px;
}

.suga-epub-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.suga-epub-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.suga-epub-nav-btn:active {
    transform: scale(0.95);
}

.suga-epub-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.suga-epub-nav-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Paginación personalizada (botones numerados en el toolbar) */
.suga-epub-pagination,
.suga-epub-pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.suga-epub-pagination-buttons.suga-epub-pagination-hidden {
    display: none !important;
}

.suga-epub-toolbar-center .suga-epub-pagination-buttons {
    margin-left: 4px;
}

.suga-epub-pagination-item {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0 none;
    border-radius: 4px;
    color: #4A586E;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 14px;
}

.suga-epub-pagination-item:hover {
    background: transparent;
    border-color: 0 none;
    transform: scale(1.1);
}

.epub-btn:focus {
  outline: 2px solid #01C5C6;

}

.suga-epub-pagination-item.active {
    background: #01C5C6;
    border-color:  transparent;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 none;
}

.suga-epub-pagination-item.ellipsis {
    background: transparent;
    border: none;
    cursor: default;
    min-width: auto;
    padding: 0 5px;
}

.suga-epub-pagination-item.ellipsis:hover {
    transform: none;
    background: transparent;
}

/* Contenedor del visor con flechas laterales (flex: flechas fijas a los lados, solo el centro hace scroll con zoom) */
.suga-epub-viewer-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wrapper del contenido: es el único que hace scroll cuando hay zoom; las flechas no se mueven */
.epub-viewer-content-wrapper {
    flex: 1;
    min-width: 0;
    min-height: 600px;
    height: 600px;
    position: relative;
    overflow: visible;
    scrollbar-width: none; /* Firefox: sin barra de scroll */
    -ms-overflow-style: none; /* IE/Edge: sin barra de scroll */
}

/* Ocultar scrollbar en WebKit (Chrome, Safari) pero el arrastre sigue funcionando */
.epub-viewer-content-wrapper::-webkit-scrollbar {
    display: none;
}

/* Flechas celestes a los lados del libro */
.suga-epub-side-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #01C5C6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.suga-epub-side-arrow:hover {
    background: #00b4b5;
    transform: scale(1.08);
}

.suga-epub-side-arrow:active {
    transform: scale(0.95);
}

.suga-epub-side-arrow svg {
    width: 11px;
    height: 18px;
}

.suga-epub-side-prev {
    margin-right: 5px;
    margin-left: 5px;
}

.suga-epub-side-next {
    margin-left: 5px;
    margin-right: 5px;
}

/* Contenedor del visor */
.suga-epub-viewer .epub-viewer-content {
    background: #002559;
    height: 600px; /* Altura definida como el ejemplo funcional */
    min-height: 600px;
    position: relative;
    overflow: hidden;
    padding: 25px 0px 15px 0px;
    flex: 1;
    min-width: 0;
}

.suga-epub-viewer .epub-viewer-content .epub-rendition {
    width: 100% !important;
    height: 100% !important;
    border: none;
}
.epub-viewer-content .epub-view {
  /*background: #fff;*/
}

/* .suga-epub-viewer .epub-viewer-content iframe { 
  background: #002559;
} */

.suga-epub-viewer .epub-viewer-toolbar {
  background: #002559;
  border: 0 none;
  padding: 15px 51px 15px 51px;
}


.epub-btn.epub-btn-toc,
.epub-btn.epub-btn-settings {
 display: none;
}

.suga-epub-viewer .epub-loading {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.suga-epub-viewer .epub-loading .epub-spinner {
    border-top-color: #4fc3f7;
}


/* Marco general del visor dentro de cuentos */
.suga-tomo-viewer-wrapper .epub-viewer-container.suga-epub-viewer {
  background: #002559;            /* azul oscuro */
  border-radius: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  position: relative;
  border: 0 none;
}

.epub-btn.epub-btn-fullscreen {
  border-radius: 24px;
  background: var(--Celeste-marino-Lighter, #DDF7FF);
  color: var(--Azul-Azul-primario, #002559);
text-align: center;

/* 16/24 Boton */
font-family: "Helvetica Rounded LT Std";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 24px; /* 150% */
display: inline-flex;
align-items: center;
justify-content: center;
}

/* Mostrar texto en desktop, ocultar icono */
.suga-desktop-fullscreen-text {
  display: inline-block;
}

.suga-mobile-fullscreen-icon {
  display: none;
}

/* Aplicar width 100% solo cuando NO está en fullscreen */
/* .epub-viewer-container:not(.fullscreen) .epub-container {
  width: 100% !important;
} */

/* Responsive */
@media (max-width: 768px) {

  .suga-epub-viewer .epub-viewer-content {
    background: #002559;
    height: 600px; /* Altura definida como el ejemplo funcional */
    min-height: 600px;
    position: relative;
    overflow: hidden;
    padding: 24px 22px 15px 22px;
  }
  
  /* Flechas celestes laterales en móvil */
  .suga-epub-side-arrow {
    width: 32px;
    height: 32px;
  }
  
  .suga-epub-side-arrow svg {
    width: 11px;
    height: 18px;
  }
  
  .suga-epub-side-prev {
    margin-right: 8px;
  }
  
  .suga-epub-side-next {
    margin-left: 8px;
  }
  
  /* Separador del libro: visible solo en móvil al final de los tomos */
  .suga-libro-separador {
    display: block;
    width: 100%;
    margin:  0;
    padding: 0;
    text-align: center;
  }
  
  .suga-libro-separador-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
  
  /* Fondo móvil: capa que cubre el tomo solo en móvil */
  .suga-tomo-bg-mobile {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
  }

  .suga-tomo-wrapper {
    padding-bottom: 40px !important;
    padding-top: 60px !important;
  }
  
  /* Miniatura móvil: en móvil mostrar miniatura y ocultar imagen desktop */
  .suga-tomo-wrapper.suga-tomo-has-thumb-mobile .suga-tomo-personaje-desktop {
    display: none !important;
  }
  
  .suga-tomo-wrapper.suga-tomo-has-thumb-mobile .suga-tomo-personaje-mobile {
    display: block !important;
    position: static;
  }
  
    .suga-cuentos-titulo {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .suga-tomo-card {
        flex-direction: column-reverse;
        text-align: center;
        align-items: center;
        justify-content: center;
        padding: 20px;
        margin: 0 25px 40px 25px;
        gap: 0;
    }
    .suga-tomo-info {
        padding: 0;
    }
    
    .suga-tomo-personaje {
        width: 125px;
        height: auto;
        & img {
          position: static;
        }
    }
    
    .suga-tomo-titulo {
        font-size: 24px;
    }
    
    .suga-epub-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
    }
    
    /* Primera fila: solo botones de navegación */
    .suga-epub-toolbar-center {
        /* order: 1;
        grid-row: 1;
        grid-column: 1;
        width: 100%;
        justify-content: center; */
        display: none;
    }
    
    /* Segunda fila: branding y botones de la derecha juntos */
    .suga-epub-toolbar-left {
        order: 2;
        grid-row: 2;
        grid-column: 1;
        width: auto;
        justify-self: center;
        justify-content: center;
    }
    
    .suga-epub-toolbar-right {
        display: none;
    }
    
    .suga-epub-pagination {
        gap: 3px;
    }
    
    .suga-epub-pagination-item {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .suga-epub-viewer {
        min-height: 400px;
    }
    .suga-tomo-viewer-wrapper .epub-viewer-container.suga-epub-viewer {
      border-radius:0;    
    }
    .suga-epub-viewer .epub-viewer-toolbar {
      padding-bottom: 18px;
      gap: 0px;
    }
    
    /* Ocultar texto en mobile, mostrar icono */
    .suga-desktop-fullscreen-text {
        display: none;
    }
    
    .suga-mobile-fullscreen-icon {
        display: inline-block;
    }
}

/* Mensajes de error */
.suga-cuentos-error {
    padding: 20px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
    border-radius: 4px;
    margin: 20px 0;
}

/* ============================================
   ANIMACIONES
   ============================================ */

/* 1. Animación de entrada de los tomos (fade in + slide up) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación inicial al cargar la página */
.suga-tomo-wrapper {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.suga-tomo-wrapper:nth-child(1) { animation-delay: 0.1s; }
.suga-tomo-wrapper:nth-child(2) { animation-delay: 0.2s; }
.suga-tomo-wrapper:nth-child(3) { animation-delay: 0.3s; }
.suga-tomo-wrapper:nth-child(4) { animation-delay: 0.4s; }
.suga-tomo-wrapper:nth-child(5) { animation-delay: 0.5s; }
.suga-tomo-wrapper:nth-child(6) { animation-delay: 0.6s; }
.suga-tomo-wrapper:nth-child(n+7) { animation-delay: 0.7s; }

/* Si ya tiene la clase reveal (scroll reveal), usar esa animación en su lugar */
.suga-tomo-wrapper.reveal {
    animation: reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 2. Personaje/miniatura: sin animación flotante (evita efecto desmembrado en recortes) */
.suga-tomo-personaje img {
    transition: box-shadow 0.3s ease;
}


/* 3. Animación de hover en las tarjetas */
.suga-tomo-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.suga-tomo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 4. Animación mejorada de los botones de navegación */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(1, 197, 198, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(1, 197, 198, 0);
    }
}

.epub-btn.epub-btn-prev,
.epub-btn.epub-btn-next {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
/* Flechas laterales dentro del inner: flex items (no absolute) para que no se muevan con el zoom/scroll */
.suga-epub-viewer-inner .epub-btn.epub-btn-prev.suga-epub-side-arrow,
.suga-epub-viewer-inner .epub-btn.epub-btn-next.suga-epub-side-arrow {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  flex-shrink: 0;
}

.suga-epub-viewer-inner .epub-btn.epub-btn-prev.suga-epub-side-arrow:hover,
.suga-epub-viewer-inner .epub-btn.epub-btn-next.suga-epub-side-arrow:hover {
  transform: scale(1.08);
}

.suga-epub-viewer-inner .epub-btn.epub-btn-prev.suga-epub-side-arrow {
  margin-right: 5px;
}

.suga-epub-viewer-inner .epub-btn.epub-btn-next.suga-epub-side-arrow {
  margin-left: 5px;
}

.epub-btn.epub-btn-prev:hover,
.epub-btn.epub-btn-next:hover {
    transform: scale(1.15);
    animation: pulse 1.5s ease-in-out infinite;
}

.epub-btn.epub-btn-prev:active,
.epub-btn.epub-btn-next:active {
    transform: scale(0.9);
}

/* 5. Animación de transición de página del EPUB */
@keyframes pageFade {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

.epub-viewer-content .epub-view {
    transition: opacity 0.3s ease-in-out;
}

.epub-viewer-content.changing-page .epub-view {
    animation: pageFade 0.4s ease-in-out;
}

/* 6. Animación mejorada del spinner de carga */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinDot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.epub-loading .epub-spinner {
    animation: spin 1s linear infinite;
    border: 4px solid rgba(1, 197, 198, 0.2);
    border-top-color: #01C5C6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
}

.epub-loading .epub-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(1, 197, 198, 0.4);
    border-top-color: #01C5C6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite reverse;
}

/* 7. Animación del toolbar (slide down) */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suga-epub-toolbar {
    animation: slideDown 0.5s ease-out;
}

/* 8. Animación del botón de pantalla completa */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(221, 247, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(221, 247, 255, 0.8), 0 0 30px rgba(221, 247, 255, 0.6);
    }
}

.epub-btn.epub-btn-fullscreen {
    transition: all 0.3s ease;
}

.epub-btn.epub-btn-fullscreen:hover {
    transform: scale(1.05);
    animation: glow 2s ease-in-out infinite;
}

.epub-btn.epub-btn-fullscreen:active {
    transform: scale(0.95);
}

/* 9. Animación de scroll reveal (se activará con JavaScript) */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Los elementos sin reveal empiezan ocultos para el scroll reveal */
.suga-tomo-wrapper:not(.reveal):not(:nth-child(-n+6)) {
    opacity: 0;
}

/* 10. Animación del título de la sección */
@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suga-cuentos-titulo {
    animation: titleSlide 0.8s ease-out;
}

/* 11. Animación suave en los elementos de paginación */
.suga-epub-pagination-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suga-epub-pagination-item:hover {
    transform: translateY(-2px) scale(1.1);
}

.suga-epub-pagination-item.active {
    animation: pulse 2s ease-in-out infinite;
}

/* 12. Animación de entrada del visor EPUB */
@keyframes viewerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.suga-epub-viewer {
    animation: viewerFadeIn 0.6s ease-out;
}

/* 13. Animación de los iconos SVG en los botones */
.epub-btn svg {
    transition: transform 0.3s ease;
}

.epub-btn:hover svg {
    transform: scale(1.1);
}

.epub-btn:active svg {
    transform: scale(0.9);
}

/* 14. Animación de la tarjeta de información del tomo */
.suga-tomo-info {
    transition: all 0.3s ease;
}

.suga-tomo-card:hover .suga-tomo-info {
    transform: translateX(5px);
}

/* 15. Animación de fondo del wrapper cuando tiene imagen */
.suga-tomo-wrapper {
    transition: background-position 0.5s ease;
}

.suga-tomo-wrapper:hover {
    background-position: bottom center;
}

/* Reducir animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Asegurar que al salir de fullscreen se restauren las dimensiones correctas */
.epub-viewer-container:not(.fullscreen) .epub-viewer-content {
    height: 600px !important;
    min-height: 600px !important;
    width: 100% !important;
    box-sizing: border-box;
}

.epub-viewer-container:not(.fullscreen) {
    width: 80% !important;
    height: auto !important;
    position: relative !important;
    margin: 0 auto;
}

.suga-epub-viewer-inner::-webkit-scrollbar {
  width: 8px;
	height: 8px;
}

/* Fondo */
.suga-epub-viewer-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Barra */
.suga-epub-viewer-inner::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 8px;
}

/* Hover */
.suga-epub-viewer-inner::-webkit-scrollbar-thumb:hover {
  background: #555;
}






@media(min-width: 100px){
	.epub-viewer-container:not(.fullscreen) .epub-viewer-content {
		height: 471px !important;
        min-height: 366px !important;
	}
	.epub-viewer-container:not(.fullscreen) .epub-viewer-content-wrapper {
		height: 471px !important;
		min-height: 366px !important;
	}
}

@media(min-width: 992px){
	.epub-viewer-container:not(.fullscreen) .epub-viewer-content {
		height: 600px !important;
    	min-height: 600px !important;
	}
	.epub-viewer-container:not(.fullscreen) .epub-viewer-content-wrapper {
		height: 600px !important;
		min-height: 600px !important;
	}
	.suga-epub-viewer-inner{
		min-height: 600px;	
	}
	/* Flechas laterales siguen como flex (no absolute) para no moverse con zoom */
	.suga-epub-viewer-inner .epub-btn.epub-btn-prev.suga-epub-side-arrow {
		margin-right: 5px;
	}
	.suga-epub-viewer-inner .epub-btn.epub-btn-next.suga-epub-side-arrow {
		margin-left: 5px;
	}
    .epub-viewer-content .epub-view {
      background: #fff;
      width: 364.5px !important;
    }
	.epub-container{
	  justify-content: center;
	}
	.suga-tomo-viewer-wrapper .epub-viewer-container.suga-epub-viewer.fullscreen .epub-viewer-content .epub-view{
		width: 50% !important; /* En fullscreen dos páginas ocupan todo el ancho */
		min-height: 100% !important;
	}
}




@media(min-height: 600px){
	.epub-container {
      max-width: 1173px !important;
        margin: 0 auto;
    }
}

@media(min-height: 1000px){
	.epub-container {
      max-width: 1535px !important;
        margin: 0 auto;
    }
}













