* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores corporativos TandyWeb actualizados */
    --primary: #6b2e9b;       /* Morado */
    --primary-dark: #512275;  /* Morado oscuro para hovers */
    --secondary: #40e0d0;     /* Turquesa */
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f7f6;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* CTA tipo botón: Iniciar sesión en navbar */
.nav-links a.nav-login-btn {
    background: #6b2e9b;
    color: #fff !important;
    padding: 0.55rem 1.35rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(107, 46, 155, 0.35);
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.nav-links a.nav-login-btn:hover {
    background: var(--primary-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(107, 46, 155, 0.45);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Botones Modernos */
.btn-primary, .btn-secondary, .btn-plan, .btn-demo {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    margin: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(107, 46, 155, 0.3);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-plan {
    background: var(--primary);
    color: white;
    text-align: center;
    display: block;
    margin: 1rem;
}
.btn-plan:hover {
    background: var(--primary-dark);
}

/* CARRUSEL HERO (NUEVO) */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
    background-color: var(--dark);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide-content h1 span {
    color: var(--secondary);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 300;
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.pause-play-btn {
    background: var(--dark);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.pause-play-btn:hover {
    background: var(--primary);
}

.dot-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.dot {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: #999;
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s;
}

.dot::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.dot.active { color: var(--primary); }
.dot.active::after { width: 100%; }

/* Secciones generales */
.plans, .demo, .contacto {
    padding: 5rem 0;
    background-color: var(--light);
}

.plans:nth-child(even), .demo:nth-child(even), .contacto:nth-child(even) {
    background-color: var(--gray);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto;
    border-radius: 2px;
}

/* Planes */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.plan-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
    border: 1px solid #eaeaea;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.popular {
    border: 2px solid var(--primary);
}

.popular-badge {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-header {
    background: var(--dark);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.plan-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: white;
}

.plan-features {
    list-style: none;
    padding: 2rem 1.5rem;
}

.plan-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.plan-features i.fa-check { color: var(--secondary); }
.plan-features i.fa-times { color: #dc3545; }

/* Demo */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid #eaeaea;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.demo-card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.demo-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.btn-demo {
    background: var(--secondary);
    color: var(--dark);
    display: inline-block;
    margin-top: 1.5rem;
}

.btn-demo:hover {
    background: #33b8a8;
}

/* Contacto */
.contacto {
    background: var(--dark);
    color: white;
}

.contacto .section-title {
    color: white;
}

.contacto-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* Chatbot */
.chatbot-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    font-weight: 600;
    transition: transform 0.3s;
}
.chatbot-btn:hover { transform: scale(1.05); }

.chatbot-modal {
    display: none;
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1001;
    overflow: hidden;
}

.chatbot-header {
    background: var(--gradient);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chatbot {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s;
}

#close-chatbot:hover {
    transform: scale(1.2);
}

.chatbot-body {
    padding: 20px;
}

.chatbot-body .form-group {
    margin-bottom: 15px;
}

.chatbot-body input, .chatbot-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    font-family: inherit;
    background: #f9f9f9;
}

.chatbot-body input:focus, .chatbot-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.chatbot-body button {
    width: 100%;
}

.chatbot-mensaje {
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: left; /* Mejor para leer textos largos */
    max-height: 250px; /* Límite de altura para que aparezca el scroll */
    overflow-y: auto; /* Habilita el scroll vertical */
    white-space: pre-wrap; /* Respeta los saltos de línea de la IA */
    padding-right: 10px; /* Evita que el texto choque con la barra */
    color: var(--dark);
}

/* Estilo personalizado para la barrita de scroll */
.chatbot-mensaje::-webkit-scrollbar {
    width: 6px;
}
.chatbot-mensaje::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        text-align: center;
        padding: 10px 0;
    }
    .mobile-menu {
        display: block;
    }
    .slide-content h1 {
        font-size: 2.2rem;
    }
    .hero-carousel {
        height: 60vh;
    }
    .plans-grid {
        grid-template-columns: 1fr;
    }
}