/* ─────────────────────────────────────────────────────────
   RepFit — Central de Ajuda
   Tokens e componentes alinhados com o index.html da landing.
   ───────────────────────────────────────────────────────── */

:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-900: #1e3a8a;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-150: #e8edf3;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --primary: var(--blue-600);
    --text: var(--slate-900);
    --text-muted: var(--slate-600);
    --text-subtle: var(--slate-500);
    --border: var(--slate-150);
    --bg: #ffffff;
    --bg-soft: var(--slate-50);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

html, body {
    margin: 0; padding: 0;
    font-family: "Geist", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 28px; flex: 1; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 16px;
    border-radius: 8px;
    font-size: 14px; font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 150ms;
    letter-spacing: -0.005em;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-outline { background: #fff; border-color: var(--slate-200); color: var(--text); }
.btn-outline:hover { border-color: var(--slate-300); background: var(--slate-50); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; font-weight: 600; }

/* ── Cabeçalho da central ────────────────────────────── */
.help-hero {
    position: relative; overflow: hidden;
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%);
    text-align: center;
}
.help-hero h1 {
    font-size: 46px; line-height: 1.08; font-weight: 700;
    letter-spacing: -0.035em; margin: 0 0 16px;
}
.help-hero .desc {
    font-size: 17px; color: var(--text-muted);
    max-width: 560px; margin: 0 auto; line-height: 1.55;
}
.eyebrow {
    font-size: 12.5px; font-weight: 600; color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px;
}

/* ── Busca ───────────────────────────────────────────── */
.search { position: relative; max-width: 560px; margin: 32px auto 0; }
.search svg {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none;
}
.search input {
    width: 100%; height: 52px;
    padding: 0 16px 0 46px;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    background: #fff;
    font-size: 16px; color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 150ms, box-shadow 150ms;
}
.search input::placeholder { color: var(--slate-400); }
.search input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px var(--blue-100);
}
.search-results {
    margin-top: 12px; text-align: left;
    border: 1px solid var(--border); border-radius: 12px;
    background: #fff; overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.search-results[hidden] { display: none; }
.search-results a {
    display: block; padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--slate-50); }
.search-results strong { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.search-results span { display: block; font-size: 13px; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
.search-results .sr-topic { font-size: 11.5px; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
.search-empty { padding: 18px; font-size: 14px; color: var(--text-muted); }

/* ── Seções ──────────────────────────────────────────── */
.section { padding: 72px 0; }
.section h2 {
    font-size: 30px; line-height: 1.15; font-weight: 700;
    letter-spacing: -0.03em; margin: 0 0 8px;
}
.section .desc { font-size: 16px; color: var(--text-muted); margin: 0 0 36px; }

/* ── Cards de tópico ─────────────────────────────────── */
.topics-section { padding-top: 56px; }
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card {
    display: block; padding: 24px;
    border: 1px solid var(--border); border-radius: 14px;
    background: #fff;
    transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}
.topic-card:hover {
    border-color: var(--slate-300);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}
.topic-card .ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--blue-50); font-size: 20px; margin-bottom: 14px;
}
.topic-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.topic-card p { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }
.topic-card .count { font-size: 12.5px; font-weight: 600; color: var(--primary); }

/* ── Lista de perguntas ──────────────────────────────── */
.q-list { border-top: 1px solid var(--border); }
.q-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em;
    transition: color 150ms, padding-left 150ms;
}
.q-list a:hover { color: var(--primary); padding-left: 10px; }
.q-list a .tag {
    flex-shrink: 0; font-size: 11.5px; font-weight: 600;
    color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Breadcrumb ──────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--text-subtle); padding: 24px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; }
.crumbs a:hover { color: var(--primary); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--slate-300); }
.crumbs [aria-current="page"] { color: var(--text-muted); }

/* ── Layout do tópico ────────────────────────────────── */
.topic-head { padding: 20px 0 36px; border-bottom: 1px solid var(--border); }
.topic-head .ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--blue-50); font-size: 24px; margin-bottom: 16px;
}
.topic-head h1 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; margin: 0 0 12px; }
.topic-head p { font-size: 17px; color: var(--text-muted); margin: 0; max-width: 640px; line-height: 1.55; }

.doc { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 44px 0 24px; align-items: start; }
.doc-side { position: sticky; top: 88px; }
.doc-side h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-subtle); margin: 0 0 12px; font-weight: 600;
}
.doc-side nav a {
    display: block; font-size: 13.5px; color: var(--text-muted);
    padding: 6px 0 6px 12px; line-height: 1.45;
    border-left: 2px solid var(--border);
}
.doc-side nav a:hover { color: var(--text); border-left-color: var(--slate-300); }
.doc-side .side-block + .side-block { margin-top: 32px; }
.doc-side .side-topics a { border-left: 0; padding-left: 0; display: flex; gap: 8px; align-items: center; }

/* ── Artigo ──────────────────────────────────────────── */
.article { padding-bottom: 48px; border-bottom: 1px solid var(--border); margin-bottom: 48px; scroll-margin-top: 88px; }
.article:last-child { border-bottom: 0; margin-bottom: 0; }
.article h2 {
    font-size: 26px; line-height: 1.2; font-weight: 700;
    letter-spacing: -0.03em; margin: 0 0 10px; scroll-margin-top: 88px;
}
.article .summary { font-size: 16px; color: var(--text-muted); margin: 0 0 22px; line-height: 1.6; }
.article h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 32px 0 10px; }
.article p { font-size: 16px; color: var(--slate-700); line-height: 1.7; margin: 0 0 16px; }
.article strong { color: var(--text); font-weight: 600; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px; }
.article li { font-size: 16px; color: var(--slate-700); line-height: 1.7; margin-bottom: 6px; }
.article ol { counter-reset: step; list-style: none; padding-left: 0; }
.article ol > li {
    position: relative; padding-left: 38px; margin-bottom: 12px; counter-increment: step;
}
.article ol > li::before {
    content: counter(step);
    position: absolute; left: 0; top: 1px;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--blue-50); color: var(--primary);
    font-size: 12.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.article a:not(.btn) { color: var(--primary); font-weight: 500; }
