/**
 * Elementor Flipbook Widget — CSS v2.0.0
 *
 * • 7 tipos de animación: flip3d, flip3d_soft, slide, slide_up, fade, zoom, curl.
 * • Indicador de página en 7 posiciones.
 * • Fondo de página: color, degradado, imagen (con overlay).
 * • Contenido independiente del fondo con layouts flexibles.
 * • Ancho y alto configurables en px, %, vh, vw.
 * • WCAG 2.2 AA: focus, contraste, reduced-motion, forced-colors.
 */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --efb-duration:    600ms;
    --efb-easing:      ease-in-out;
    --efb-perspective: 2000px;
    --efb-shadow-page: 0 6px 24px rgba(0,0,0,0.18);
    --efb-shadow-book: 0 24px 64px rgba(0,0,0,0.30);
    --efb-radius:      3px;
    --efb-nav-size:    48px;
    --efb-focus:       3px solid #005fcc;
    --efb-focus-off:   2px;
    --efb-spine:       14px;
    --efb-thumb-w:     60px;
    --efb-thumb-h:     80px;
}

/* ── Utilidad: solo lectores de pantalla ────────────────────────────────────── */
.efb-sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ── Wrapper ────────────────────────────────────────────────────────────────── */
.efb-flipbook-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 16px;
    box-sizing: border-box;
    isolation: isolate;
}

/* ── Contenedor del libro ───────────────────────────────────────────────────── */
.efb-flipbook-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 580px;
    perspective: var(--efb-perspective);
    perspective-origin: center center;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* ── Libro ──────────────────────────────────────────────────────────────────── */
.efb-book {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    transform-style: preserve-3d;
}

/* Lomo central decorativo */
.efb-book::after {
    content: '';
    position: absolute;
    top: 4%; left: calc(50% - var(--efb-spine)/2);
    width: var(--efb-spine); height: 92%;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.12) 0%,
        rgba(0,0,0,0.04) 30%,
        rgba(255,255,255,0.18) 50%,
        rgba(0,0,0,0.04) 70%,
        rgba(0,0,0,0.12) 100%
    );
    pointer-events: none; z-index: 20; border-radius: 2px;
}

/* Sombra bajo el libro */
.efb-book-shadow {
    position: absolute;
    bottom: -28px; left: 50%; transform: translateX(-50%);
    width: 68%; height: 28px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.30) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PÁGINA
══════════════════════════════════════════════════════════════════════════════ */
.efb-page {
    position: absolute;
    top: 0; width: 50%; height: 100%;
    overflow: hidden;
    box-shadow: var(--efb-shadow-page);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Oculta por defecto */
    opacity: 0; pointer-events: none; z-index: 1;
    will-change: transform, opacity;
}

.efb-page.efb-page--left {
    left: 0;
    border-radius: var(--efb-radius) 0 0 var(--efb-radius);
    transform-origin: right center;
    border-right: 1px solid rgba(0,0,0,0.07);
}
.efb-page.efb-page--right {
    right: 0;
    border-radius: 0 var(--efb-radius) var(--efb-radius) 0;
    transform-origin: left center;
    border-left: 1px solid rgba(0,0,0,0.07);
}

/* Activa */
.efb-page.efb-page--active {
    opacity: 1; pointer-events: auto; z-index: 2;
}

