:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --line: #e2e8f0;

    --primary: #0b3d91;
    /* azul serio */
    --primary2: #1d4ed8;
    /* azul vivo */
    --soft: #f1f7ff;
    /* azul muy clarito */
    --shadow: 0 12px 30px rgba(2, 8, 23, .08);

    --radius: 18px;
    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: 74px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

main {
    position: relative;
    overflow: hidden;
}

main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;

    background-image: url("../img/logo.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: 20% 20%;

    opacity: 0.3;
    filter: blur(4px);

    pointer-events: none;
    z-index: 0;
}

main>* {
    position: relative;
    z-index: 1;
}


/* ===================== */
/* NAVBAR  */
/* ===================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    gap: 12px;
}

.brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand span {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 18px;
}

.brand strong {
    font-weight: 800;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 1.2px;
    font-size: 16px;
    color: var(--text);
    color: var(--primary);
}

.brand-sub {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: .2px;
    font-size: 12px;
    color: var(--muted);
}

/* Smart+ estilo premium */
.smart-premium {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #fff !important;
    background: linear-gradient(135deg, #0b3d91, #1d4ed8);
    box-shadow: 0 6px 18px rgba(29, 78, 216, .25);
    transition: .25s ease;
}

.smart-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(29, 78, 216, .35);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.smart-premium.active {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.menu a {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}

.menu a.active {
    color: var(--primary);
    background: var(--soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: .2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--primary2);
    color: #fff !important;
}

.btn-outline {
    border-color: var(--line);
    background: #fff;
}

/* FIX: texto visible en el botón azul */
a.btn.btn-primary,
.btn.btn-primary {
    color: #fff !important;
}

a.btn.btn-primary:hover,
.btn.btn-primary:hover {
    color: #fff !important;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.burger {
    display: none;
}

.mobile {
    display: none;
}

/* ===== */
/* HERO  */
/* ===== */
.hero {
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(29, 78, 216, .10), transparent 60%),
        radial-gradient(1000px 600px at 90% 0%, rgba(11, 61, 145, .10), transparent 55%);
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 30px;
    padding: 56px 0;
    align-items: center;
}

.kicker {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-weight: 700;
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}

.lead {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 18px;
}

.hero-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-card img {
    height: 340px;
    width: 100%;
    object-fit: cover;
}

.hero-card .pad {
    padding: 16px;
}

.hero-card .mini {
    color: var(--muted);
    font-size: 14px;
}

/* ========= */
/* SECTIONS  */
/* ========= */
.section {
    padding: 54px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section h2 {
    margin: 0;
    font-size: 28px;
}

.section p.sub {
    margin: 0;
    color: var(--muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(2, 8, 23, .05);
}

.card .tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--primary);
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 8px;
}

.card h3 {
    margin: 6px 0 8px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
    /* clave */
}

/* ========= */
/* CONTACT   */
/* ========= */
.form {
    display: grid;
    gap: 12px;
}

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-size: 16px;
    outline: none;
}

.input:focus {
    border-color: rgba(29, 78, 216, .45);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}

textarea.input {
    min-height: 140px;
    resize: vertical;
}

.wa-card-btn {
    margin-top: 14px;
    width: 100%;
    justify-content: center;
}

/* Botón estilo WhatsApp oficial */
.btn-whatsapp {
    background: #25D366;
    color: #fff !important;
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

.left-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
}

.left-col .card {
    flex: 1;
}

.help {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--text);
}

.map {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    height: 360px;
}

/* ======= */
/* FOOTER  */
/* ======= */
.footer {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    color: var(--muted);
    font-size: 14px;
}

.footer .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer a {
    color: var(--primary);
    font-weight: 700;
}

/* Respiro abajo para que el WA no estorbe el último contenido */
main {
    padding-bottom: 40px;
}

/* ========================= */
/* WHATSAPP (SVG ORIGINAL)   */
/* ========================= */
.wa-float {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 9999;

    width: 56px;
    height: 56px;
    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);

    transition: transform .2s, border-color .2s;
}

.wa-svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: #25D366;
    transition: fill .2s;
}

.wa-float:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 211, 102, .45);
}

.wa-float:hover .wa-svg {
    fill: #128C7E;
}

/* ============================= */
/* RESPONSIVE (<=920px)          */
/* ============================= */
@media (max-width: 920px) {
    .hero-grid {
        grid-template-columns: 1fr;
        padding: 38px 0;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .menu {
        display: none;
    }

    .burger {
        display: inline-flex;
    }

    .mobile {
        display: none;
        padding: 0 0 14px;
    }

    .mobile.open {
        display: block;
    }

    .mobile a {
        display: block;
        padding: 12px 8px;
        border-top: 1px solid var(--line);
        color: var(--muted);
        font-weight: 700;
    }

    .mobile a.active {
        color: var(--primary);
    }
}

/* WhatsApp un poco más grande y cómodo en móvil */
@media (max-width: 520px) {
    .wa-float {
        width: 60px;
        height: 60px;
    }

    .wa-svg {
        width: 30px;
        height: 30px;
    }
}

/* ============================= */
/* BODY                          */
/* ============================= */
body {
    padding-top: 74px;
}

/* ============================= */
/* SMART                          */
/* ============================= */

/* Smart+ premium: estado ACTIVO (cuando estás en smart.html) */

/* Smart+ en menú móvil */
.smart-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
    color: var(--primary) !important;
}

.smart-badge {
    font-size: 10px;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b3d91, #1d4ed8);
    color: #fff;
    letter-spacing: .5px;
}

.menu a.smart-premium.active,
.mobile a.smart-premium.active {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .25) !important;
}

.menu a.smart-premium.active:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #111827, #1f2937) !important;
}

.smart-hero {
    border: 1px solid rgba(29, 78, 216, .25);
    background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
}

.smart-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 920px) {
    .smart-grid {
        grid-template-columns: 1fr;
    }
}


/* Evita scroll horizontal por desbordes en móvil */
html,
body {
    overflow-x: hidden;
}

/* En Smart+ en particular, que nada se salga */
.smart-grid .card {
    overflow: hidden;
}

/* Header del card CNKT: permite envolver bien */
.range-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    /* <-- clave */
    justify-content: flex-end;
}

/* Gráfica: siempre dentro del card */
.chart-wrap {
    width: 100%;
    overflow: hidden;
}

.chart-wrap canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    display: block;
}

/* Botones más compactos en móvil */
@media (max-width: 520px) {
    .range-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

.chart-wrap {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.range-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.range-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.range-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.range-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Evita que textos largos rompan layout */
.card h3,
.card p {
    overflow-wrap: anywhere;
}


@media (max-width: 520px) {
    .card .range-buttons {
        width: 100%;
        justify-content: flex-start;
        margin-top: 6px;
    }
}