/* =========================================
   1. TOKENS DE DISEÑO & VARIABLES
   ========================================= */
:root {
    /* Marca */
    --brand-cobalt: #0052FF;
    --brand-lime: #A3E635;
    
    /* Modo Oscuro (Default) */
    --bg-body: #0F1115;
    --bg-surface: #1A1D23;
    --text-primary: #F9FAFB;
    --text-secondary: #B0B8C4; 
    --border-color: #2F333A;

    /* Sombras & Efectos */
    --shadow-ambient: 0 4px 10px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.6);

    /* Tipografía */
    --font-display: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Espaciado */
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Animaciones */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* =========================================
   2. BASE & RESET
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Evitar rebote elástico en Mac/iOS */
html, body { overscroll-behavior: none; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Clases de estado del Body */
body.has-fixed-hero { padding-top: 100vh; }
body.modal-open { overflow: hidden; }

/* Capas de profundidad */
main, footer, section { position: relative; z-index: 2; background-color: var(--bg-body); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-padding { padding: var(--space-xl) 0; }

/* =========================================
   3. TIPOGRAFÍA
   ========================================= */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem; }

.text-display-xl { font-size: clamp(3rem, 8vw, 5rem); line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; }
.text-display-l { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 2rem; }
.text-display-m { font-size: 2rem; }

.text-body-lead { 
    font-size: 1.25rem; font-weight: 300; 
    color: var(--text-secondary); max-width: 60ch; 
    margin: 0 auto 2rem auto;
}

.gradient-text {
    background: linear-gradient(135deg, #fff, var(--brand-lime));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* =========================================
   4. COMPONENTES UI
   ========================================= */
/* Botones */
.btn {
    display: inline-flex; padding: 1rem 2rem; border-radius: 50px; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 600; text-decoration: none;
    transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s ease; cursor: pointer;
}
.btn-primary { background: var(--brand-cobalt); color: #fff; border: 1px solid var(--brand-cobalt); }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(0, 82, 255, 0.3); }
.btn-outline { background: transparent; color: #fff; border: 1px solid var(--border-color); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.05); }
.btn-sm { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

/* Badges */
.badge {
    display: inline-block; padding: 0.25rem 0.75rem; border-radius: 100px;
    background: rgba(163, 230, 53, 0.15); color: var(--brand-lime);
    font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; margin-bottom: 1.5rem;
}

/* Animación Reveal (Fade Up) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-out-expo); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   5. NAVEGACIÓN & FOOTER
   ========================================= */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(15, 17, 21, 0.9); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05); padding: 1.2rem 0;

    transition: transform 0.3s ease, background 0.3s ease;
    
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.05em; color: #fff; text-decoration: none; }
.nav-links { display: flex; gap: 2rem; align-items: center; }

/* Links Kinetia (Efecto Barra Verde) */
.kinetia-link, .nav-links a { 
    color: var(--text-secondary); text-decoration: none; font-weight: 500; 
    position: relative; padding-bottom: 4px; transition: color 0.3s ease;
}
.nav-links a.btn { padding-bottom: 1rem; } 
.kinetia-link::after, .nav-links a:not(.btn)::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--brand-lime); transition: width 0.3s var(--ease-out-expo);
}
.kinetia-link:hover, .nav-links a:hover { color: #fff; }
.kinetia-link:hover::after, .nav-links a:not(.btn)::hover::after { width: 100%; }
.nav-links a.active { color: #fff; } 

/* Menú Móvil (Corrección Fantasma) */
.mobile-menu-overlay {
    position: fixed; top: 0; right: 0; width: 100%; height: 100vh;
    background: var(--bg-body); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; pointer-events: none; 
    transform: translateX(100%); transition: all 0.4s var(--ease-out-expo);
}
.mobile-menu-overlay.active { 
    opacity: 1; visibility: visible; pointer-events: auto; 
    transform: translateX(0);
}
.mobile-link { font-size: 2rem; font-weight: 700; color: #fff; text-decoration: none; margin: 1rem 0; font-family: var(--font-display); }

/* Footer V3 (Diseño Limpio) */
.site-footer {
    background: var(--bg-surface); border-top: 1px solid var(--border-color);
    padding-top: 5rem; margin-top: 4rem; position: relative; z-index: 2;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 4rem; }
.footer-col h5 { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: var(--text-primary); text-decoration: none; font-size: 0.95rem; opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; color: var(--brand-lime); }

/* Barra Legal Inferior */
.footer-legal-bar { 
    border-top: 1px solid var(--border-color); padding: 2rem 0; 
    display: flex; justify-content: center; align-items: center; gap: 2rem; flex-wrap: wrap;
    font-size: 0.85rem; color: var(--text-secondary);
}
.footer-legal-link { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-legal-link:hover { color: var(--brand-lime); }
.footer-separator { opacity: 0.3; }

/* =========================================
   6. SECCIONES ESPECÍFICAS (HOME)
   ========================================= */

/* Hero Parallax (Fijo al fondo) */
.hero-fixed {
    height: 100vh; width: 100%; position: fixed; top: 0; left: 0; 
    display: flex; align-items: center; justify-content: center; z-index: 0; overflow: hidden;
}
.hero-absolute {
    height: 100vh; width: 100%; position: relative; 
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    margin-top: -80px; padding-top: 80px;
}
.hero-bg-img { 
    position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; z-index: -1; 
    animation: ken-burns 20s infinite alternate ease-in-out;
}
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 1rem; }

/* Intro Card Glass (La tarjeta flotante) */
.intro-overlay-section {
    margin-top: -150px; padding-bottom: 4rem; background: transparent; position: relative; z-index: 5;
}
.glass-intro-card {
    background: rgba(15, 17, 21, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 32px; padding: 4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-width: 1000px; margin: 0 auto;
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 3.5rem; color: var(--brand-lime); margin: 0; font-weight: 700; }
.stat-item p { font-family: var(--font-mono); color: var(--text-secondary); font-size: 0.9rem; }

/* Full Width Sections (Para fondos oscuros extendidos) */
.full-width-bg {
    width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw;
    background-color: #0A0C0F; padding: 8rem 0;
}

/* 3 Puntos de Precisión (Features) */
.features-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; 
    margin-top: 4rem; padding-top: 4rem; border-top: 1px solid var(--border-color); 
}
.feature-item h4 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #fff; }
.feature-item p { font-size: 0.9rem; color: var(--text-secondary); }

/* =========================================
   7. MÓDULOS INTERACTIVOS (KINETIA 2.0)
   ========================================= */

/* APPLE CAROUSEL (Blindado: no se rompe) */
.apple-carousel-container {
    display: flex; flex-wrap: nowrap; /* CLAVE: Evita que bajen */
    gap: 2rem; overflow-x: auto; padding-bottom: 3rem; padding-top: 1rem;
    padding-left: max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem));
    padding-right: 4rem; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; width: 100%; cursor: grab;
}
.apple-carousel-container:active { cursor: grabbing; }
.apple-carousel-container::-webkit-scrollbar { display: none; }

.apple-card {
    flex: 0 0 auto; /* CLAVE: No encoger ni crecer */
    min-width: 400px; height: 500px; scroll-snap-align: center;
    position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease; user-select: none;
}
.apple-card:hover { transform: scale(1.02); border-color: var(--brand-lime); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.apple-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); transition: filter 0.3s ease; pointer-events: none; }
.apple-card:hover img { filter: brightness(0.5); }
.apple-card-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    display: flex; flex-direction: column; justify-content: flex-end;
}
.apple-card h4 { font-size: 1.5rem; margin-bottom: 0.5rem; color: #fff; white-space: normal; }
.apple-card p { font-size: 1rem; color: #ddd; margin-bottom: 0; transition: margin 0.3s ease; white-space: normal; }
.apple-card-btn {
    display: inline-block; margin-top: 0; opacity: 0; height: 0;
    transform: translateY(20px); transition: all 0.3s var(--ease-out-expo); overflow: hidden;
}
.apple-card:hover .apple-card-btn { opacity: 1; height: auto; margin-top: 1.5rem; transform: translateY(0); }

/* FLIP CARDS (Servicios) */
.flip-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; perspective: 1000px; }
.flip-card { background-color: transparent; height: 350px; cursor: pointer; }
.flip-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.8s var(--ease-out-expo); transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 16px; padding: 2rem; border: 1px solid var(--border-color);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.flip-card-front { background-color: var(--bg-surface); }
.flip-card-back { background-color: #0A0C0F; transform: rotateY(180deg); border: 1px solid var(--brand-lime); }
.service-card-icon { font-size: 2.5rem; margin-bottom: 1.5rem; display: block; stroke: var(--brand-lime); color: var(--brand-lime); }

/* MODALES */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center; z-index: 10000;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-surface); width: 90%; max-width: 600px;
    padding: 3rem; border-radius: 24px; border: 1px solid var(--border-color);
    position: relative; transform: scale(0.9); transition: transform 0.3s var(--ease-out-expo);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none;
    color: var(--text-secondary); font-size: 1.5rem; cursor: pointer;
}
.modal-close:hover { color: #fff; }

/* STICKY SCROLL (CORREGIDO: Espaciado) */
.sticky-wrapper { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.scroll-content { position: relative; padding-bottom: 2vh; }
.scroll-step {
    min-height: 80vh; display: flex; flex-direction: column; justify-content: center;
    opacity: 0.2; transition: opacity 0.5s ease, transform 0.5s ease; padding-right: 2rem;
}
.scroll-step.active { opacity: 1; transform: translateX(10px); }
.step-number { font-family: var(--font-mono); color: var(--brand-lime); margin-bottom: 1rem; display: block; font-size: 0.9rem; }
.sticky-visual-container {
    position: -webkit-sticky; position: sticky; top: 0; height: 100vh;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.visual-card {
    width: 100%; height: 60vh; background: var(--bg-surface);
    border-radius: 24px; border: 1px solid var(--border-color);
    position: relative; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.visual-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.8s var(--ease-out-expo), transform 1.2s ease;
    transform: scale(1.1);
}
.visual-layer.active { opacity: 1; transform: scale(1); }

/* FAB */
.contextual-fab-wrapper {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 90;
    transform: translateY(100px); opacity: 0; transition: all 0.5s var(--ease-out-expo);
}
.contextual-fab-wrapper.visible { transform: translateY(0); opacity: 1; }
.fab-btn {
    background: rgba(163, 230, 53, 0.9); backdrop-filter: blur(10px);
    border: 1px solid var(--brand-lime); color: #000;
    padding: 0.8rem 1.5rem; border-radius: 50px; font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); transition: all 0.3s ease;
}
.fab-btn:hover { background: #fff; transform: translateY(-3px) scale(1.05); }

/* =========================================
   8. MÓDULOS CAPACIDADES (NUEVO)
   ========================================= */

/* --- COMPARATIVA MEJORADA V3.2 --- */

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Kinetia un poco más ancha */
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
    align-items: center; /* Centrar verticalmente */
}

/* Columna "Aburrida" (Tradicional) */
.comparison-col.traditional {
    padding: 3rem;
    border-radius: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.15); /* Borde sutil punteado */
    background: transparent;
    opacity: 0.6; /* Visualmente "apagada" */
    transition: opacity 0.3s ease;
}
.comparison-col.traditional:hover { opacity: 1; }

/* Columna "Premium" (Kinetia) */
.comparison-col.kinetia {
    padding: 4rem; /* Más aire */
    border-radius: 32px;
    border: 1px solid rgba(163, 230, 53, 0.3); /* Borde verde sutil */
    background: linear-gradient(180deg, rgba(26, 29, 35, 1) 0%, rgba(163, 230, 53, 0.05) 100%);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(163, 230, 53, 0.1) inset;
    transform: scale(1.05); /* Efecto de zoom permanente */
    position: relative;
    z-index: 2;
}

/* Títulos */
.comparison-col h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.comparison-col.traditional h3 { color: #888; }
.comparison-col.kinetia h3 { color: #fff; font-size: 1.8rem; }

/* Listas */
.comparison-list { list-style: none; padding: 0; margin: 0; }
.comparison-list li {
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Iconos Customizados */
.comparison-col.traditional li { color: #999; }
.comparison-col.traditional li::before {
    content: "✕";
    position: absolute; left: 0; top: 0;
    color: #555; /* Rojo muy apagado o gris */
    font-weight: 700;
}

.comparison-col.kinetia li { color: #eee; font-weight: 500; }
.comparison-col.kinetia li::before {
    content: "✔"; /* O puedes usar un SVG aquí */
    position: absolute; left: 0; top: 0;
    color: var(--brand-lime);
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(163, 230, 53, 0.4);
}

/* VS Badge Flotante */
.comparison-grid::after {
    content: 'VS';
    position: absolute;
    left: 46%; /* Ajuste por la asimetría de columnas */
    top: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid #333;
    color: #666;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    z-index: 3;
}

/* Responsive */
@media (max-width: 900px) {
    .comparison-grid { grid-template-columns: 1fr; gap: 3rem; }
    .comparison-grid::after { display: none; }
    .comparison-col.kinetia { transform: none; padding: 3rem; }
}

/* --- CORRECCIÓN: HERO CENTRADO ABSOLUTO --- */
.page-header {
    padding-top: 160px; 
    padding-bottom: 4rem; 
    text-align: center; /* Centra el texto */
    display: flex;      /* Activa Flexbox */
    flex-direction: column;
    align-items: center; /* Centra los elementos hijos horizontalmente */
    justify-content: center; /* Centra verticalmente si tuviera altura */
    width: 100%;
}

.page-header h1 {
    margin-left: auto;
    margin-right: auto;
    max-width: 900px; /* Evita que se estire demasiado en pantallas gigantes */
}

.page-header .text-body-lead {
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   9. PÁGINAS INTERNAS & FORMULARIO
   ========================================= */

/* Portafolio Grid */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }
.portfolio-item {
    background: var(--bg-surface); border-radius: 16px; overflow: hidden;
    text-decoration: none; color: #fff; border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s ease; display: block; box-shadow: var(--shadow-ambient);
    position: relative;
}
.portfolio-item:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.portfolio-img-wrapper { height: 280px; overflow: hidden; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-text { 
    padding: 2rem; position: absolute; bottom:0; left:0; width: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, transparent);
    opacity: 0; transform: translateY(20px); transition: all 0.4s var(--ease-out-expo);
}
.portfolio-item:hover .portfolio-text { opacity: 1; transform: translateY(0); }

/* Portafolio Asimétrico */
.portfolio-grid-asym { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; grid-auto-rows: 300px; }
.item-tall { grid-row: span 2; } .item-standard { grid-row: span 1; }

/* Filtros */
.filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.filter-item { font-family: var(--font-mono); font-size: 0.9rem; padding: 0.5rem 1.5rem; border-radius: 50px; cursor: pointer; background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-color); transition: all 0.3s; }
.filter-item:hover { background: #fff; color: #000; }
.filter-item.active { background: var(--brand-lime); color: #000; border-color: var(--brand-lime); font-weight: 600; }

/* Formulario */
.form-container { max-width: 700px; margin: 0 auto; background: var(--bg-surface); padding: 3rem; border-radius: 24px; border: 1px solid var(--border-color); box-shadow: var(--shadow-ambient); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-family: var(--font-display); font-weight: 500; margin-bottom: 0.5rem; font-size: 0.9rem; color: #fff; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 1rem 1.25rem; font-family: var(--font-body); font-size: 1rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-body); color: var(--text-primary); transition: all 0.2s ease; outline: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--brand-cobalt); box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.2); }
.form-textarea { min-height: 150px; resize: vertical; }
.form-file-upload { border: 2px dashed var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s ease; background: rgba(255,255,255,0.02); display: block; }
.form-file-upload:hover { border-color: var(--brand-lime); background: rgba(163, 230, 53, 0.05); }
.form-file-upload input[type="file"] { display: none; }
.file-label-text { font-size: 0.9rem; color: var(--text-secondary); pointer-events: none; }

.btn-submit-animated { position: relative; overflow: hidden; width: 100%; margin-top: 1rem; }
.btn-submit-animated.sending { width: 60px; height: 60px; border-radius: 50%; padding: 0; margin-left: auto; margin-right: auto; background: var(--brand-lime); border-color: var(--brand-lime); pointer-events: none; color: transparent; }
.paper-plane { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); color: #000; transition: all 0.3s; }
.btn-submit-animated.sending .paper-plane { transform: translate(-50%, -50%) scale(1); }
.btn-text { transition: opacity 0.2s; }
.btn-submit-animated.sending .btn-text { opacity: 0; }

/* Tabs Legal */
.legal-container { max-width: 800px; margin: 0 auto; }
.legal-text { color: var(--text-secondary); font-size: 1rem; line-height: 1.8; margin-bottom: 2rem; }
.legal-text h3 { color: #fff; font-size: 1.5rem; margin-top: 3rem; margin-bottom: 1rem; }
.legal-text ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.legal-tabs { display: flex; gap: 1rem; margin-bottom: 3rem; border-bottom: 1px solid var(--border-color); }
.tab-btn { background: none; border: none; color: var(--text-secondary); padding: 1rem 0; margin-right: 2rem; font-family: var(--font-display); font-size: 1.1rem; cursor: pointer; position: relative; }
.tab-btn.active { color: var(--brand-lime); font-weight: 600; }
.tab-btn.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--brand-lime); }
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   10. RESPONSIVE GLOBAL
   ========================================= */
/* CORRECCIÓN CLAVE: Ocultar botón hamburguesa en escritorio */
.nav-toggle-btn { display: none !important; } 

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .flip-card-grid { grid-template-columns: 1fr 1fr; }
    /* AJUSTE: El carrusel se hace más pequeño en tablet */
    .apple-card { 
        min-width: 300px; 
        width: 300px;
        height: 420px; 
    }
    .comparison-grid { grid-template-columns: 1fr; gap: 2rem; }
    .comparison-grid::after { display: none; }
}

@media (max-width: 768px) {
    /* Mostrar botón hamburguesa SOLO en móvil */
    .nav-toggle-btn { display: block !important; background: none; border: none; color: #fff; cursor: pointer; } 
    .nav-links { display: none; }
    
    /* Grids a 1 columna */
    .stats-grid, .icon-services-grid, .portfolio-grid, .portfolio-grid-asym, .project-gallery, .project-content, .footer-grid, .sticky-wrapper, .flip-card-grid, .form-grid, .features-grid { 
        grid-template-columns: 1fr; 
    }
    
    /* Ajustes específicos móvil */
    .portfolio-item[style*="span 2"], .gallery-item.full-width, .item-tall { grid-column: span 1 !important; }
    .item-tall { height: 300px; }
    
    .text-display-xl { font-size: 2.5rem; }
    .project-nav { flex-direction: column; gap: 2rem; text-align: center; }
    .hero-image-container { height: 40vh; }
    .footer-legal-bar { flex-direction: column; gap: 0.5rem; }
    .footer-separator { display: none; }
    .sticky-visual-container { display: none; } 
    .scroll-step { min-height: auto; margin-bottom: 3rem; opacity: 1; }
    
    /* Footer móvil */
    .footer-grid { gap: 2rem; }
    /* Ajuste Botón Apple Card móvil */
    .apple-card-btn { opacity: 1; height: auto; margin-top: 1rem; transform: none; }
    
    /* AJUSTE CARRUSEL MÓVIL: Ancho casi completo */
    .apple-card {
        min-width: 85vw;
        width: 85vw;
        height: 450px;
    }
    
    /* Ajuste para móviles: Tarjeta Flotante Intro */
    .intro-overlay-section { margin-top: -50px; }
    .glass-intro-card { padding: 2rem; border-radius: 24px; }

    /* Ajuste Tech Stack */
    .tech-item { font-size: 1.8rem; margin: 0 1.5rem; }
}
/* =========================================
   11. MEJORAS CARRUSEL APPLE (FIX & AUTO)
   ========================================= */

/* Wrapper para posicionar controles */
.apple-carousel-wrapper {
    position: relative;
    width: 100%;
}

/* Asegurar que el contenedor no corte las sombras ni oculte items */
.apple-carousel-container {
    padding-bottom: 4rem; /* Espacio para la sombra y hover */
    padding-top: 1rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    scroll-behavior: smooth; /* Suavidad nativa */
}
.apple-carousel-container::-webkit-scrollbar { display: none; }

/* Indicadores de Progreso */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: -2rem; /* Subir para acercar a las cards */
    margin-bottom: 2rem;
    padding-left: max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem)); /* Alinear visualmente */
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background-color: var(--brand-lime);
    width: 30px; /* Se estira como en iOS */
    border-radius: 4px;
}

/* Botón de Pausa Flotante (Pequeño y sutil) */
.carousel-control-btn {
    position: absolute;
    bottom: 0;
    right: max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem));
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 10;
}
.carousel-control-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.2); }

/* Ajuste Responsive para indicadores */
@media (max-width: 768px) {
    .carousel-indicators {
        justify-content: flex-start; /* Alinear a la izquierda en móvil para seguir el scroll */
        padding-left: 1.5rem;
    }
    .carousel-control-btn {
        display: none; /* Ocultar botón pause en móvil, el dedo basta */
    }
}

/* =========================================
   12. TECH STACK MARQUEE (CORREGIDO: OVERFLOW & VISIBILIDAD)
   ========================================= */

.tech-marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* Necesario para el efecto infinito */
    white-space: nowrap;
    
    /* 🟢 CORRECCIÓN CLAVE: 
       Damos mucho espacio arriba (padding-top) para que el tooltip 
       quepa DENTRO del área visible sin ser recortado por el overflow. */
    padding-top: 8rem; 
    padding-bottom: 2rem;
    margin-top: -4rem; /* Compensamos visualmente el espacio extra */
    
    /* Máscara de desvanecimiento lateral */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.tech-marquee-track {
    display: inline-block;
    animation: marquee-scroll 40s linear infinite;
}

/* Animación: Mueve el track de 0 a -50% */
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pausar animación al pasar el mouse */
.tech-marquee-wrapper:hover .tech-marquee-track {
    animation-play-state: paused;
}

/* ESTILOS DE LOS ITEMS */
.tech-item {
    display: inline-block;
    margin: 0 3rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.5rem;
    color: #4B5563; /* Gris oscuro inicial */
    opacity: 0.5;
    cursor: help;
    transition: all 0.3s ease;
    position: relative; /* Referencia para el tooltip */
}

/* Hover en el ITEM */
.tech-item:hover {
    color: var(--brand-lime);
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(163, 230, 53, 0.4);
    z-index: 10; /* Elevar el item activo */
}

/* TOOLTIP (La explicación flotante) */
.tech-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%; /* Arriba del texto */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    
    width: max-content;
    max-width: 280px; /* Un poco más ancho */
    padding: 1rem 1.5rem;
    
    /* 🟢 MEJORA VISUAL: Fondo más claro y borde visible */
    background: var(--bg-surface); /* #1A1D23 en lugar de negro casi puro */
    border: 1px solid var(--brand-lime); /* Borde verde para resaltar */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8); /* Sombra fuerte para profundidad */
    
    color: #fff;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 400;
    text-align: center;
    white-space: normal;
    line-height: 1.5;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
    pointer-events: none;
    z-index: 100; /* Asegurar que esté encima de todo */
}

