:root {
    --primary: #00e5ff;
    --primary-dark: #00b8d4;
    --secondary: #7000ff;
    --bg-dark: #050505;
    --bg-surface: #0a0a0a;
    --text-main: #f0f0f0;
    --text-dim: #a0a0a0;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 100px 0;
}

/* --- Background Blobs --- */
.blob {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.blob-1 {
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.blob-2 {
    background: var(--secondary);
    bottom: -200px;
    left: -100px;
}

/* --- Navigation --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.nav-container {
    height: 130px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 110px;
    width: auto;
    max-width: 500px;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 0 12px rgba(0, 180, 255, 0.35));
}

.nav-logo:hover {
    filter: drop-shadow(0 0 30px var(--primary)) brightness(1.25);
    transform: scale(1.05);
}

.footer-logo {
    height: 60px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 180, 255, 0.25));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

/* --- Buttons --- */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
    z-index: -1;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.4);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    background: var(--glass);
}

.btn-outline:hover {
    background: var(--glass-border);
}

.btn-lg {
    padding: 1.1rem 2.4rem;
    font-size: 1.1rem;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* --- Placeholders --- */
.image-placeholder {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0%,
        rgba(0, 229, 255, 0.1) 25%,
        transparent 50%,
        rgba(112, 0, 255, 0.1) 75%,
        transparent 100%
    );
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Android / AI Hero --- */
.hero-placeholder {
    height: 500px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-head-img {
    width: 100%;
    max-width: 550px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 40px rgba(0, 229, 255, 0.3));
    object-fit: contain;
}

.floating-card {
    position: absolute;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    top: 20%;
    right: -20px;
    z-index: 2;
}

.floating-card.bottom {
    top: auto;
    bottom: 20%;
    right: auto;
    left: -20px;
}

/* --- Glassmorphism --- */
.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* --- Nosotros --- */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.section-header .title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.section-header .subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    max-width: 700px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.about-card {
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: var(--transition);
}

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

.objetivo-card, .valores-card, .innovacion-card {
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.objetivo-card {
    background-image: linear-gradient(rgba(5, 5, 5, 0.75), rgba(5, 5, 5, 0.85)), url('assets/objetivo.png');
    background-size: 160%;
}

.valores-card {
    background-image: linear-gradient(rgba(5, 5, 5, 0.75), rgba(5, 5, 5, 0.85)), url('assets/valores.png');
    background-size: 180%; /* Slightly larger to compensate for image padding */
}

.innovacion-card {
    background-image: linear-gradient(rgba(5, 5, 5, 0.75), rgba(5, 5, 5, 0.85)), url('assets/innovacion.png');
    background-size: 160%;
}

.objetivo-card::after, .valores-card::after, .innovacion-card::after {
    display: none;
}

.icon-wrap {
    width: 60px;
    height: 60px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

.about-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 120px; /* Significant separation for a cleaner, premium look */
}

/* Utility Classes */
.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mt-3 { margin-top: 3rem !important; }
.mt-4 { margin-top: 4rem !important; }
.mt-5 { margin-top: 5rem !important; }

.side-placeholder {
    height: 500px; /* Matching the hero height for balance */
    position: relative;
    overflow: hidden;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures images are not cropped */
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    padding: 1.5rem; /* Internal padding for better framing */
}

.carousel-img.active {
    opacity: 1;
    z-index: 2;
}

.stats {
    display: flex;
    gap: 3rem;
    margin: 2.5rem 0;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.quote-card {
    padding: 2rem;
    border-radius: 20px;
    font-style: italic;
    border-left: 4px solid var(--primary);
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    padding: 2.5rem;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
}

.service-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-thumb {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-top: 1rem; /* Minimum spacing if text is very long */
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 10;
    padding: 1.2rem;
    transition: var(--transition);
}

.service-card:hover .service-img {
    transform: scale(1.1);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto; /* Aligns all buttons at the same height */
    margin-bottom: 2rem; /* Creates space between button and image */
    transition: var(--transition);
}

.btn-text:hover {
    gap: 12px;
    color: white;
}

/* --- Product Section --- */
.product-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 32px;
    overflow: hidden;
}

.product-info {
    padding: 5rem;
}

.product-features {
    list-style: none;
    margin: 2rem 0;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.8rem;
    color: var(--text-dim);
}

.product-features li i {
    color: var(--primary);
}

.pricing-cards {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-box .price {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.price-box .btn {
    width: 140px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    padding: 0.5rem;
}

.product-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem; /* Espacio para que la grilla no ocupe todo el lateral */
}

.product-placeholder {
    height: 100%;
    width: 100%;
    min-height: 400px;
    border-radius: 24px; /* Bordes redondeados para el panel de la grilla */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
    transition: var(--transition);
}

.product-placeholder:hover .product-img {
    transform: translateY(-10px) scale(1.02);
}

/* --- Partners Section --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.partner-card {
    display: flex;
    flex-direction: column; /* Diseño vertical como las tarjetas de servicio */
    padding: 2rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    border-radius: 32px;
}

.partner-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.partner-thumb {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    position: relative;
    z-index: 10;
    transition: var(--transition);
}

.partner-card:hover .partner-img {
    transform: scale(1.1);
}

.partner-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: white;
}

.partner-info p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0;
}

