/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Industry & Tech Palette */
    --color-bg: #0a192f;
    /* Deep Navy */
    --color-surface: #112240;
    /* Light Navy */
    --color-primary: #00d4ff;
    /* Cyan Tech */
    --color-secondary: #0056b3;
    /* Traditional Industrial Blue */
    --color-accent: #64ffda;
    /* Greenish Cyan (Data/Success) */
    --color-text: #ccd6f6;
    /* Off-white Text */
    --color-text-dim: #8892b0;
    /* Muted Text */
    --color-white: #ffffff;

    /* Layout */
    --nav-height: 80px;
    --container-width: 1200px;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --transition: all 0.3s ease;
    --shadow-card: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    --glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-weight: 700;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-primary:hover {
    background-color: rgba(0, 212, 255, 0.1);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--color-text-dim);
    color: var(--color-text);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(90deg, var(--color-white), var(--color-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
    height: var(--nav-height);
    background-color: rgba(10, 25, 47, 0.85);
    /* More transparent for glass effect */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ... existing navbar styles ... */

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    /* Behind everything */
    pointer-events: none;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    /* background: radial-gradient(circle at 50% 50%, #172a45 0%, #0a192f 100%); */
    background: transparent;
    /* Particles are behind */
    overflow: hidden;
    z-index: 1;
    /* Above particles */
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
}

/* Make sure other sections are also above particles if they have transparency, 
   or give them a background if they should cover particles */
section,
footer {
    position: relative;
    z-index: 1;
}

/* Transparent background for sections to let particles show through slightly or fully opaque?
   Let's keep sections opaque mostly for readability, but Hero transparent.
*/
.pillars,
.neuronal-section,
.softing-section,
.contact-section {
    background-color: rgba(10, 25, 47, 0.8);
    /* Slight transparency */
    backdrop-filter: blur(5px);
}


.navbar-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-size: 0.9rem;
    color: var(--color-text);
}

.nav-links a:not(.btn):hover {
    color: var(--color-primary);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--color-text-dim);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    background: radial-gradient(circle at 50% 50%, #172a45 0%, #0a192f 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 3rem;
    background: rgba(10, 25, 47, 0.85);
    /* Fondo semi-transparente */
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.8);
    /* Sombra más fuerte */
}

.hero-title .highlight {
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-dim);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    /* Sombra para mejor legibilidad */
}

/* Background visual decoration - Removed in favor of Particles.js */
.hero-bg-overlay {
    display: none;
}

/* =========================================
   5. PILLARS / SERVICES
   ========================================= */
.pillars {
    padding: 120px 0;
    /* Más padding */
    position: relative;
}

/* Fade effect at bottom */
.pillars::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: linear-gradient(145deg, rgba(17, 34, 64, 0.8), rgba(10, 25, 47, 0.9));
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, #00d4ff, #64ffda, #00d4ff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3), 0 0 30px rgba(100, 255, 218, 0.2);
    background: linear-gradient(145deg, rgba(17, 34, 64, 0.95), rgba(10, 25, 47, 1));
}


.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(100, 255, 218, 0.8));
    }
}

.card-icon img {
    max-height: 100%;
    width: auto;
}


.pillar-card h3 {
    margin-bottom: 1rem;
    color: var(--color-white);
    text-align: center;
}

.pillar-card p {
    color: var(--color-text-dim);
    font-size: 0.95rem;
    text-align: center;
}

/* =========================================
   6. COMPANY SECTION
   ========================================= */
.company-section {
    padding: 100px 0;
    position: relative;
    background-color: var(--color-bg);
}

.company-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.section-title-left {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--color-white), var(--color-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
}

.company-desc {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.mission-box {
    background: rgba(17, 34, 64, 0.5);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.mission-box h3 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-size: 1.4rem;
}

.mission-list {
    list-style: none;
}

.mission-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 1rem;
    color: var(--color-text-dim);
}

.mission-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.tech-stack-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.tech-item {
    padding: 20px 40px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-white);
    font-weight: 600;
    width: 200px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tech-item.highlight {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
}

.tech-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    position: relative;
}

@media (max-width: 992px) {
    .company-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .section-title-left {
        text-align: center;
    }

    .company-text {
        text-align: center;
    }

    .mission-list li {
        text-align: left;
        display: inline-block;
        width: 100%;
    }
}

/* =========================================
   7. NEURONAL HUB SECTION - FLAGSHIP PRODUCT
   ========================================= */
