/* ==========================================================================
   Hoja de CONTENIDO de toda la documentación (docs/rutacc, docs/fuentecc y
   docs/superusuario), 21-10-2026: antes había una copia por sistema más
   fuentecc_docs.css y superusuario_docs.css, que redefinían el marco y
   duplicaban componentes con otros nombres. El marco (barra, encabezado,
   botones y pie) está en docs_marco.css, que se carga antes; los temas, en
   temas_paginas.css, que se carga después.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  position: relative;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  /* Sin padding-top propio: body ya reserva los 60px del nav fijo (ver arriba).
     Antes acá había además 100px de padding-top, sumando ~160px de espacio
     muerto antes del contenido — el doble de lo que usa index.html, que solo
     compensa el nav una vez. */
  padding: 0 48px 80px;
  position: relative;
  z-index: 1;
}

/* ── ANIMACIONES ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease;}
.reveal.visible { opacity: 1; transform: translateY(0);}

/* ── NAV LOGO ──────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 30px;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--accent);
}

/* ── TÍTULOS Y TEXTO: los de la portada de RutaCC (sección "El proyecto") ──
   h2 = .story-title / .section-title, p = .story-body p, .section-tag igual. */
.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-tag::after { content: ''; flex: 1; height: 1px; background: var(--border); max-width: 60px; }
h2 {
  font-family: 'Syne', sans-serif;
  color: var(--text);
  margin: 64px 0 28px 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
}
.section-tag + h2 { margin-top: 0; }
h3 {
  font-family: 'Syne', sans-serif;
  color: var(--text);
  margin: 36px 0 16px 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}
h4 {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  margin: 24px 0 10px 0;
  font-size: 1.05em;
}
p {
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  font-weight: 300;
  text-align: left;
}
ul, ol {
  margin: 20px 0 20px 30px;
  line-height: 1.85;
  color: var(--muted);
  font-weight: 300;
}
:is(p, li) strong, :is(p, li) b { color: var(--text); font-weight: 500; }
:is(p, li) em { color: var(--accent); font-style: normal; }
li {
  margin-bottom: 10px;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: #00bbdd;
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}

/* ── TABLES ────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 30px 0;
  font-size: 0.9em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
th {
  background: rgba(30, 45, 69, 0.4);
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  opacity: 0.95;
}
tr:last-child td {
  border-bottom: none;
}
tr:nth-child(even) {
  background: rgba(26, 34, 53, 0.3);
}
tr:hover {
  background: rgba(30, 45, 69, 0.3);
}

/* ── META INFO & TOC ───────────────────────────────────── */
.meta-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 8px;
  margin: 30px 0;
}
.meta-info strong {
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.9em;
}

