/* ==========================================================================
   PROXMOX VE ENTERPRISE DOCUMENTATION SYSTEM — STYLESHEET
   Normativas: ISO/IEC/IEEE 29148 | IEEE 42010
   Diseño: Proxmox Enterprise Dark / Clean Light UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables CSS y Esquemas de Color (Dark & Light)
   -------------------------------------------------------------------------- */
:root {
  /* Paleta Base Proxmox Dark (Predeterminado) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-surface: #1e293b;
  --bg-surface-hover: #283548;
  --bg-surface-active: #334155;
  --bg-glass: rgba(17, 24, 39, 0.85);
  
  --border-color: #334155;
  --border-subtle: #1f293d;
  --border-focus: #e57000;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Identidad Proxmox */
  --pve-orange: #e57000;
  --pve-orange-hover: #ff851b;
  --pve-orange-glow: rgba(229, 112, 0, 0.25);
  --pve-cyan: #06b6d4;
  --pve-cyan-glow: rgba(6, 182, 212, 0.2);
  --pve-emerald: #10b981;
  --pve-emerald-glow: rgba(16, 185, 129, 0.2);
  --pve-amber: #f59e0b;
  --pve-rose: #f43f5e;

  /* Tipografía y Espaciado */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, Consolas, monospace;
  
  --header-height: 70px;
  --sidebar-width: 300px;
  --max-content-width: 1400px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px var(--pve-orange-glow);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-surface-active: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.9);
  
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #e57000;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(229, 112, 0, 0.18);
}

/* --------------------------------------------------------------------------
   Resets y Estilos Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

a {
  color: var(--pve-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--pve-orange-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Header y Barra de Navegación
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #e57000, #ff851b);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--pve-orange-glow);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-badge {
  background: rgba(229, 112, 0, 0.15);
  color: var(--pve-orange);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(229, 112, 0, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.nav-link.active {
  color: #ffffff;
  background: var(--pve-orange);
}

[data-theme="light"] .nav-link.active {
  color: #ffffff;
  background: var(--pve-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--pve-orange);
  background: var(--bg-surface-hover);
}

.btn-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-github:hover {
  border-color: var(--pve-orange);
  background: var(--bg-surface-hover);
  color: var(--pve-orange);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* --------------------------------------------------------------------------
   Layout General de Página de Documentación
   -------------------------------------------------------------------------- */
.doc-layout {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  gap: 2.5rem;
  width: 100%;
  flex: 1;
}

.doc-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  padding-right: 1rem;
  border-right: 1px solid var(--border-color);
}

.doc-sidebar::-webkit-scrollbar {
  width: 5px;
}
.doc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.sidebar-nav-item a:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.sidebar-nav-item.active a {
  color: var(--pve-orange);
  background: rgba(229, 112, 0, 0.1);
  border-left-color: var(--pve-orange);
  font-weight: 600;
}

.sidebar-progress-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pve-orange), var(--pve-cyan));
  width: 0%;
  transition: width 0.2s ease-out;
}

.doc-content {
  flex: 1;
  min-width: 0; /* Evita desbordamiento con flexbox */
}

/* --------------------------------------------------------------------------
   Breadcrumbs y Metadatos de Cabecera
   -------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--pve-orange);
}

.breadcrumbs span.separator {
  color: var(--border-color);
}

.doc-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.doc-meta-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-orange {
  background: rgba(229, 112, 0, 0.15);
  color: var(--pve-orange);
  border: 1px solid rgba(229, 112, 0, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--pve-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--pve-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--pve-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-omitted {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid #f59e0b;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.doc-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.doc-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Tarjetas, Contenedores de Secciones y Steps
   -------------------------------------------------------------------------- */
.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.step-card:hover {
  border-color: var(--border-focus);
}

.step-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.step-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  background: var(--pve-orange);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--pve-orange-glow);
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.step-meta {
  display: flex;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Cajas de Alerta y Notificación (Callouts)
   -------------------------------------------------------------------------- */
.callout {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  border-left: 4px solid;
}

.callout-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

.callout-content {
  flex: 1;
}

.callout-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.callout-content p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--pve-amber);
}
.callout-warning h4 { color: var(--pve-amber); }

.callout-info {
  background: rgba(6, 182, 212, 0.08);
  border-left-color: var(--pve-cyan);
}
.callout-info h4 { color: var(--pve-cyan); }

.callout-success {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--pve-emerald);
}
.callout-success h4 { color: var(--pve-emerald); }