/* Overlay sobre imagen de fondo */
.efb-page-overlay {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.efb-page-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    overflow: hidden; z-index: 2;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ANIMACIONES — 7 TIPOS
   Cada tipo usa clases CSS + JS que aplica la animación correcta.
══════════════════════════════════════════════════════════════════════════════ */

/* ─ 1. flip3d ───────────────────────────────────────────────────────────────── */
.efb-anim-flip3d .efb-page.efb-anim-out-left  { animation: efbFlipOutL var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d .efb-page.efb-anim-in-left   { animation: efbFlipInL  var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d .efb-page.efb-anim-out-right { animation: efbFlipOutR var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d .efb-page.efb-anim-in-right  { animation: efbFlipInR  var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }

@keyframes efbFlipOutL {
    0%   { transform: rotateY(0deg);    opacity: 1; box-shadow: var(--efb-shadow-page); }
    40%  { transform: rotateY(-50deg);  opacity: 0.8; box-shadow: -8px 0 20px rgba(0,0,0,0.25); }
    100% { transform: rotateY(-180deg); opacity: 0; box-shadow: none; }
}
@keyframes efbFlipInL {
    0%   { transform: rotateY(180deg);  opacity: 0; box-shadow: none; }
    60%  { transform: rotateY(30deg);   opacity: 0.8; box-shadow: -8px 0 20px rgba(0,0,0,0.25); }
    100% { transform: rotateY(0deg);    opacity: 1; box-shadow: var(--efb-shadow-page); }
}
@keyframes efbFlipOutR {
    0%   { transform: rotateY(0deg);   opacity: 1; box-shadow: var(--efb-shadow-page); }
    40%  { transform: rotateY(50deg);  opacity: 0.8; box-shadow: 8px 0 20px rgba(0,0,0,0.25); }
    100% { transform: rotateY(180deg); opacity: 0; box-shadow: none; }
}
@keyframes efbFlipInR {
    0%   { transform: rotateY(-180deg); opacity: 0; box-shadow: none; }
    60%  { transform: rotateY(-30deg);  opacity: 0.8; box-shadow: 8px 0 20px rgba(0,0,0,0.25); }
    100% { transform: rotateY(0deg);    opacity: 1; box-shadow: var(--efb-shadow-page); }
}

/* ─ 2. flip3d_soft — con sombra dinámica ───────────────────────────────────── */
.efb-anim-flip3d_soft .efb-page.efb-anim-out-left  { animation: efbFlipSoftOutL var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d_soft .efb-page.efb-anim-in-left   { animation: efbFlipSoftInL  var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d_soft .efb-page.efb-anim-out-right { animation: efbFlipSoftOutR var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }
.efb-anim-flip3d_soft .efb-page.efb-anim-in-right  { animation: efbFlipSoftInR  var(--efb-duration) var(--efb-easing) forwards; z-index: 10; }

@keyframes efbFlipSoftOutL {
    0%   { transform: rotateY(0deg)    scaleX(1);    opacity: 1;   filter: brightness(1);    }
    50%  { transform: rotateY(-90deg)  scaleX(0.95); opacity: 0.5; filter: brightness(0.7);  }
    100% { transform: rotateY(-180deg) scaleX(1);    opacity: 0;   filter: brightness(0.5);  }
}
@keyframes efbFlipSoftInL {
    0%   { transform: rotateY(180deg)  scaleX(1);    opacity: 0;   filter: brightness(0.5);  }
    50%  { transform: rotateY(90deg)   scaleX(0.95); opacity: 0.5; filter: brightness(0.7);  }
    100% { transform: rotateY(0deg)    scaleX(1);    opacity: 1;   filter: brightness(1);    }
}
@keyframes efbFlipSoftOutR {
    0%   { transform: rotateY(0deg)   scaleX(1);    opacity: 1;   filter: brightness(1);   }
    50%  { transform: rotateY(90deg)  scaleX(0.95); opacity: 0.5; filter: brightness(0.7); }
    100% { transform: rotateY(180deg) scaleX(1);    opacity: 0;   filter: brightness(0.5); }
}
@keyframes efbFlipSoftInR {
    0%   { transform: rotateY(-180deg) scaleX(1);    opacity: 0;   filter: brightness(0.5); }
    50%  { transform: rotateY(-90deg)  scaleX(0.95); opacity: 0.5; filter: brightness(0.7); }
    100% { transform: rotateY(0deg)    scaleX(1);    opacity: 1;   filter: brightness(1);   }
}

/* ─ 3. slide ────────────────────────────────────────────────────────────────── */
.efb-anim-slide .efb-page.efb-anim-out-fwd  { animation: efbSlideOutFwd var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-slide .efb-page.efb-anim-in-fwd   { animation: efbSlideInFwd  var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }
.efb-anim-slide .efb-page.efb-anim-out-back { animation: efbSlideOutBack var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-slide .efb-page.efb-anim-in-back  { animation: efbSlideInBack  var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }

@keyframes efbSlideOutFwd  { from { transform: translateX(0);     opacity: 1; } to { transform: translateX(-60%); opacity: 0; } }
@keyframes efbSlideInFwd   { from { transform: translateX(60%);   opacity: 0; } to { transform: translateX(0);    opacity: 1; } }
@keyframes efbSlideOutBack { from { transform: translateX(0);     opacity: 1; } to { transform: translateX(60%);  opacity: 0; } }
@keyframes efbSlideInBack  { from { transform: translateX(-60%);  opacity: 0; } to { transform: translateX(0);    opacity: 1; } }

/* ─ 4. slide_up ─────────────────────────────────────────────────────────────── */
.efb-anim-slide_up .efb-page.efb-anim-out-fwd  { animation: efbSlideUpOut  var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-slide_up .efb-page.efb-anim-in-fwd   { animation: efbSlideUpIn   var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }
.efb-anim-slide_up .efb-page.efb-anim-out-back { animation: efbSlideDownOut var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-slide_up .efb-page.efb-anim-in-back  { animation: efbSlideDownIn  var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }

@keyframes efbSlideUpOut   { from { transform: translateY(0);    opacity: 1; } to { transform: translateY(-60%); opacity: 0; } }
@keyframes efbSlideUpIn    { from { transform: translateY(60%);  opacity: 0; } to { transform: translateY(0);    opacity: 1; } }
@keyframes efbSlideDownOut { from { transform: translateY(0);    opacity: 1; } to { transform: translateY(60%);  opacity: 0; } }
@keyframes efbSlideDownIn  { from { transform: translateY(-60%); opacity: 0; } to { transform: translateY(0);    opacity: 1; } }

/* ─ 5. fade ─────────────────────────────────────────────────────────────────── */
.efb-anim-fade .efb-page.efb-anim-out-fwd,
.efb-anim-fade .efb-page.efb-anim-out-back { animation: efbFadeOut var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-fade .efb-page.efb-anim-in-fwd,
.efb-anim-fade .efb-page.efb-anim-in-back  { animation: efbFadeIn  var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }

@keyframes efbFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes efbFadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* ─ 6. zoom + fade ──────────────────────────────────────────────────────────── */
.efb-anim-zoom .efb-page.efb-anim-out-fwd,
.efb-anim-zoom .efb-page.efb-anim-out-back { animation: efbZoomOut var(--efb-duration) var(--efb-easing) forwards; z-index: 3; }
.efb-anim-zoom .efb-page.efb-anim-in-fwd,
.efb-anim-zoom .efb-page.efb-anim-in-back  { animation: efbZoomIn  var(--efb-duration) var(--efb-easing) forwards; z-index: 4; }

@keyframes efbZoomOut { from { transform: scale(1);    opacity: 1; } to { transform: scale(0.85); opacity: 0; } }
@keyframes efbZoomIn  { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1);    opacity: 1; } }

/* ─ 7. curl — doblez de esquina ─────────────────────────────────────────────── */
.efb-anim-curl .efb-page.efb-anim-out-left  { animation: efbCurlOutL var(--efb-duration) var(--efb-easing) forwards; transform-origin: bottom right; z-index: 10; }
.efb-anim-curl .efb-page.efb-anim-in-left   { animation: efbCurlInL  var(--efb-duration) var(--efb-easing) forwards; transform-origin: bottom right; z-index: 10; }
.efb-anim-curl .efb-page.efb-anim-out-right { animation: efbCurlOutR var(--efb-duration) var(--efb-easing) forwards; transform-origin: bottom left; z-index: 10; }
.efb-anim-curl .efb-page.efb-anim-in-right  { animation: efbCurlInR  var(--efb-duration) var(--efb-easing) forwards; transform-origin: bottom left; z-index: 10; }

@keyframes efbCurlOutL {
    0%   { transform: rotateX(0deg)   rotateY(0deg);   opacity: 1; }
    50%  { transform: rotateX(10deg)  rotateY(-80deg); opacity: 0.6; }
    100% { transform: rotateX(20deg)  rotateY(-160deg); opacity: 0; }
}
@keyframes efbCurlInL {
    0%   { transform: rotateX(20deg)  rotateY(160deg);  opacity: 0; }
    50%  { transform: rotateX(10deg)  rotateY(60deg);   opacity: 0.6; }
    100% { transform: rotateX(0deg)   rotateY(0deg);    opacity: 1; }
}
@keyframes efbCurlOutR {
    0%   { transform: rotateX(0deg)   rotateY(0deg);    opacity: 1; }
    50%  { transform: rotateX(10deg)  rotateY(80deg);   opacity: 0.6; }
    100% { transform: rotateX(20deg)  rotateY(160deg);  opacity: 0; }
}
@keyframes efbCurlInR {
    0%   { transform: rotateX(20deg)  rotateY(-160deg); opacity: 0; }
    50%  { transform: rotateX(10deg)  rotateY(-60deg);  opacity: 0.6; }
    100% { transform: rotateX(0deg)   rotateY(0deg);    opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   CONTENIDO DE PÁGINAS
══════════════════════════════════════════════════════════════════════════════ */

.efb-page-img {
    width: 100%; flex-shrink: 0;
    display: block; object-fit: cover;
    max-height: 55%;
}
.efb-page-img-bottom {
    width: 100%; display: block; object-fit: cover;
    max-height: 50%; flex-shrink: 0; margin-top: auto;
}
.efb-page-img-side {
    display: block; object-fit: cover; flex-shrink: 0;
}

.efb-page-text-area {
    overflow-y: auto; flex: 1;
    font-size: clamp(0.72rem, 1.1vw, 0.88rem);
    line-height: 1.7;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.18) transparent;
    padding: 20px; /* sobreescrito por control de Elementor */
}
.efb-page-text-area::-webkit-scrollbar { width: 4px; }
.efb-page-text-area::-webkit-scrollbar-track { background: transparent; }
.efb-page-text-area::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 2px; }

.efb-layout-h { height: 100%; overflow: hidden; }

/* Video */
.efb-video-wrapper {
    position: relative; width: 100%; padding-top: 56.25%;
    background: #000; flex-shrink: 0;
}
.efb-video-iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.efb-video-error {
    padding: 16px; color: #cc0000; font-size: 0.82rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   INDICADOR DE PÁGINA
══════════════════════════════════════════════════════════════════════════════ */

.efb-indicator {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 600;
    background: rgba(255,255,255,0.90);
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 300ms ease;
    align-self: flex-start;
    pointer-events: none;
}

/* Posiciones externas */
.efb-indicator--top_left    { align-self: flex-start; }
.efb-indicator--top_center  { align-self: center; }
.efb-indicator--top_right   { align-self: flex-end; }
.efb-indicator--bottom_left { align-self: flex-start; }
.efb-indicator--bottom_center { align-self: center; }
.efb-indicator--bottom_right { align-self: flex-end; }

/* Posición interna (dentro del libro) */
.efb-indicator--inside {
    position: absolute;
    top: 10px; left: 50%; transform: translateX(-50%);
    z-index: 30;
}

/* Barra de progreso */
.efb-indicator .efb-progress-track {
    width: 140px; height: 6px;
    background: rgba(0,0,0,0.12);
    border-radius: 3px; overflow: hidden;
}
.efb-progress-fill {
    height: 100%; background: #005fcc;
    border-radius: 3px;
    transition: width var(--efb-duration) var(--efb-easing);
}

/* ══════════════════════════════════════════════════════════════════════════════
   NAVEGACIÓN
══════════════════════════════════════════════════════════════════════════════ */

.efb-navigation {
    display: flex; align-items: center;
    justify-content: center; gap: 10px;
    flex-wrap: wrap;
}

.efb-nav-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--efb-nav-size); height: var(--efb-nav-size);
    min-width: 44px; min-height: 44px;
    border: none; border-radius: 50%;
    background: #2c2c2c; cursor: pointer;
    transition: background 180ms ease, transform 140ms ease, opacity 180ms ease;
    position: relative;
}
.efb-nav-btn svg { fill: #fff; pointer-events: none; transition: fill 180ms ease; }
.efb-nav-btn:hover:not(:disabled) { background: #444; transform: scale(1.08); }
.efb-nav-btn:active:not(:disabled) { transform: scale(0.94); }
.efb-nav-btn:focus-visible { outline: var(--efb-focus); outline-offset: var(--efb-focus-off); }
.efb-nav-btn:disabled { opacity: 0.32; cursor: not-allowed; pointer-events: none; }
.efb-btn-pause[aria-pressed="true"] { background: #005fcc; }

.efb-page-counter { display: flex; align-items: center; gap: 6px; }

.efb-page-input {
    width: 50px; height: 36px;
    border: 2px solid #ccc; border-radius: 6px;
    text-align: center; font-size: 0.93rem; font-weight: 600;
    color: #1a1a1a; background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    -moz-appearance: textfield; appearance: textfield;
}
.efb-page-input::-webkit-inner-spin-button,
.efb-page-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.efb-page-input:focus-visible {
    outline: none; border-color: #005fcc;
    box-shadow: 0 0 0 3px rgba(0,95,204,0.20);
}

.efb-page-total { font-size: 0.82rem; color: #666; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════════════════
   MINIATURAS
══════════════════════════════════════════════════════════════════════════════ */

.efb-thumbnails {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 8px;
    max-width: 100%; padding: 4px;
}

.efb-thumb-btn {
    width: var(--efb-thumb-w); height: var(--efb-thumb-h);
    border: 2px solid transparent; border-radius: 4px;
    padding: 0; overflow: hidden; cursor: pointer;
    background: #e8e4dc;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.efb-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.efb-thumb-btn span[aria-hidden] { font-size: 0.73rem; font-weight: 700; color: #666; }
.efb-thumb-btn:hover { border-color: #aaa; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.efb-thumb-btn.efb-thumb-active,
.efb-thumb-btn[aria-selected="true"] { border-color: #005fcc; box-shadow: 0 0 0 1px #005fcc; }
.efb-thumb-btn:focus-visible { outline: var(--efb-focus); outline-offset: var(--efb-focus-off); }

/* ══════════════════════════════════════════════════════════════════════════════
   EDITOR DE ELEMENTOR — Modo edición
══════════════════════════════════════════════════════════════════════════════ */

.efb-is-editor .efb-page {
    /* En el editor todas las páginas se apilan; JS activa la correcta */
    pointer-events: auto;
}
.efb-is-editor .efb-page.efb-page--active {
    opacity: 1; z-index: 5;
}
/* El editor no ejecuta el JS de animación — transición simple */
.efb-is-editor .efb-page {
    transition: opacity 250ms ease;
}

.efb-empty-notice {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; border: 2px dashed #b0b0b0;
    border-radius: 8px; color: #888; font-size: 14px;
    font-style: italic; background: #fafafa;
    text-align: center; padding: 20px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .efb-flipbook-container { height: 460px; }
}

@media (max-width: 768px) {
    .efb-flipbook-container {
        height: 380px;
        perspective: none;
    }
    /* Página única: 100% ancho */
    .efb-page {
        width: 100% !important;
        left: 0 !important; right: 0 !important;
        border-radius: var(--efb-radius) !important;
        transform-origin: center !important;
    }
    .efb-book::after { display: none; }

    /* Simplificar todas las animaciones en móvil a fade+slide */
    .efb-page.efb-anim-out-left,
    .efb-page.efb-anim-out-fwd,
    .efb-page.efb-anim-out-right,
    .efb-page.efb-anim-out-back { animation: efbMobOut var(--efb-duration) ease forwards !important; }
    .efb-page.efb-anim-in-left,
    .efb-page.efb-anim-in-fwd,
    .efb-page.efb-anim-in-right,
    .efb-page.efb-anim-in-back  { animation: efbMobIn  var(--efb-duration) ease forwards !important; }

    @keyframes efbMobOut { from { opacity: 1; transform: translateX(0); }    to { opacity: 0; transform: translateX(-20px); } }
    @keyframes efbMobIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

    --efb-thumb-w: 44px; --efb-thumb-h: 58px;
}

@media (max-width: 480px) {
    .efb-flipbook-container { height: 300px; }
    .efb-page-text-area { padding: 12px; font-size: 0.78rem; }
    .efb-thumbnails { gap: 5px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   prefers-reduced-motion (WCAG 2.3.3)
══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .efb-page,
    .efb-page[class*="efb-anim-"] {
        animation: none !important;
        transition: opacity 120ms ease !important;
        transform: none !important;
        filter: none !important;
    }
    .efb-nav-btn { transition: none !important; }
    .efb-thumb-btn { transition: border-color 80ms ease !important; transform: none !important; }
    .efb-progress-fill { transition: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   forced-colors (Alto contraste del sistema) — WCAG
══════════════════════════════════════════════════════════════════════════════ */

@media (forced-colors: active) {
    .efb-nav-btn {
        border: 2px solid ButtonText; background: ButtonFace;
        forced-color-adjust: none;
    }
    .efb-nav-btn:focus-visible { outline: 3px solid Highlight; }
    .efb-thumb-btn { border-color: ButtonText; forced-color-adjust: none; }
    .efb-thumb-btn.efb-thumb-active { border-color: Highlight; }
    .efb-page-input { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
    .efb-indicator { background: Canvas; color: CanvasText; box-shadow: none; border: 1px solid ButtonText; }
    .efb-progress-fill { background: Highlight; }
}