.toc {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 8px;
  margin: 40px 0;
}
.toc h3 {
  margin-top: 0;
  color: var(--accent);
  border: none;
  padding: 0;
  font-size: 1.15em;
  letter-spacing: 0.05em;
}
.toc ol {
  margin-left: 24px;
}
.toc a {
  color: var(--text);
  opacity: 0.85;
}
.toc a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ── BOXES & BADGES ────────────────────────────────────── */
.info-box, .warning-box, .success-box, .danger-box, .good-box, .bad-box {
  margin: 36px 0;
  padding: 20px 24px;
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text);
}
.info-box { border-left: 3px solid var(--accent); background: rgba(0, 212, 255, 0.05); }
.warning-box { border-left: 3px solid var(--warning); background: rgba(255, 215, 0, 0.05); }
.success-box, .good-box { border-left: 3px solid var(--success); background: rgba(16, 185, 129, 0.05); }
.danger-box, .bad-box { border-left: 3px solid var(--danger); background: rgba(255, 68, 68, 0.05); }
:is(.info-box, .warning-box, .success-box, .danger-box, .good-box, .bad-box) :is(p, li) { color: var(--text); font-weight: 400; }
:is(.info-box, .warning-box, .success-box, .danger-box, .good-box, .bad-box) > :last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75em;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
}
.badge-alto, .badge-critical, .badge-high { background: rgba(255, 68, 68, 0.15); border: 1px solid var(--danger); color: #ff8888; }
.badge-medio, .badge-medium { background: rgba(255, 215, 0, 0.15); border: 1px solid var(--warning); color: #ffe875; }
.badge-bajo, .badge-low { background: rgba(0, 212, 255, 0.15); border: 1px solid var(--accent); color: #8eeaff; }
.badge-obligatorio, .badge-required { background: rgba(16, 185, 129, 0.15); border: 1px solid var(--success); color: #7af2c6; }

/* ── CODE ──────────────────────────────────────────────── */
code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
  color: var(--accent);
}
pre {
  background: #070a10;
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.85em;
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #a5b4fc;
}

/* Syntax Highlighting */
.keyword { color: #f472b6; font-weight: bold; }
.string { color: #34d399; }
.comment { color: #64748b; font-style: italic; }
.number { color: #fbbf24; }
.code-good { border-left: 4px solid var(--success) !important; }
.code-bad { border-left: 4px solid var(--danger) !important; }

/* ── TARJETAS DE DOCUMENTOS (portadas docs/<sistema>/index.html) ──────
   Son las MISMAS .modulo-card de la portada de RutaCC (rutacc/css/index.css), con
   sus mismos valores; acotadas a .modulo-card porque la infografía usa .modulo-name
   y .modulo-icon con otro diseño. */
.modulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.modulo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: block;
  color: var(--text);
  text-decoration: none;
}
.modulo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-color, var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.modulo-card:hover { border-color: var(--card-color, var(--accent)); transform: translateY(-3px); }
.modulo-card:hover::before { transform: scaleX(1); }
a.modulo-card { cursor: pointer; }
a.modulo-card:hover { box-shadow: 0 0 30px rgba(0, 212, 255, 0.1); color: var(--text); text-shadow: none; }
.modulo-card .modulo-icon { font-size: 1.8rem; line-height: normal; margin: 0 0 16px; display: block; color: var(--text); }
.modulo-card .modulo-name {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-color, var(--accent));
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.modulo-card .modulo-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; margin: 0; text-align: left; opacity: 1; }
.modulo-card .modulo-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.modulo-card .modulo-tag {
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}
/* Color de cada documento: el mismo que le da la sección "Documentación" de la portada de
   RutaCC (rutacc/css/index.css, page-style-203 a 215), por número de documento */
.modulo-card.doc-01 { --card-color: var(--accent3); }
.modulo-card.doc-02 { --card-color: #ff6b35; }
.modulo-card.doc-03 { --card-color: #a855f7; }
.modulo-card.doc-04 { --card-color: var(--warning); }
.modulo-card.doc-05 { --card-color: var(--accent2); }
.modulo-card.doc-06 { --card-color: var(--accent3); }
.modulo-card.doc-07 { --card-color: #ff6b35; }
.modulo-card.doc-08 { --card-color: #a855f7; }
.modulo-card.doc-09 { --card-color: var(--accent); }
.modulo-card.doc-10 { --card-color: var(--accent2); }
.modulo-card.doc-11 { --card-color: var(--accent2); }

/* ── DIAGRAMS & DATABASE (02_Analisis & 03_Diseno) ───────── */
.diagram, .arch-diagram {
  background: #070a10;
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 8px;
  margin: 24px 0;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
}
.entity {
  display: inline-block;
  background: var(--surface2);
  border: 2px solid var(--accent);
  padding: 10px 18px;
  margin: 8px;
  border-radius: 6px;
  min-width: 130px;
  color: var(--text);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.05);
}
.relation {
  color: var(--accent2);
  font-weight: bold;
}
.layer {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 14px 0;
}
.layer-title {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 0.8em;
}
.component {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  margin: 6px;
  border-radius: 4px;
  font-size: 0.8em;
  color: var(--text);
}
.db-table {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 16px;
  margin: 12px 0;
  border-radius: 6px;
}
.db-table-name {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.db-field {
  font-family: 'Space Mono', monospace;
  font-size: 0.8em;
  padding: 4px 0;
  opacity: 0.85;
}
.db-pk {
  color: var(--accent2);
  font-weight: bold;
  margin-right: 4px;
}
.db-fk {
  color: var(--accent3);
  margin-right: 4px;
}
.api-endpoint {
  background: var(--surface2);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
  display: flex;
  align-items: center;
}
.api-method {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.75em;
  margin-right: 12px;
  text-transform: uppercase;
}
.api-get { background: rgba(0, 212, 255, 0.15); border: 1px solid var(--accent); color: var(--accent); }
.api-post { background: rgba(57, 255, 20, 0.15); border: 1px solid var(--accent3); color: var(--accent3); }
.api-put { background: rgba(255, 215, 0, 0.15); border: 1px solid var(--warning); color: var(--warning); }
.api-delete { background: rgba(255, 68, 68, 0.15); border: 1px solid var(--danger); color: var(--danger); }

/* ── INFOGRAPHICS (06_Infografia) ────────────────────────── */
.infografia {
  /* Mismo ancho y márgenes que .container, para que encabezado y contenido se alineen como en las demás páginas */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px 80px;
  position: relative;
  z-index: 1;
}
/* .section no tenía padding propio: antes se notaba menos porque el borde/
   overflow:hidden de .infografia recortaba visualmente la caja; al sacar esa
   caja (para no verse "enmarcada" como una tarjeta aparte de index.html) hace
   falta este gutter para que el contenido no quede pegado al borde. */
.infografia .section {
  padding: 0 48px;
}
.infografia .header {
  background: linear-gradient(135deg, #0f1624 0%, #17243c 100%);
  border-bottom: 1px solid var(--border);
  padding: 100px 48px 60px;
}
.infografia h2.section-title {
  text-align: center;
  font-size: 1.8em;
  color: var(--text);
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
  border: none;
}
.infografia h2.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 20px;
  background: rgba(10, 14, 23, 0.3);
  padding: 40px;
  border-bottom: 1px solid var(--border);
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s;
}
.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.stat-icon {
  font-size: 2.8em;
  margin-bottom: 10px;
}
.stat-number {
  font-family: 'Space Mono', monospace;
  font-size: 2.4em;
  font-weight: bold;
  color: var(--accent);
}
.stat-label {
  color: var(--muted);
  font-size: 0.9em;
  margin-top: 5px;
}
.modulos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}
.modulo {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s;
}
.modulo:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.1);
}
.modulo-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
}
.modulo-name {
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  color: var(--text);
  font-size: 1.05em;
}
.modulo-desc {
  color: var(--muted);
  font-size: 0.85em;
  margin-top: 6px;
}
.flujo {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
}
.flujo-step {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  min-width: 140px;
  position: relative;
  transition: border-color 0.2s;
}
.flujo-step:hover {
  border-color: var(--accent);
}
.flujo-step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: 'Space Mono', monospace;
  font-size: 0.9em;
}
.flujo-step-icon {
  font-size: 1.8em;
  margin: 12px 0 8px 0;
}
.flujo-step-name {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  color: var(--text);
  font-size: 0.9em;
}
.flujo-arrow {
  font-size: 1.8em;
  color: var(--accent);
}
.tecnologias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.tech-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}
.tech-icon {
  font-size: 2.8em;
  margin-bottom: 10px;
}
.tech-name {
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  color: var(--text);
  font-size: 1.15em;
  margin-bottom: 6px;
}
.tech-desc {
  color: var(--muted);
  font-size: 0.85em;
}
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.security-item {
  background: rgba(30, 45, 69, 0.15);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color 0.2s;
}
.security-item:hover {
  border-color: var(--accent);
}
.security-icon {
  font-size: 2.2em;
}
.security-text h4 {
  margin: 0 0 5px 0;
  color: var(--text);
}
.security-text p {
  margin: 0;
  font-size: 0.85em;
  opacity: 0.85;
}
.beneficios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.beneficio {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border-top: 4px solid var(--accent);
}
.beneficio-icon {
  font-size: 2.8em;
  margin-bottom: 10px;
}
.beneficio-title {
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  color: var(--text);
  font-size: 1.1em;
  margin-bottom: 8px;
}
.beneficio-desc {
  color: var(--muted);
  font-size: 0.85em;
}
.cumplimiento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 20px;
}
.norma {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.norma:hover {
  border-color: var(--accent);
}
.norma-icon {
  font-size: 2.2em;
  margin-bottom: 10px;
}
.norma-name {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  color: var(--accent);
  font-size: 0.9em;
}
.norma-desc {
  color: var(--muted);
  font-size: 0.8em;
  margin-top: 6px;
}

/* ── SALES PRESENTATION SLIDES (07_Presentacion_Ventas) ─────── */
.presentacion {
  max-width: 1200px;
  margin: 0 auto;
}
.slide {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.slide-cover {
  background: linear-gradient(135deg, #070a10 0%, var(--surface) 100%);
  color: var(--text);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px;
  border: 1px solid var(--border);
}
.slide-cover h1 {
  font-family: 'Syne', sans-serif;
  font-size: 4.2em;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
  text-shadow: 0 0 40px rgba(0,212,255,0.2);
}
.slide-cover .tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.8em;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 30px;
  color: var(--accent);
}
.slide-cover .logo {
  font-size: 5.5em;
  margin-bottom: 24px;
}
.slide-content {
  padding: 60px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.slide-content h2 {
  font-size: 2.3em;
  color: var(--text);
  margin: 0 0 30px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  border-left: none;
  padding-left: 0;
  font-family: 'Syne', sans-serif;
}
.slide-content h3 {
  font-size: 1.4em;
  color: var(--accent);
  margin: 30px 0 15px 0;
  font-family: 'Space Mono', monospace;
}
.slide-content p {
  font-size: 1.15em;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--text);
  opacity: 0.9;
}
.slide-problem {
  background: linear-gradient(135deg, rgba(222, 46, 3, 0.04) 0%, rgba(10, 14, 23, 0.6) 100%);
  border: 1px solid rgba(222, 46, 3, 0.3);
}
.slide-problem h2 {
  color: #ff6b3b;
  border-bottom-color: rgba(222, 46, 3, 0.3);
  text-shadow: 0 0 20px rgba(222, 46, 3, 0.1);
}
.slide-solution {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.03) 0%, rgba(10, 14, 23, 0.6) 100%);
  border: 1px solid rgba(57, 255, 20, 0.2);
}
.slide-solution h2 {
  color: var(--accent3);
  border-bottom-color: rgba(57, 255, 20, 0.2);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
}
.slide-cta {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(10, 14, 23, 0.8) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  text-align: center;
  justify-content: center;
}
.slide-cta h2 {
  color: var(--accent);
  border: none;
  font-size: 3.2em;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  margin-bottom: 20px;
}
.slide-final {
  background: linear-gradient(135deg, #070a10 0%, var(--surface) 100%);
  color: var(--text);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px;
  border: 1px solid var(--border);
}
.slide-final h2 {
  color: var(--text);
  border: none;
  font-size: 3.2em;
  text-shadow: 0 0 40px rgba(0,212,255,0.2);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin: 30px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 30px 0; }

.card, .feature, .stat-big, .pricing-card, .testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover, .feature:hover, .stat-big:hover, .testimonial:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.card-icon {
  font-size: 2.8em;
  margin-bottom: 15px;
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25em;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 10px;
}
.card-desc {
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1.6;
}
.feature {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin: 15px 0;
}
.feature-icon {
  font-size: 2.2em;
  min-width: 50px;
  text-align: center;
}
.feature-text h4 {
  color: var(--text);
  font-size: 1.1em;
  margin: 0 0 5px 0;
}
.feature-text p {
  color: var(--muted);
  font-size: 0.9em;
  margin: 0;
}
.stat-big {
  text-align: center;
  padding: 30px;
}
.stat-big .stat-number {
  font-family: 'Space Mono', monospace;
  font-size: 3.2em;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}
.stat-big .stat-label {
  color: var(--muted);
  font-size: 1em;
  margin-top: 8px;
}
.pricing-card {
  text-align: center;
  padding: 40px;
  border-radius: 16px;
  position: relative;
}
.pricing-card.featured {
  border: 1px solid var(--accent3);
  box-shadow: 0 10px 30px rgba(57, 255, 20, 0.08);
  transform: scale(1.03);
}
.pricing-card.featured:hover {
  transform: scale(1.05);
}
.pricing-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.4em;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 10px;
}
.pricing-price {
  font-family: 'Space Mono', monospace;
  font-size: 2.8em;
  font-weight: bold;
  color: var(--accent);
  margin: 20px 0;
}
.pricing-price small {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.4em;
  color: var(--muted);
}
.pricing-features {
  list-style: none;
  margin: 20px 0;
  text-align: left;
}
.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9em;
}
.pricing-features li:before {
  content: "✓ ";
  color: var(--accent3);
  font-weight: bold;
}
.testimonial {
  border-left: 4px solid var(--accent);
  margin: 20px 0;
}
.testimonial-text {
  font-style: italic;
  color: var(--text);
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 15px;
  opacity: 0.9;
}
.testimonial-author {
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  color: var(--text);
}
.testimonial-role {
  color: var(--muted);
  font-size: 0.85em;
}
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface2);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}
.timeline-title {
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  color: var(--text);
  font-size: 1.15em;
  margin-bottom: 5px;
}
.timeline-desc {
  color: var(--muted);
  font-size: 0.95em;
}
.slide-number {
  position: absolute;
  bottom: 20px;
  right: 30px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
}
ul.check-list {
  list-style: none;
}
ul.check-list li {
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
  font-size: 1.05em;
}
ul.check-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent3);
  font-weight: bold;
  font-size: 1.2em;
}