.external-icon {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 18px;
    height: 18px;
    color: var(--primary);
    opacity: 0.3;
    transition: var(--transition);
}

.partner-card:hover .external-icon {
    opacity: 1;
    transform: translate(3px, -3px);
}

/* --- Contact Section --- */
.contact-wrap {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.info-list {
    margin-top: 3rem;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.info-item i {
    color: var(--primary);
}

.contact-form {
    padding: 4rem;
    border-radius: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-group.full {
    grid-column: span 2;
}

.input-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.input-group input, 
.input-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    color: white;
    transition: var(--transition);
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-dim);
    transition: var(--transition);
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- Floating WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

/* --- Mobile Menu --- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-up { opacity: 0; animation: fadeInUp 1s forwards; }
.animate-fade { opacity: 0; animation: fadeIn 1.5s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE – PC / TABLET / MOBILE
   ========================================= */

/* --- Tablet grande (1024px) --- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-buttons { justify-content: center; }
    .hero-image-container { display: none; }

    .about-main {
        grid-template-columns: 1fr;
    }
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-featured {
        grid-template-columns: 1fr;
    }
    .product-visual { height: 280px; }

    .contact-wrap {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* --- Tablet chica (768px) --- */
@media (max-width: 768px) {

    /* Header / Nav */
    .nav-container { height: 100px; }
    .nav-logo {
        height: 80px;
        max-width: 300px;
    }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 999;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        font-size: 1.4rem;
        font-weight: 600;
    }
    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    /* Typography */
    .hero h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
    .section-header .title { font-size: 2rem; }
    .testimonial-text { font-size: 1.3rem; }

    /* Hero */
    .hero { padding-top: 160px; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 1rem; }
    .btn-lg { width: 100%; justify-content: center; }

    /* Grids → 1 columna */
    .about-grid,
    .services-grid { grid-template-columns: 1fr; }

    /* About */
    .stats { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
    .side-placeholder { height: 280px; }

    /* Product */
    .product-info { padding: 3rem 2rem; }

    /* Testimonial */
    .testimonial-wrap { padding: 3rem 1.5rem; }

    /* Contact */
    .form-grid { grid-template-columns: 1fr; }
    .input-group.full { grid-column: span 1; }
    .contact-form { padding: 2rem 1.5rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-logo { height: 50px; }

    /* Sections */
    .section-padding { padding: 70px 0; }

    /* WhatsApp btn */
    .whatsapp-float { bottom: 24px; right: 24px; width: 55px; height: 55px; font-size: 1.6rem; }
}

/* --- Mobile (480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 1.2rem; }

    .nav-container { height: 85px; }
    .nav-logo {
        height: 65px;
        max-width: 240px;
    }

    .hero h1 { font-size: clamp(2rem, 12vw, 3rem); }
    .hero { padding-top: 130px; }

    .about-card { padding: 2rem 1.5rem; }
    .service-card { padding: 2rem 1.5rem; }
    .pricing-cards { flex-direction: column; gap: 1rem; }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .stats { flex-direction: column; gap: 1rem; }

    .quote-card { padding: 1.5rem; }
    .testimonial-wrap { padding: 2rem 1rem; }
}



/* =========================================
   AI Chat Widget
   ========================================= */
.ai-chat-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.ai-chat-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(112, 0, 255, 0.6);
}
.chat-float-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.ai-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 60px);
    height: 500px;
    max-height: calc(100vh - 120px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}
.ai-chat-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
}
.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}
.header-info h4 {
    margin: 0;
    font-size: 1rem;
    color: white;
}
.status-online {
    font-size: 0.8rem;
    color: #4ade80;
}
#close-chat-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
#close-chat-btn:hover {
    opacity: 1;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    color: white;
}

/* Agente de IA: Izquierda, fondo verde suave */
.chat-bubble.ai {
    align-self: flex-start;
    background-color: #2b4c3b; /* soft green */
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Usuario: Derecha, fondo azul suave */
.chat-bubble.user {
    align-self: flex-end;
    background-color: #1e3a5f; /* soft blue */
    border-bottom-right-radius: 2px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-chat-input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--glass-border);
    align-items: center;
}
#ai-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 15px;
    color: white;
    resize: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}
#ai-chat-input:focus {
    border-color: var(--primary);
}
#ai-chat-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}
#ai-chat-send:hover {
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
