@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=MedievalSharp&family=Dancing+Script:wght@400;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,700&family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");
/* ======================================= */
/* ==    INICIO DEL DISEÑO "LIST VIEW"    == */
/* ======================================= */

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1a202c;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.modal-open {
    overflow: hidden;
}

/* === Splash de bienvenida === */
.app-splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, rgba(243, 232, 216, 0.06), transparent 45%), linear-gradient(135deg, #0a1427 0%, #0b152b 50%, #0a1427 100%);
}

.splash-shine-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: shineGold 2s ease-in-out forwards;
}

.splash-iso-wrapper {
    /* Radial mask to fade out edges and remove square halo */
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
    mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-size: cover;
}

.app-splash img {
    width: clamp(260px, 60vw, 520px);
    max-height: 80vh;
    object-fit: contain;
    /* Masking to remove black background */
    -webkit-mask-image: url('Splash.png');
    mask-image: url('Splash.png');
    -webkit-mask-mode: luminance;
    mask-mode: luminance;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    mix-blend-mode: normal;
}

@keyframes shineGold {
    0% {
        filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
    }

    100% {
        filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0));
    }
}

@keyframes splashEntry {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-shine-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: shineGold 2s ease-in-out forwards, splashEntry 0.8s ease-out forwards;
}

.app-splash.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    background-color: #d4af37;
    color: #0a1427;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-bottom-right-radius: 12px;
    z-index: 999;
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .header-icon-wrapper {
        margin-top: 0.75rem;
    }

    .page-header {
        padding-top: 1.5rem;
    }

    .page-header .text-center {
        margin-top: 0.75rem;
    }
}

main {
    padding-top: 0;
}

.text-custom-blue {
    color: #2563eb;
    /* Azul para títulos */
}

/* =========================================== */
/* === NUEVO ESTILO DE HEADER "HARRY POTTER" === */
/* =========================================== */

/* Define la animación de brillo */
@keyframes magicGlow {

    0%,
    100% {
        text-shadow: 0 0 8px #e6d3a8, 0 0 16px #e6d3a8, 0 0 24px #a88d57;
        filter: drop-shadow(0 0 4px #e6d3a8) drop-shadow(0 0 8px #a88d57);
    }

    50% {
        text-shadow: 0 0 16px #e6d3a8, 0 0 24px #a88d57, 0 0 32px #a88d57;
        filter: drop-shadow(0 0 8px #e6d3a8) drop-shadow(0 0 16px #a88d57);
    }
}

.font-harry-potter {
    font-family: 'MedievalSharp', cursive;
}

/* 1. Animación que se ejecuta UNA SOLA VEZ al cargar */
.run-once {
    animation: magicGlow 1s ease-in-out 1;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(230, 211, 168, 0.6)) drop-shadow(0 0 12px rgba(168, 141, 87, 0.65));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(230, 211, 168, 0.9)) drop-shadow(0 0 22px rgba(168, 141, 87, 0.85));
        transform: scale(1.015);
    }
}

.logo-glow-once {
    animation: logoGlow 1s ease-in-out 1;
}

/* 2. Animación que se ejecuta SOLO AL PASAR EL MOUSE */
.page-header:hover .magic-glow-hover {
    animation: magicGlow 3s ease-in-out infinite;
}


.page-header {
    background: linear-gradient(140deg, #050c1b 0%, #0c1b34 48%, #17335f 100%);
    color: #f3e8d8;
    /* Color pergamino/hueso claro */
    padding: 3.5rem 0 3rem;
    /* más aire vertical */
    border-bottom: 2px solid #a88d57;
    /* Un borde dorado/bronce */
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.9) 18%, #f3e8d8 45%, rgba(212, 175, 55, 0.9) 82%, rgba(212, 175, 55, 0) 100%);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(212, 175, 55, 0.55);
}

.hero-subtitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    margin-bottom: 14px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 20%, rgba(228, 193, 120, 0.35), rgba(12, 19, 51, 0.6));
    border: 1px solid rgba(212, 175, 55, 0.55);
    color: #f8eed8;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
}

.hero-pill svg {
    width: 18px;
    height: 18px;
}