/* Flechita del tooltip */
.tech-item::before {
    content: '';
    position: absolute;
    bottom: 110%; /* Ajustado para conectar con la caja */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 8px solid transparent;
    border-top-color: var(--brand-lime); /* Flecha verde para conectar */
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 100;
}

/* Mostrar Tooltip al hover */
.tech-item:hover::after,
.tech-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .tech-item {
        font-size: 1.8rem;
        margin: 0 1.5rem;
    }
    .tech-marquee-wrapper {
        mask-image: none;
        padding-top: 6rem; /* Menos padding en móvil pero suficiente */
        margin-top: -2rem;
    }
    .tech-item::after {
        max-width: 200px; /* Tooltip más estrecho en móvil */
        font-size: 0.8rem;
    }
}

/* =========================================
   13. MEJORAS PORTAFOLIO (PREMIUM UI)
   ========================================= */

/* 1. BADGES FLOTANTES EN TARJETA */
.portfolio-tags {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
    pointer-events: none;
}

.p-tag {
    background: rgba(15, 17, 21, 0.7); /* Oscuro translúcido */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 2. FLECHA ANIMADA EN HOVER */
.portfolio-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #000;
    opacity: 0;
    transform: translateX(-10px) scale(0.8);
    transition: all 0.4s var(--ease-out-expo);
    z-index: 3;
}