.neuronal-section {
    padding: 180px 0;
    /* Mucho más padding para separación */
    background: linear-gradient(180deg, #0a192f 0%, #112240 50%, #0a192f 100%);
    overflow: hidden;
    position: relative;
    border-top: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.2);
    /* Glow effect */
    margin: 80px 0;
    /* Margen adicional arriba y abajo */
}

/* Fade effect at top */
.neuronal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(10, 25, 47, 1), transparent);
    z-index: 1;
    pointer-events: none;
}

/* Fade effect at bottom */
.neuronal-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, rgba(10, 25, 47, 1), transparent);
    z-index: 1;
    pointer-events: none;
}

#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
    /* Más visible */
}

.neuronal-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
    /* Por encima de los efectos de fade */
}

.badge {
    color: var(--color-primary);
    font-family: monospace;
    font-size: 1.1rem;
    /* Más grande */
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neuronal-text h2 {
    font-size: 3.5rem;
    /* Más grande */
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #00d4ff, #64ffda);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.neuronal-text p {
    color: var(--color-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    /* Texto más grande */
    line-height: 1.8;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.feature-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.dashboard-mockup {
    background-color: #1a2c4e;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 212, 255, 0.2);
    /* Sombra más dramática */
    padding: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    /* Borde más visible */
    width: 100%;
    aspect-ratio: 16/9;
    transform: scale(1.05);
    /* Ligeramente más grande */
    transition: transform 0.3s ease;
}

.dashboard-mockup:hover {
    transform: scale(1.08);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 212, 255, 0.4);
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background-color: #ff5f56;
}

.yellow {
    background-color: #ffbd2e;
}

.green {
    background-color: #27c93f;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100% - 40px);
}

.chart-area {
    flex: 2;
    background: linear-gradient(90deg, #112240, #233554);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* Simple CSS Chart Graphic */
.chart-area::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(100, 255, 218, 0.2), transparent);
    clip-path: polygon(0 80%, 20% 60%, 40% 90%, 60% 50%, 80% 70%, 100% 30%, 100% 100%, 0 100%);
}

.stats-row {
    flex: 1;
    display: flex;
    gap: 15px;
}

.stat-box {
    flex: 1;
    background-color: #233554;
    border-radius: 6px;
}

/* =========================================
   7. SOFTING SECTION
   ========================================= */
.softing-section {
    padding: 120px 0;
    /* Más padding */
    position: relative;
}

/* Fade effect at top */
.softing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, var(--color-bg), transparent);
    pointer-events: none;
    z-index: 1;
}

.softing-header {
    text-align: center;
    margin-bottom: 4rem;
}

.softing-logo-text {
    font-size: 3rem;
    color: #f7941e;
    /* Softing Logo Color aprox orange */
    letter-spacing: -2px;
    font-weight: 800;
}

.section-subtitle {
    color: var(--color-text-dim);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.product-item {
    background-color: var(--color-surface);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-bg);
    transition: var(--transition);
    cursor: pointer;
}

.product-item:hover {
    border-left-color: #f7941e;
    background-color: #1a2c4e;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(247, 148, 30, 0.2);
}

.highlight-box {
    border: 1px solid #f7941e;
    background: rgba(247, 148, 30, 0.05);
}

.highlight-box h3 {
    color: #f7941e;
}

/* =========================================
   8. CONTACT SECTION
   ========================================= */
.contact-section {
    padding: 100px 0;
    background-color: #0b1a30;
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    text-align: left;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-text-dim);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Fila doble en el formulario */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Select con estética consistente */
.form-group select {
    width: 100%;
    padding: 12px;
    background-color: var(--color-bg);
    border: 1px solid #233554;
    border-radius: 4px;
    color: var(--color-white);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4ff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group select option {
    background-color: #112240;
    color: var(--color-white);
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        text-align: center;
    }

    .contact-details {
        display: inline-block;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.contact-details {
    margin-top: 3rem;
    display: inline-block;
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    justify-content: flex-start;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.1rem;
    display: inline-block;
}

.contact-form {
    flex: 1;
    background-color: var(--color-surface);
    padding: 3rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--color-bg);
    border: 1px solid #233554;
    border-radius: 4px;
    color: var(--color-white);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.full-width {
    width: 100%;
    text-align: center;
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer {
    padding: 30px 0;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-weight: 600;
}

.social-links a {
    margin: 0 10px;
    color: var(--color-text);
}

.social-links a:hover {
    color: var(--color-primary);
}

/* =========================================
   10. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .container {
        padding: 0 30px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 20px;
    }

    /* Mobile Nav */
    .mobile-menu-btn {
        display: block;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background-color: #112240;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .neuronal-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column;
    }
}