/* qup — base compartida (qupapps.cl y quptraining.cl; el menú y el pie son los de qup Training) (variables de tema, barra superior, pie de página, botón de WhatsApp).
   Cambia aquí y se actualizan TODAS las páginas. Tema: <html data-theme="dark"> (guardado en localStorage 'qup-theme'). */

:root {
    --bg: #ffffff;
    --bg-card: rgba(255,255,255,0.9);
    --bg-card-solid: #ffffff;
    --bg-nav: rgba(255,255,255,0.75);
    --border: #e5e5ea;

    --text: #1d1d1f;
    --text-2: #55555a;
    --text-3: #757579;

    --marca: #0d1d4a;
    --accion: #2c6fc4;
    --accion-hover: #255fa8;
    --accion-texto: #ffffff;
    --acento: #4a90e2;
    --acento-label: #2264c4;
    --acento-titulo: #2264c4;
    --bg-subtle: #f4f5f7;
    --text-muted: var(--text-3);

    --problema-bg: #fafafa;
    --solucion-bg: #eef3fb;
    --mockup-header: #eceef2;
    --testimonio-bg: #fafbfd;
    --testimonio-border: #c7cede;

    --sombra: 0 12px 32px rgba(13,29,74,0.10);
    --radio: 24px;
    /* escala de títulos única (celular → escritorio) */
    --h1-size: 32px;
    --h2-size: 26px;
    --seccion: 96px;
}

html[data-theme="dark"] {
    --bg: #0a0e1a;
    --bg-card: rgba(17,24,39,0.6);
    --bg-card-solid: #111827;
    --bg-nav: rgba(10,14,26,0.65);
    --border: rgba(255,255,255,0.08);

    --text: #e0e4ef;
    --text-2: #94a3b8;
    --text-3: #7b8794;

    --marca: #4a90e2;
    --accion: #4a90e2;
    --accion-hover: #6aa5e8;
    --accion-texto: #0a0e1a;
    --acento: #4a90e2;
    --acento-label: #7eb3f0;
    --acento-titulo: #7eb3f0;
    --bg-subtle: #0d1424;

    --problema-bg: rgba(17,24,39,0.4);
    --solucion-bg: rgba(74,144,226,0.07);
    --mockup-header: #141b2d;
    --testimonio-bg: rgba(17,24,39,0.3);
    --testimonio-border: rgba(255,255,255,0.1);

    --sombra: none;
}