.portfolio-item:hover .portfolio-arrow {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* =========================================
   14. DETALLE DE PROYECTO (SINGLE)
   ========================================= */

/* Hero de Proyecto */
.project-hero {
    height: 70vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
}
.project-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}
.project-hero-content {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 4rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

/* Barra de Datos Técnicos (Data Grid) */
.project-data-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
}
.data-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}
.data-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* Galería Masonry */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 4rem 0;
}
.gallery-img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-img:hover { transform: scale(1.02); }
.gallery-full { grid-column: span 2; height: 500px; }
.gallery-half { height: 400px; }

/* Navegación Siguiente Proyecto */
.next-project-nav {
    display: block;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: right;
    text-decoration: none;
    transition: background 0.3s;
}
.next-project-nav:hover { background: var(--bg-surface); }

/* Ajuste Responsive */
@media (max-width: 768px) {
    .project-data-bar { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .project-gallery { grid-template-columns: 1fr; }
    .gallery-full { grid-column: span 1; height: 300px; }
    .gallery-half { height: 300px; }
}

/* =========================================
   15. MEJORAS PROYECTO SINGLE (SIDE NAV + COMPARE)
   ========================================= */

/* --- A. NAVEGACIÓN LATERAL "PEEKING" --- */
.side-nav-trigger {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px; /* Zona activa estrecha */
    height: 200px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    background: transparent; /* Invisible por defecto */
}

.side-nav-left { left: 0; }
.side-nav-right { right: 0; }

/* El contenedor de la tarjeta que se expande */
.side-nav-card {
    position: absolute;
    top: 0;
    width: 280px;
    height: 100%;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none; /* No clickeable si está oculto */
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.side-nav-left .side-nav-card { left: 20px; transform: translateX(-50px); }
.side-nav-right .side-nav-card { right: 20px; transform: translateX(50px); }

/* Al hacer hover en el trigger, mostramos la card */
.side-nav-trigger:hover .side-nav-card {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Flecha indicadora visible siempre */
.side-nav-arrow {
    width: 40px; height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: transform 0.3s ease;
    z-index: 92;
}
.side-nav-trigger:hover .side-nav-arrow { background: var(--brand-lime); color: #000; }

/* Contenido interno de la tarjeta lateral */
.sn-img { height: 120px; width: 100%; object-fit: cover; }
.sn-info { padding: 1rem; }
.sn-label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; display: block; margin-bottom: 0.3rem; }
.sn-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; line-height: 1.2; }


/* --- B. SLIDER DE COMPARACIÓN (ANTES/DESPUÉS) --- */
.img-comp-container {
    position: relative;
    height: 500px; /* Altura fija impactante */
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    cursor: col-resize; /* Cursor de redimensionar */
}

.img-comp-img {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.img-comp-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que llenen el espacio */
}

/* Etiquetas flotantes sobre el slider */
.comp-label {
    position: absolute;
    top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.7);
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 20;
    pointer-events: none;
}
.label-left { left: 1.5rem; border: 1px solid var(--brand-lime); color: var(--brand-lime); }
.label-right { right: 1.5rem; border: 1px solid #fff; }

/* La barra deslizadora */
.img-comp-slider {
    position: absolute;
    z-index: 25;
    cursor: col-resize;
    width: 40px;
    height: 40px;
    background-color: var(--brand-lime);
    border-radius: 50%;
    top: 50%;
    left: 50%; /* Inicio al centro */
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.6);
}
/* Línea vertical del slider */
.img-comp-slider::before {
    content: '';
    position: absolute;
    top: -1000px; /* Línea muy larga hacia arriba */
    bottom: -1000px; /* Línea muy larga hacia abajo */
    width: 2px;
    background: var(--brand-lime);
    z-index: 24;
}

@media (max-width: 768px) {
    .side-nav-trigger { display: none; } /* Ocultar nav lateral en móvil */
    .img-comp-container { height: 300px; } /* Slider más bajo en móvil */
}

/* Estilos para Navegación Inmersiva (MODO BANNER CINEMÁTICO) */
.immersive-next-project {
    display: block;
    position: relative;
    
    /* 🟢 AJUSTE: 100% Ancho pero altura controlada (Faja) */
    width: 100%;
    height: 220px; /* Altura elegante, tipo banner */
    margin: 0;     /* Sin márgenes externos */
    
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    border-top: 1px solid var(--border-color); /* Línea sutil arriba */
    border-bottom: 1px solid var(--border-color);
}

.immersive-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    /* Centramos la imagen para que al recortar altura se vea lo importante */
    object-position: center; 
    transition: transform 0.6s var(--ease-out-expo);
    filter: brightness(0.3); /* Más oscuro para garantizar lectura en banner */
}

