/* --- VARIABLES CIBERPUNK DISTÓPICO --- */
:root {
  /* Fondo y texto base (Oscuridad Distópica) */
  --dark: #0A0210; /* Casi negro con un toque violeta oscuro */
  --dark-2: #1A0726; /* Fondo de contenedores */
  --text: #E0FCFF; /* Texto claro (cian muy claro) */
  --text-muted: #8A7A99; /* Texto secundario (gris púrpura) */

  /* Colores de Acento (Neón/Cian Eléctrico y Magenta) */
  --neon-primary: #00F0FF; /* Cian Eléctrico (AZUL) */
  --neon-secondary: #FF00FF; /* Magenta/Fucsia Brillante */
  --shadow-primary: rgba(0, 240, 255, 0.7); /* Sombra para glow cian */
  --shadow-secondary: rgba(255, 0, 255, 0.7); /* Sombra para glow magenta */
}

/* --- ESTILOS BASE Y FUENTES --- */
html {
    scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Electrolize', sans-serif; 
}

body {
  background-color: var(--dark);
  color: var(--text);
  line-height: 1.6;
}

/* --- EFECTOS DE FONDO CIBERPUNK: RUIDO Y LÍNEA DE ESCANEO --- */

/* EFECTO DE RUIDO (Noise/Grain Effect) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Imagen base64 de ruido simple */
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAMAAABs5YmFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9QTFRFNDo8P0lLRUxQTE1RTE9S////Mzs+P0RJU09WTE5RTE9S////tGg+EAAAAAt0Uk5T/wAACgoLCwwNDg4QDxERFBYYGhobHB0eHx8gICAiIyUmKCkqKywuLzAxMjM0NTo7PD0+P0BDRktOV1lgoA4XAAAAJUlEQVR42mJgZAACMhAAMyQABhCgAGhOAAHACgYAAQYAbh0AX0f9xQAAAABJRU5ErkJggg==') repeat;
  opacity: 0.05; 
  pointer-events: none; 
  z-index: 100;
}

/* ANIMACIÓN DE LÍNEA DE ESCANEO (CRT/VHS effect) */
@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100vh);
    }
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 240, 255, 0.08) 50% /* Ligero rastro cian */
    );
    background-size: 100% 2px; 
    animation: scanline 15s linear infinite; 
    pointer-events: none;
    z-index: 99;
    mix-blend-mode: overlay; 
}

/* --- ENLACES Y TIPOGRAFÍA --- */
a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* --- NAVBAR (Cabecera) --- */
.navbar {
  padding: 25px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(10, 2, 16, 0.85); /* Fondo semitransparente oscuro */
  backdrop-filter: blur(8px); 
  border-bottom: 1px solid rgba(0, 240, 255, 0.15); 
  z-index: 10;
  position: relative; 
}

/* Línea de hover inferior */
.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; 
  width: 0; 
  height: 2px;
  background: var(--neon-primary);
  box-shadow: 0 0 8px var(--shadow-primary), 0 0 15px rgba(0, 240, 255, 0.4);
  transition: width 0.4s ease-out; 
}

.navbar:hover::after {
  width: 100%; 
}

/* LOGO (Efecto Neón principal) */
.logo {
  font-weight: 400; 
  font-size: 1.5rem;
  letter-spacing: 3px; 
  text-transform: uppercase;
  color: var(--neon-primary); 
  text-shadow: 
    0 0 5px var(--neon-primary), 
    0 0 10px var(--shadow-primary), 
    0 0 20px var(--shadow-primary);
  transition: all 0.3s ease-in-out;
}