/* ── COMMERCIAL BUSINESS & KPI (08_Definicion_Comercial) ─── */
.highlight-box {
  /* Como .story-highlight de la portada */
  margin: 36px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 212, 255, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}
.highlight-box h3 {
  color: var(--accent);
  margin-top: 0;
  font-size: 1.4em;
  font-family: 'Syne', sans-serif;
}
.canvas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.canvas-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.canvas-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.canvas-item h4 {
  font-family: 'Syne', sans-serif;
  color: var(--accent);
  margin-top: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-size: 1.1em;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}
.kpi {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 20px 30px;
  border-radius: 12px;
  margin: 12px;
  text-align: center;
  min-width: 160px;
  transition: border-color 0.2s;
}
.kpi:hover {
  border-color: var(--accent);
}
.kpi-value {
  font-family: 'Space Mono', monospace;
  font-size: 2.2em;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}
.kpi-label {
  color: var(--muted);
  font-size: 0.85em;
  margin-top: 6px;
}

/* ── PORTADA DE DOCUMENTACIÓN: "Acerca de esta documentación" ──
   Como la sección "El proyecto" de la portada de RutaCC (.story-inner: sin caja,
   texto de 720 px) y sus cifras como .hero-stats / .stat-num. */
.info-section { position: relative; z-index: 0; max-width: 720px; margin: 72px auto 0; padding: 100px 0; }
/* Franja de fondo de borde a borde, como #story de la portada (superficie con borde arriba y abajo) */
/* Sombra recortada en vez de un pseudo-elemento ancho: no agrega desplazamiento horizontal */
.info-section { background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface); clip-path: inset(0 -100vmax); }
.info-section > h2:first-child { margin-top: 0; }
.info-section .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 40px 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: transparent;
}
.info-section .stat-value { font-family: 'Space Mono', monospace; font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1; }
.info-section .stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* ── COMPONENTES QUE ANTES SOLO DEFINÍA FUENTECC / SUPERUSUARIO ──
   (fuentecc_docs.css / superusuario_docs.css): con el mismo aspecto que su
   equivalente de RutaCC. Las clases con el mismo nombre que ya existían arriba
   (.stats, .stat-card, .slide, .infografia, .presentacion, .toc, .meta-info,
   .info-box…) quedan con el diseño común. */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; margin: 20px 0; }
