/* --- VARIABLES DE COLOR (Basadas en tu logo) --- */
:root {
    --espacio-profundo: #05050f; /* Un negro/azul muy oscuro */
    --brillo-estelar: #141034; /* Tono morado oscuro para el centro */
    --azul-neon: #00f0ff;
    --morado-neon: #8a2be2;
    --texto-claro: #f8fafc;
    --texto-gris: #94a3b8;
}

/* --- ESTILOS GENERALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- SCROLLBAR ESTILO MATRIX / NAVE ESPACIAL --- */
/* Ancho de la pista */
::-webkit-scrollbar {
    width: 12px;
}

/* El fondo por donde viaja la nave (el espacio) */
::-webkit-scrollbar-track {
    background: var(--espacio-profundo);
    border-left: 1px solid rgba(0, 240, 255, 0.1); /* Una línea guía muy sutil */
}

/* La nave / haz de luz que sube y baja */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, transparent, var(--azul-neon), var(--morado-neon), transparent);
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.8);
}

/* Cuando le pasas el mouse a la nave (acelera) */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, transparent, var(--morado-neon), var(--azul-neon), transparent);
}

body {
    /* Fondo con efecto espacial (radial) */
    background: radial-gradient(circle at 50% -20%, var(--brillo-estelar), var(--espacio-profundo) 80%);
    background-color: var(--espacio-profundo);
    color: var(--texto-claro);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* --- NAVEGACIÓN --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(5, 5, 15, 0.8); /* Transparente para que se vea el fondo */
    backdrop-filter: blur(10px); /* Efecto vidrio esmerilado */
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

/* Aseguramos que el logo quede perfectamente alineado y proporcionado */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* Ajusta este tamaño si lo ves muy grande o pequeño */
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--texto-claro);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--azul-neon);
}

/* --- BOTONES NEÓN --- */
.btn-contacto {
    background: transparent;
    border: 2px solid var(--azul-neon);
    padding: 10px 20px;
    border-radius: 30px;
    color: var(--azul-neon) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); /* Brillo sutil */
}

.btn-contacto:hover {
    background: var(--azul-neon);
    color: var(--espacio-profundo) !important;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.btn-principal {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    color: white;
    background: linear-gradient(90deg, var(--morado-neon), var(--azul-neon));
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-principal:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

/* --- SECCIÓN HERO (Principal) --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 50px; /* Compensa la barra de navegación fija */
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

/* Texto con degradado de tus colores */
.highlight {
    background: linear-gradient(90deg, var(--azul-neon), var(--morado-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--texto-gris);
    max-width: 600px;
    margin: 0 auto;
}

/* --- FONDO ANIMADO DE PARTÍCULAS --- */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Lo manda al fondo de todo */
    pointer-events: none; /* Evita que bloquee los clics en la página */
}

/* --- SECCIONES GENERALES --- */
.seccion {
    padding: 100px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10; /* Asegura que el texto esté por encima de las bolitas */
}

.titulo-seccion {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

/* --- PANEL HORIZONTAL INTERMEDIO --- */
.panel-horizontal {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg, rgba(20, 16, 52, 0.6), rgba(0, 240, 255, 0.05), rgba(20, 16, 52, 0.6));
    padding: 30px 50px;
    max-width: 1000px;
    /* El margen negativo (-60px) hace que el panel suba y conecte la parte de arriba con la de abajo */
    margin: -60px auto 60px auto; 
    border-top: 1px solid rgba(0, 240, 255, 0.3);
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(8px); /* Efecto cristal */
    position: relative;
    z-index: 10;
}

.info-item {
    text-align: center;
}

.info-numero {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--azul-neon);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
    margin-bottom: 5px;
}

.info-texto {
    color: var(--texto-claro);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Para que se vea bien en celulares */
@media (max-width: 768px) {
    .panel-horizontal {
        flex-direction: column;
        gap: 30px;
        margin: 20px 20px 60px 20px; /* Quitamos el margen negativo en móviles */
    }
}

/* --- ENVOLTORIO DEL CARRUSEL --- */
.carousel-wrapper {
    position: relative;
    display: block; /* Esto evita que el contenedor aplaste las tarjetas */
    max-width: 100%;
    margin: 0 auto;
}

/* --- CONTENEDOR DE TARJETAS EN FILA --- */
.grid-servicios {
    display: flex; /* Cambiamos grid por flex para ponerlas en fila */
    overflow-x: auto; /* Permite desplazamiento horizontal */
    scroll-behavior: smooth; /* Movimiento suave */
    gap: 25px;
    padding: 20px 10px; /* Espacio para que la sombra al pasar el mouse no se corte */
    align-items: stretch; /* Obliga a que todas las tarjetas tengan la misma altura */
    
    /* Ocultar la barra de scroll de abajo para que se vea limpio */
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;  /* Firefox */
}

.grid-servicios::-webkit-scrollbar {
    display: none; /* Chrome, Safari y Opera */
}

/* --- TARJETAS INDIVIDUALES --- */
.tarjeta-servicio {
    flex: 0 0 280px; /* Bloquea el ancho exacto en 280px (ni más, ni menos) */
    width: 280px; 
    min-height: 420px;
    background: #0f101f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.tarjeta-servicio:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.5);
}

/* --- ESTILOS RESTAURADOS DE IMAGEN Y TEXTO --- */
.imagen-tarjeta {
    width: 100%;
    min-height: 160px; /* Altura de la imagen restaurada */
    flex-shrink: 0; /* Evita que la imagen se haga pequeña */
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid rgba(0, 240, 255, 0.2); 
}

.contenido-tarjeta {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Hace que el botón de 'Ver más' siempre quede abajo */
}

.contenido-tarjeta h3 {
    font-size: 1.25rem;
    color: var(--texto-claro);
    margin-bottom: 12px;
    font-weight: 700;
}

.contenido-tarjeta p {
    color: #8b8d9b; 
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.link-ver-mas {
    color: #7b8aff; 
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: auto; /* Empuja el enlace hacia abajo */
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.link-ver-mas:hover {
    color: var(--azul-neon);
}

/* --- ESTILO DE LAS FLECHAS --- */
.nav-flecha {
    background: rgba(0, 240, 255, 0.1);
    color: var(--azul-neon);
    border: 1px solid var(--azul-neon);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    position: absolute;
    top: 50%; /* Centra la flecha verticalmente */
    transform: translateY(-50%); /* Ajuste fino del centrado */
    z-index: 20;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#prev-btn { left: -20px; }
#next-btn { right: -20px; }

.nav-flecha:hover {
    background: var(--azul-neon);
    color: #000;
    box-shadow: 0 0 15px var(--azul-neon);
    transform: scale(1.1);
}

/* En celulares metemos las flechas un poco para que no se salgan de la pantalla */
@media (max-width: 768px) {
    #prev-btn { left: 0; }
    #next-btn { right: 0; }
}