/* ANIMACIÓN GLITCH PARA EL LOGO AL HACER HOVER */
@keyframes glitch-anim {
    0% {
        text-shadow: 
            2px 2px 0 var(--neon-secondary), 
            -2px -2px 0 var(--neon-primary);
        transform: translate(0%);
        opacity: 0.9;
    }
    10% {
        text-shadow: 
            -1px 1px 0 var(--neon-primary), 
            1px -1px 0 var(--neon-secondary);
        transform: translate(1%);
    }
    20% {
        text-shadow: 
            3px -3px 0 var(--neon-secondary), 
            -3px 3px 0 var(--neon-primary);
        transform: translate(-1%);
    }
    30% {
        text-shadow: none;
        transform: translate(0%);
    }
    40% {
        text-shadow: 
            -2px 2px 0 var(--neon-primary), 
            2px -2px 0 var(--neon-secondary);
        transform: translate(2%);
        opacity: 1;
    }
    50% {
        text-shadow: none;
        transform: translate(0%);
    }
}

.logo:hover {
    text-shadow: 
        0 0 8px var(--neon-primary), 
        0 0 15px var(--shadow-primary); 
    animation: glitch-anim 0.5s linear infinite alternate;
}

.nav-links a {
  margin-left: 30px;
  font-size: 0.95rem;
  opacity: 0.75;
  font-family: 'Rajdhani', sans-serif; 
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--neon-secondary); /* Cambio a Magenta al hacer hover */
  opacity: 1;
  text-shadow: 0 0 5px var(--shadow-secondary);
}

/* --- SECCIÓN HERO --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.hero-content h1 {
  font-size: 3.5rem;
  max-width: 750px;
  letter-spacing: 2px;
  color: var(--neon-primary); 
  text-shadow: 0 0 10px var(--shadow-primary);
  font-family: 'Electrolize', sans-serif;
}

.hero-content p {
  margin-top: 20px;
  max-width: 600px;
  color: var(--text-muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
}

.hero-buttons {
  margin-top: 35px;
}

/* Estilo del cursor tecleado (usado por JS) */
#typed-text.cursor-active::after {
    content: '_';
    display: inline-block;
    animation: blink 0.6s infinite step-start;
    color: var(--neon-secondary); 
    text-shadow: 0 0 5px var(--neon-secondary); 
}
@keyframes blink {
    50% { opacity: 0; }
}


/* --- SECCIONES Y TÍTULOS --- */
.section {
  padding: 100px 60px;
  border-top: 1px dashed rgba(0, 240, 255, 0.1); 
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.05); 
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  letter-spacing: 4px; 
  color: var(--neon-primary);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid var(--neon-secondary); 
  border-bottom: 1px solid var(--neon-secondary); 
  display: inline-block;
}

.section p {
  max-width: 700px;
  color: var(--text-muted);
  font-family: 'Rajdhani', sans-serif;
}

/* --- BOTONES (Diseño Angular Neón) --- */
.btn {
  padding: 12px 24px; 
  border-radius: 4px; 
  text-decoration: none;
  margin-right: 15px;
  font-weight: 500;
  display: inline-block;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease-in-out;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}

.btn-primary {
  background: var(--neon-primary);
  color: var(--dark);
  border: 1px solid var(--neon-primary);
}

.btn-secondary {
  border: 1px solid var(--neon-primary);
  color: var(--neon-primary);
  background: transparent;
}

/* Hover Primary: se vuelve Magenta */
.btn-primary:hover {
  background: var(--neon-secondary);
  color: var(--dark);
  border-color: var(--neon-secondary);
  box-shadow: 0 0 15px var(--shadow-secondary); 
}

/* Hover Secondary: se vuelve Cian y cambia color de texto */
.btn-secondary:hover {
  background: var(--neon-primary);
  color: var(--dark);
  box-shadow: 0 0 15px var(--shadow-primary);
}


/* --- CARDS (Contenedores de Servicio) --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.card {
  background: var(--dark-2);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.1); 
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrar contenido de la tarjeta */
  text-align: center;
}

.card-id {
    display: block;
    font-family: 'Rajdhani', monospace; 
    color: var(--neon-secondary); 
    font-size: 0.8rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Glow en Hover */
.card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 0 10px var(--shadow-primary), 
    0 0 30px rgba(0, 240, 255, 0.4);
  border-color: var(--neon-primary); 
}

.card h3 {
  margin-bottom: 10px;
  color: var(--neon-primary);
  letter-spacing: 1px;
}

