@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0f172a;       /* Azul oscuro (Casi negro) */
    --accent: #2563eb;        /* Azul eléctrico */
    --accent-dark: #1d4ed8;
    --text-dark: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

/* HEADER */
header {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}
.logo a { text-decoration: none; display: flex; align-items: center; color: var(--primary); font-weight: 800; font-size: 1.5rem; }
.logo img { height: 40px; margin-right: 10px; }

nav ul { list-style: none; display: flex; gap: 30px; }
nav ul li a { text-decoration: none; color: var(--primary); font-weight: 500; transition: color 0.3s; }
nav ul li a:hover { color: var(--accent); }

/* HERO (Portada) */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%); /* Si tienes imagen de fondo, ponla aquí */
    color: white;
    padding: 8rem 2rem;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; line-height: 1.2; font-weight: 700; }
.hero p { font-size: 1.2rem; color: #cbd5e1; max-width: 700px; margin: 0 auto 2.5rem; }
.btn-primary {
    display: inline-block; background: var(--accent); color: white;
    padding: 14px 35px; border-radius: 6px; text-decoration: none; font-weight: 600;
    transition: background 0.3s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); }

/* SECCIONES */
.section-padding { padding: 6rem 5%; }
.bg-light { background-color: var(--bg-light); }

/* NOSOTROS (Grid Texto + Imagen) */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.about-text h3 { font-size: 2rem; color: var(--primary); margin-bottom: 1.5rem; }
.about-text p { margin-bottom: 1rem; color: var(--text-light); }
.check-list li { list-style: none; margin-bottom: 10px; font-weight: 500; }
.check-list i { color: var(--accent); margin-right: 10px; }

/* SERVICIOS */
.container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.2rem; color: var(--primary); }
.section-title span { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

.grid-servicios { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card-link { text-decoration: none; color: inherit; height: 100%; display: block; }

/* Diseño de Tarjeta estilo "Industrial Clean" */
.card-servicio {
    background: white; padding: 2.5rem; border-radius: 12px;
    border: 1px solid #e2e8f0; transition: all 0.3s ease;
    height: 100%; display: flex; flex-direction: column;
}
.card-link:hover .card-servicio {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
}
.icono { font-size: 2.5rem; color: var(--accent); margin-bottom: 1.5rem; }
.card-servicio h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary); }
.card-servicio p { color: var(--text-light); font-size: 0.95rem; }

/* CTA STRIP (Franja Azul) */
.cta-section {
    background: var(--accent); color: white; text-align: center; padding: 4rem 2rem;
}
.cta-section h2 { color: white; margin-bottom: 1rem; }
.btn-white {
    background: white; color: var(--accent); padding: 12px 30px; border-radius: 6px;
    text-decoration: none; font-weight: 700; display: inline-block; margin-top: 1rem;
}

/* FOOTER OSCURO */
footer { background: var(--primary); color: #cbd5e1; padding: 4rem 5% 2rem; }
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; max-width: 1200px; margin: 0 auto 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 3rem;
}
.footer-col h4 { color: white; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; }
.footer-col ul li a { text-decoration: none; color: #94a3b8; transition: color 0.3s; display: block; margin-bottom: 8px; }
.footer-col ul li a:hover { color: white; }

/* CHATBOT */
#chatbot-widget {
    position: fixed; bottom: 20px; right: 20px; width: 340px;
    background: white; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 9999; overflow: hidden; border: 1px solid #e2e8f0; font-family: 'Poppins', sans-serif;
}
#chat-header { background: var(--primary); color: white; padding: 15px; cursor: pointer; display: flex; justify-content: space-between; font-weight: 600; }
#chat-body { display: none; flex-direction: column; }
#chat-messages { height: 300px; padding: 15px; background: #f8fafc; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bot-msg { align-self: flex-start; background: white; padding: 8px 12px; border-radius: 8px; max-width: 85%; border: 1px solid #e2e8f0; font-size: 0.9rem; }
.user-msg { align-self: flex-end; background: var(--accent); color: white; padding: 8px 12px; border-radius: 8px; max-width: 85%; font-size: 0.9rem; }
#chat-input-area { padding: 10px; background: white; border-top: 1px solid #e2e8f0; display: flex; gap: 5px; }
#chat-input-area input { flex: 1; padding: 8px; border: 1px solid #cbd5e1; border-radius: 4px; outline: none; }
#chat-input-area button { width: 35px; background: var(--primary); color: white; border: none; border-radius: 4px; cursor: pointer; }