.card, .panel, .entity-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.card h3, .panel h3 { margin-top: 0; }
.card-icon, .icon { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; }
.highlight-box, .callout { margin: 20px 0; padding: 16px 20px; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; background: rgba(0, 212, 255, 0.05); }
.callout { border-left-color: var(--accent2); background: rgba(255, 107, 53, 0.06); }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.module-card { background: var(--surface2); border: 1px solid var(--border); padding: 24px; border-radius: 12px; transition: all 0.3s; }
.module-card:hover { border-color: var(--accent); box-shadow: 0 8px 25px rgba(0, 212, 255, 0.1); }
.module-card h3 { margin: 8px 0; font-size: 1.05em; }
.module-card p { margin: 0; color: var(--muted); font-size: 0.88em; text-align: left; }
.pill {
  display: inline-block;
  margin: 3px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}
.flow { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 12px; margin: 24px 0; }
.flow-step { flex: 1 1 125px; max-width: 220px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); text-align: center; transition: border-color 0.2s; }
.flow-step:hover { border-color: var(--accent); }
.flow-arrow { align-self: center; color: var(--accent); font-size: 1.4rem; }
.diagram-row { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 620px; margin: 14px auto; }
.diagram-node { min-width: 130px; padding: 14px; border: 1px solid var(--accent); border-radius: 9px; background: var(--surface); text-align: center; }
.diagram-link { color: var(--accent); font-weight: 700; }
.section { padding: 24px 0 34px; }
.section-title { margin-bottom: 18px; }
.section-title h2 { margin-top: 0; }
/* Portada de las presentaciones con calculadora (fuentecc/09): como el encabezado común */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { max-width: 900px; margin: 12px auto; font-family: 'Syne', sans-serif; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; }
.hero p { max-width: 760px; margin: 15px auto; color: var(--muted); text-align: center; }
.eyebrow {
  display: inline-block;
  padding: 5px 16px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.06);
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.1rem; }
.note, .caption, .muted { color: var(--muted); font-size: 0.9rem; }
.accent { color: var(--accent); }
.mono { font-family: 'Space Mono', monospace; }
.button-link, .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.button-link:hover, .cta-link:hover { border-color: var(--accent); color: var(--accent); text-shadow: none; }
/* Calculadora / simulador */
.calculator { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.calculator .panel { margin: 0; }
.field { display: grid; gap: 7px; margin: 14px 0; }
.field label { font-weight: 600; }
.field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); font: 1rem 'Space Mono', monospace; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.result { padding: 12px 0; border-bottom: 1px solid var(--border); }
.result strong { display: block; color: var(--accent); font: 700 1.45rem 'Space Mono', monospace; }
.result:last-child { border-bottom: 0; }