.hero-subtext {
    font-size: 0.95rem;
    color: #d1c5ab;
    opacity: 0.88;
    letter-spacing: 0.01em;
    margin-top: 8px;
}

.site-footer {
    background: linear-gradient(135deg, #040a16 0%, #0a1427 50%, #102747 100%);
    color: #f0e5cc;
    padding: 0.9rem 0 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    position: relative;
    text-align: center;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.35);
}

.site-footer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.9) 18%, #f3e8d8 45%, rgba(212, 175, 55, 0.9) 82%, rgba(212, 175, 55, 0) 100%);
    box-shadow: 0 -6px 18px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(212, 175, 55, 0.55);
}

.site-footer p {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #f6edd4;
}

/* --- NUEVOS ICONOS DEL HEADER --- */
.header-icon-wrapper {
    position: relative;
    display: inline-block;
}

.header-icon-sphere {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: #181c2a;
    border: 1px solid #e6d3a8;
    color: #e6d3a8;
    /* Icono dorado */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-icon-sphere:hover {
    background-color: #f3e8d8;
    /* Fondo claro */
    color: #181c2a;
    /* Icono oscuro */
    transform: scale(1.1);
}

.header-icon-sphere:focus-visible,
.icon-sphere:focus-visible,
.welcome-pill:focus-visible,
.info-tooltip-button:focus-visible,
#scrollTopBtn:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

.header-tooltip-bubble {
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: #1f2937;
    /* Globo negro/oscuro */
    color: #f9fafb;
    /* Letra clara */
    font-weight: 300;
    border: 1px solid #a88d57;
    /* Borde dorado */
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.header-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.header-icon-wrapper:hover .header-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* === Botón de instalación PWA === */
.pwa-install-trigger {
    position: relative;
}

.pwa-highlight {
    animation: installGlow 1.35s ease-in-out infinite;
}

@keyframes installGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
        transform: scale(1);
    }

    60% {
        box-shadow: 0 0 0 12px rgba(212, 175, 55, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
        transform: scale(1);
    }
}

.pwa-install-dropdown {
    position: absolute;
    top: 115%;
    right: -10px;
    width: min(280px, 82vw);
    background: #0f1b2f;
    color: #f9fafb;
    border: 1px solid rgba(212, 175, 55, 0.7);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    z-index: 30;
}

.pwa-install-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 22px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent rgba(212, 175, 55, 0.7) transparent;
}

.pwa-install-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.pwa-install-steps {
    margin: 0 0 8px 0;
    padding-left: 16px;
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.45;
}

.pwa-install-steps li {
    margin-bottom: 4px;
}

.pwa-install-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(120deg, #d4af37, #f3e8d8);
    color: #0b1323;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.4);
}

.pwa-install-action:hover {
    transform: translateY(-1px);
}

.pwa-install-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.pwa-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    z-index: 120;
    display: none;
}

.pwa-guide-overlay.hidden {
    display: none;
}

.pwa-guide-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, 92vw);
    background: linear-gradient(160deg, #0b1426 0%, #0f1b2f 55%, #0c1c35 100%);
    color: #f3e8d8;
    border: 1px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 20px 22px;
    z-index: 130;
    line-height: 1.55;
}

.pwa-guide-modal h3 {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f7e3a6;
}



.pwa-guide-steps {
    margin: 12px 0;
    padding-left: 18px;
}

.pwa-guide-steps li {
    margin-bottom: 8px;
}

.pwa-guide-close {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(120deg, rgba(243, 232, 216, 0.95), rgba(212, 175, 55, 0.92));
    color: #0a1427;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.pwa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 28;
    display: none;
}

.pwa-overlay.hidden {
    display: none;
}

.info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 90;
    display: none;
}

.info-overlay.hidden {
    display: none;
}

.info-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px);
    max-width: 480px;
    background: linear-gradient(145deg, #0b1426 0%, #0f1b2f 60%);
    color: #f3e8d8;
    border: 1px solid #d4af37;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
    padding: 18px 20px;
    border-radius: 14px;
    z-index: 95;
    line-height: 1.55;
    font-size: 0.95rem;
}

/* =========================================== */

.magic-book-frame {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    margin-top: 0;
}

