:root {
  --primary: #00e5ff;
  --primary-dark: #00b8cc;
  --secondary: #0a192f;
  --secondary-light: #172a46;
  --text-light: #ffffff;
  --text-gray: #a0aec0;
}

/* Reset base */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Evita corrimientos horizontales */
  font-family: 'Montserrat', sans-serif;
  background-color: var(--secondary);
  color: var(--text-light);
}

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-secondary-light { background-color: var(--secondary-light); }
.text-primary { color: var(--primary); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--secondary); }
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Navigation */
.navbar {
  background-color: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(10px);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

/* Hero section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(10,25,47,0.9) 0%, rgba(23,42,70,0.9) 100%);
  position: relative;
  overflow: hidden;
  background-size: cover;       /* Corrige fondo corrido */
  background-position: center;  /* Centra fondo */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,229,255,0.05) 0%, rgba(10,25,47,0) 70%);
}

#particle-canvas, 
#parallax-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;  /* reemplazo de 100vw */
  height: 100%;
  z-index: 0;
}

.hero .container, 
.parallax .container {
  position: relative;
  z-index: 10;
}

.particle {
  position: absolute;
  width: 1px;
  height: 1px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px var(--primary);
  opacity: 0.5;
}

/* Services */
.service-card {
  background-color: rgba(23, 42, 70, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.1);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 229, 255, 0.1);
}

.accordion-button {
  cursor: pointer;
  transition: all 0.3s ease;
}

.accordion-button:hover { color: var(--primary); }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.accordion-content.active { max-height: 1000px; }

/* Contact form */
.form-input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

/* Button styles */
.btn-primary {
  background-color: var(--primary);
  color: var(--secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn-primary:hover { background-color: var(--primary-dark); }
.btn-primary:hover::before { left: 100%; }

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--secondary);
}

/* Gallery */
.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img { transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;  /* corrige 100vw */
  height: 100%;
  background: rgba(10, 25, 47, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Network visualization */
.network {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;  /* corrige fondo corrido */
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;  /* corrige 100vw */
  height: 100%;
  background: rgba(10, 25, 47, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  background-color: var(--primary);
  color: var(--secondary);
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}
