/* ==========================================================================
   PRESENTACIÓN INTERACTIVA ACADÉMICA - ESTILOS PRINCIPALES
   ========================================================================== */

/* Variables de Diseño System (Temas Oscuro y Claro) */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Tema Oscuro (Defecto) */
    --bg-main: #0b111e;
    --bg-container: #131b2e;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Colores Temáticos / Acentos */
    --color-primary: #38bdf8; /* Azul UNAD / Cian */
    --color-primary-rgb: 56, 189, 248;
    --color-steel: #94a3b8;
    --color-steel-glow: rgba(148, 163, 184, 0.4);
    --color-steel-text: #e2e8f0;
    --color-plastic: #10b981; /* Verde PE-HD */
    --color-plastic-glow: rgba(16, 185, 129, 0.4);
    --color-plastic-text: #a7f3d0;
    
    /* Fondos de Simuladores y Componentes */
    --bg-material-card: rgba(15, 23, 42, 0.4);
    --bg-sandbox-header: rgba(15, 23, 42, 0.8);
    --bg-sandbox-controls: rgba(15, 23, 42, 0.8);
    --bg-sandbox-tabs: rgba(15, 23, 42, 0.9);
    --bg-chart-area: rgba(15, 23, 42, 0.4);
    --bg-realtime-data: rgba(15, 23, 42, 0.5);
    --bg-magnet-visualizer: rgba(15, 23, 42, 0.5);
    --bg-projection-screen: rgba(0, 0, 0, 0.3);
    --bg-rod-wrapper: rgba(0, 0, 0, 0.2);
    --bg-circuit-gap: rgba(15, 23, 42, 0.9);
    --bg-readout: rgba(15, 23, 42, 0.9);
    --text-readout: #f8fafc;
    
    /* Placas Ópticas */
    --bg-plate-air: rgba(255, 255, 255, 0.05);
    --bg-plate-steel: #475569;
    --bg-plate-plastic: rgba(16, 185, 129, 0.3);
    
    /* Dashboard y Tabla */
    --bg-matrix-header: rgba(15, 23, 42, 0.8);
    --bg-matrix-hover: rgba(255, 255, 255, 0.02);
    --bg-rec-steel: rgba(148, 163, 184, 0.08);
    --border-rec-steel: rgba(148, 163, 184, 0.2);
    --bg-rec-plastic: rgba(16, 185, 129, 0.08);
    --border-rec-plastic: rgba(16, 185, 129, 0.2);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