.immersive-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    /* En modo banner, funciona mejor horizontal o muy compacto */
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

/* Ajuste de textos para que quepan bien en la faja */
.immersive-content .text-display-l {
    font-size: 2.5rem; /* Un poco más pequeño que el Hero */
    margin-bottom: 0.5rem;
}

.immersive-content .next-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
}

/* Efecto Hover */
.immersive-next-project:hover .immersive-bg {
    transform: scale(1.03); /* Zoom muy sutil */
    filter: brightness(0.5); /* Se aclara al pasar el mouse */
}

/* Ajuste Móvil */
@media (max-width: 768px) {
    .immersive-next-project {
        height: 180px; /* Aún más compacto en celular */
    }
    .immersive-content .text-display-l {
        font-size: 1.8rem;
    }
}

/* =========================================
   16. CORRECCIÓN VISOR DUAL (SIN SLIDER)
   ========================================= */

.tech-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tech-card-visual {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 350px; /* Altura fija para uniformidad */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.tech-card:hover .tech-card-visual {
    transform: translateY(-5px);
    border-color: var(--brand-lime);
}

.tech-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

/* Etiquetas flotantes (Badges) */
.tech-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--brand-lime);
    border: 1px solid var(--brand-lime);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.05em;
}

.tech-badge.white {
    color: #fff;
    border-color: #fff;
}

.tech-caption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    font-family: var(--font-mono);
}

@media (max-width: 768px) {
    .tech-dual-grid { grid-template-columns: 1fr; }
    .tech-card-visual { height: 250px; }
}

/* =========================================
   17. BOTÓN BACK TO TOP (ELEVADOR)
   ========================================= */

.back-to-top {
    position: fixed;
    bottom: 6rem; /* Lo ponemos encima del botón FAB (que está en 2rem) */
    right: 2rem;
    width: 45px;
    height: 45px;
    
    background: rgba(15, 17, 21, 0.6); /* Oscuro semitransparente */
    backdrop-filter: blur(8px);       /* Efecto vidrio Apple */
    border: 1px solid var(--border-color);
    border-radius: 50%;
    
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    
    cursor: pointer;
    opacity: 0;          /* Invisible al inicio */
    visibility: hidden;  /* No clickeable al inicio */
    transform: translateY(20px);
    transition: all 0.4s var(--ease-out-expo);
    z-index: 89; /* Debajo del menú móvil (99) pero encima del contenido */
}

/* Estado Visible (se activa con JS al bajar) */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover */
.back-to-top:hover {
    background: var(--brand-lime);
    color: #000;
    border-color: var(--brand-lime);
    transform: translateY(-5px); /* Se eleva un poco */
}

/* Ajuste Móvil para que no estorbe */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 5.5rem; 
        right: 1.5rem;
        width: 40px; height: 40px;
    }
}

/* =========================================
   18. ESTILOS JOURNAL (BLOG SERIO)
   ========================================= */

/* Barra de Progreso de Lectura */
.reading-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: var(--brand-lime);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s;
}

/* Contenedor Editorial (Más estrecho para leer mejor) */
.journal-container {
    max-width: 740px; /* Ancho óptimo de lectura (~70 caracteres) */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Tipografía de Artículo */
.journal-body {
    font-family: 'IBM Plex Sans', sans-serif; /* O una Serif si quieres más seriedad */
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0; /* Blanco suave */
}

.journal-body p { margin-bottom: 2rem; }

.journal-body h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--brand-lime);
    padding-left: 1rem;
}

.journal-abstract {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--brand-lime);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    line-height: 1.6;
    font-style: italic;
}

/* Citas en el texto [1] */
sup.cite-ref a {
    color: var(--brand-lime);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-left: 2px;
}

/* Bloque de Referencias (Desplegable) */
.journal-references {
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.journal-references summary {
    cursor: pointer;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 600;
    list-style: none; /* Quitar flecha default fea */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.journal-references summary::after {
    content: '+'; 
    font-size: 1.2rem;
}
.journal-references[open] summary::after {
    content: '-';
}

.ref-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.ref-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}
.ref-list li::before {
    content: attr(data-index) ".";
    position: absolute;
    left: 0;
    color: var(--brand-lime);
    font-family: var(--font-mono);
}

/* Navegación de Artículos (Flechas) */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}
.nav-card {
    text-decoration: none;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.nav-card:hover {
    background: var(--bg-surface);
    border-color: var(--brand-lime);
}
.nav-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}
.nav-title {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

/* =========================================
   19. BLOG INDEX (ESTILO MAGAZINE)
   ========================================= */

/* Tarjeta Destacada (Hero del Blog) */
.blog-featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4rem;
    align-items: center;
    text-decoration: none;
    color: #fff;
}
.blog-featured-card:hover .text-display-l { color: var(--brand-lime); transition: color 0.3s; }
.featured-img {
    width: 100%; height: 450px;
    object-fit: cover; border-radius: 16px;
}

/* Tarjetas Estándar (Grid) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}
.blog-card {
    text-decoration: none;
    color: #fff;
    display: flex; flex-direction: column;
    group: transition; /* Para efectos hover */
}
.blog-card-img {
    width: 100%; height: 250px;
    object-fit: cover; border-radius: 12px;
    margin-bottom: 1.5rem;
    filter: brightness(0.8);
    transition: all 0.3s ease;
}
.blog-card:hover .blog-card-img { filter: brightness(1); transform: scale(1.02); }
.blog-card:hover h3 { color: var(--brand-lime); transition: color 0.3s; }

/* Metadatos del Card */
.blog-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Cortar a 3 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .blog-featured-card { grid-template-columns: 1fr; gap: 1.5rem; }
    .featured-img { height: 300px; }
}

/* =========================================
   20. BLOG CONTEXTUAL & NAVEGACIÓN
   ========================================= */

/* --- BOTÓN CONTEXTUAL (SMART FAB) --- */
.article-context-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    
    /* Estado Inicial: Botón Circular Discreto */
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background: var(--bg-surface);
    border: 1px solid var(--brand-lime);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    
    /* Animaciones */
    transition: width 0.4s var(--ease-out-expo), transform 0.3s ease, opacity 0.3s;
    opacity: 0; /* Oculto al inicio */
    transform: translateY(20px);
}

.article-context-fab.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Estado Hover: Expandir a Tarjeta */
.article-context-fab:hover {
    width: 300px; /* Se estira */
    background: rgba(15, 17, 21, 0.95);
}

/* Icono (+) */
.ctx-icon {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-lime);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Contenido Oculto (Texto) */
.ctx-content {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s; /* Delay pequeño */
    padding-right: 1.5rem;
}