.magic-book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================================= */
/* ===   NUEVO SUBRAYADO MÁGICO (MAGIC DIVIDER)  === */
/* ================================================= */
.magic-divider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 1.5rem auto;
    gap: 15px;
    opacity: 0.9;
}

.divider-line {
    height: 2px;
    flex-grow: 1;
    border-radius: 2px;
    position: relative;
}

.divider-line.left {
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.3) 20%, #e6d3a8 100%);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.divider-line.right {
    background: linear-gradient(90deg, #e6d3a8 0%, rgba(212, 175, 55, 0.3) 80%, transparent 100%);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.divider-gem {
    width: 10px;
    height: 10px;
    background: #e6d3a8;
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px #0c1b34, 0 0 0 3px #d4af37, 0 0 12px rgba(230, 211, 168, 0.6);
    flex-shrink: 0;
    position: relative;
    animation: pulseGem 3s infinite ease-in-out;
}

@keyframes pulseGem {

    0%,
    100% {
        box-shadow: 0 0 0 2px #0c1b34, 0 0 0 3px #d4af37, 0 0 8px rgba(230, 211, 168, 0.4);
    }

    50% {
        box-shadow: 0 0 0 2px #0c1b34, 0 0 0 3px #f3e8d8, 0 0 18px rgba(230, 211, 168, 0.9);
    }
}

.class-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.class-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, transform 0.2s ease;
}

.class-title-link:hover {
    color: #0ea5e9;
    transform: translateY(-1px);
}

.class-title-link.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

.class-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: center;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (min-width: 640px) {
    .class-title-wrapper {
        justify-content: flex-start;
        text-align: left;
    }
}

.new-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(234, 179, 8, 0.95), rgba(212, 175, 55, 0.95));
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}

@keyframes beamSweep {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }
}

.class-row-container {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    color: #0f172a;
    position: relative;
    z-index: 1;
}

.class-row-container:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background-color: #fafafa;
    z-index: 2;
    transform: translateY(-1px);
}

/* =========================================== */
/* ===   NUEVO DISEÑO DE "BADGE" (ETIQUETA) === */
/* =========================================== */
.class-number-wrapper {
    flex-shrink: 0;
    min-width: 6.75rem;
    display: flex;
    justify-content: center;
}

.class-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    white-space: nowrap;

    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #2563eb;

    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* =========================================== */


/* ============================================= */
/* === INICIO DE LA ACTUALIZACIÓN DE ICONOS === */
/* ============================================= */

/* Estilo de Iconos en Esfera (Base Gris Intermedio) */
.icon-sphere {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: #f3f4f6;
    color: #9ca3af;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- NUEVAS CLASES DE HOVER --- */
.icon-sphere.hover-desc:hover,
.icon-sphere.accordion-trigger.active {
    background-color: #d1d5db;
    color: #374151;
}

.icon-sphere.accordion-trigger {
    transition: all 0.3s ease;
}

.icon-sphere.accordion-trigger.active {
    transform: rotate(180deg);
}

/* CORRECCIÓN: De vuelta a LILA (MORADO) */
.icon-sphere.hover-video:hover {
    background-color: #f3e8ff;
    color: #9333ea;
}

.icon-sphere.hover-podcast {
    color: #9ca3af;
    /* Base gris */
}

.icon-sphere.hover-podcast:hover {
    background-color: #dcfce7;
    color: #1DB954;
}

.icon-sphere.hover-notes:hover {
    background-color: #e0e7ff;
    color: #2563eb;
    /* text-custom-blue */
}

.icon-sphere.hover-infografia:hover {
    background-color: #ccfbf1;
    color: #0f766e;
}

.icon-sphere.icon-disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.icon-sphere.icon-disabled:hover {
    color: #9ca3af;
    background-color: #e5e7eb;
}

/* =========================================== */
/* ===   CSS TOOLTIPS (DISEÑO SUTIL)       === */
/* =========================================== */

.icon-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-bubble {
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);

    background-color: #f9fafb;
    /* Relleno: gris clarito (bg-gray-50) */
    color: #374151;
    /* Letra: gris oscuro (text-gray-700) */
    font-weight: 300;
    /* Letra: finita (font-light) */
    border: 1px solid #e5e7eb;
    /* Borde: gris finito (border-gray-200) */

    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;

    z-index: 10;
}