/* Reinicio solo dentro de lo que pone la base */
:where(nav.navbar, .mobile-menu, .qfooter, .whatsapp-fab) { box-sizing: border-box; }
:where(nav.navbar, .mobile-menu, .qfooter) :where(*, *::before, *::after) { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
#qup-nav:empty { min-height: 65px; }
#qup-footer:empty { min-height: 320px; }

        /* ============================================================
           NAV — sticky con blur
           ============================================================ */
        nav.navbar {
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 64px;
            padding: 0 max(72px, calc((100% - 1180px) / 2 + 72px));
            background: var(--bg-nav);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
        }

        .nav-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            font-family: 'Sora', sans-serif;
            font-weight: 700;
            font-size: 17px;
            color: var(--text);
        }

        .nav-logo img { width: 46px; height: auto; display: block; }

        .nav-right {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .nav-links {
            display: flex;
            gap: 2px;
            list-style: none;
        }

        .nav-links a {
            white-space: nowrap;
            display: block;
            color: var(--text-2);
            text-decoration: none;
            font-size: 15px;
            font-weight: 400;
            padding: 8px 12px;
            border-radius: 12px;
            transition: color 0.2s, background 0.2s;
        }

        .nav-links a:hover { color: var(--text); background: var(--bg-subtle); }

        .theme-toggle {
            min-height: 40px;
            margin: 0 6px;
            padding: 8px 16px;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
            background: transparent;
            color: var(--text);
            font-size: 14px;
            font-weight: 400;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            transition: background 0.2s;
        }

        .theme-toggle:hover { background: var(--bg-subtle); }

        /* botón del menú (Entrar / Ver Demos): como el de qup Training */
        nav.navbar .btn-primary {
            padding: 9px 18px;
            font-size: 14px;
            font-weight: 500;
            border-radius: 999px;
            background: var(--accion);
            border: 1px solid transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
        nav.navbar .btn-primary:hover { background: var(--accion-hover); }

        .btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 30px;
            background: rgba(74,144,226,.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            color: var(--accion-texto);
            text-decoration: none;
            border: 1px solid rgba(255,255,255,.15);
            border-radius: var(--radio);
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.2s, transform 0.1s;
        }

        .btn-primary:hover { background: var(--accion); }
        .btn-primary:active { transform: scale(0.97); }


        /* ============================================================
           MENÚ MÓVIL (hamburguesa)
           ============================================================ */
        .hamburger {
            display: none;
            width: 40px;
            height: 40px;
            border: 1px solid var(--border);
            border-radius: var(--radio);
            background: transparent;
            color: var(--text);
            font-size: 20px;
            cursor: pointer;
            align-items: center;
            justify-content: center;
        }

        .mobile-menu {
            position: fixed;
            inset: 0;
            z-index: 999;
            background: rgba(10,14,26,0.7);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 32px;
            opacity: 0;
            pointer-events: none;
            transform: translateY(-10px);
            transition: opacity 0.25s ease, transform 0.25s ease;
        }

        html[data-theme="dark"] .mobile-menu,
        html:not([data-theme]) .mobile-menu {
            background: rgba(10,14,26,0.75);
        }

        .mobile-menu.open {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .mobile-menu a {
            font-family: 'Sora', sans-serif;
            font-size: 26px;
            font-weight: 700;
            color: #fff;
            text-decoration: none;
        }

        .mobile-menu .btn-primary {
            margin-top: 12px;
            font-size: 16px;
            padding: 14px 32px;
        }

        .mobile-menu-close {
            position: absolute;
            top: 20px;
            right: 24px;
            width: 40px;
            height: 40px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 10px;
            background: transparent;
            color: #fff;
            font-size: 20px;
            cursor: pointer;
        }


        /* Mejora 5 — Botón flotante WhatsApp (FAB) */
        .whatsapp-fab {
            position: fixed;
            bottom: 28px;
            right: 28px;
            z-index: 9999;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #25d366;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            box-shadow: 0 4px 20px rgba(37,211,102,0.45);
            transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
            opacity: 0;
            transform: scale(0.75);
            pointer-events: none;
        }
        .whatsapp-fab.visible {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        .whatsapp-fab:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 28px rgba(37,211,102,0.6);
        }
        .whatsapp-fab::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: rgba(37,211,102,0.35);
            animation: wafab-pulse 2.6s ease-out infinite;
        }
        @keyframes wafab-pulse {
            0%   { transform: scale(1);   opacity: 0.7; }
            70%  { transform: scale(1.6); opacity: 0; }
            100% { transform: scale(1.6); opacity: 0; }
        }


/* Estados del botón dentro de páginas con enlaces propios */
.btn-primary:hover { color: var(--accion-texto); }
nav.navbar .nav-logo { color: var(--text); }

/* ============================================================
   PIE DE PÁGINA
   ============================================================ */
.qfooter {
    border-top: 1px solid var(--border);
    background: var(--bg-card-solid);
    padding: 44px 0 26px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-2);
}
.qf-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 72px;
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 32px;
}
.qf-brand img { width: 64px; height: auto; display: block; margin-bottom: 12px; }
.qf-brand p { font-size: 14px; color: var(--text-2); margin: 0 0 4px; max-width: 300px; }
.qf-social { display: flex; gap: 10px; margin-top: 16px; }
.qf-social a {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.qf-social a:hover { color: var(--marca); border-color: color-mix(in srgb, var(--text) 18%, transparent); background: var(--bg); }
.qf-social svg { width: 20px; height: 20px; }
.qf-col h4 {
    font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text); margin-bottom: 14px;
}
.qf-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.qfooter .qf-col a, .qfooter .qf-legal a { font-size: 14px; color: var(--text-2); text-decoration: none; display: inline-block; padding: 5px 0; }
.qfooter .qf-col a:hover, .qfooter .qf-legal a:hover { color: var(--marca); text-decoration: underline; }
.qf-bottom {
    max-width: 1180px; margin: 30px auto 0; padding: 20px 72px 0;
    border-top: 0; position: relative;
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px 24px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-3);
}
.qf-bottom::before { content: ""; position: absolute; top: 0; left: 72px; right: 72px; border-top: 1px solid var(--border); }
.qf-bottom strong { color: var(--text-2); font-weight: 500; }
.qf-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.qfooter .qf-legal a { font-size: 13px; color: var(--text-3); }

/* ============================================================
   RESPONSIVO DE LA BASE
   ============================================================ */
@media (max-width: 1100px) {
    .nav-links a { padding: 8px 8px; font-size: 14px; }
}
@media (max-width: 1000px) { .nav-links { display: none; } .hamburger { display: flex; } }
@media (max-width: 992px) {
    nav.navbar { padding: 0 32px; }
    .theme-toggle { white-space: nowrap; padding: 8px 12px; margin: 0 2px; }
    .qf-inner { grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 0 32px; }
    .qf-bottom { padding: 20px 32px 0; }
    .qf-bottom::before { left: 32px; right: 32px; }
    .qf-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    nav.navbar { padding: 0 20px; }
    .nav-right { gap: 4px; }
    nav.navbar .btn-primary { padding: 9px 14px; font-size: 13px; }
    nav.navbar .theme-toggle { padding: 8px 12px; font-size: 14px; margin: 0 2px; }
    .whatsapp-fab { bottom: 20px; right: 20px; width: 50px; height: 50px; }
    .qf-inner { padding: 0 20px; }
    .qf-bottom { padding: 20px 20px 0; flex-direction: column; align-items: flex-start; }
    .qf-bottom::before { left: 20px; right: 20px; }
}
@media (max-width: 480px) {
    .qf-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   TÍTULOS Y BOTÓN SECUNDARIO COMPARTIDOS
   Usar .qh1 / .qh2 en vez de fijar tamaños en cada página.
   ============================================================ */
@media (min-width: 768px) { :root { --h1-size: 52px; --h2-size: 36px; } }
.qh1 { font-family: 'Sora', 'Inter', sans-serif; font-size: var(--h1-size); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.qh2 { font-family: 'Sora', 'Inter', sans-serif; font-size: var(--h2-size); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.btn-secundario {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 30px; min-height: 44px;
    background: transparent; color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 28%, transparent);
    border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
.btn-secundario:hover { background: var(--bg-subtle); }
.btn-secundario:active { transform: scale(0.97); }
