/* ===========================
   BORO 33 - TECH THEME 2024
   Diseño innovador para consultoría tecnológica
   =========================== */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css");

/* ===========================
   VARIABLES CSS TECH
   =========================== */
:root {
  /* Colores Tech Principales */
  --tech-primary: #00d2ff;
  --tech-secondary: #3a0ca3;
  --tech-accent: #00f5ff;
  --tech-success: #00ff88;
  --tech-warning: #ffb347;
  --tech-error: #ff3366;
  --dark-particle: #00d2ff;
  --light-particle: #0077ff;

  /* Paleta Oscura */
  --dark-bg-primary: #0a0a0f;
  --dark-bg-secondary: #1a1a2e;
  --dark-bg-tertiary: #16213e;
  --dark-surface: #1e1e2f;
  --dark-surface-hover: #2a2a3f;
  
  /* Paleta Clara */
  --light-bg-primary: #ffffff;
  --light-bg-secondary: #f8fafc;
  --light-bg-tertiary: #e2e8f0;
  --light-surface: #ffffff;
  --light-surface-hover: #f1f5f9;
  
  /* Texto */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-light-primary: #1e293b;
  --text-light-secondary: #334155;
  
  /* Gradientes Tech */
  --gradient-primary: linear-gradient(135deg, #00d2ff 0%, #3a0ca3 100%);
  --gradient-secondary: linear-gradient(135deg, #00f5ff 0%, #0066cc 100%);
  --gradient-accent: linear-gradient(45deg, #00ff88, #00d2ff, #3a0ca3);
  --gradient-dark: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  
  /* Sombras Tech */
  --shadow-tech-sm: 0 2px 4px rgba(0, 210, 255, 0.1);
  --shadow-tech-md: 0 4px 12px rgba(0, 210, 255, 0.15);
  --shadow-tech-lg: 0 8px 25px rgba(0, 210, 255, 0.2);
  --shadow-tech-xl: 0 20px 40px rgba(0, 210, 255, 0.3);
  
  /* Tipografía */
  --font-primary: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Espaciado */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Bordes */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  
  /* Transiciones */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
  
  /* Variables dinámicas - tema oscuro por defecto */
  --current-bg-primary: var(--dark-bg-primary);
  --current-bg-secondary: var(--dark-bg-secondary);
  --current-bg-tertiary: var(--dark-bg-tertiary);
  --current-surface: var(--dark-surface);
  --current-surface-hover: var(--dark-surface-hover);
  --current-text-primary: var(--text-primary);
  --current-text-secondary: var(--text-secondary);
  --current-particle: var(--dark-particle);

  /* Bordes dinámicos */
  --current-border-light: rgba(255, 255, 255, 0.1);
  --current-border-medium: rgba(255, 255, 255, 0.2);
  --current-border-strong: rgba(255, 255, 255, 0.3);

  /* Efectos Glassmorphism */
  --dark-glass: rgba(30, 30, 47, 0.7);
  --light-glass: rgba(255, 255, 255, 0.7);
  --current-glass: var(--dark-glass);
  --tech-glass: var(--current-glass);
}

/* ===========================
   RESET Y BASE
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--current-bg-primary);
  color: var(--current-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition-base);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--current-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--tech-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tech-accent);
}

/* ===========================
   CLASES UTILITARIAS TECH
   =========================== */
.tech-gradient-primary {
  background: var(--gradient-primary);
}

.tech-gradient-secondary {
  background: var(--gradient-secondary);
}

.tech-gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tech-glow {
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
  transition: var(--transition-base);
}

.tech-glow:hover {
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.5);
}

.tech-border {
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--border-radius-md);
}

.tech-surface {
  background: var(--current-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--current-border-light);
}

.tech-glass {
  background: var(--tech-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--current-border-light);
}

/* ===========================
   ANIMACIONES TECH
   =========================== */
@keyframes pulse-tech {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.6);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Clases de animación */
.animate-pulse {
  animation: pulse-tech 2s infinite;
}

.animate-glow {
  animation: glow-pulse 3s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slide-in-right 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slide-in-left 0.6s ease-out forwards;
}

/* ===========================
   EFECTOS ESPECIALES
   =========================== */
.code-block {
  background: var(--current-bg-secondary);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.terminal-window {
  background: var(--current-bg-secondary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-tech-lg);
}

.terminal-header {
  background: var(--current-bg-tertiary);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
}

.terminal-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-button.red {
  background: #ff5f57;
}

.terminal-button.yellow {
  background: #ffbd2e;
}

.terminal-button.green {
  background: #28ca42;
}

.terminal-content {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  color: var(--current-text-secondary);
}

.tech-card {
  background: var(--tech-glass);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--current-border-light);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-base);
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-tech-xl);
  border-color: rgba(0, 210, 255, 0.3);
}