/* Triángulo de la burbuja */
.tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;

    border-color: #f9fafb transparent transparent transparent;
}

.icon-wrapper:hover .tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* =========================================== */
/* ===      FIN DE CSS PARA TOOLTIPS       === */
/* =========================================== */


/* Oculta el contenido del acordeón por defecto */
.accordion-content.hidden {
    display: none;
}

/* Margen y estilo de descripciones */
.accordion-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    color: #374151;
    margin: 0 1.5rem;
    /* Reduced side margins for better mobile fit, can be increased on desktop */
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-align: left;
    /* Changed from justify for better readability */
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .accordion-description {
        margin: 0 3rem;
    }
}

.accordion-description ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.accordion-description li {
    margin-bottom: 0.25rem;
}

.accordion-description p {
    margin: 0;
}

.accordion-description strong {
    color: #111827;
}

.desc-paragraph {
    color: #4b5563;
}

.desc-bullet {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    color: #374151;
    align-items: start;
}

.desc-bullet-icon {
    color: #d4af37;
    font-weight: 800;
    margin-top: 1px;
}

@media (max-width: 768px) {
    .accordion-content {
        padding-left: 0.125rem;
        padding-right: 0.125rem;
    }

    .accordion-description {
        font-size: 0.9rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-left: 1rem;
        margin-right: 1rem;
        line-height: 1.6;
    }
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: radial-gradient(circle at 30% 30%, #f7e3a6 0%, #d4af37 45%, #b8891a 100%);
    color: #0a1427;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    width: 46px;
    height: 46px;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.35s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(212, 175, 55, 0.25);
    z-index: 200;
}

/* Force hide scroll button when modal is open */
body.modal-open #scrollTopBtn {
    display: none !important;
}

#scrollTopBtn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(243, 232, 216, 0.35);
}

#scrollTopBtn svg {
    width: 22px;
    height: 22px;
}

/* --- Estilos del Buscador --- */
.search-container {
    display: flex;
    justify-content: center;
    padding: 12px 10px 10px;
}

.search-wrapper {
    width: 100%;
    max-width: 720px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fff;
    border: 2px solid #D4AF37;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

#searchInput {
    width: 100%;
    padding: 0.6rem 0.25rem;
    font-size: 1rem;
    border: none;
    outline: none;
    background: transparent;
}

#searchInput::placeholder {
    color: #9ca3af;
}

.search-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    fill: #D4AF37;
}

