:root {
    --brand-primary: #2C3E50;
    --brand-accent: #FFA500;
    --text-light: #f5f5f7;
    --text-dark: #333333;
    --bg-dark: #0b0e17;
    --bg-light: #FFFFFF;
}
body {
    margin: 0;
    font-family: 'Lato', "Segoe UI", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
h2 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* ====== HERO ====== */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    position: relative;
    z-index: 2;
}
header .logo {
    margin-bottom: 2rem;
}
header .logo img {
    width: 10vw;
    max-width: 150px;
    height: auto;
}
header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    z-index: 2;
}
header p {
    font-size: 1.2rem;
    color: #c8d1e0;
    max-width: 600px;
    z-index: 2;
}
.cta {
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 6px;
    background: var(--brand-accent);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2;
    text-decoration: none;
}
.cta:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.cta.agent-cta:hover {
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.8);
}

#bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

/* ====== NAVEGACIÓN ====== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 10%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.nav-container .logo img {
    width: 5vw;
    max-width: 100px;
    height: auto;
}
.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.top-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.top-nav a:hover {
    color: var(--brand-accent);
}

/* ====== SECCIONES ====== */
section {
    padding: 5rem 10%;
    position: relative;
    z-index: 2;
}
.section-centered {
    text-align: center;
    max-width: 800px;
    margin: auto;
}
.section-intro {
    font-size: 1.1rem;
    color: #c8d1e0;
}
.split {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}
.split div {
    flex: 1;
}
.split img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(44, 62, 80, 0.5);
}

/* ====== GRID SERVICIOS ====== */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.service {
    background: #141a27;
    border-radius: 10px;
    padding: 2rem;
    transition: 0.3s;
    border: 1px solid var(--brand-primary);
}
.service:hover {
    box-shadow: 0 0 20px rgba(44, 62, 80, 0.7);
    transform: translateY(-5px);
}
.service h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    color: var(--text-light);
}
.cta-container {
    text-align: center;
    margin-top: 2rem;
}

/* ====== AGENTES INTELIGENTES ====== */
#agentes-inteligentes {
    background: linear-gradient(180deg, #0f172a 0%, #0b1020 100%);
    border-top: 1px solid var(--brand-primary);
    border-bottom: 1px solid var(--brand-primary);
}
.agents-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}
.agents-header h2 {
    font-size: 2.5rem;
}
.agents-header .subtitle {
    color: var(--brand-accent);
    text-align: center;
    margin-bottom: 1rem;
}
.agent-buttons {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.services-agents {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.service-agent {
    background: #141a27;
    border-color: rgba(44, 62, 80, 0.5);
}
.service-agent h3 {
    color: var(--brand-accent);
}

/* ====== CONTACTO ====== */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 500px;
    margin: auto;
}
#contact-form input, #contact-form textarea {
    padding: 0.9rem;
    border: 1px solid var(--brand-primary);
    border-radius: 6px;
    background: #0f141e;
    color: #fff;
    font-size: 1rem;
}
#contact-form input:focus, #contact-form textarea:focus {
    outline: 1px solid var(--brand-accent);
}
#contact-form button {
    padding: 0.9rem;
    background: var(--brand-accent);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
}
.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}
#form-status {
    text-align: center;
    margin-top: 1rem;
}

/* ====== FAQ ====== */
.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}
.faq-list {
    max-width: 700px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: #141a27;
    border: 1px solid var(--brand-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
}
.faq-item summary {
    padding: 1.2rem;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    padding: 0 1.2rem 1.2rem;
    margin: 0;
    color: #c8d1e0;
}

/* ====== BLOG ====== */
#contenido-educativo {
    background: var(--bg-dark);
}
.blog-header{
    text-align: center;
    margin-bottom: 3rem;
}
.blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.blog-post-cta {
    margin-top: 1rem;
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

/* ====== FOOTER ====== */
.site-footer {
    background: #06080f;
    padding: 4rem 10%;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid var(--brand-primary);
    position: relative;
    z-index: 2;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column ul li {
    margin-bottom: 0.8rem;
}
.footer-column a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-column a:hover {
    color: var(--brand-accent);
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-links a {
    color: #999;
}
.social-links a:hover {
    color: var(--brand-accent);
}
.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ====== WIDGET CHATBOT ====== */
.sxw-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999998;
    width: 58px; height: 58px;
    border-radius: 50%;
    border: none; cursor: pointer;
    background: var(--brand-accent);
}
.sxw-toggle img {
    width: 36px;
    height: 36px;
}
.sxw-panel {
    position: fixed; right: 20px; bottom: 90px;
    width: 280px;
    height: 350px;
    border-radius: 16px;
    background: #1a202c;
    display: none;
    flex-direction: column;
    z-index: 999999;
}
.sxw-panel.open { display: flex; }
.sxw-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}
.sxw-input {
    padding: 10px;
    flex-shrink: 0;
}
.sxw-input input {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(15,23,42,.8);
    color: var(--text-light);
}
.sxw-send {
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: var(--brand-accent);
    color: var(--text-dark);
    font-weight: 600;
}

/* ====== MEDIA QUERIES ====== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 5%;
    }

    .split {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .top-nav ul {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

.sxw-msg {
    display: flex;
    margin: 8px 0;
}
.sxw-msg.user {
    justify-content: flex-end;
}
.sxw-bubble {
    padding: 8px 14px;
    border-radius: 16px;
    max-width: 85%;
    word-wrap: break-word;
}
.sxw-msg.bot .sxw-bubble {
    background: #2d3748;
    color: var(--text-light);
}
.sxw-msg.user .sxw-bubble {
    background: var(--brand-accent);
    color: var(--text-dark);
}
.sxw-footer-tip {
    font-size: 10px;
    color: #718096;
    text-align: center;
    padding: 0 10px 10px;
}

/* ====== HAMBURGER MENU ====== */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    margin: 6px 0;
    transition: 0.4s;
}