.callout-omitted-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(229, 112, 0, 0.08));
  border: 1px dashed var(--pve-amber);
  border-left: 5px solid var(--pve-amber);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.omitted-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.omitted-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pve-amber);
}

/* --------------------------------------------------------------------------
   Imágenes de Evidencia y Lightbox
   -------------------------------------------------------------------------- */
.figure-wrapper {
  margin: 1.5rem 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.figure-img-container {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #000000;
}

.figure-img-container img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.figure-img-container:hover img {
  transform: scale(1.015);
}

.zoom-overlay-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  opacity: 0.85;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity var(--transition-fast);
}

.figure-img-container:hover .zoom-overlay-hint {
  opacity: 1;
}

.figure-caption {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.figure-caption-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Modal Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 7, 13, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

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

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.2s;
  z-index: 100001;
}

.lightbox-close-btn:hover {
  background: var(--pve-orange);
}

.lightbox-content-box {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
}

.lightbox-caption-text {
  color: #e2e8f0;
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Tablas Técnicas y Matrices Normativas
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

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

.tech-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tech-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

.tech-table tr:last-child td {
  border-bottom: none;
}

.tech-table tr:hover td {
  background: var(--bg-surface-hover);
}

.tech-table td code {
  background: rgba(229, 112, 0, 0.1);
  color: var(--pve-orange);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Bloques de Código y Terminal Interactiva
   -------------------------------------------------------------------------- */
.code-block-wrapper {
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  background: #0f172a;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.code-title {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #94a3b8;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--pve-orange);
  color: #ffffff;
  border-color: var(--pve-orange);
}

.code-content {
  padding: 1.2rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.code-content code {
  color: inherit;
  background: transparent;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Página de Inicio (Home Page / index.html)
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(229, 112, 0, 0.12) 0%, transparent 70%);
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(229, 112, 0, 0.12);
  border: 1px solid rgba(229, 112, 0, 0.3);
  color: var(--pve-orange);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--pve-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title .text-gradient {
  background: linear-gradient(135deg, #0f172a 30%, var(--pve-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--pve-orange);
  color: #ffffff;
  border: 1px solid var(--pve-orange);
  box-shadow: 0 4px 14px var(--pve-orange-glow);
}

.btn-primary:hover {
  background: var(--pve-orange-hover);
  border-color: var(--pve-orange-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--pve-orange-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Ficha Técnica del Nodo */
.node-spec-card {
  max-width: 1050px;
  margin: 0 auto 4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.node-spec-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--pve-orange), var(--pve-cyan), var(--pve-emerald));
}

.node-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.node-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--pve-emerald);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  background: var(--pve-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pve-emerald);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.spec-item {
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.spec-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  word-break: break-all;
}

.spec-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Cuadrícula de Módulos (Grid) */
.modules-section {
  max-width: var(--max-content-width);
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.section-heading-wrap {
  text-align: center;
  margin-bottom: 3rem;
}

.section-eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pve-orange);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--pve-orange);
  box-shadow: var(--shadow-glow);
}

.module-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(229, 112, 0, 0.1);
  border: 1px solid rgba(229, 112, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pve-orange);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.module-card:nth-child(2) .module-icon-wrap {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
  color: var(--pve-cyan);
}

.module-card:nth-child(3) .module-icon-wrap {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--pve-emerald);
}

.module-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.2px;
}

.module-card-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.module-feature-list {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.module-feature-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-feature-list li::before {
  content: '✓';
  color: var(--pve-orange);
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   Diagramas Mermaid Contenedor
   -------------------------------------------------------------------------- */
.mermaid-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.75rem 0;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.mermaid {
  display: inline-block;
  min-width: 300px;
}

/* --------------------------------------------------------------------------
   Navegación Paginador Inferior (Next / Previous)
   -------------------------------------------------------------------------- */
.doc-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.nav-card-btn {
  flex: 1;
  max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.nav-card-btn:hover {
  border-color: var(--pve-orange);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.nav-direction-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.nav-target-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Footer Institucional
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  max-width: 420px;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.footer-links-group a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links-group a:hover {
  color: var(--pve-orange);
}

.footer-bottom {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Responsividad y Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .doc-layout {
    flex-direction: column;
    padding: 1.5rem 1rem;
  }
  
  .doc-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.75rem;
    transform: translateY(-120%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.open {
    transform: translateY(0);
  }
  
  .btn-github span {
    display: none;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .node-spec-card {
    padding: 1.5rem;
  }
  
  .step-card {
    padding: 1.25rem;
  }
  
  .doc-footer-nav {
    flex-direction: column;
  }
  
  .nav-card-btn {
    max-width: 100%;
  }
}