.search-clear-btn {
    background-color: #f3f4f6;
    color: #0f172a;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.search-clear-btn:hover,
.search-clear-btn:focus-visible {
    background-color: #d4af37;
    color: #0b1323;
}

.search-clear-btn svg {
    width: 12px;
    height: 12px;
}

.welcome-section {
    background-color: #f9fafb;
}

.welcome-pill {
    background: linear-gradient(135deg, #d4af37, #f3e8d8);
    color: #181c2a;
    border-radius: 999px;
    padding: 14px 24px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.45);
}

.magic-panel {
    background: linear-gradient(135deg, #0f1b2f 0%, #132a4d 60%, #0f1b2f 100%);
    box-shadow: 0 30px 55px rgba(9, 10, 20, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.magic-panel::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.3), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(236, 209, 139, 0.25), transparent 60%);
    pointer-events: none;
}

.magic-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(115deg, rgba(212, 175, 55, 0.9), rgba(243, 232, 216, 0.35), rgba(212, 175, 55, 0.8));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.magic-panel>* {
    position: relative;
    z-index: 1;
}

.inline-tip {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.35rem;
}

.compendio-shell {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.class-list-scroll {
    max-height: 500px;
    scroll-behavior: smooth;
}

@media (max-width: 640px) {
    .class-list-scroll {
        max-height: 70vh;
    }
}

.class-list-scroll::-webkit-scrollbar {
    width: 12px;
    background: transparent;
}

.class-list-scroll::-webkit-scrollbar-track {
    margin: 6px;
    background: linear-gradient(180deg, rgba(10, 20, 39, 0.35) 0%, rgba(10, 20, 39, 0.1) 100%);
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.25);
}

.class-list-scroll::-webkit-scrollbar-thumb {
    background: radial-gradient(circle at 30% 30%, #f7e3a6 0%, #d4af37 40%, #b8891a 100%);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 2px 10px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(243, 232, 216, 0.35);
}

.class-list-scroll::-webkit-scrollbar-thumb:hover {
    background: radial-gradient(circle at 30% 30%, #f9e9bd 0%, #e3c35f 45%, #c19128 100%);
}

.class-list-scroll::-webkit-scrollbar-corner {
    background: transparent;
}

.class-list-scroll {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(10, 20, 39, 0.15);
}

/* --- Estilos del Tooltip de Información --- */

.info-tooltip-button {
    background: transparent;
    border: none;
    color: #D4AF37;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.info-tooltip-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-tooltip-message {
    visibility: hidden;
    opacity: 0;
    background-color: #181c2a;
    color: #f3e8d8;
    border: 1px solid #D4AF37;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: normal;
    text-align: center;
}

.info-tooltip-trigger:hover .info-tooltip-message,
.info-tooltip-trigger:focus-within .info-tooltip-message {
    visibility: visible;
    opacity: 1;
}

/* --- Animación de Brillo para el Botón de Información --- */
@keyframes pulseGold {
    0% {
        filter: brightness(100%);
        transform: scale(1);
    }

    50% {
        filter: brightness(150%);
        transform: scale(1.05);
    }

    100% {
        filter: brightness(100%);
        transform: scale(1);
    }
}

main {
    padding-bottom: 3rem;
}

.search-sticky {
    position: sticky;
    top: 12px;
    z-index: 20;
    margin-bottom: 0.65rem;
    padding: 0.8rem 0.75rem 0.65rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(8, 13, 23, 0.95));
    box-shadow: 0 12px 30px rgba(5, 8, 15, 0.25);
}

.magic-panel>h2 {
    margin-top: -0.55rem;
    /* eleva el título para centrar mejor en el eje vertical */
    margin-bottom: 0.35rem;
}

.header-actions {
    gap: 16px;
}

.animate-pulse-once {
    animation: pulseGold 1.2s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 768px) {
    header h1 {
        position: relative;
        display: inline-block;
        padding-bottom: 5px;
        text-decoration: none !important;
    }

    header h1::after {
        content: none;
    }

    .magic-divider {
        display: none;
    }

    .site-footer p {
        font-size: 0.75rem;
    }

    .page-header {
        padding: 2.75rem 0 2.5rem;
    }

    .hero-pill {
        padding: 7px 12px;
    }

    .header-actions {
        margin-top: 1.25rem;
    }

    .hero-subtext {
        font-size: 0.9rem;
        line-height: 1.25;
        max-width: 90vw;
        margin-top: 10px;
        margin-bottom: 6px;
    }

    .pwa-install-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 36px);
        max-width: 420px;
        right: auto;
        height: auto;
        z-index: 60;
    }

    .pwa-install-dropdown::before {
        display: none;
    }

    .info-tooltip-message {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 32px);
        max-width: 480px;
        background: linear-gradient(145deg, #0b1426 0%, #0f1b2f 60%);
        color: #f3e8d8;
        border: 1px solid #d4af37;
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
        padding: 18px 20px;
        border-radius: 14px;
        z-index: 80;
        line-height: 1.5;
        text-align: left;
        font-size: 0.95rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .info-tooltip-message::after {
        display: none;
    }

    /* Ocultamos el tooltip inline en móvil; solo usamos el modal */
    .info-tooltip-message {
        display: none !important;
    }
}

/* MAGIC-BOOK: Antique Professional Design - Enhanced 3D */
.magic-book {
    position: relative;
    width: 100px;
    aspect-ratio: 2 / 3;
    margin: 0 auto;
    cursor: pointer;
    perspective: 1500px;
    transform-style: preserve-3d;
}

.magic-book__body {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center left;
    transform: rotateY(-20deg) rotateX(10deg);
    will-change: transform;
    /* Default slight tilt */
}

.magic-book:hover .magic-book__body {
    transform: rotateY(-10deg) rotateX(5deg) translateY(-5px);
}

/* Tapa del libro (Front Cover) */
.magic-book__front {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #1a2742 0%, #0d1424 100%);
    border-radius: 2px 6px 6px 2px;
    box-shadow:
        inset 4px 0 10px rgba(0, 0, 0, 0.6),
        inset 0 0 0 2px rgba(168, 141, 87, 0.4),
        5px 5px 15px rgba(0, 0, 0, 0.4);
    transform: translateZ(12px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Grosor de la tapa (Cover Thickness) */
.magic-book__front::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4px;
    background: #1a2742;
    transform: rotateY(90deg) translateZ(2px);
}

/* Título en la tapa */
.magic-book__title {
    font-family: 'MedievalSharp', cursive;
    color: #d4af37;
    text-align: center;
    font-size: 0.65rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    padding: 0 10px;
    transform: translateZ(1px);
}

/* Lomo del libro (Spine) */
.magic-book__spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 16px;
    /* Lomo más ancho */
    background: linear-gradient(90deg, #0a101d 0%, #1f2e4d 50%, #0a101d 100%);
    transform: rotateY(-90deg) translateZ(8px);
    border-radius: 2px 0 0 2px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Bandas del lomo (Nervios) */
.magic-book__spine::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.2));
    box-shadow: 0 25px 0 rgba(212, 175, 55, 0.4), 0 50px 0 rgba(212, 175, 55, 0.4), 0 75px 0 rgba(212, 175, 55, 0.4);
}