.article-context-fab:hover .ctx-content {
    opacity: 1;
}

.ctx-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-secondary); text-transform: uppercase; display: block; }
.ctx-title { font-size: 0.9rem; font-weight: 700; color: #fff; }


/* --- MODAL DE VISTA RÁPIDA (PREVIEW) --- */
.preview-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
}
.preview-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}
.preview-tags {
    display: flex; gap: 0.5rem; margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .article-context-fab { display: none; } /* En móvil puede estorbar, mejor ocultarlo o dejarlo fijo pequeño */
    .preview-modal-grid { grid-template-columns: 1fr; }
    .preview-img { height: 200px; }
}

/* =========================================
   22. FEEDBACK Y NAVEGACIÓN RANDOM
   ========================================= */

/* --- SISTEMA DE ESTRELLAS --- */
.rating-container {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
}

.rating-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.stars-wrapper {
    display: inline-flex;
    gap: 0.5rem;
    cursor: pointer;
}

.star-icon {
    width: 32px;
    height: 32px;
    fill: transparent;
    stroke: var(--text-secondary);
    stroke-width: 2;
    transition: all 0.2s ease;
}

/* Interacción: Hover y Active */
.stars-wrapper:hover .star-icon { stroke: var(--brand-lime); } /* Al pasar mouse, borde verde */
.star-icon:hover ~ .star-icon { opacity: 0.5; } /* Atenuar las siguientes */

.star-icon.filled {
    fill: var(--brand-lime);
    stroke: var(--brand-lime);
}

.rating-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    height: 0; /* Oculto */
}
.rating-message.visible {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}


/* --- TARJETA "ALGO DIFERENTE" (RANDOM FOOTER) --- */
.random-footer-wrapper {
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.random-card {
    display: block;
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.random-bg {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.4) grayscale(100%); /* Blanco y negro inicial */
    transition: all 0.5s var(--ease-out-expo);
}

.random-content {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.random-tag {
    background: var(--brand-lime);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.random-title {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    max-width: 800px;
    margin: 0;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Hover Effect */
.random-card:hover .random-bg {
    filter: brightness(0.6) grayscale(0%); /* Color al hover */
    transform: scale(1.05);
}

/* =========================================
   23. NAV FINAL JOURNAL (3 RANDOM CARDS EXPANDIDAS)
   ========================================= */

.journal-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    /* Quitamos todos los hacks de width/transform */
    width: 100%; 
}

.footer-card {
    position: relative;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    background: #000;
}

.footer-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand-lime);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.footer-card-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.5) grayscale(100%);
    transition: all 0.5s ease;
}

.footer-card:hover .footer-card-bg {
    filter: brightness(0.7) grayscale(0%);
    transform: scale(1.1);
}

.footer-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.footer-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #000;
    background: var(--brand-lime); /* Etiqueta verde siempre */
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-title {
    font-size: 1.4rem; /* Título más grande */
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

@media (max-width: 900px) {
    .journal-footer-grid { 
        grid-template-columns: 1fr; 
    }
}

/* =========================================
   24. ESTILOS "ERUDITO" (UX BLOG + LAYOUT)
   ========================================= */

/* --- AJUSTES DE ANCHO Y LAYOUT (25/75) --- */
.journal-container {
    max-width: 1100px; /* Más ancho para que respire la imagen */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.journal-layout {
    display: grid;
    grid-template-columns: 25% 1fr; /* 25% Menú / 75% Contenido */
    gap: 4rem;
    position: relative;
}

.journal-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
    max-width: 100%; /* Usa todo el 75% disponible */
}

/* --- TAXONOMÍA DE NIVELES --- */
:root {
    --lvl-1-color: var(--brand-lime);
    --lvl-2-color: #3b82f6;
    --lvl-3-color: #a855f7;
}

.level-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.lvl-1 { background: rgba(163, 230, 53, 0.15); color: var(--lvl-1-color); border: 1px solid var(--lvl-1-color); }
.lvl-2 { background: rgba(59, 130, 246, 0.15); color: var(--lvl-2-color); border: 1px solid var(--lvl-2-color); }
.lvl-3 { background: rgba(168, 85, 247, 0.15); color: var(--lvl-3-color); border: 1px solid var(--lvl-3-color); }

/* --- METADATOS --- */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin: 2rem 0;
}
.meta-item strong { display: block; color: var(--text-secondary); font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; margin-bottom: 0.2rem; }
.meta-item span { color: #fff; font-size: 0.95rem; font-weight: 500; }

/* --- HOOK BOX --- */
.hook-box {
    background: var(--bg-surface);
    border-left: 4px solid var(--brand-lime);
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 0 12px 12px 0;
}
.hook-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.hook-list { list-style: none; padding: 0; margin: 0; }
.hook-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.hook-list li::before {
    content: '→';
    position: absolute; left: 0; color: var(--brand-lime); font-weight: bold;
}

/* --- SIDEBAR (TOC ESCRITORIO) --- */
.toc-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    padding-right: 1rem;
    border-right: 1px solid var(--border-color);
}
.toc-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 0.8rem; }
.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
    border-left: 2px solid transparent;
    padding-left: 0.8rem;
}
.toc-link:hover, .toc-link.active {
    color: var(--brand-lime);
    border-left-color: var(--brand-lime);
}