.card p {
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
}

/* --- ESTILOS DE ÍCONOS FONT AWESOME --- */

.card-icon {
    font-size: 3.5rem; /* Tamaño base del ícono */
    color: var(--neon-primary);
    text-shadow: 0 0 8px var(--shadow-primary);
    margin-bottom: 20px;
    transition: color 0.3s, text-shadow 0.3s;
}

/* Hover en la tarjeta cambia el color del ícono principal a magenta */
.card:hover .card-icon {
    color: var(--neon-secondary);
    text-shadow: 0 0 8px var(--shadow-secondary);
}

/* ------------------------------------------------ */
/* INTERACTIVIDAD SOLICITADA: ÍCONOS A AZUL NEÓN EN HOVER SOBRE LA TARJETA */
/* ------------------------------------------------ */

/* CARD 2: Administrador de Servidores (Engranaje) */
.icon-gear {
    font-size: 1.5rem; 
    color: var(--neon-secondary); /* Color base: Magenta */
    text-shadow: 0 0 5px var(--shadow-secondary);
    position: absolute;
    top: 0.5rem; 
    right: 0.2rem;
    animation: spin 6s linear infinite; 
    transition: color 0.3s, text-shadow 0.3s;
}

/* CAMBIO SOLICITADO: Engranaje a Azul Neón en hover sobre la CARD */
.card:hover .icon-gear {
    color: var(--neon-primary); /* Cian Eléctrico */
    text-shadow: 0 0 5px var(--shadow-primary);
}

/* CARD 3: Desarrollador de Software para Empresas (Ícono C) */
.fa-copyright {
    font-size: 4rem;
    color: var(--neon-secondary); /* Color base: Magenta */
    text-shadow: 0 0 8px var(--shadow-secondary);
    margin-bottom: 20px;
    transition: color 0.3s, text-shadow 0.3s;
}

/* CAMBIO SOLICITADO: Ícono C a Azul Neón en hover sobre la CARD */
.card:hover .fa-copyright {
    color: var(--neon-primary); /* Cian Eléctrico */
    text-shadow: 0 0 8px var(--shadow-primary);
}

/* ------------------------------------------------ */
/* Fin de las Interacciones */
/* ------------------------------------------------ */


/* Estilo específico para la CARD 2: Servidor + Engranaje (Usando Font Awesome Stacks) */
.icon-stack {
    position: relative;
    display: inline-block;
    width: 4rem; 
    height: 4rem;
    line-height: 4rem;
    margin-bottom: 20px;
}

.icon-stack .fa-server {
    font-size: 3.5rem;
    color: var(--neon-primary);
    text-shadow: 0 0 8px var(--shadow-primary);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* --- SECCIÓN CTA --- */
.cta {
  padding: 100px 60px;
  text-align: center;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.08), transparent 70%); 
}

.cta h2 {
  margin-bottom: 30px;
  text-shadow: 0 0 10px var(--shadow-secondary); 
}

/* --- FOOTER --- */
.footer {
  padding: 40px 60px;
  border-top: 1px solid rgba(0, 240, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
}

.footer span {
    color: var(--neon-secondary); 
    letter-spacing: 1px;
}

/* --- MEDIA QUERIES (Responsividad) --- */
@media (max-width: 1024px) {
    .navbar { padding: 20px 30px; }
    .hero, .section, .footer { padding-left: 30px; padding-right: 30px; }
    .hero-content h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: flex-start; padding: 15px 20px; }
    .nav-links { margin-top: 15px; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; }
    .nav-links a { margin: 0 10px 10px 10px; font-size: 0.9rem; }
    .hero, .section, .footer { padding-left: 20px; padding-right: 20px; }
    .hero-content h1 { font-size: 2.5rem; text-align: center; }
    .hero-content p, .section p { text-align: center; max-width: 100%; }
    .hero-buttons { text-align: center; }
    .cards { grid-template-columns: 1fr; }
    .section h2 { font-size: 2rem; }
    .footer { flex-direction: column; text-align: center; gap: 10px; }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .section h2 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}