.article a:not(.btn):hover { text-decoration: underline; }
.article code {
    font-family: "Geist Mono", monospace; font-size: 0.9em;
    background: var(--slate-100); border: 1px solid var(--border);
    border-radius: 5px; padding: 1px 5px;
}
/* Tabela rola dentro do próprio container: a página nunca rola na horizontal. */
.article .table-wrap { overflow-x: auto; margin: 0 0 20px; }
.article table { border-collapse: collapse; width: 100%; min-width: 380px; font-size: 15px; }
.article thead th {
    text-align: left; font-weight: 600; color: var(--text);
    padding: 10px 14px; background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200); white-space: nowrap;
}
.article tbody td {
    padding: 10px 14px; color: var(--slate-700);
    border-bottom: 1px solid var(--border); line-height: 1.55;
}
.article tbody tr:last-child td { border-bottom: 0; }
.article table th:first-child, .article table td:first-child { padding-left: 0; }

.article figure { margin: 24px 0; }
.article figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; }
.article figcaption { font-size: 13px; color: var(--text-subtle); margin-top: 8px; }
.article .callout {
    border: 1px solid var(--border); border-left: 3px solid var(--primary);
    background: var(--slate-50); border-radius: 8px;
    padding: 14px 18px; margin: 0 0 16px;
}
.article .callout.warning { border-left-color: #f59e0b; background: #fffbeb; }
.article .callout p:last-child { margin-bottom: 0; }
.article-foot { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.article-foot a { font-size: 13px; color: var(--text-subtle); font-weight: 500; }
.article-foot a:hover { color: var(--primary); }

/* ── Navegação entre tópicos ─────────────────────────── */
.doc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0 0; }
.doc-nav a {
    border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
    transition: border-color 150ms, background 150ms;
}
.doc-nav a:hover { border-color: var(--slate-300); background: var(--slate-50); }
.doc-nav a.next { text-align: right; grid-column: 2; }
.doc-nav .lbl { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); font-weight: 600; margin-bottom: 5px; }
.doc-nav .ttl { font-size: 15.5px; font-weight: 600; letter-spacing: -0.015em; }

/* ── CTA de contato ──────────────────────────────────── */
.help-cta {
    margin-top: 64px;
    background: linear-gradient(120deg, var(--blue-700), var(--blue-600) 60%, var(--blue-500));
    border-radius: 18px; padding: 44px 40px; color: #fff; text-align: center;
}
.help-cta h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 10px; }
.help-cta p { font-size: 16px; margin: 0 auto 24px; max-width: 460px; color: rgba(255, 255, 255, 0.88); line-height: 1.55; }
.help-cta .btn-primary { background: #fff; color: var(--blue-700); font-weight: 600; }
.help-cta .btn-primary:hover { background: var(--blue-50); }
.help-cta .btn-outline { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.help-cta .btn-outline:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }
.help-cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Botão branco com o ícone na cor do WhatsApp: destaca sem brigar
   com o gradiente azul do bloco. */
.btn-whatsapp { background: #fff; color: var(--slate-900); font-weight: 600; }
.btn-whatsapp:hover { background: var(--slate-100); }
.btn-whatsapp svg { color: #25d366; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────── */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    margin-top: 80px;
}
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.foot-brand p { font-size: 13.5px; color: var(--text-muted); margin: 12px 0 0; max-width: 280px; line-height: 1.55; }
.foot-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); margin: 0 0 14px; font-weight: 600; }
.foot-col a { display: block; font-size: 13.5px; color: var(--text-muted); padding: 4px 0; }
.foot-col a:hover { color: var(--text); }
.foot-bottom {
    border-top: 1px solid var(--border); padding-top: 22px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: var(--text-subtle);
}
.foot-social { display: flex; gap: 8px; }
.foot-social a {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 12px; border-radius: 8px;
    background: var(--slate-100); color: var(--text-muted);
    font-size: 13px; font-weight: 500;
}
.foot-social a:hover { background: var(--slate-150); color: var(--text); }

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 980px) {
    .doc { grid-template-columns: 1fr; gap: 32px; }
    .doc-side { position: static; }
    .doc-side nav { columns: 2; column-gap: 24px; }
    .topics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .nav-links { display: none; }
    .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .help-hero { padding: 52px 0 40px; }
    .help-hero h1 { font-size: 34px; }
    .topic-head h1 { font-size: 30px; }
    .section { padding: 52px 0; }
    .section h2 { font-size: 24px; }
    .article h2 { font-size: 22px; }
    .topics { grid-template-columns: 1fr; }
    .doc-side nav { columns: 1; }
    .doc-nav { grid-template-columns: 1fr; }
    .doc-nav a.next { grid-column: 1; text-align: left; }
    .help-cta { padding: 32px 22px; }
    .foot { grid-template-columns: 1fr; gap: 28px; }
    .foot-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
    .nav-cta .btn-ghost { display: none; }
}