/* Contraportada (Back Cover) */
.magic-book__back {
    position: absolute;
    inset: 0;
    background: #0d1424;
    border-radius: 2px 6px 6px 2px;
    transform: translateZ(-4px);
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.3);
}

/* Páginas (Bloque de hojas) - EFECTO DE ALTURA */
.magic-book__pages {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 2px;
    width: 14px;
    /* Grosor visible de las hojas */
    background:
        repeating-linear-gradient(90deg, #fdfbf7 0px, #e6dcb1 1px, #fdfbf7 2px);
    transform: rotateY(90deg) translateZ(-94px);
    /* Ajuste fino para posicionar al borde derecho */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Bloque superior de hojas (Top Edge) */
.magic-book__pages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 96px;
    /* Ancho del libro menos márgenes */
    background: #fdfbf7;
    transform-origin: top;
    transform: rotateX(90deg) translateZ(-2px) translateY(-50px);
    /* Posicionamiento complejo */
    background: repeating-linear-gradient(to right, #fdfbf7 0px, #e6dcb1 1px, #fdfbf7 2px);
    display: none;
    /* Simplificación: oculto por complejidad de 3D CSS puro sin glitch */
}

/* Alternativa para el bloque de hojas (Visible desde el frente/lado) - AHORA CON ESTILO ANTIGUO */
.magic-book__page-block {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 4px;
    right: 4px;
    background: #f4e4bc;
    /* Sepia más oscuro */
    transform: translateZ(4px);
    border-radius: 0 4px 4px 0;
    box-shadow:
        inset -1px 0 2px rgba(0, 0, 0, 0.1),
        5px 0 5px rgba(0, 0, 0, 0.1);
    /* Sombra que da volumen */
    /* Efecto de renglones - MÁS RENGLONES (12px de altura) */
    background-image:
        linear-gradient(90deg, transparent 19px, rgba(255, 0, 0, 0.15) 20px, transparent 21px),
        /* Margen rojo */
        repeating-linear-gradient(transparent, transparent 11px, #a8a29e 12px);
    /* Renglones más densos */
    background-size: 100% 100%, 100% 12px;
    overflow: hidden;
    /* Flexbox para centrar texto */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Borde derecho de las hojas (Canto) */
.magic-book__page-block::after {
    content: '';
    position: absolute;
    top: 1px;
    bottom: 1px;
    right: 0;
    width: 12px;
    background: repeating-linear-gradient(to right, #f4e4bc 0px, #d6c698 1px, #f4e4bc 2px);
    transform: rotateY(90deg) translateZ(6px);
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Interior de la tapa (Endpaper) - Ahora Hoja Antigua */
.magic-book__front-inside {
    position: absolute;
    inset: 0;
    background: #f4e4bc;
    /* Sepia más oscuro */
    border-radius: 2px 6px 6px 2px;
    transform: rotateY(180deg) translateZ(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    /* Efecto de renglones - MÁS RENGLONES (12px de altura) */
    background-image:
        linear-gradient(90deg, transparent 19px, rgba(255, 0, 0, 0.15) 20px, transparent 21px),
        /* Margen rojo */
        repeating-linear-gradient(transparent, transparent 11px, #a8a29e 12px);
    /* Renglones más densos */
    background-size: 100% 100%, 100% 12px;
}

.magic-book__front-inside::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://www.transparenttextures.com/patterns/aged-paper.png');
    /* Textura sutil */
    opacity: 0.6;
    /* Más textura */
    pointer-events: none;
}

.magic-book__text-inside {
    font-family: 'Dancing Script', cursive;
    font-size: 0.6rem;
    /* REDUCIDO: Para que se vea más prolijo */
    color: #1a1a1a;
    /* Tinta negra/gris oscura tipo pluma */
    text-align: center;
    line-height: 1.4;
    /* Ajustado para el nuevo tamaño */
    z-index: 2;
    transform: rotate(-1deg);
    /* Leve inclinación natural */
    font-weight: 700;
    /* Más negrita para legibilidad */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 0 5px;
}

/* Animación de apertura al hacer click (clase .is-open) */
.magic-book.is-open .magic-book__front {
    transform: rotateY(-160deg);
}

.magic-book.is-open .magic-book__page--right .magic-book__content {
    display: block;
}

/* MAGIC-LOGO: Animación para el logo (casco/caduceo) */
.magic-logo-frame {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.magic-logo {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
    transform-origin: center center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    will-change: transform, filter;
}

.magic-logo:hover {
    transform: translateY(-5px) rotateX(5deg) rotateY(-5deg) scale(1.05);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

/* Sombra flotante */
.magic-book::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 10%;
    width: 80%;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
    transition: all 0.6s ease;
    transform: translateZ(-30px) rotateX(90deg);
}

.magic-book.is-open::after {
    width: 140%;
    left: -20%;
    opacity: 0.6;
}

.infografia-overlay {
    background: linear-gradient(135deg, #f6f7fb 0%, #e8ebf0 100%);
    backdrop-filter: blur(4px);
}

.infografia-modal {
    position: relative;
    width: min(1180px, 96vw);
    max-height: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 30px 40px;
    border-radius: 18px;
    background: #f8fafc;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.infografia-modal.infografia-modal-full {
    width: 100vw;
    max-width: none;
    border-radius: 0;
    padding-left: 12px;
    padding-right: 12px;
}

.infografia-body {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.infografia-viewer {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    padding-right: 0;
    width: 100%;
}

.infografia-viewer img {
    transform-origin: top center;
    display: block;
    align-self: flex-start;
    margin: 0 auto;
}

.infografia-toolbar {
    position: absolute;
    top: -64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 249, 0.96));
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.16),
        0 2px 6px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.infografia-toolbar button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(160deg, #f8fafc, #eef2f7);
    color: #0f172a;
    display: grid;
    place-items: center;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.2s ease;
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.infografia-toolbar button:hover {
    transform: translateY(-1px);
    background: linear-gradient(160deg, #e8eef7, #dfe7f3);
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow:
        0 12px 24px rgba(14, 165, 233, 0.22),
        0 2px 8px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.infografia-toolbar button:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.infografia-loader {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.75));
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 18px;
    backdrop-filter: blur(2px);
    z-index: 2;
}

.infografia-loader.hidden {
    display: none;
}

.infografia-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.infografia-close:hover {
    background: #e2e8f0;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.infografia-close:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.35);
}

.infografia-error {
    color: #b91c1c;
    font-weight: 700;
    text-align: center;
    padding: 10px 14px;
    background: rgba(248, 113, 113, 0.12);
    border-radius: 12px;
}

.infografia-img-full {
    width: 100%;
    max-width: none;
    max-height: none;
}

@media (max-width: 768px) {
    .infografia-toolbar {
        top: -56px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }

    .infografia-viewer {
        padding-right: 0;
    }

    .infografia-modal {
        width: 100%;
    }
}