html, body {
    margin: 0; 
    padding: 0; 
    width: 100%; 
    height: 100vh;
    background-color: #fdfdfd;
    background-image: 
        linear-gradient(#e5e5e5 1px, transparent 1px),
        linear-gradient(90deg, #e5e5e5 1px, transparent 1px);
    background-size: 30px 30px;
    color: #333;
    font-family: 'Kalam', cursive;
    overflow: hidden;
}

.showcase-wrapper {
    display: flex; 
    width: 800vw; 
    height: 100vh;
    overflow-x: scroll; 
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.showcase-wrapper::-webkit-scrollbar { display: none; }

section {
    width: 100vw; 
    height: 100vh; /* Ajustado a 100vh para que la pantalla mande */
    flex-shrink: 0;
    scroll-snap-align: start; 
    display: flex;
    align-items: flex-start; /* Evita que el contenido se corte arriba */
    justify-content: center;
    padding-top: 90px; 
    padding-bottom: 80px;
    overflow-y: auto; /* El scroll vertical ahora es natural en la sección */
    scrollbar-width: none;
}
section::-webkit-scrollbar { display: none; }

.content-scroll {
    width: 100%;
    max-width: 1140px; /* Fija el ancho máximo estándar de Bootstrap */
    margin: 0 auto; /* Centra el contenedor en pantallas grandes */
    padding: 15px 30px;
    display: flex; 
    flex-direction: column;
    justify-content: flex-start;
}
/* ==========================================================================
   DARK MODE (MODO OSCURO GLOBAL)
   ========================================================================== */

/* Transición suave para el cambio de tema */
body, header, .note-card, .formula-box, .css-graphic-box, .header-btn, .control-btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 1. Fondo y Texto Base */
body.dark-mode {
    background-color: #121212;
    background-image: 
        linear-gradient(#222 1px, transparent 1px),
        linear-gradient(90deg, #222 1px, transparent 1px);
    color: #e2e8f0;
}

body.dark-mode p, body.dark-mode li { color: #cbd5e1; }
body.dark-mode strong { color: #fff; }

/* 2. Encabezado (Header) y Botones */
body.dark-mode header.rainbow-header {
    background: rgba(18, 18, 18, 0.98);
    border-bottom-color: #333;
}

/* Magia CSS: Reemplazo del logo a la versión clara/negativa */
body.dark-mode header.rainbow-header img {
    content: url("../images/logo/logo-dark 2.png");
}

body.dark-mode .header-btn {
    background: #1e1e1e;
    color: #e2e8f0;
    border-color: #555;
    box-shadow: 2px 2px 0px #000;
}
body.dark-mode .header-btn:hover {
    box-shadow: 4px 4px 0px #000;
    color: #fff;
    background: #2a2a2a;
}
body.dark-mode .header-btn.primary {
    background: #005f92;
    border-color: #003f62;
    color: #fff;
}

/* 3. Tarjetas, Fórmulas y Contenedores */
body.dark-mode .note-card,
body.dark-mode .sc-card,
body.dark-mode .css-graphic-box {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
}

body.dark-mode .formula-box {
    background: #1a1a1a;
    border-color: #444;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}
body.dark-mode .formula-box:hover {
    box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
    border-color: #555;
}

/* 4. Navegación Inferior y Controles Laterales */
body.dark-mode .nav-item { color: #555; }
body.dark-mode .nav-item.active { color: #fff; }
body.dark-mode .control-btn {
    background: #1e1e1e;
    border-color: #555;
    color: #fff;
    box-shadow: 3px 3px 0px #000;
}
body.dark-mode .control-btn:hover {
    background: #333;
    box-shadow: 4px 4px 0px #000;
}

/* 5. Atajos de Teclado (KBD) */
body.dark-mode .kbd-key {
    background: #2d3748;
    color: #f1f5f9;
    border-color: #475569;
    border-bottom-color: #1e293b;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.1), 0 2px 0 rgba(0,0,0,0.5);
}

/* 6. Adaptación de Gráficos CSS y Referencias visuales */
/* Evita que los documentos falsos o lienzos simulados cieguen al usuario */
body.dark-mode .ui-canvas,
body.dark-mode .tm-box,
body.dark-mode .doc-sheet,
body.dark-mode .biz-card,
body.dark-mode .brand-page,
body.dark-mode .pl-page,
body.dark-mode .am-body,
body.dark-mode .dummy-handle,
body.dark-mode .subtle-reference-wrapper {
    background-color: #222;
    border-color: #444;
}

body.dark-mode .subtle-reference-wrapper:hover {
    background-color: #2a2a2a;
    border-color: #666;
}
body.dark-mode .subtle-reference-img { border-color: #111; }

/* 7. Ribbon (Menú estilo Office en las Prácticas) */
body.dark-mode .ribbon-menu { background: #1e1e1e; border-color: #444; }
body.dark-mode .ribbon-tab { background: #2a2a2a; border-color: #444; color: #94a3b8; }
body.dark-mode .ribbon-tab.active, 
body.dark-mode .ribbon-tab span.active { background: #1e1e1e; color: #fff; }
body.dark-mode .ribbon-tools { background: #1e1e1e; }
body.dark-mode .ribbon-btn { color: #cbd5e1; border-color: #555; }
/* ==========================================================================
   TIPOGRAFÍA Y PALETA DE COLORES UTILITY
   ========================================================================== */
h2, h4, p, li, span { font-family: 'Kalam', cursive; }
h2 { font-weight: 700; font-size: 37px; line-height: 1.1; margin-bottom: 15px; }
h4 { font-weight: 700; font-size: 24px; margin-bottom: 10px; line-height: 1.2; display: flex; align-items: center; gap: 12px;}

/* FUENTE DE DESCRIPCIONES AUMENTADA A 20PX */
p, li { font-size: 20px; line-height: 1.4; color: #444; margin-bottom: 12px; }
strong { font-weight: 700; color: #111; }

.t-rojo { color: #e63946; } 
.t-azul { color: #0077b6; }
.t-naranja { color: #fca311; } 
.t-purpura { color: #7209b7; }
.t-verde { color: #217346; } 
.t-cyan { color: #00b4d8; }
.t-magenta { color: #d946ef; } 
.t-lima { color: #84cc16; }

/* ==========================================================================
   COMPONENTES UI (TARJETAS, CAJAS Y ATAJOS)
   ========================================================================== */
.note-card { 
    padding: 30px 35px; 
    box-shadow: 8px 8px 0px rgba(0,0,0,0.05);
    border: 2px solid #02b4d8; 
    position: relative; 
    z-index: 2; 
    margin-bottom: 20px; 
    border-radius: 12px;
}

.tape-top {
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%);
    width: 120px; 
    height: 30px; 
    opacity: 0.8; 
    z-index: 5;
}

.formula-box {
    background: #fdfdfd; 
    border: 2px dashed #bbb; 
    padding: 20px; 
    border-radius: 12px;
    margin-bottom: 15px; 
    transition: 0.3s; 
    box-shadow: 4px 4px 0px rgba(0,0,0,0.02);
}
.formula-box:hover { 
    transform: translate(-2px, -2px); 
    box-shadow: 6px 6px 0px rgba(0,0,0,0.05); 
    border-style: solid; 
}

.title-icon { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 10px; 
}

/* Comandos 3D */
.kbd-key {
    display: inline-block; 
    padding: 3px 12px;
    font-family: -apple-system, system-ui, sans-serif;
    font-weight: 900; 
    color: #222; 
    background: #f4f4f5; 
    border: 2px solid #cbd5e1; 
    border-bottom: 4px solid #94a3b8; 
    border-radius: 8px;
    margin: 0 4px; 
    font-size: 15px; 
    transform: translateY(-2px);
    box-shadow: inset 1px 1px 0px rgba(255,255,255,1), 0 2px 0 rgba(0,0,0,0.1);
}

.shortcuts-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    width: 100%; 
    padding-bottom: 20px;
}
.sc-card { 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-left: 6px solid #d946ef; 
    padding: 15px 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* ==========================================================================
   NAVEGACIÓN (HEADER, SLIDERS Y BOTTOM NAV)
   ========================================================================== */
header.rainbow-header {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.98);
    border-bottom: 2px dashed #ccc;
}

.header-btn {
    font-family: 'Kalam', cursive;
    font-weight: 700; font-size: 16px;
    border: 2px solid #333; background: #fff; color: #333;
    padding: 5px 15px; border-radius: 8px; text-decoration: none;
    box-shadow: 2px 2px 0px #333; transition: 0.2s;
    white-space: nowrap;
}
.header-btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0px #333; color: #000; }
.header-btn.primary { background: #d24726; color: #fff; border-color: #a3371d; }

.bottom-nav { position: fixed; bottom: 20px; left: 5%; z-index: 100; display: flex; gap: 15px; flex-wrap: wrap; max-width: 80%;}
.nav-item { font-size: 14px; font-weight: 700; text-transform: uppercase; color: #aaa; cursor: pointer; font-family: -apple-system, sans-serif;}
.nav-item.active { color: #000; border-bottom: 3px solid #00b4d8; padding-bottom: 2px;}

.slide-controls { position: fixed; bottom: 20px; right: 5%; z-index: 100; display: flex; gap: 15px;}
.control-btn { background: #fff; border: 2px solid #333; width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 3px 3px 0px #333; transition: 0.2s;}

/* ==========================================================================
   CONTENEDORES DE SIMULADORES CSS (ESTÁNDAR)
   ========================================================================== */
.css-graphic-box {
    background: #ff121200; padding: 25px; border: 3px solid #333; border-radius: 12px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.05); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sketch-caption {
    position: absolute; bottom: 8px; left: 0; width: 100%; text-align: center;
    font-weight: 900; font-size: 12px; color: #aaa; text-transform: uppercase;
    font-family: sans-serif; letter-spacing: 2px;
}

/* ==========================================================================
   SISTEMA DE EVALUACIONES (QUIZZES)
   ========================================================================== */

/* Tarjetas de Evaluación */
.eval-card {
    background: #fff; padding: 30px 40px; box-shadow: 8px 8px 0px rgba(0,0,0,0.05);
    border: 2px solid #ddd; position: relative; z-index: 2; border-radius: 12px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 20px;
}
.question-block {
    background: #fdfdfd; border: 2px solid #e2e8f0; padding: 20px; border-radius: 12px;
    transition: 0.3s; box-shadow: 0 4px 8px rgba(0,0,0,0.02); display: flex; flex-direction: column;
}
.question-block:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); }

/* Tipografía de Preguntas */
.question-text { font-family: 'Kalam', cursive; font-weight: 700; font-size: 1.25rem; line-height: 1.35; margin-bottom: 15px; color: #111;}
.hl-text { font-weight: 900; }

/* Opciones de Respuesta */
.options-group { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; justify-content: flex-start; }
.option-label {
    display: flex; align-items: flex-start; padding: 10px 15px;
    background: #fff; border: 2px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; transition: all 0.2s ease;
}
.option-label:hover { border-color: #94a3b8; transform: translateX(5px); }
.option-label input { display: none; }
.opt-indicator {
    width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 50%;
    margin-right: 12px; margin-top: 2px; flex-shrink: 0; position: relative;
}
.opt-text { font-family: 'Kalam', cursive; font-size: 1.1rem; color: #444; line-height: 1.25; }

/* Estados Activos por Color de Panel */
.eval-card[data-color="cyan"] .option-label:has(input:checked) { border-color: #00b4d8; background: #e0f7fa; transform: translateX(10px);}
.eval-card[data-color="cyan"] .option-label:has(input:checked) .opt-indicator { background: #00b4d8; border-color: #00b4d8; }
.eval-card[data-color="cyan"] .hl-text { color: #00b4d8; }

.eval-card[data-color="rosa"] .option-label:has(input:checked) { border-color: #e4007c; background: #fff0f5; transform: translateX(10px);}
.eval-card[data-color="rosa"] .option-label:has(input:checked) .opt-indicator { background: #e4007c; border-color: #e4007c; }
.eval-card[data-color="rosa"] .hl-text { color: #e4007c; }

.eval-card[data-color="azul"] .option-label:has(input:checked) { border-color: #0077b6; background: #e6f2f8; transform: translateX(10px);}
.eval-card[data-color="azul"] .option-label:has(input:checked) .opt-indicator { background: #0077b6; border-color: #0077b6; }
.eval-card[data-color="azul"] .hl-text { color: #0077b6; }

.eval-card[data-color="purpura"] .option-label:has(input:checked) { border-color: #7209b7; background: #faf5ff; transform: translateX(10px);}
.eval-card[data-color="purpura"] .option-label:has(input:checked) .opt-indicator { background: #7209b7; border-color: #7209b7; }
.eval-card[data-color="purpura"] .hl-text { color: #7209b7; }

.eval-card[data-color="naranja"] .option-label:has(input:checked) { border-color: #fca311; background: #fffcf5; transform: translateX(10px);}
.eval-card[data-color="naranja"] .option-label:has(input:checked) .opt-indicator { background: #fca311; border-color: #fca311; }
.eval-card[data-color="naranja"] .hl-text { color: #fca311; }

.option-label:has(input:checked) .opt-indicator::after {
    content: ''; position: absolute; width: 8px; height: 8px;
    background: #fff; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%);
}


/* Botón Finalizar de la Evaluación */
.btn-finish {
    background: #217346; color: #fff; font-family: 'Kalam', cursive; font-weight: 700;
    padding: 12px 40px; border: 2px solid #333; border-radius: 8px;
    cursor: pointer; font-size: 1.3rem; box-shadow: 4px 4px 0px #333; transition: 0.2s;
    margin-top: 20px; width: 100%;
}
.btn-finish:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #333; }
.locked { opacity: 0; pointer-events: none; }
.unlocked { opacity: 1; pointer-events: all; }

/* Responsive de Tarjetas */
@media (max-width: 768px) { 
    .eval-card { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MODO OSCURO PARA EVALUACIONES (Overrides)
   ========================================================================== */
body.dark-mode .eval-card { background: #1e1e1e; border-color: #333; }
body.dark-mode .question-block { background: #2a2a2a; border-color: #444; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
body.dark-mode .question-text { color: #e2e8f0; }
body.dark-mode .option-label { background: #1e1e1e; border-color: #444; }
body.dark-mode .option-label:hover { border-color: #777; }
body.dark-mode .opt-text { color: #cbd5e1; }
body.dark-mode #score-circle { color: #fff !important; }

/* Tintes sutiles para opciones seleccionadas en Dark Mode */
body.dark-mode .eval-card[data-color="cyan"] .option-label:has(input:checked) { background: rgba(0, 180, 216, 0.15); }
body.dark-mode .eval-card[data-color="rosa"] .option-label:has(input:checked) { background: rgba(228, 0, 124, 0.15); }
body.dark-mode .eval-card[data-color="azul"] .option-label:has(input:checked) { background: rgba(0, 119, 182, 0.15); }
body.dark-mode .eval-card[data-color="purpura"] .option-label:has(input:checked) { background: rgba(114, 9, 183, 0.15); }
body.dark-mode .eval-card[data-color="naranja"] .option-label:has(input:checked) { background: rgba(252, 163, 17, 0.15); }

/* ==========================================================================
   MÓDULO 1: GRÁFICOS ESPECÍFICOS
   ========================================================================== */
/* Gráfico 1: Anatomía */
.doc-sheet { width: 240px; height: 280px; background: #fff; border: 2px solid #333; position: relative; display: flex; flex-direction: column; padding: 8px; margin-bottom: 15px;}
.doc-header { height: 20px; border: 2px dashed #00b4d8; background: #e0f7fa; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-family: sans-serif; font-weight: bold; color: #00b4d8;}
.doc-body { flex: 1; border: 2px dashed #e63946; background: #fff0f0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-family: sans-serif; font-weight: bold; color: #e63946; text-align: center;}
.doc-footer { height: 20px; border: 2px dashed #00b4d8; background: #e0f7fa; margin-top: 5px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-family: sans-serif; font-weight: bold; color: #00b4d8;}

/* Gráfico 2: Bauhaus */
.bauhaus-grid { display: flex; gap: 30px; padding-bottom: 20px; align-items: center; justify-content: center;}
.bh-shape { display: flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-weight: 900; font-size: 14px; color: #ffffff; letter-spacing: 1px;}
.bh-square { width: 110px; height: 110px; background: #00509d; border: 4px solid #333;}
.bh-circle { width: 110px; height: 110px; background: #d62828; border-radius: 50%; border: 4px solid #333;}
.bh-triangle { width: 0; height: 0; border-left: 65px solid transparent; border-right: 65px solid transparent; border-bottom: 110px solid #fca311; position: relative; filter: drop-shadow(0 -3px 0 #333) drop-shadow(3px 3px 0 #333) drop-shadow(-3px 3px 0 #333);}
.bh-triangle::after { content: 'DIRECCIÓN'; position: absolute; top: 65px; left: -42px; font-family: 'Inter', sans-serif; font-weight: 900; font-size: 12px; color: #ffffff; }

/* Gráfico 3: Raster vs Vector */
.vr-container { display: flex; gap: 20px; align-items: center; padding-bottom: 15px;}
.vr-box { display: flex; flex-direction: column; align-items: center; gap: 10px;}
.pixel-circle { width: 110px; height: 110px; background: #333; border-radius: 50%; box-shadow: 0 0 0 4px #ccc; filter: blur(1.5px); image-rendering: pixelated;}
.vector-circle { width: 110px; height: 110px; background: #7209b7; border-radius: 50%; border: 3px solid #333; outline: 2px solid #7209b7; outline-offset: 2px;}

/* Gráfico 4: Flat Palette */
.flat-palette { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding-bottom: 20px;}
.fp-swatch { width: 90px; height: 130px; border-radius: 10px; background: #ffffff; border: 2px solid #e2e8f0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.2s ease; }
.fp-swatch:hover { transform: translateY(-5px); }
.fp-color { flex-grow: 1; width: 100%; }
.fp-info { height: 35px; display: flex; align-items: center; justify-content: center; background: #ffffff; font-family: 'Inter', sans-serif; font-weight: 800; font-size: 11px; color: #334155; letter-spacing: 0.5px;}

/* Gráfico 5: Estructura Nodal */
.node-anatomy { position: relative; width: 160px; height: 180px; border: 2px solid #2a9d8f; background: rgba(42, 157, 143, 0.1); margin-bottom: 20px;}
.n-white { position: absolute; width: 10px; height: 10px; background: #fff; border: 2px solid #333;}
.n-yellow { position: absolute; width: 12px; height: 12px; background: #fca311; border: 2px solid #333; border-radius: 50%; top: -6px; left: 30px; box-shadow: 0 0 5px rgba(0,0,0,0.3);}
.n-label { position: absolute; font-family: sans-serif; font-size: 9px; font-weight: bold; color: #555; white-space: nowrap;}

/* ==========================================================================
   MEDIA QUERIES (ADAPTACIÓN MÓVIL)
   ========================================================================== */
@media (max-width: 768px) { 
    .bottom-nav { display: none; } 
    .shortcuts-grid { grid-template-columns: 1fr; } 
    
    /* ADAPTACIÓN DEL ENCABEZADO */
    header.rainbow-header .container {
        flex-direction: column !important; /* Apila logo y botones */
        gap: 12px !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    /* Envuelve los botones si no caben */
    header.rainbow-header .d-flex.align-items-center.gap-2 {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Reduce el título para que no rompa la pantalla */
    header.rainbow-header span {
        font-size: 18px !important; 
        text-align: center;
    }
    
    /* Ajusta botones para dedos/móvil */
    .header-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    /* ADAPTACIÓN DE LAS SECCIONES Y CONTENIDO */
    section {
        padding-top: 150px; /* Compensa el nuevo alto del header apilado */
    }
    .content-scroll {
        padding: 5px 15px; /* Menos márgenes laterales en móvil */
    }

    /* ADAPTACIÓN DE GRÁFICOS GRANDES */
    .bauhaus-grid, .vr-container {
        flex-direction: column;
        gap: 20px;
    }
}