:root {
    --primary: #00C4B4;
    /* Teal/Cyan */
    --primary-glow: rgba(0, 196, 180, 0.5);
    --bg-dark: #050511;
    /* Deepest black-blue */
    --bg-card: #0F1021;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 17, 0.85);
    /* More transparent */
    backdrop-filter: blur(12px);
    /* Stronger blur for clean glass effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Underline animation for nav links */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary) 0%, #009e91 100%);
    color: #000;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 15px rgba(0, 196, 180, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 196, 180, 0.4);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 0 120px;
    background: #050511;
    /* Solid dark background, canvas provides animation */
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Stats Section (Clean Polish) */
.stats-section {
    background: #000000;
    padding: 60px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.stat-item p {
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.hero-title {
    line-height: 1.1;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-title .line-1 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 4.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.hero-title .line-2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 5.5rem;
    color: var(--primary);
    margin-top: -15px;
    filter: drop-shadow(0 0 10px rgba(0, 196, 180, 0.3));
}

.hero-title .line-3 {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 3rem;
    color: white;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto 50px;
    font-weight: 300;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 100px;
}

.primary-btn {
    background: var(--primary);
    color: #050511;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(0, 196, 180, 0.5);
    background: #00e6d2;
    /* Slightly brighter on hover */
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 196, 180, 0.5);
    color: var(--primary);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.secondary-btn:hover {
    background: rgba(0, 196, 180, 0.1);
    border-color: var(--primary);
}

/* Hero Footer Stats */
.hero-footer-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 900px;
    margin: 0 auto;
}

.hero-stat {
    text-align: center;
    padding: 0 50px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px var(--primary);
    /* Hollow text effect */
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 196, 180, 0.2);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #cbd5e1;
    font-weight: 600;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.text-center {
    text-align: center;
}

/* Sections General */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
}

.contact-highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

/* Testimonials - Glass Cards */
.testimonials-section {
    background: #050511;
    /* Clean dark */
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, background 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.user-info {
    display: flex;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    /* Ensure image fits circle */
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-details h4 {
    font-size: 1.05rem;
    color: white;
}

.testimonial-tag {
    background: rgba(0, 196, 180, 0.08);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    height: fit-content;
    border: 1px solid rgba(0, 196, 180, 0.2);
}

.testimonial-quote {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.roi-badge {
    color: #10B981;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #fbbf24;
    letter-spacing: 2px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(15, 16, 33, 0.6);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon-box {
    width: 65px;
    height: 65px;
    background: rgba(0, 196, 180, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary);
    border: 1px solid rgba(0, 196, 180, 0.1);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Demos */
.demos-section {
    background: #050511;
}

.demo-card {
    background: #0F1021;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.demo-card:hover {
    transform: scale(1.02);
}

.demo-preview {
    height: 220px;
    background: radial-gradient(circle at center, #1a1a2e, #0F1021);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    /* Brighter default text */
}

.live-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.2);
    /* Green background */
    color: #10B981;
    /* Green text */
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.demo-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.demo-icon-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.demo-icon {
    font-size: 1.8rem;
    /* Larger */
    color: #ffffff;
    /* pure white */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    /* Glow */
}

.demo-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.demo-stat-pill {
    background: rgba(0, 196, 180, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    border: 1px solid rgba(0, 196, 180, 0.1);
}

.demo-btn {
    margin-top: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.demo-btn:hover {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
}

/* Contact */
.contact-section {
    padding: 120px 0;
}

.contact-direct {
    background: rgba(255, 255, 255, 0.03);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-direct h4 {
    margin-bottom: 25px;
    color: white;
    font-size: 1.2rem;
}

.direct-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 1rem;
}

.direct-icon {
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.form-card {
    background: rgba(15, 16, 33, 0.8);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.form-card h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 5px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 196, 180, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 196, 180, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #009e91 100%);
    color: #fff;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 196, 180, 0.2);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 196, 180, 0.3);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 5px;
    margin-right: 5px;
}

/* Chatbot Widget Styles */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: #000;
    padding: 16px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 196, 180, 0.3);
    z-index: 9999;
    font-weight: 700;
    transition: transform 0.3s;
}

.chatbot-trigger:hover {
    transform: translateY(-3px) scale(1.02);
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #0F1021;
    /* Dark card bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* FIX: Clase ACTIVE necesaria para mostrar el chat */
.chatbot-window.active {
    display: flex !important;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: rgba(0, 196, 180, 0.1);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #0F1021;
}

.chat-message {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.chat-bot {
    background: #1f2937;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-user {
    background: var(--primary);
    color: #050511;
    font-weight: 600;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chatbot-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 16, 33, 0.95);
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

#chatInput {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    outline: none;
}

#chatInput:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

#sendChat {
    background: var(--primary);
    border: none;
    color: black;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#sendChat:hover {
    transform: scale(1.1);
}

/* Code Block Styling in Chat */
.chat-message pre {
    background: #000;
    padding: 10px;
    border-radius: 8px;
    margin-top: 5px;
    overflow-x: auto;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message code {
    font-family: 'Courier New', monospace;
    color: #00C4B4;
}



#chatInput:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.chat-send-btn {
    background: var(--primary);
    color: #000;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 1.2rem;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    background: #009e91;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* Footer */
/* Footer */
footer {
    background: #02020a;
    padding: 80px 0 0;
    /* Changed padding to accommodate bottom bar */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: white;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    font-size: 0.95rem;
    display: block;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    margin-top: 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    color: #94a3b8;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.footer-social-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .hero-title .line-1 {
        font-size: 2.8rem;
    }

    .hero-title .line-2 {
        font-size: 3.5rem;
    }

    .hero-title .line-3 {
        font-size: 2rem;
    }

    .contact-grid,
    .footer-grid,
    .hero-footer-stats {
        grid-template-columns: 1fr;
    }

    .testimonials-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal-content {
    background: #0F1021;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    /* Flex layout to organize children vertically if needed */
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.5);
}