/* CITAS CÓDIGO */
blockquote.code-citation {
    background: rgba(0,0,0,0.3);
    border: 1px dashed var(--text-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e0e0e0;
    margin: 2rem 0;
}

/* --- TOC MÓVIL (CORREGIDO: INVISIBLE EN DESKTOP) --- */

/* 1. REGLA MAESTRA: Todo lo móvil nace MUERTO (Oculto) */
.mobile-toc-trigger,
.mobile-toc-overlay {
    display: none !important;
}

/* Estilos base (se activarán solo en media query) */
.mobile-toc-trigger {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    z-index: 95;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.mobile-toc-trigger:hover, .mobile-toc-trigger.active {
    background: var(--text-primary);
    color: var(--bg-body);
    border-color: var(--text-primary);
}

.mobile-toc-overlay {
    position: fixed;
    bottom: 80px;
    left: 2rem;
    width: 250px;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    z-index: 94;
    
    /* Animación de entrada */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    transform-origin: bottom left;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.mobile-toc-overlay.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}


/* --- ACTIVACIÓN RESPONSIVE (Solo aquí existen) --- */
@media (max-width: 1000px) {
    
    /* 1. Ocultamos el sidebar de escritorio */
    .toc-sidebar { display: none; }
    
    /* 2. Revivimos los elementos móviles */
    .mobile-toc-trigger { display: flex !important; }
    .mobile-toc-overlay { display: block !important; }
    
    /* Ajustes de layout */
    .journal-layout { grid-template-columns: 1fr; gap: 2rem; }
    .meta-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
    /* En tablet/móvil: 1 Columna */
    .journal-layout { grid-template-columns: 1fr; gap: 2rem; }
    
    /* Ocultamos el sidebar fijo */
    .toc-sidebar { display: none; }
    
    /* Mostramos botón móvil */
    .mobile-toc-trigger { display: flex; }
    
    .meta-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* =========================================
   25. FASE 2: INTERACTIVIDAD Y UTILIDADES
   ========================================= */

/* --- REQ 1: MOTOR DE REFERENCIAS (TOOLTIPS) --- */
/* Estilo del texto citado en el artículo */
.ref-norma {
    color: var(--brand-lime);
    font-weight: 600;
    cursor: help;
    border-bottom: 1px dotted var(--brand-lime);
    position: relative;
    transition: all 0.2s;
}

.ref-norma:hover {
    background: rgba(163, 230, 53, 0.1);
    border-bottom-style: solid;
}

/* La tarjeta flotante (Tooltip) */
.ref-norma::after {
    content: attr(data-tooltip); /* El texto viene del HTML */
    position: absolute;
    bottom: 140%; /* Arriba del texto */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    
    width: max-content;
    max-width: 300px; /* Ancho máximo de lectura */
    padding: 1rem;
    
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--brand-lime); /* Acento Kinetia */
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
    text-align: left;
    white-space: normal;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    z-index: 100;
}

/* Triangulito conector */
.ref-norma::before {
    content: '';
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: var(--brand-lime);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

/* Activación al Hover */
.ref-norma:hover::after,
.ref-norma:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* --- REQ 3: SLOTS PARA MICRO-HERRAMIENTAS --- */
/* Contenedor aislado para scripts futuros (Calculadoras, Gráficas) */
.micro-tool-container {
    margin: 3rem 0;
    padding: 2rem;
    background: #0f1115; /* Fondo más oscuro para resaltar */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}
/* Etiqueta visual de "Herramienta Interactiva" */
.micro-tool-container::before {
    content: 'HERRAMIENTA INTERACTIVA';
    position: absolute;
    top: 0; right: 0;
    background: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-bottom-left-radius: 8px;
    font-family: var(--font-mono);
}


/* --- REQ 4: TABLAS ROBUSTAS (DATA GRIDS) --- */
/* Wrapper para scroll horizontal en móvil */
.table-wrapper {
    width: 100%;
    overflow-x: auto; /* Scroll si no cabe */
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Fuerza el scroll en pantallas chicas */
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.tech-table th {
    background: rgba(255,255,255,0.05);
    color: var(--brand-lime);
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.tech-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ddd;
}

.tech-table tr:last-child td { border-bottom: none; }

/* Ajuste para el intro del Blog de Erudito */
.intro-text {
    font-size: 1.3rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 3rem;
    line-height: 1.6;
    border-left: 2px solid var(--brand-lime); /* Detalle sutil */
    padding-left: 1.5rem;
}

/* =========================================
   26. BLOG INDEX MAESTRO (BARRA + GRID + CLUSTERS)
   ========================================= */

/* --- A. BARRA DE CONTROL (LIMPIA Y HEGEMÓNICA) --- */
.blog-filter-bar {
    position: sticky;
    top: 80px; 
    z-index: 80;
    background: rgba(15, 17, 21, 0.9); 
    backdrop-filter: blur(12px);
    
    /* 🔴 ELIMINAR ESTA LÍNEA: */
    /* border-bottom: 1px solid rgba(255,255,255,0.05); */
    
    /* 🟢 OPCIONAL: Si quieres que se note la separación sutilmente, usa sombra en vez de borde */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2); 
    
    padding: 0.8rem 0;
    margin-bottom: 2rem;
    transition: top 0.3s ease;
}

/* Cuando el navbar se esconde, la barra sube */
body.nav-hidden .blog-filter-bar { top: 0; }

.control-grid {
    display: flex;
    justify-content: center; /* Todo centrado */
    align-items: center;
    gap: 2rem;
    position: relative;
}

/* Filtros Rápidos (Chips) */
.quick-filters { display: flex; gap: 0.5rem; align-items: center; }
.filter-label {
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--text-secondary); margin-right: 0.8rem;
    white-space: nowrap; text-transform: uppercase; letter-spacing: 0.05em;
}
.filter-chip {
    background: transparent; border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); padding: 0.3rem 1rem;
    border-radius: 50px; font-size: 0.8rem; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.filter-chip:hover { border-color: #fff; color: #fff; }
.filter-chip.active { background: #fff; border-color: #fff; color: #000; font-weight: 700; }
.filter-chip.disabled { opacity: 0.3; pointer-events: none; }

/* Botón Más Temas */
.more-filters-btn {
    background: none; border: none; color: var(--brand-lime);
    font-family: var(--font-mono); font-size: 0.75rem;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
    text-transform: uppercase; font-weight: 700; transition: opacity 0.3s;
}
.more-filters-btn:hover { opacity: 0.8; text-shadow: 0 0 10px rgba(163,230,53,0.4); }

/* Drawer (Cajón Desplegable) */
.topics-drawer {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden; max-height: 0;
    transition: max-height 0.5s var(--ease-out-expo);
}
.topics-drawer.open { max-height: 600px; }
.drawer-content { padding: 3rem 0; }
.levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.level-col h4 {
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--text-secondary); text-transform: uppercase;
    margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.level-col h4::before { content: ''; width: 8px; height: 8px; border-radius: 50%; display: block; }
.lvl-1-title::before { background: var(--brand-lime); }
.lvl-2-title::before { background: #3b82f6; }
.lvl-3-title::before { background: #a855f7; }
.topics-list { display: flex; flex-direction: column; gap: 0.8rem; }
.topic-link {
    text-align: left; background: none; border: none;
    color: #fff; font-size: 0.95rem; cursor: pointer;
    transition: transform 0.2s, color 0.2s; padding: 0;
}
.topic-link:hover { color: var(--brand-lime); transform: translateX(5px); }
.topic-link.active { color: var(--brand-lime); font-weight: 700; }


/* --- B. BENTO GRID (ESTRUCTURA BLINDADA) --- */
.blog-bento-grid {
    display: grid;
    /* 🟢 FUERZA BRUTA: 3 columnas estrictas */
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem;
    grid-auto-flow: dense;
    width: 100%;
}

/* Tarjeta Destacada (Horizontal) */
.blog-card.featured {
    grid-column: span 2;
    display: flex; flex-direction: row; 
    align-items: stretch;
}
.blog-card.featured .blog-card-img {
    width: 50%; height: auto;
    border-bottom: none; border-right: 1px solid var(--border-color);
}
.blog-card.featured .blog-card-body {
    width: 50%; justify-content: center;
}

/* Tarjeta Normal */
.blog-card {
    display: flex; flex-direction: column;
    text-decoration: none; background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%; width: 100%;
}
.blog-card:hover { transform: translateY(-5px); border-color: var(--brand-lime); }
.blog-card-img {
    width: 100%; height: 220px; object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}
.blog-card-body {
    padding: 1.5rem; display: flex;
    flex-direction: column; flex-grow: 1;
}
.smart-excerpt {
    margin-top: auto; padding-top: 1rem;
    font-size: 0.85rem; color: #999; font-style: italic;
    border-top: 1px solid rgba(255,255,255,0.05);
}


/* --- C. CLUSTERS DE TEMAS --- */
.clusters-section {
    margin-top: 6rem; padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}
.clusters-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; margin-top: 2rem;
}
.cluster-card {
    position: relative; height: 200px;
    border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; border: 1px solid var(--border-color);
}
.cluster-bg {
    position: absolute; top:0; left:0; width:100%; height:100%;
    object-fit: cover; filter: brightness(0.4) grayscale(100%);
    transition: all 0.5s ease;
}
.cluster-card:hover .cluster-bg { filter: brightness(0.6) grayscale(0%); transform: scale(1.1); }
.cluster-title {
    position: relative; z-index: 2;
    color: #fff; font-size: 1.5rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; text-align: center;
}


/* =========================================
   27. BUSCADOR SPOTLIGHT Y FABs
   ========================================= */

/* Botón Flotante (Lupa) */
.search-fab {
    position: fixed;
    bottom: 2rem; left: 2rem; /* Izquierda */
    width: 50px; height: 50px;
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    z-index: 90;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
.search-fab:hover {
    background: #fff; color: #000; transform: scale(1.1);
}

/* Modal Spotlight */
.spotlight-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 15vh;
}
.spotlight-overlay.open { opacity: 1; visibility: visible; }

.spotlight-container {
    width: 100%; max-width: 600px;
    background: #1A1D23; border: 1px solid var(--border-color);
    border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.95); transition: transform 0.3s var(--ease-out-expo);
    overflow: hidden; position: relative;
}
.spotlight-overlay.open .spotlight-container { transform: scale(1); }

.spotlight-header {
    display: flex; align-items: center; padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.spotlight-icon { width: 24px; height: 24px; color: var(--brand-lime); margin-right: 1rem; }
.spotlight-input {
    width: 100%; background: transparent; border: none;
    font-size: 1.2rem; color: #fff; font-family: var(--font-display); outline: none;
}
.spotlight-close {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    border-radius: 4px; padding: 0.2rem 0.5rem; font-size: 0.8rem; cursor: pointer;
}
.spotlight-results { max-height: 400px; overflow-y: auto; padding: 0.5rem; }

.result-item {
    display: flex; align-items: center; gap: 1rem; padding: 1rem;
    border-radius: 8px; text-decoration: none;
    transition: background 0.2s; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.result-item:last-child { border-bottom: none; }
.result-item:hover { background: rgba(255,255,255,0.05); }
.result-thumb { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.result-info h4 { font-size: 1rem; margin: 0 0 0.3rem 0; color: #fff; }
.result-meta { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); }


/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
    .blog-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-card.featured { grid-column: span 2; }
}
@media (max-width: 900px) {
    .control-grid { flex-direction: column; gap: 1rem; }
    .quick-filters { justify-content: center; flex-wrap: wrap; }
    .levels-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
    .blog-bento-grid { grid-template-columns: 1fr; }
    .blog-card.featured { grid-column: span 1; flex-direction: column; }
    .blog-card.featured .blog-card-img, .blog-card.featured .blog-card-body { width: 100%; }
    .clusters-grid { grid-template-columns: 1fr; }
}

/* --- CORRECCIÓN FINAL: QUITAR LÍNEAS DEL HEADER --- */
header.reveal, 
header .container {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* =========================================
   28. LIMPIEZA FINAL (ZERO-UI: SIN BORDES)
   ========================================= */

/* 1. Quitar línea del Navbar Superior */
.nav {
    border-bottom: none !important;
    box-shadow: none !important; /* Por si acaso tiene sombra */
}

/* 2. Quitar línea de la Barra de Filtros */
.blog-filter-bar {
    border-bottom: none !important;
}

/* 3. Quitar líneas del Cajón Desplegable (Temas) */
.topics-drawer {
    border-top: none !important;
    border-bottom: none !important;
}

/* 4. Quitar línea dentro de las columnas del cajón (Opcional, para limpieza total) */
.level-col h4 {
    border-bottom: none !important;
}

/* 5. Asegurar que el Header de texto no tenga nada */
header.reveal {
    border-bottom: none !important;
}

/* --- BOTÓN GUARDAR FLOTANTE (FAB BOOKMARK) --- */
.bookmark-fab {
    position: fixed;
    top: 120px; /* Alineado con el inicio del texto aprox */
    right: 3rem; /* Lado derecho, opuesto al índice */
    width: 45px; height: 45px;
    
    background: rgba(15, 17, 21, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Rebote sutil */
    z-index: 88;
}

.bookmark-fab:hover {
    border-color: var(--brand-lime);
    color: #fff;
    transform: scale(1.1);
}

/* Estado Guardado */
.bookmark-fab.saved {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    color: #000; /* Icono negro sobre verde */
    box-shadow: 0 0 15px rgba(163, 230, 53, 0.4);
}

/* Icono SVG */
.bookmark-fab svg {
    width: 20px; height: 20px;
    fill: none; /* Por defecto hueco */
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.3s;
}

/* Llenar el icono al guardar */
.bookmark-fab.saved svg {
    fill: currentColor; /* Se rellena de negro */
}

/* Ajuste Móvil */
@media (max-width: 1000px) {
    .bookmark-fab {
        top: auto; bottom: 2rem; /* Bajarlo en móvil */
        right: 5rem; /* Al lado del botón de compartir/indice */
    }
}

/* =========================================
   29. ESTILOS DE IMPRESIÓN (PAPER ACADÉMICO LIMPIO)
   ========================================= */
@media print {
    
    /* 1. LIMPIEZA NUCLEAR (Ocultar todo lo digital) */
    .nav, .mobile-menu-overlay, .blog-filter-bar, 
    .side-nav-trigger, .article-context-fab, .reading-progress-bar,
    .journal-footer-grid, .site-footer, .contextual-fab-wrapper, 
    .immersive-next-project, #spotlight-modal, .search-fab,
    .bookmark-fab, 
    /* 🟢 CORRECCIÓN 1: Ocultar botón de índice móvil */
    .mobile-toc-trigger, .mobile-toc-overlay,
    /* Ocultar la sección de "También queremos contarte" */
    .random-footer-wrapper,
    /* Ocultar el gancho de "Perspectiva Kinetia" */
    .reveal > div:has(h3.text-display-m) { 
        display: none !important;
    }

    /* 2. CONFIGURACIÓN DE PÁGINA */
    @page {
        margin: 2cm 2.5cm; /* Márgenes académicos estándar */
        size: auto;
    }

    body {
        background-color: white !important;
        color: #000 !important;
        font-family: "Times New Roman", Times, serif !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    /* Contenedores al 100% */
    .journal-container, .journal-layout {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 3. HEADER (PORTADA) */
    header.reveal {
        padding-top: 0 !important;
        padding-bottom: 1rem !important;
        border-bottom: 2px solid #000 !important;
        text-align: left !important;
        margin-bottom: 2rem !important;
    }

    /* Título */
    .text-display-l {
        font-family: "Arial", Helvetica, Sans-Serif !important;
        font-size: 24pt !important;
        color: #000 !important;
        margin-bottom: 1rem !important;
        line-height: 1.1 !important;
        -webkit-text-fill-color: #000 !important;
    }

    /* 4. METADATOS + AUTOR (ALINEADOS) */
    .meta-grid {
        display: flex !important;
        flex-wrap: wrap;
        gap: 2rem !important;
        margin: 1rem 0 0.5rem 0 !important;
        padding: 0 !important;
        border: none !important;
        font-family: "Arial", Sans-Serif !important;
        font-size: 9pt !important;
    }

    /* 🟢 CORRECCIÓN 2: Autor integrado en la línea */
    #a-autor-container {
        display: flex !important;
        justify-content: flex-start !important; /* Forzar izquierda */
        margin-top: 0.5rem !important;
        padding: 0 !important;
    }
    /* Ocultar avatar circular */
    #a-autor-container > div:first-child { display: none !important; }
    
    /* Texto Autor */
    #a-autor { 
        font-size: 10pt !important; 
        font-weight: bold !important; 
        color: #000 !important; 
        font-family: "Arial", Sans-Serif !important;
    }
    #a-autor::before { content: "Por: "; font-weight: normal; color: #666; }
    #a-autor-sub { display: none !important; } /* Ocultar 'Kinetia Team' */


    /* 5. ÍNDICE (TOC) LIMPIO */
    .toc-sidebar {
        display: block !important;
        position: static !important;
        border: none !important; /* 🟢 CORRECCIÓN 4: Sin borde */
        background: transparent !important; /* Sin fondo */
        padding: 0 !important;
        margin-bottom: 3rem !important;
    }
    .toc-title {
        color: #000 !important;
        font-size: 10pt !important;
        text-transform: uppercase;
        border-bottom: 1px solid #000;
        display: inline-block;
        margin-bottom: 0.5rem;
    }
    .toc-list li { margin-bottom: 0.2rem; }
    .toc-link {
        color: #000 !important;
        text-decoration: none !important;
        font-size: 11pt !important;
    }
    /* Puntos conductores opcionales */
    .toc-link::after { content: " ........................................................ "; color: #ccc; overflow: hidden; }


    /* 6. CONTENIDO */
    .hook-box { display: none !important; } /* Ocultamos hook box siempre en papel para limpieza */
    
    .journal-body h2 {
        font-family: "Arial", Sans-Serif !important;
        font-size: 14pt !important;
        margin-top: 2rem !important;
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.2rem;
    }

    /* 7. REFERENCIAS (CORRECCIÓN 3: LISTA LIMPIA) */
    .journal-references {
        display: block !important;
        border: none !important; /* Sin cuadro */
        background: transparent !important;
        padding: 0 !important;
        margin-top: 4rem !important;
        page-break-before: auto;
    }
    /* Ocultar el botón desplegable "Ver más" */
    .journal-references summary { display: none !important; }
    
    /* Título manual para referencias */
    .journal-references::before {
        content: "Bibliografía";
        font-family: "Arial", Sans-Serif;
        font-weight: bold;
        font-size: 12pt;
        display: block;
        margin-bottom: 1rem;
        border-bottom: 2px solid #000;
    }
    
    .ref-list { margin: 0 !important; padding-left: 1.5rem !important; }
    .ref-list li { color: #000 !important; margin-bottom: 0.5rem; }
    .ref-list li::before { color: #000 !important; }


    /* 8. PIE DE PÁGINA (CITA) */
    #print-footer {
        display: block !important;
        position: fixed;
        bottom: 0; left: 0; width: 100%;
        text-align: center;
        font-size: 8pt; color: #666;
        border-top: 1px solid #ccc;
        padding-top: 5px;
        background: white;
    }
}

/* =========================================
   30. NUESTRA FIRMA (TIMELINE, HERO & PROMESA)
   ========================================= */

/* --- A. MANIFIESTO (TEXTO EDITORIAL) --- */
.manifesto-section {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 6rem auto;
}
.manifesto-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #e0e0e0;
    font-weight: 300;
}
.manifesto-highlight {
    color: var(--brand-lime);
    font-weight: 600;
}


/* --- B. HERO DIRECTOR (PERSONAL BRANDING) --- */
.director-hero {
    position: relative;
    height: 90vh; /* Casi pantalla completa */
    width: 100%;
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: flex-start; /* Tarjeta a la izquierda */
    overflow: hidden;
    margin-bottom: 6rem;
    padding-bottom: 4rem; /* Espacio inferior */
}

/* Imagen de Fondo con Máscara de Fusión */
.director-bg {
    position: absolute;
    top: 0; right: 0; /* Alineado a la derecha */
    width: 65%; /* Ocupa el 65% derecho */
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* Máscara para fundirse con el negro a la izquierda */
    mask-image: linear-gradient(to right, transparent 0%, black 20%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%);
}

/* Sombra Dramática Interna (Vignette) */
.director-bg::after {
    content: ''; 
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to right, #000 5%, transparent 50%),
                linear-gradient(to top, #000 10%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.director-content {
    position: relative;
    z-index: 3; /* Encima de la foto y la sombra */
    width: 100%;
    padding-left: 8%; /* Margen izquierdo visual */
}

/* Tarjeta de Cristal Premium */
.glass-manifesto {
    background: rgba(20, 22, 27, 0.75); /* Tono oscuro profundo */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Bordes y Luces */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* Luz cenital */
    box-shadow: 
        0 30px 60px -10px rgba(0,0,0,0.6),
        inset 0 0 0 1px rgba(255,255,255,0.03); /* Borde interno */
        
    border-radius: 24px;
    padding: 4rem;
    max-width: 750px;
    position: relative;
    overflow: hidden;
}

/* Reflejo superior sutil */
.glass-manifesto::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.signature {
    font-family: var(--font-display); 
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    display: block;
}


/* --- C. TIMELINE VERTICAL INTERACTIVO --- */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 0;
}

/* La línea base (gris) */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.1);
    transform: translateX(-50%);
}

/* La línea de progreso (verde) que crece */
.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    background: var(--brand-lime);
    transform: translateX(-50%);
    height: 0%; /* Se llena con JS */
    transition: height 0.1s linear;
    box-shadow: 0 0 15px var(--brand-lime);
}

/* Items del Timeline */
.timeline-item {
    position: relative;
    margin-bottom: 6rem;
    width: 50%;
    padding: 0 3rem;
    opacity: 0.3; /* Apagado por defecto */
    transition: opacity 0.5s ease, transform 0.5s ease;
    filter: blur(2px);
}
.timeline-item.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

/* Puntos (Markers) */
.timeline-marker {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-body);
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}
.timeline-item:nth-child(odd) .timeline-marker { right: -11px; }
.timeline-item:nth-child(even) .timeline-marker { left: -11px; }

/* Cuando se activa el punto */
.timeline-item.active .timeline-marker {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    box-shadow: 0 0 20px var(--brand-lime);
    transform: scale(1.5);
}

.t-step-title {
    font-size: 1.5rem; color: #fff; margin-bottom: 0.5rem;
    font-family: var(--font-display);
}
.t-step-desc { font-size: 1rem; color: var(--text-secondary); }


/* --- D. LOGO GRID (TECNOLOGÍA / ALIANZAS) --- */
.tech-stack-section {
    text-align: center;
    padding: 6rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4rem;
}

.logo-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    opacity: 0.6;
}

.tech-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    transition: all 0.3s;
    cursor: default;
}

.tech-logo:hover {
    color: #fff;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}


/* --- E. SECCIÓN PROMESA (GLASS FINAL) --- */
.promise-section {
    position: relative;
    padding: 8rem 0;
    margin-top: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000; 
}

/* Imagen de Fondo */
.promise-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.6;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* La Tarjeta de Cristal de la Promesa (Estilo igual al Manifesto) */
.glass-promise-card {
    position: relative;
    z-index: 2;
    background: rgba(20, 22, 27, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    
    padding: 4rem;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    text-align: left;
}

/* Reflejo superior */
.glass-promise-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.promise-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
}

.promise-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.promise-highlight {
    color: #fff;
    font-weight: 600;
}

.promise-signature {
    margin-top: 3rem;
    text-align: right;
    font-style: italic;
    font-family: var(--font-mono);
    color: var(--brand-lime);
    font-size: 1rem;
    font-weight: 600;
}


/* --- F. RESPONSIVE --- */
@media (max-width: 768px) {
    /* Ajuste Hero Director */
    .director-hero {
        height: auto;
        flex-direction: column;
        padding-top: 120px;
        justify-content: center;
    }
    .director-bg {
        position: absolute;
        width: 100%;
        height: 50%; /* Solo arriba */
        top: 0;
        mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    }
    .director-content {
        padding: 1.5rem;
        margin-top: 25vh; /* Bajar la tarjeta para que no tape la cara */
        padding-left: 1.5rem; /* Resetear margen izq */
    }
    .glass-manifesto {
        padding: 2rem;
    }

    /* Ajuste Timeline */
    .timeline-line, .timeline-progress { left: 20px; }
    .timeline-item { width: 100%; padding-left: 4rem; padding-right: 1rem; text-align: left; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; }
    .timeline-item:nth-child(odd) .timeline-marker, .timeline-item:nth-child(even) .timeline-marker { left: 11px; right: auto; }
    
    /* Ajuste Logos */
    .logo-grid { gap: 2rem; }
    .tech-logo { font-size: 1.2rem; }

    /* Ajuste Promesa */
    .glass-promise-card { padding: 2rem; }
    .promise-title { font-size: 1.8rem; }
}

/* =========================================
   31. PÁGINA DE CONTACTO (GEO-INTELIGENCIA)
   ========================================= */

.contact-split-section {
    display: grid;
    grid-template-columns: 40% 60%; /* 40% Mapa Izq | 60% Formulario Der */
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* --- COLUMNA IZQUIERDA (MAPA AMBIENTAL) --- */
.contact-info-col {
    position: sticky;
    top: 0;
    height: 100vh; /* Se queda fija mientras scrolleas la derecha */
    padding: 0;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
    z-index: 10;
    background: #0F1115;
}

/* Contenedor del Mapa Leaflet */
.map-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    background: #1a1a1a;
}

/* 🟢 TRUCO: Filtros CSS para volver "Dark Mode" los mapas de OpenStreet */
.leaflet-layer, 
.leaflet-control-zoom-in, 
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}
/* Personalizar Popups del Mapa */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #000;
    color: #fff;
    border: 1px solid var(--brand-lime);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Tarjeta Flotante de Info (Glass) */
.contact-glass-card {
    position: absolute;
    bottom: 4rem; left: 50%;
    transform: translateX(-50%);
    width: 85%;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.contact-item { margin-bottom: 1.5rem; }
.contact-label {
    font-family: var(--font-mono);
    color: var(--brand-lime);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    display: block;
}
.contact-value {
    font-size: 1.1rem; color: #fff; font-weight: 500;
    text-decoration: none; line-height: 1.4;
}
.contact-value.address { font-size: 0.95rem; color: #ccc; }


/* --- COLUMNA DERECHA (FORMULARIO) --- */
.contact-form-col {
    background: var(--bg-body);
    padding: 8rem 6rem; /* Espacio amplio */
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.form-intro h1 {
    font-size: 3.5rem; margin-bottom: 1.5rem;
    line-height: 1.1; max-width: 15ch;
}
.form-intro p {
    font-size: 1.1rem; color: var(--text-secondary);
    margin-bottom: 3rem; max-width: 50ch;
}

/* Tooltip del Input */
.input-hint {
    font-size: 0.75rem; color: #666; 
    margin-top: 0.5rem; font-family: var(--font-mono);
}

/* Footer integrado a la derecha */
.contact-footer {
    margin-top: auto; padding-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex; justify-content: space-between;
}


/* --- MODAL SELECTOR DE UBICACIÓN (PICKER) --- */
.geo-picker-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.geo-picker-modal.open { opacity: 1; visibility: visible; }

.geo-map-wrapper {
    width: 90%; height: 60vh;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--brand-lime);
    position: relative;
    background: #222;
}

.geo-instructions {
    color: #fff; margin-bottom: 1.5rem; text-align: center;
    font-family: var(--font-display); font-size: 1.5rem;
}

.geo-confirm-btn {
    margin-top: 2rem;
    background: var(--brand-lime); color: #000;
    border: none; padding: 1rem 3rem;
    font-weight: 700; border-radius: 50px;
    cursor: pointer; transition: transform 0.2s;
    font-family: var(--font-mono); text-transform: uppercase;
}
.geo-confirm-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(163,230,53,0.4); }


/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
    .contact-split-section { grid-template-columns: 1fr; }
    .contact-info-col { 
        position: relative; height: 500px; /* Mapa estático arriba en móvil */
        order: 2; /* O si prefieres abajo, cambia a order: 2 */
    }
    .contact-form-col { padding: 6rem 2rem 4rem 2rem; order: 1; }
    .contact-glass-card { bottom: 2rem; width: 90%; }
    .form-intro h1 { font-size: 2.5rem; }
}

/* =========================================
   32. PÁGINA LEGALES (DOCUMENTO INTELIGENTE)
   ========================================= */

.legal-header {
    padding-top: 140px;
    padding-bottom: 4rem;
    text-align: center;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

/* Switcher de Documentos (Tabs Grandes) */
.legal-tabs-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.legal-tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-tab-btn:hover {
    border-color: #fff;
    color: #fff;
}

.legal-tab-btn.active {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    color: #000;
    font-weight: 700;
}

/* Layout de Contenido (Sidebar + Texto) */
.legal-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding-top: 4rem;
    position: relative;
}

/* Sidebar de Índice (Sticky) */
.legal-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    border-right: 1px solid var(--border-color);
    padding-right: 1rem;
}

.legal-nav-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.legal-nav-list {
    list-style: none;
    padding: 0;
}

.legal-nav-link {
    display: block;
    padding: 0.5rem 0;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    border-left: 2px solid transparent;
    padding-left: 0.8rem;
}

.legal-nav-link:hover, .legal-nav-link.active {
    color: var(--brand-lime);
    border-left-color: var(--brand-lime);
}

/* Cuerpo del Texto Legal */
.legal-content-body {
    max-width: 800px; /* Lectura cómoda */
    font-family: 'IBM Plex Sans', sans-serif;
    color: #d1d5db;
    line-height: 1.7;
    font-size: 1rem;
}

.legal-content-body h2 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.legal-content-body h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.legal-content-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-content-body li {
    margin-bottom: 0.5rem;
}

.legal-content-body strong {
    color: #fff;
}

/* Ocultar/Mostrar Secciones */
.legal-doc-section {
    display: none;
    animation: fadeIn 0.5s ease;
}
.legal-doc-section.active {
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-sidebar { display: none; } /* En móvil ocultamos el sidebar para simplificar */
}

