/* css/node-styles.css */

/* Nodos principales */
.node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node-circle {
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.node-circle:hover {
    stroke-width: 4px;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.3));
    transform: scale(1.05);
}

.node-text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Nodo Central - Sistema IA */
.node.root .node-circle {
    fill: url(#goldGradient);
    stroke: #FF8C00;
    stroke-width: 4px;
    filter: drop-shadow(0 6px 12px rgba(255, 215, 0, 0.4));
}

.node.root .node-text {
    font-size: 16px;
    font-weight: 700;
    fill: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Módulos Principales */
.node.module .node-circle {
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.node.module .node-text {
    font-size: 14px;
    fill: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* IA YAYA - Verde Esmeralda */
.node.yaya .node-circle {
    fill: url(#greenGradient);
    stroke: #047857;
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.node.yaya .node-text {
    font-size: 12px;
    fill: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* IA Propuestas - Naranja Vibrante */
.node.propuestas .node-circle {
    fill: url(#orangeGradient);
    stroke: #b45309;
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

.node.propuestas .node-text {
    font-size: 12px;
    fill: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Agentes */
.node.agent .node-circle {
    fill: linear-gradient(45deg, #DDA0DD, #B19CD9);
    stroke: #9C27B0;
}

.node.agent .node-text {
    font-size: 11px;
    fill: #4A148C;
}

/* Tecnologías - Morado */
.node.tech .node-circle {
    fill: url(#purpleGradient);
    stroke: #6d28d9;
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

.node.tech .node-text {
    font-size: 11px;
    fill: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Integraciones - Azul */
.node.integration .node-circle {
    fill: url(#blueGradient);
    stroke: #4c51bf;
    stroke-width: 3px;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.node.integration .node-text {
    font-size: 11px;
    fill: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Beneficios */
.node.benefit .node-circle {
    fill: linear-gradient(45deg, #98FB98, #90EE90);
    stroke: #4CAF50;
}

.node.benefit .node-text {
    font-size: 10px;
    fill: #1B5E20;
}

/* Características */
.node.feature .node-circle {
    fill: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    stroke: #E91E63;
}

.node.feature .node-text {
    font-size: 9px;
    fill: #880E4F;
}

/* Estados de nodos */
.node.expanded .node-circle {
    stroke-width: 4px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.3));
}

.node.collapsed .node-circle {
    opacity: 0.8;
}

.node.highlighted .node-circle {
    stroke-width: 5px;
    filter: drop-shadow(0 8px 25px rgba(255, 193, 7, 0.6));
    animation: pulse 2s infinite;
}

/* Enlaces */
.link {
    fill: none;
    stroke-width: 2px;
    stroke: #ffffff;
    stroke-opacity: 0.8;
    transition: all 0.3s ease;
}

.link:hover {
    stroke-width: 3px;
    stroke-opacity: 1.0;
}

.link.module-link {
    stroke: #ffffff;
    stroke-width: 3px;
    stroke-opacity: 0.9;
}

.link.agent-link {
    stroke: #ffffff;
    stroke-width: 2px;
    stroke-dasharray: 5,5;
    stroke-opacity: 0.7;
}

.link.tech-link {
    stroke: #ffffff;
    stroke-width: 2px;
    stroke-opacity: 0.8;
}

/* Código - cajas negras mejoradas */
.code-container {
    background: #1e1e1e;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #d4d4d4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 11px;
}

.code-container .code-title {
    color: #569cd6;
    font-weight: bold;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.code-container .keyword {
    color: #c586c0;
}

.code-container .string {
    color: #ce9178;
}

.code-container .comment {
    color: #6a9955;
    font-style: italic;
}

.code-container .number {
    color: #b5cea8;
}

/* Tooltips */
.tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Iconos por tipo de nodo */
.node-icon {
    font-size: 20px;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.node.root .node-icon {
    font-size: 24px;
}

.node.module .node-icon {
    font-size: 18px;
}

.node.agent .node-icon {
    font-size: 16px;
}

.node.tech .node-icon {
    font-size: 14px;
}

/* Modal avanzado con pestañas */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    animation: modalSlideIn 0.4s ease-out forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.modal-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 3px solid #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 18px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-button.active::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
}

.modal-content {
    max-height: 75vh;
    overflow-y: auto;
    padding: 0;
}

.tab-content {
    display: none;
    padding: 30px;
    line-height: 1.6;
    color: #333;
    animation: fadeInContent 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h3 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.tab-content h4 {
    color: #34495e;
    margin: 20px 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.tab-content h5 {
    color: #667eea;
    margin: 15px 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

/* Grids de características y métricas */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.feature-card h5 {
    color: #2c3e50;
    margin: 10px 0 8px 0;
    font-size: 16px;
    font-weight: 700;
}

.feature-card p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.metric-value {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.metric-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Stack tecnológico */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tech-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.tech-item strong {
    color: #2c3e50;
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.tech-item p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Bloques de código mejorados */
.code-block {
    background: linear-gradient(145deg, #1e1e1e, #2d2d30);
    border: 1px solid #3c3c3c;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #d4d4d4;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.code-block::before {
    content: '💻 Code';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #1e1e1e;
    color: #569cd6;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

/* Contenedores Mermaid */
.mermaid-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mermaid {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Barras de progreso */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    border-radius: 4px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* Listas mejoradas */
.tab-content ul {
    padding-left: 0;
    list-style: none;
}

.tab-content li {
    position: relative;
    padding: 8px 0 8px 25px;
    color: #495057;
    line-height: 1.6;
}

.tab-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95vw;
        max-height: 95vh;
        margin: 20px;
    }
    
    .feature-grid,
    .metrics-grid,
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .modal-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 1 50%;
        min-width: 120px;
    }
    
    .tab-content {
        padding: 20px;
    }
}

/* Estilos para leyendas y estadísticas */
.legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  backdrop-filter: blur(10px);
  min-width: 200px;
}

.legend h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  font-size: 13px;
  color: #555;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  font-size: 13px;
  backdrop-filter: blur(10px);
  min-width: 180px;
}

.stats h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.stats div {
  margin: 6px 0;
  color: #555;
}

.stats strong {
  color: #333;
}

/* Estilos para el código y bloques de código mejorados */
.code-block {
  background: #1a202c !important;
  color: #e2e8f0 !important;
  padding: 20px !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', 'Courier New', monospace !important;
  margin: 15px 0 !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
  border: 1px solid #2d3748 !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3) !important;
}

.code-block::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: #2d3748;
}

.code-block::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 4px;
}

/* Mejoras para los diagramas Mermaid */
.mermaid-container {
  background: #f8f9fa !important;
  padding: 20px !important;
  border-radius: 12px !important;
  margin: 20px 0 !important;
  text-align: left !important;
  min-height: 400px !important;
  height: 500px !important;
  position: relative !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  border: 2px solid #e2e8f0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Controles interactivos de diagramas */
.mermaid-controls {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  display: flex !important;
  gap: 5px !important;
  z-index: 10 !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease !important;
}

.mermaid-container:hover .mermaid-controls {
  opacity: 1 !important;
}

.mermaid-control-btn {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  border: none !important;
  color: white !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
  backdrop-filter: blur(5px) !important;
}

.mermaid-control-btn:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46c1) !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 5px 12px rgba(0,0,0,0.25) !important;
}

.mermaid-control-btn:active {
  transform: scale(0.95) !important;
}

/* Estilos para fullscreen de diagramas Mermaid */
.mermaid-fullscreen {
  background: white !important;
  padding: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
}

.mermaid-fullscreen .mermaid-controls {
  top: 20px !important;
  right: 20px !important;
}

/* Asegurar que el modal no capture eventos del zoom principal */
.modal-overlay {
  pointer-events: auto !important;
}

.modal-overlay.show {
  pointer-events: auto !important;
}

/* Mejorar el cursor en los diagramas */
.mermaid-container .mermaid svg {
  cursor: grab !important;
}

.mermaid-container .mermaid svg:active {
  cursor: grabbing !important;
}

.mermaid-container .mermaid {
  font-size: 14px !important;
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  border: 1px solid #e0e6ed !important;
  border-radius: 8px !important;
  background: white !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mermaid-container .mermaid svg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-width: auto !important;
  min-height: auto !important;
  transform-origin: 0 0 !important;
  margin: 0 !important;
  display: block !important;
  pointer-events: auto !important;
}

/* Scrollbars personalizados para contenedores Mermaid */
.mermaid-container .mermaid::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.mermaid-container .mermaid::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 4px;
}

.mermaid-container .mermaid::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.mermaid-container .mermaid::-webkit-scrollbar-thumb:hover {
  background: #5a67d8;
}

/* Indicador de navegación para usuarios */
.mermaid-container::after {
  content: "🎯 Usa ⇱ para ajustar • 🖱️ Arrastra para mover • 🔍 Rueda para zoom";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 10;
}

.mermaid-container:hover::after {
  opacity: 0.9;
}

/* Ajustar el tamaño de texto en diagramas Mermaid */
.mermaid-container .mermaid .node text {
  font-size: 12px !important;
  font-weight: 500 !important;
}

.mermaid-container .mermaid .edgeLabel text {
  font-size: 11px !important;
}

.mermaid-container .mermaid .cluster text {
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* Estados de carga para Mermaid */
.mermaid-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #666;
  font-style: italic;
}

.mermaid-loading::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mermaid-error {
  padding: 20px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  color: #c33;
  text-align: center;
  margin: 15px 0;
}

/* Mejoras adicionales para elementos existentes */
.progress-bar {
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  height: 8px;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 1s ease-out;
  border-radius: 10px;
}

/* Mejoras para grid layouts */
.feature-grid, .metrics-grid, .tech-stack {
  display: grid;
  gap: 15px;
  margin: 20px 0;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tech-stack {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Mejora de tarjetas */
.feature-card, .metric-card, .tech-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature-card:hover, .metric-card:hover, .tech-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #667eea;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.metric-value {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 14px;
  color: #666;
}

/* Estilos para timeline */
.timeline {
  position: relative;
  margin: 20px 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin: 15px 0;
  padding-left: 25px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.timeline-date {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 15px;
  white-space: nowrap;
}

.timeline-content h5 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.timeline-content p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

/* Financial cards */
.financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.financial-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.financial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.financial-card h5 {
  color: #333;
  margin-bottom: 10px;
  font-size: 16px;
}

.amount {
  font-size: 28px;
  font-weight: bold;
  color: #667eea;
  margin: 10px 0 15px 0;
}

.financial-card ul {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0;
}

.financial-card li {
  padding: 5px 0;
  color: #666;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.financial-card li:last-child {
  border-bottom: none;
}

/* Success factors */
.success-factors {
  margin: 20px 0;
}

.factor-technical, .factor-organizational, .factor-functional {
  background: white;
  border-left: 4px solid #667eea;
  padding: 15px;
  margin: 10px 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.factor-technical {
  border-left-color: #10b981;
}

.factor-organizational {
  border-left-color: #f59e0b;
}

.factor-functional {
  border-left-color: #ef4444;
}