/* --- RESET Y VARIABLES --- */
:root {
    --primary: #00f2ff;
    /* Cian Neón */
    --secondary: #7000ff;
    /* Violeta */
    --bg-dark: #0a0a12;
    --text-light: #f0f0f0;
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a:hover {
    color: var(--primary);
}

#inicio {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    z-index: 1;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px auto;
    color: #ccc;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    transition: transform 0.3s ease;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.6);
}

section {
    padding: 100px 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card p {
    color: #aaa;
    line-height: 1.6;
}

#clientes {
    background: #050508;
    text-align: center;
}

.clients-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 40px;
}

.client-logo {
    font-size: 1.5rem;
    color: #555;
    font-weight: bold;
    border: 2px solid #333;
    padding: 20px 40px;
    border-radius: 10px;
    transition: 0.3s;
}

.client-logo:hover {
    color: var(--text-light);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.2);
}

/* --- CONTACTO --- */
.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.form-group {
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

footer {
    padding: 20px;
    text-align: center;
    background: black;
    color: #666;
    font-size: 0.9rem;
}

.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.4);
    z-index: 2000;
    transition: transform 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: #0f0f1a;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1999;
    display: none;
    /* Oculto por defecto */
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
}

.close-chat {
    cursor: pointer;
    font-size: 1.2rem;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-top-left-radius: 0;
}

.user-message {
    background: var(--primary);
    color: #000;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #000;
}

/* --- AGENTES DE IA --- */
.agents-section {
    background: #08080f;
    padding: 100px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.agents-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.agents-content {
    flex: 1;
    min-width: 300px;
}

.agents-content .subtitle {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 300;
}

.agents-content .subtitle strong {
    color: var(--secondary);
    font-weight: 700;
}

.agents-content .description {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.6;
}

.agents-features-list {
    margin-bottom: 40px;
}

.agents-features-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #ddd;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.agents-features-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateX(10px);
}

.agents-features-list li i {
    color: #00f2ff;
    font-size: 1.5rem;
    margin-top: 2px;
}

.agents-features-list li strong {
    color: white;
    display: block;
    margin-bottom: 5px;
}

.agents-image {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    justify-content: center;
}

.agents-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(112, 0, 255, 0.3);
    border: 1px solid rgba(112, 0, 255, 0.5);
    position: relative;
    z-index: 2;
}

.floating-icons i {
    position: absolute;
    color: var(--primary);
    font-size: 2rem;
    z-index: 3;
    animation: float 4s ease-in-out infinite;
    text-shadow: 0 0 10px var(--primary);
}

.floating-icons .float-1 { top: 10%; left: -5%; animation-delay: 0s; }
.floating-icons .float-2 { top: 70%; left: -10%; animation-delay: 1s; font-size: 2.5rem; color: var(--secondary); text-shadow: 0 0 10px var(--secondary); }
.floating-icons .float-3 { top: 20%; right: -5%; animation-delay: 2s; }
.floating-icons .float-4 { bottom: 10%; right: -10%; animation-delay: 3s; font-size: 1.8rem; }

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

/* --- BUSINESS INTELLIGENCE --- */
.bi-section {
    background: #050508;
    padding: 100px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.bi-container {
    max-width: 1200px;
    margin: 0 auto;
}

.bi-subtitle {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 50px;
    margin-top: -30px;
}

.bi-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.bi-feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    text-align: left;
}

.bi-feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.bi-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.bi-feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.bi-feature-card .highlight-text {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.bi-feature-card p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

.bi-dashboard-image {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* --- SOFTWARE A MEDIDA --- */
.software-section {
    background: #08080f;
    padding: 100px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.software-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.software-header {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.software-text {
    flex: 1;
    min-width: 300px;
}

.software-text .description {
    font-size: 1.15rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.software-text .highlight-text {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: bold;
    line-height: 1.6;
}

.software-image-top {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.software-image-top img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(112, 0, 255, 0.3);
    border: 1px solid rgba(112, 0, 255, 0.5);
}

.software-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.sw-feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sw-feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.sw-icon {
    font-size: 1.8rem;
    color: var(--secondary);
}

.sw-feature-card h4 {
    font-size: 1.2rem;
    color: white;
}

.sw-feature-card p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .software-header {
        flex-direction: column-reverse;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }

    nav {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        font-size: 0.9rem;
    }

    .chat-window {
        width: 90%;
        right: 5%;
        bottom: 90px;
    }

    .agents-container {
        flex-direction: column-reverse;
    }
}