/* ============================================================
   whitepaper.css — Estilos para documentos técnicos / guías
   ignaciobravo.com
   ============================================================ */

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #263348;
    --primary: #00a0e4;
    --primary-hover: #0086c3;
    --text-main: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Outfit', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SITE TOPBAR — Barra de navegación propia del whitepaper
   (independiente del article, no aparece en print)
   ============================================================ */
.wp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.wp-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.25s;
}

.wp-topbar-back:hover { color: var(--text-main); }

.wp-topbar-back svg {
    flex-shrink: 0;
    transition: transform 0.25s;
}

.wp-topbar-back:hover svg { transform: translateX(-3px); }

.wp-topbar-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-topbar-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.25s;
}

.wp-topbar-nav a:hover { color: var(--text-main); }

.wp-topbar-print {
    background: var(--primary);
    color: #020617;
    border: none;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.wp-topbar-print:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* ============================================================
   DOCUMENT WRAPPER
   ============================================================ */
.document-wrapper {
    max-width: 820px;
    margin: 60px auto;
    padding: 60px 80px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
}

/* ============================================================
   DOCUMENT HEADER
   ============================================================ */
.document-eyebrow {
    display: block;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.document-title {
    font-family: var(--font-accent);
    font-size: 2.6rem;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #fff;
}

.document-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

/* ============================================================
   HEADINGS
   ============================================================ */
h1 {
    font-family: var(--font-accent);
    font-size: 2.6rem;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #fff;
}

h2 {
    font-family: var(--font-accent);
    color: var(--primary);
    font-size: 1.75rem;
    margin: 56px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 160, 228, 0.2);
}

h3 {
    font-family: var(--font-accent);
    font-size: 1.2rem;
    color: #e2e8f0;
    margin: 32px 0 14px;
}

/* ============================================================
   BODY TEXT
   ============================================================ */
p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
}

ul, ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

li {
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.7;
}

strong { color: var(--text-main); }

em { color: var(--text-muted); }

/* ============================================================
   CALLOUT / QUOTE
   ============================================================ */
.callout {
    background: rgba(0, 160, 228, 0.06);
    border-left: 4px solid var(--primary);
    padding: 28px 32px;
    margin: 48px 0;
    border-radius: 0 12px 12px 0;
}

.callout p {
    margin: 0;
    color: #e2e8f0;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ============================================================
   TABLE — Características vs Beneficios
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0 40px;
    font-size: 0.95rem;
}

thead {
    background: rgba(0, 160, 228, 0.12);
}

th {
    text-align: left;
    padding: 14px 18px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(0, 160, 228, 0.3);
}

td {
    padding: 14px 18px;
    color: var(--text-body);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.6;
    font-size: 0.95rem;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   FAQ SECTION (GEO / LLMO)
   ============================================================ */
.faq-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 8px 0 32px;
}

.faq-section p {
    margin: 0;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
}

.faq-section p:last-child {
    border-bottom: none;
}

.faq-section strong {
    display: block;
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

/* ============================================================
   AUTHOR NOTE
   ============================================================ */
.document-author-note {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================================
   PRINT STYLES — PDF limpio
   ============================================================ */
@media print {
    body {
        background: #fff;
        color: #111;
        font-size: 10.5pt;
        line-height: 1.6;
    }

    .wp-topbar {
        display: none !important;
    }

    .document-wrapper {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-width: 100%;
        background: #fff;
    }

    h1, .document-title {
        color: #000;
        font-size: 22pt;
        page-break-after: avoid;
    }

    h2 {
        color: #0055a5;
        font-size: 14pt;
        page-break-after: avoid;
        border-bottom-color: #cce4f7;
    }

    h3 {
        color: #111;
        font-size: 11pt;
        page-break-after: avoid;
    }

    .document-eyebrow {
        color: #0055a5;
    }

    .document-subtitle {
        color: #444;
        border-bottom-color: #ccc;
    }

    p, li, td {
        color: #222;
        page-break-inside: avoid;
    }

    .callout {
        background: #f0f8ff;
        border-left-color: #0055a5;
        border-radius: 0;
    }

    .callout p { color: #111; }

    table {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        font-size: 9pt;
    }

    th {
        background: #e6f2fa;
        color: #0055a5;
        border-bottom: 1px solid #ccc;
    }

    td { border-bottom: 1px solid #ddd; }

    .document-author-note {
        color: #555;
        border-top-color: #ccc;
    }

    .faq-section p { border-bottom-color: #ddd; }

    @page {
        margin: 2cm 2.5cm;
        size: A4;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .document-wrapper {
        margin: 24px 16px;
        padding: 36px 28px;
        border-radius: 12px;
    }

    .wp-topbar {
        padding: 12px 20px;
        gap: 12px;
    }

    .wp-topbar-nav { display: none; }

    h1, .document-title { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.1rem; }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .document-wrapper { padding: 28px 20px; }
    h1, .document-title { font-size: 1.7rem; }
    .document-subtitle { font-size: 1rem; }
    p, li, td { font-size: 0.97rem; }
}