.light-theme {
    /* Tema Claro */
    --bg-main: #f1f5f9;
    --bg-container: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --color-primary: #0284c7; /* Azul Académico más oscuro para contraste */
    --color-primary-rgb: 2, 132, 199;
    
    --color-steel: #475569;
    --color-steel-glow: rgba(71, 85, 105, 0.2);
    --color-steel-text: #1e293b;
    --color-plastic: #059669;
    --color-plastic-glow: rgba(5, 150, 105, 0.2);
    --color-plastic-text: #064e3b;
    
    /* Fondos de Simuladores y Componentes */
    --bg-material-card: rgba(15, 23, 42, 0.05);
    --bg-sandbox-header: rgba(241, 245, 249, 0.85);
    --bg-sandbox-controls: rgba(241, 245, 249, 0.85);
    --bg-sandbox-tabs: rgba(226, 232, 240, 0.9);
    --bg-chart-area: rgba(241, 245, 249, 0.6);
    --bg-realtime-data: rgba(241, 245, 249, 0.8);
    --bg-magnet-visualizer: rgba(241, 245, 249, 0.6);
    --bg-projection-screen: rgba(241, 245, 249, 0.8);
    --bg-rod-wrapper: rgba(241, 245, 249, 0.6);
    --bg-circuit-gap: rgba(241, 245, 249, 0.9);
    --bg-readout: rgba(241, 245, 249, 0.9);
    --text-readout: #0f172a;
    
    /* Placas Ópticas */
    --bg-plate-air: rgba(15, 23, 42, 0.05);
    --bg-plate-steel: #64748b;
    --bg-plate-plastic: rgba(16, 185, 129, 0.2);
    
    /* Dashboard y Tabla */
    --bg-matrix-header: rgba(226, 232, 240, 0.9);
    --bg-matrix-hover: rgba(15, 23, 42, 0.02);
    --bg-rec-steel: rgba(71, 85, 105, 0.08);
    --border-rec-steel: rgba(71, 85, 105, 0.25);
    --bg-rec-plastic: rgba(5, 150, 105, 0.08);
    --border-rec-plastic: rgba(5, 150, 105, 0.25);
    
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

/* Reset de Estilos Básicos */
* {
    margin: 0;
    padding: 0;
    box-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    transition: var(--transition-smooth);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Contenedor Principal (App Shell) */
.presentation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background-color: var(--bg-container);
    position: relative;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   HEADER / BARRA SUPERIOR
   ========================================================================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 70px;
    border-bottom: 1px solid var(--border-glass);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
}

.unad-logo-header {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.unad-logo-portada {
    max-width: 250px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.student-info-box {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--color-primary) !important;
}

.student-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.student-career {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.divider {
    margin: 0 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.project-title {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.top-controls {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background-color: var(--border-glass);
    color: var(--color-primary);
    border-color: rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   DIAPOSITIVAS (VIEWPORT & ESTRUCTURA LAYOUT)
   ========================================================================== */
.slide-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.5s;
    padding: 2rem;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 10;
}

.slide.prev-slide {
    transform: translateX(-50px);
}

/* Layout en Dos Columnas (Split) */
.slide-content {
    display: flex;
    gap: 2.5rem;
    height: 100%;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.visual-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}

.text-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 1rem;
    height: 100%;
}

.scrollable-panel {
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Personalización del Scrollbar */
.scrollable-panel::-webkit-scrollbar {
    width: 6px;
}
.scrollable-panel::-webkit-scrollbar-track {
    background: transparent;
}
.scrollable-panel::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 3px;
}
.scrollable-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Elementos de Texto */
.slide-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.slide-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--color-primary);
    opacity: 0.8;
}

.slide-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.academic-badge {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(56, 189, 248, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--color-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1rem;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 60%, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.slide-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.academic-body p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.academic-body h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

/* Contenedor de Imagen de Video */
.slide-image-container {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-glass);
    background-color: transparent;
    position: relative;
    transition: var(--transition-smooth);
}

.slide-image-container:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.3);
}

.slide-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-caption {
    background-color: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-glass);
    font-style: italic;
    text-align: center;
}

/* Tarjeta Glassmorphism */
.card {
    background-color: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.glass {
    background-color: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Meta Datos Académicos en Portada */
.academic-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item i {
    font-size: 1.3rem;
    color: var(--color-primary);
    width: 30px;
    text-align: center;
}

.meta-item div {
    display: flex;
    flex-direction: column;
}

.meta-item strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-item span {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   WIDGETS INTERACTIVOS DE COMPARACIÓN
   ========================================================================== */

/* Comparativa Físicas / Introducción */
.comparison-intro-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.material-card {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--bg-material-card);
    border-left: 4px solid var(--border-color, var(--text-muted));
}

.steel-accent {
    --border-color: var(--color-steel);
}

.plastic-accent {
    --border-color: var(--color-plastic);
}

.mat-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steel-accent .mat-title {
    color: var(--color-steel-text);
}

.plastic-accent .mat-title {
    color: var(--color-plastic);
}

.mat-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Fila de Valores en Propiedades */
.comparison-values {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.val-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border-glass);
}

.steel-style {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), transparent);
    border-left: 4px solid var(--color-steel);
    color: var(--color-steel-text);
}

.plastic-style {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
    border-left: 4px solid var(--color-plastic);
    color: var(--color-plastic-text);
}

.val-row .label {
    font-size: 0.95rem;
}

