/* Animaciones de Scroll Base */
.scroll-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}
.scroll-anim.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

.historia-header {
    text-align: center;
    padding: 70px 20px 40px;
    position: relative;
    z-index: 2;
}

.historia-header h1 {
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 15px;
    letter-spacing: -1.5px;
    font-family: 'Georgia', serif;
}

.historia-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-style: italic;
}

.historia-header i.header-icon {
    font-size: 3.5rem;
    color: #E74C3C;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 10px 15px rgba(231, 76, 60, 0.3));
}

/* Contenedor Glassmorphism para lectura tipo libro */
.historia-container {
    max-width: 1200px; 
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 80px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px 60px;
    box-shadow: var(--glass-shine), 0 20px 50px rgba(231, 76, 60, 0.1);
    position: relative;
    z-index: 2;
    overflow: hidden;
    transition: all 0.4s ease;
}

[data-theme="dark"] .historia-container {
    background: rgba(25, 15, 5, 0.8);
    border-color: rgba(231, 76, 60, 0.4);
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.2);
    border-bottom: 2px solid #E74C3C;
}

/* Contenedor Horizontal para páginas (Efecto Swipe) */
#libro-contenido {
    display: flex;
    align-items: flex-start;
    transition: height 0.4s ease;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

#libro-contenido::-webkit-scrollbar {
    display: none;
}

.libro-pagina {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
    padding: 0 5px; 
}

/* Tipografía de Lectura */
.historia-parrafo {
    font-size: 1.25rem; 
    line-height: 2; 
    color: var(--text-main);
    margin-bottom: 35px;
    text-align: justify;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Letra Capital (Drop Cap) */
.historia-primer-parrafo::first-letter {
    font-size: 4.5rem;
    float: left;
    margin-right: 15px;
    margin-top: 5px;
    line-height: 0.8;
    font-weight: 900;
    color: #E74C3C;
}

/* Imágenes con Difuminado a las orillas */
.historia-img-wrapper {
    width: 100%;
    margin: 20px 0 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.historia-img-wrapper img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
    max-height: 600px;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 65%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 65%, transparent 100%);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.historia-img-wrapper:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.info-vacia {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
}

.info-vacia i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Controles Paginación */
.libro-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.btn-paginacion {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--glass-border);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-paginacion:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.1);
    border-color: #E74C3C;
    color: #E74C3C;
}

.btn-paginacion:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-indicator {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Botón Volver Inferior */
.btn-volver-container {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    margin-top: 40px;
}

.btn-volver:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.5);
    color: white;
}

/* Responsivo */
@media (max-width: 768px) {
    .historia-header { padding: 40px 20px 20px; }
    .historia-header h1 { font-size: 2.8rem; }
    .historia-container {
        margin: 0 20px 60px;
        padding: 30px 20px;
        max-width: calc(100% - 40px);
    }
    .historia-parrafo { font-size: 1.15rem; text-align: left; margin-bottom: 25px; }
    .historia-primer-parrafo::first-letter { font-size: 3.5rem; margin-right: 12px; }
    .historia-img-wrapper { margin: 15px 0 30px; }
    .libro-controles { flex-direction: column; gap: 20px; }
    .btn-paginacion { width: 100%; justify-content: center; }
}
```[cite: 1]

Para que estos estilos se apliquen, asegúrate de añadir `<link rel="stylesheet" href="assets/css/caxcanes.css">` dentro del `<head>` de tu archivo `caxcanes.php`[cite: 1, 2].