/* ── FOOTER & PRINT ────────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85em;
  font-family: 'Space Mono', monospace;
}
.footer p {
  text-align: center;
  margin: 0;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .container {
    padding: 24px;
  }
  .infografia { padding: 0 16px 60px; }
  .header h1 {
    font-size: 2.1em;
  }
  .meta-info {
    grid-template-columns: 1fr;
  }
  .flujo {
    flex-direction: column;
  }
  .flujo-arrow {
    transform: rotate(90deg);
  }
  .canvas, .pricing-grid {
    grid-template-columns: 1fr;
  }

  /* WCAG 2.2 — 1.4.10 Reflow (AA): sin desplazamiento horizontal de la página a 320 px.
     Tablas anchas: se desplazan dentro de sí mismas en vez de ensanchar la página. */
  table { display: block; max-width: 100%; overflow-x: auto; }
  code { overflow-wrap: anywhere; }
  pre { max-width: 100%; }
  .header h1, h1 { font-size: clamp(1.5rem, 7vw, 2.1em); overflow-wrap: break-word; }
  h2 { overflow-wrap: break-word; }
  .container > *, .container { min-width: 0; }
  /* Diagramas de BD (03): líneas de campo largas → la caja se desplaza, no la página */
  .db-table { overflow-x: auto; max-width: 100%; }
  .db-field { overflow-wrap: anywhere; }
  /* Grillas de columnas fijas → una columna en celular */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  /* Presentación (07): diapositivas con menos relleno y título a escala */
  .slide { min-height: 0; }
  .slide-cover, .slide-content { padding: 24px; }
  .slide-cover h1 { font-size: clamp(2rem, 11vw, 4.2em); overflow-wrap: break-word; }
  .slide h2 { font-size: clamp(1.3rem, 6.5vw, 2.2em); }
  .slide { overflow-wrap: break-word; } /* textos largos (correos, títulos) bajan de línea */
}

@media print {
  body {
    background: white;
    color: black;
    padding: 0;
  }
  .container {
    box-shadow: none;
    border: none;
    padding: 20px;
  }
  body::before {
    display: none;
  }
  .modulo-card, .modulo, .stat-card, .tech-card, .security-item, .beneficio, .norma {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    background: white;
    color: black;
  }
}