.val-row .val {
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.fact-box {
    border-left: 4px solid var(--color-primary);
    padding: 1rem;
    background-color: rgba(56, 189, 248, 0.05);
    margin-top: 1.5rem;
}

.fact-box h4 {
    color: var(--color-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fact-box p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Diagrama de Atributos - Botones Diapositiva 3 */
.interactive-diagram-menu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.diag-btn {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background-color: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    width: 100%;
}

.diag-btn:hover {
    transform: translateX(8px);
    border-color: var(--color-primary);
    background-color: rgba(56, 189, 248, 0.05);
}

.badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.badge-phys { background-color: #ec4899; }
.badge-mech { background-color: #3b82f6; }
.badge-therm { background-color: #f97316; }
.badge-elec { background-color: #eab308; }
.badge-magnet { background-color: #8b5cf6; }
.badge-opt { background-color: #06b6d4; }

.btn-text h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   SANDBOXES / SIMULADORES VIRTUALES (PANELES VISUALES)
   ========================================================================== */
.interactive-sandbox {
    background-color: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    height: 450px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.sandbox-title {
    background-color: var(--bg-sandbox-header);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sandbox-controls {
    background-color: var(--bg-sandbox-controls);
    border-top: 1px solid var(--border-glass);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.helper-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.btn {
    background-color: var(--border-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn.active {
    background-color: var(--color-primary);
    color: #0f172a;
    border-color: var(--color-primary);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    border-color: #0284c7;
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

.action-btn:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.3);
}

.slide-image-reference {
    margin-top: 0.75rem;
    background-color: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.slide-image-reference:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.mini-ref-img {
    width: 25px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

/* 1. SIMULADOR DENSIDAD (Balanza) */
.scale-visualizer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.scale-base {
    width: 40px;
    height: 140px; /* Elevado de 90px para dar más margen vertical */
    background-color: #475569;
    position: absolute;
    bottom: 2rem;
    border-radius: 4px 4px 0 0;
    box-shadow: var(--shadow-sm);
}

.scale-beam {
    width: 320px;
    height: 8px;
    background-color: #64748b;
    position: absolute;
    bottom: calc(2rem + 130px); /* Elevado de calc(2rem + 80px) */
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center center;
}

.scale-pan {
    width: 110px;
    height: 110px; /* Reducido de 120px para ser más compacto */
    position: relative;
    top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Cuerdas del platillo */
.scale-pan::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-left: 55px solid transparent;
    border-right: 55px solid transparent;
    border-bottom: 65px solid rgba(148, 163, 184, 0.4); /* Reducido de 70px */
}

/* Platillo plano */
.scale-pan::after {
    content: '';
    position: absolute;
    top: 65px; /* Reducido de 70px */
    width: 110px;
    height: 6px;
    background-color: #cbd5e1;
    border-radius: 2px;
}

.left-pan {
    left: -20px;
}

.right-pan {
    right: -20px;
}

.pan-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    position: absolute;
    top: -20px;
    white-space: nowrap;
}

.material-cube {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-bottom: 8px; /* Reducido de 12px para evitar empujar el readout demasiado abajo */
    z-index: 2;
    transition: width 0.3s ease, height 0.3s ease, margin-bottom 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.steel-cube {
    background: radial-gradient(circle at 30% 30%, #94a3b8, #475569);
    border: 1px solid #64748b;
}

.plastic-cube {
    background: radial-gradient(circle at 30% 30%, rgba(209, 250, 229, 0.9), rgba(16, 185, 129, 0.8));
    border: 1px solid rgba(52, 211, 153, 0.5);
}

.mass-readout {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 4px;
    background-color: var(--bg-readout);
    color: var(--text-readout);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    z-index: 2;
    border: 1px solid var(--border-glass);
}

.scale-visualizer .slider {
    width: 100%;
}

/* 2. SIMULADORES MECÁNICOS (Tracción y Dureza) */
.sandbox-tabs {
    display: flex;
    background-color: var(--bg-sandbox-tabs);
    border-bottom: 1px solid var(--border-glass);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    background-color: rgba(56, 189, 248, 0.05);
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tab-content.hidden {
    display: none !important;
}

/* Ensayo Tracción */
.tensile-visualizer {
    flex: 1;
    display: flex;
    padding: 1rem;
    gap: 1rem;
    align-items: center;
}

.tensile-grips {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    height: 200px;
    border: 1px solid var(--border-glass);
}

.grip {
    width: 80px;
    height: 25px;
    background: linear-gradient(180deg, #475569, #334155);
    border: 2px solid #1e293b;
    border-radius: 4px;
    z-index: 3;
}

.specimen-holder {
    height: 100px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.specimen {
    width: 20px;
    height: 100%;
    background-color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.05s linear;
}

.specimen-inner {
    width: 10px;
    height: 100%;
    background-color: var(--bar-color, #94a3b8);
    transition: width 0.05s linear;
}

.bottom-grip {
    transition: transform 0.05s linear;
}

.chart-area {
    flex: 1.2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-chart-area);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    padding: 0.5rem;
}

.realtime-data {
    display: flex;
    justify-content: space-around;
    font-size: 0.85rem;
    background-color: var(--bg-realtime-data);
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-glass);
}

/* Ensayo Dureza */
.hardness-visualizer {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.indenter-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 10px;
    transition: transform 0.5s ease-in-out;
    z-index: 3;
}

.indenter-shaft {
    width: 16px;
    height: 60px;
    background: linear-gradient(90deg, #64748b, #475569);
    border: 1px solid #334155;
}

.indenter-ball {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #94a3b8);
    border: 1px solid #64748b;
    margin-top: -2px;
}

.material-block {
    width: 140px;
    height: 60px;
    border-radius: 6px;
    position: absolute;
    bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.material-block.steel {
    background: linear-gradient(180deg, #94a3b8, #475569);
    border: 2px solid #64748b;
}

.material-block.plastic {
    background: linear-gradient(180deg, #34d399, #059669);
    border: 2px solid #10b981;
}

.block-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.85);
}

.material-block.steel .block-label {
    color: #0f172a;
}

.indentation {
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease, height 0.3s ease;
}

/* 3. SIMULADOR TÉRMICO (Conductividad/Dilatación) */
.thermal-visualizer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    gap: 1.5rem;
}

.thermal-heater {
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 8px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    opacity: 0.4;
    transition: var(--transition-smooth);
}

.thermal-heater.active {
    opacity: 1;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.rod-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rod-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rod-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--bg-rod-wrapper);
    height: 24px;
    border-radius: 4px;
    width: 90%;
}

.rod {
    height: 16px;
    border-radius: 3px;
    position: relative;
    left: 4px;
    width: 80%;
    transition: width 0.5s ease-out;
    overflow: hidden;
}

.steel-rod {
    background-color: #64748b;
    border: 1px solid #475569;
}

.plastic-rod {
    background-color: #10b981;
    border: 1px solid #059669;
}

.heat-flow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ef4444, #f97316, transparent);
    transition: width 0.1s linear;
}

.expansion-marker {
    width: 2px;
    height: 30px;
    background-color: #ef4444;
    position: absolute;
    right: 18%;
    display: none;
}

.rod-data {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 4. SIMULADOR ELÉCTRICO (Circuito) */
.circuit-visualizer {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* Reducido de 1.5rem */
    padding: 1rem; /* Reducido de 1.5rem */
}

.circuit-loop {
    width: 320px;
    height: 150px; /* Reducido de 180px para dar espacio vertical a los botones */
    border: 6px solid #475569;
    border-radius: 12px;
    position: relative;
    background-color: transparent;
    transition: var(--transition-smooth); /* Animación suave al cambiar de color */
}

.circuit-loop.conducting {
    border-color: var(--color-primary); /* El cable se ilumina en azul al conducir */
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.light-theme .circuit-loop.conducting {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.2);
}

.circuit-component {
    position: absolute;
    background-color: var(--bg-container);
    border: 2px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    font-size: 1.4rem;
}

.circuit-component span {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 4px;
}

.battery {
    left: -20px;
    top: 45px; /* Ajustado para centrar verticalmente en la altura de 150px */
    color: var(--text-primary);
}

.bulb {
    right: -20px;
    top: 45px; /* Ajustado para centrar verticalmente en la altura de 150px */
    color: #64748b;
    transition: var(--transition-fast);
}

.bulb.lit {
    color: #eab308;
    background-color: rgba(234, 179, 8, 0.15);
    border-color: #eab308;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.circuit-gap {
    position: absolute;
    bottom: -15px;
    left: 80px;
    width: 150px;
    height: 24px;
    background-color: var(--bg-circuit-gap);
    border: 2px dashed var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.circuit-gap.steel-active {
    border-style: solid;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.circuit-gap.plastic-active {
    border-style: solid;
    border-color: #ef4444; /* Rojo para denotar aislante/bloqueo */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.gap-placeholder {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap; /* Evita que el texto de marcador de posición se amontone en flexbox */
}

.inserted-material {
    position: absolute; /* Cambiado a absoluto para no interferir ni squishear el placeholder */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2px;
    z-index: 2;
}

.circuit-gap.drag-hover {
    background-color: rgba(56, 189, 248, 0.15);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.circuit-info-card {
    background-color: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-secondary);
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin-top: 0.25rem;
    transition: var(--transition-smooth);
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.light-theme .circuit-info-card {
    background-color: rgba(15, 23, 42, 0.03);
    color: var(--text-primary);
}

.electron-flow {
    display: none;
}

.circuit-loop.conducting .electron-flow {
    display: block;
}

.electron-flow circle {
    fill: #facc15; /* Electrones amarillos resplandecientes */
    filter: drop-shadow(0 0 4px #eab308);
}

.light-theme .electron-flow circle {
    fill: #ca8a04;
    filter: drop-shadow(0 0 3px #ca8a04);
}

.materials-palette {
    display: flex;
    gap: 1rem;
}

.palette-item {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: grab;
    user-select: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.palette-item:active {
    cursor: grabbing;
}

.steel-palette {
    background-color: #64748b;
    color: #0f172a;
    border: 1px solid #94a3b8;
}

.plastic-palette {
    background-color: #10b981;
    color: #064e3b;
    border: 1px solid #34d399;
}

/* 5. SIMULADOR MAGNETISMO */
.magnet-visualizer {
    flex: 1;
    width: 100%;
    background-color: var(--bg-magnet-visualizer);
    position: relative;
    cursor: crosshair;
}

.magnet-particles-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.05s ease-out;
}

.particle.steel-particle {
    background-color: var(--color-steel);
}

.particle.plastic-particle {
    background-color: var(--color-plastic);
}

.draggable-magnet {
    position: absolute;
    width: 70px;
    height: 35px;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    user-select: none;
    z-index: 10;
}

.draggable-magnet:active {
    cursor: grabbing;
}

.magnet-n {
    flex: 1;
    background-color: #ef4444;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.magnet-s {
    flex: 1;
    background-color: #3b82f6;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* 6. SIMULADOR ÓPTICO */
.optics-visualizer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.light-source {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
}

.light-source i {
    font-size: 2.2rem;
    color: #eab308;
    z-index: 6;
}

.light-beam {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 40px;
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.6) 0%, rgba(234, 179, 8, 0.4) 60%, rgba(234, 179, 8, 0.1) 100%);
    clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.target-plate-container {
    width: 30px;
    height: 120px;
    position: relative;
}

.target-plate {
    width: 24px;
    height: 100px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: absolute;
    top: 10px;
    border: 2px solid var(--text-muted);
    background-color: var(--bg-plate-air);
}

.target-plate.plate-air {
    background-color: var(--bg-plate-air);
    border-color: var(--text-muted);
}

.target-plate.plate-steel {
    background-color: var(--bg-plate-steel);
    border-color: var(--color-steel);
}

.target-plate.plate-plastic {
    background-color: var(--bg-plate-plastic);
    border-color: var(--color-plastic);
}

.plate-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.projection-screen {
    width: 90px;
    height: 120px;
    border-left: 4px solid var(--color-steel);
    background-color: var(--bg-projection-screen);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.projection-screen span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
}

.projection-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(234, 179, 8, 0.4);
    filter: blur(8px);
    transition: var(--transition-smooth);
    opacity: 1;
}

/* Óptica Cards */
.optical-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.opt-card {
    border-left: 4px solid var(--border-color);
    background-color: var(--bg-glass);
    padding: 1rem;
    border-radius: 8px;
}

.opt-card h4 {
    color: var(--card-color);
    margin-bottom: 0.35rem;
}

.opt-card p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-secondary);
}

.opt-card.steel-style {
    --border-color: var(--color-steel);
    --card-color: var(--color-steel-text);
}

.opt-card.plastic-style {
    --border-color: var(--color-plastic);
    --card-color: var(--color-plastic-text);
}

/* ==========================================================================
   CONCLUSION SLIDE
   ========================================================================== */
.quote-box {
    border-left: 4px solid var(--color-primary);
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.08), transparent);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 1.5rem;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.quote-author {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
}

.key-takeaways h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.key-takeaways ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.key-takeaways li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.key-takeaways li i {
    margin-top: 0.2rem;
    color: var(--color-primary);
}

.key-takeaways li span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   DASHBOARD COMPARATIVO GLOBAL (DIAPOSITIVA FINAL)
   ========================================================================== */
.dashboard-slide-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding-bottom: 0.5rem;
}

.dashboard-header {
    margin-bottom: 1.25rem;
}

.dashboard-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.dashboard-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    flex: 1;
    min-height: 0; /* Permite scroll interno */
}

.matrix-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    min-height: 0;
}

.matrix-card h3 {
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.matrix-table-container {
    overflow-y: auto;
    flex: 1;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.matrix-table th, .matrix-table td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--border-glass);
}

.matrix-table th {
    background-color: var(--bg-matrix-header);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.matrix-table tr:hover {
    background-color: var(--bg-matrix-hover);
}

.steel-td {
    color: var(--color-steel-text);
    font-weight: 500;
}

.plastic-td {
    color: var(--color-plastic-text);
    font-weight: 500;
}

/* Corregir el diseño de las insignias en la tabla del dashboard para evitar que se desborden y se pierda el texto blanco */
.matrix-table .badge {
    width: auto;
    height: auto;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.matrix-table .badge-elec {
    background-color: #facc15; /* Amarillo más cálido */
    color: #451a03; /* Texto marrón oscuro para contraste alto */
    text-shadow: none;
}

.badge-magnet { background-color: #8b5cf6; }
.badge-opt { background-color: #06b6d4; }

/* Asistente Recomendador */
.assistant-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.assistant-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.25rem;
}

.assistant-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.selector-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-group label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    accent-color: var(--color-primary);
}

.recommendation-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    transition: var(--transition-smooth);
}

.recommendation-result h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.recommendation-result span {
    color: var(--color-primary);
}

.recommendation-result p {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.45;
}

/* ==========================================================================
   NAVEGACIÓN / CONTROLES INFERIORES (FOOTER)
   ========================================================================== */
.footer-controls {
    height: 70px;
    border-top: 1px solid var(--border-glass);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
}

.nav-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--color-primary);
    border-color: rgba(56, 189, 248, 0.3);
}

.progress-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.progress-bar-tracks {
    display: flex;
    width: 100%;
    gap: 4px;
}

.progress-track {
    height: 4px;
    flex: 1;
    background-color: var(--border-glass);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.progress-track.active {
    background-color: var(--color-primary);
}

.progress-track:hover {
    background-color: var(--text-muted);
}

.slide-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ÍNDICE LATERAL (SIDEBAR NAVIGATION)
   ========================================================================== */
.slide-index {
    position: absolute;
    top: 70px;
    right: 0;
    width: 320px;
    height: calc(100% - 140px);
    background-color: var(--bg-container);
    border-left: 1px solid var(--border-glass);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.slide-index.open {
    transform: translateX(0);
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-glass);
}

.index-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
}

.index-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.index-list li {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.index-list li:hover {
    background-color: var(--border-glass);
    color: var(--text-primary);
}

.index-list li.active {
    background-color: rgba(56, 189, 248, 0.08);
    color: var(--color-primary);
    font-weight: 600;
    border-left: 4px solid var(--color-primary);
}

.index-num {
    font-family: var(--font-heading);
    font-weight: 700;
    opacity: 0.5;
}

/* ==========================================================================
   RESPONSIVIDAD Y ADAPTABILIDAD (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .slide-content {
        flex-direction: column;
        gap: 1.5rem;
        overflow-y: auto;
        padding-right: 0.5rem;
    }
    
    .slide {
        padding: 1rem;
        overflow-y: auto;
    }
    
    .visual-panel, .text-panel {
        flex: none;
        width: 100%;
        height: auto;
    }
    
    .text-panel {
        padding-right: 0;
    }
    
    .interactive-sandbox {
        height: 380px;
        margin: 0 auto;
    }
    
    .scale-beam {
        width: 250px;
    }
    
    .scale-pan::before {
        border-left-width: 40px;
        border-right-width: 40px;
    }
    
    .scale-pan::after {
        width: 80px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .matrix-card, .assistant-card {
        min-height: 300px;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 1rem;
    }
    
    .project-title {
        display: none;
    }
    
    .footer-controls {
        padding: 0 1rem;
    }
    
    .progress-bar-container {
        margin: 0 0.5rem;
    }
    
    .nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   LIGHTBOX MODAL DE REFERENCIAS DE VIDEO
   ========================================================================== */
.lightbox-modal {
    /* Forzar estilo oscuro de alto contraste e inmersivo en ambos temas */
    --lightbox-bg-glass: rgba(15, 23, 42, 0.85);
    --lightbox-border-glass: rgba(255, 255, 255, 0.12);
    --lightbox-text: #f8fafc;
    
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(7, 10, 18, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    border: 1px solid var(--lightbox-border-glass);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    object-fit: contain;
    background-color: #000;
}

.lightbox-caption {
    margin-top: 1.25rem;
    color: var(--lightbox-text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-heading);
    text-align: center;
    background: var(--lightbox-bg-glass);
    padding: 0.65rem 1.75rem;
    border-radius: 30px;
    border: 1px solid var(--lightbox-border-glass);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 85%;
    line-height: 1.4;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--lightbox-bg-glass);
    border: 1px solid var(--lightbox-border-glass);
    color: var(--lightbox-text);
    font-size: 2.2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    background-color: var(--color-primary);
    color: #0b111e;
    border-color: var(--color-primary);
    transform: scale(1.1) rotate(90deg);
}

.slide-image-reference {
    cursor: pointer !important;
    user-select: none;
}

.slide-image-reference:active {
    transform: scale(0.98);
}