.tech-card:hover::before {
  opacity: 1;
}

/* ===========================
   ESTILOS DE TEXTO DINÁMICOS
   =========================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--current-text-primary);
}

p, span, li, div {
  color: var(--current-text-secondary);
}

.section-title {
  color: var(--current-text-primary);
}

.section-description {
  color: var(--current-text-secondary);
}

.section-tag {
  color: var(--tech-primary);
}

/* Elementos específicos que necesitan variables dinámicas */
.solution-card h3,
.service-card h3,
.benefit-item h3,
.brand-card h4,
.tech-card h3,
.metric-card h3,
.timeline-content h3,
.hero-stat h3,
.tech-category h3,
.process-content h3,
.feature-title,
.stat-label,
.service-title {
  color: var(--current-text-primary) !important;
}

.hero-description,
.hero-quote,
.quote-text,
.solution-card p,
.service-card p,
.benefit-item p,
.brand-card p,
.tech-card p,
.metric-card p,
.timeline-content p,
.process-content p,
.service-description,
.feature-description,
.hero-subtitle:not(.tech-gradient-text) {
  color: var(--current-text-secondary) !important;
}

/* Elementos específicos de hero y quotes que necesitan mejor contraste */
.hero-description,
.quote-text {
  color: var(--current-text-primary) !important;
  opacity: 0.9;
}

/* Stats y elementos destacados */
.stat-number,
.metric-number {
  color: var(--current-text-primary) !important;
}

/* ===========================
   MODO CLARO
   =========================== */
[data-theme="light"] {
  --current-bg-primary: var(--light-bg-primary);
  --current-bg-secondary: var(--light-bg-secondary);
  --current-bg-tertiary: var(--light-bg-tertiary);
  --current-surface: var(--light-surface);
  --current-surface-hover: var(--light-surface-hover);
  --current-text-primary: var(--text-light-primary);
  --current-text-secondary: var(--text-light-secondary);
  --current-particle: var(--light-particle);
  /* Bordes para tema claro */
  --current-border-light: rgba(0, 0, 0, 0.1);
  --current-border-medium: rgba(0, 0, 0, 0.15);
  --current-border-strong: rgba(0, 0, 0, 0.2);
  /* Glassmorphism para tema claro */
  --current-glass: var(--light-glass);
}

[data-theme="dark"] {
  --current-bg-primary: var(--dark-bg-primary);
  --current-bg-secondary: var(--dark-bg-secondary);
  --current-bg-tertiary: var(--dark-bg-tertiary);
  --current-surface: var(--dark-surface);
  --current-surface-hover: var(--dark-surface-hover);
  --current-text-primary: var(--text-primary);
  --current-text-secondary: var(--text-secondary);
  --current-particle: var(--dark-particle);
  /* Bordes para tema oscuro */
  --current-border-light: rgba(255, 255, 255, 0.1);
  --current-border-medium: rgba(255, 255, 255, 0.2);
  --current-border-strong: rgba(255, 255, 255, 0.3);
  /* Glassmorphism para tema oscuro */
  --current-glass: var(--dark-glass);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
  :root {
    --space-xs: 0.2rem;
    --space-sm: 0.4rem;
    --space-md: 0.8rem;
    --space-lg: 1.2rem;
    --space-xl: 1.6rem;
    --space-2xl: 2.4rem;
  }
  
  .tech-card {
    padding: var(--space-lg);
  }
  
  .terminal-content {
    padding: var(--space-md);
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .tech-card {
    padding: var(--space-md);
  }
}

/* ===========================
   UTILIDADES ADICIONALES
   =========================== */
.text-tech-primary { color: var(--tech-primary); }
.text-tech-secondary { color: var(--tech-secondary); }
.text-tech-accent { color: var(--tech-accent); }
.text-tech-success { color: var(--tech-success); }
.text-tech-warning { color: var(--tech-warning); }
.text-tech-error { color: var(--tech-error); }

.bg-tech-surface { background: var(--current-surface); }
.bg-tech-glass { background: var(--tech-glass); }

.font-mono { font-family: var(--font-mono); }
.font-primary { font-family: var(--font-primary); }

.cursor-tech {
  cursor: pointer;
  position: relative;
}

.cursor-tech::after {
  content: '▊';
  color: var(--tech-primary);
  animation: blink 1s infinite;
  margin-left: 2px;
}

/* ===========================
   COMPONENTES ESPECIALES
   =========================== */
.tech-progress-bar {
  background: var(--current-bg-secondary);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.tech-progress-fill {
  background: var(--gradient-primary);
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tech-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.tech-tooltip {
  position: relative;
}

.tech-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--current-surface);
  color: var(--current-text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-base);
  z-index: var(--z-tooltip);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.tech-tooltip:hover::before {
  opacity: 1;
}