/* ============================================================
   Guias públicos (páginas estáticas de SEO)
   ------------------------------------------------------------
   Folha compartilhada pelas páginas HTML puras servidas fora do
   Blazor (/orcamento-para-eletricista/, /orcamento-para-pedreiro/,
   /orcamento-para-pintor/). Elas precisam responder já no primeiro
   byte, sem baixar o runtime WASM nem o MudBlazor — por isso o
   visual da aplicação é reproduzido aqui à mão.

   As cores, raios e sombras são os mesmos tokens usados na landing
   e na Central de Ajuda (ver app.css e Index.razor); ao mudar a
   identidade lá, espelhe aqui. Nenhum JavaScript é usado: o menu
   mobile e o FAQ funcionam com <details>.
   ============================================================ */

:root {
    --teal: #0C6E62;
    --teal-dark: #08544A;
    --teal-mid: #0F8C7C;
    --teal-light: #14A38F;
    --teal-wash: #E1F4F0;
    --teal-line: #C5EDE6;

    --navy: #1C2B3A;
    --ink: #0F172A;
    --ink-2: #334155;
    --muted: #64748B;
    --muted-2: #94A3B8;

    --line: #E2E8F0;
    --bg: #F8FAFC;
    --bg-2: #F1F5F9;

    --green: #059669;
    --green-wash: #ECFDF5;
    --amber: #D97706;
    --amber-wash: #FFFBEB;
    --amber-line: #FED7AA;
    --red: #DC2626;
    --red-wash: #FEF2F2;
    --red-line: #FECACA;

    --radius: 16px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, .10);
    --header-h: 64px;
    --max: 1140px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--teal);
}

    a:focus-visible,
    button:focus-visible,
    summary:focus-visible {
        outline: 2px solid var(--teal);
        outline-offset: 2px;
        border-radius: 6px;
    }

/* Visível apenas para leitores de tela (legendas de tabela, rótulos auxiliares). */
.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;
}

/* Pula direto ao conteúdo (leitores de tela / navegação por teclado). */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #fff;
    color: var(--teal);
    padding: 10px 16px;
    font-weight: 700;
    border-radius: 0 0 10px 0;
}

    .skip-link:focus {
        left: 0;
    }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.wrap--narrow {
    max-width: 820px;
}

/* ---------- Cabeçalho (espelha a MudAppBar fixa) ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

    .brand img {
        width: 30px;
        height: 30px;
        display: block;
    }

.brand__word {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.3px;
    white-space: nowrap;
}

    .brand__word b {
        color: var(--navy);
        font-weight: 800;
    }

    .brand__word i {
        color: var(--teal);
        font-style: normal;
    }

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .nav a {
        color: var(--muted);
        text-decoration: none;
        font-size: .9rem;
        font-weight: 500;
        padding: 8px 12px;
        border-radius: 8px;
    }

        .nav a:hover {
            color: var(--teal);
            background: var(--bg-2);
        }

    /* O CTA não é mais um link da nav: precisa de hierarquia visual sobre os
       vizinhos, senão some na barra branca. Um degrau de tamanho e peso basta —
       o realce de profundidade vem do .btn--primary.

       O `color` aqui é obrigatório, não redundante: `.nav a` (0,1,1) tem
       especificidade maior que `.btn--primary` (0,1,0) e estava pintando o texto
       de cinza (--muted) por cima do degradê teal — daí o botão parecer apagado. */
    .nav .btn--primary {
        margin-left: 10px;
        padding: 10px 18px;
        font-size: .9rem;
        font-weight: 800;
        color: #fff;
    }

        .nav .btn--primary:hover {
            color: #fff;
            background: linear-gradient(180deg, #0C6E62 0%, var(--teal-dark) 100%);
        }

/* Menu mobile sem JavaScript (<details>/<summary>). */
.nav-mobile {
    margin-left: auto;
    position: relative;
}

    .nav-mobile > summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        color: var(--teal);
        font-size: 1.5rem;
        line-height: 1;
    }

        .nav-mobile > summary::-webkit-details-marker {
            display: none;
        }

.nav-mobile__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(78vw, 260px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .nav-mobile__panel a {
        color: var(--ink-2);
        text-decoration: none;
        padding: 10px 12px;
        border-radius: 10px;
        font-weight: 500;
    }

        .nav-mobile__panel a:hover {
            background: var(--bg-2);
        }

    /* No celular o CTA era um link idêntico aos demais — desperdício, já que é
       daqui que vem a maior parte do tráfego. Vira botão de largura total,
       separado do resto por uma divisória. Seletor mais específico que
       `.nav-mobile__panel a` para vencer a cor e o padding herdados de lá. */
    .nav-mobile__panel .btn--primary {
        margin-top: 8px;
        padding: 12px 16px;
        border-top: none;
        color: #fff;
        font-weight: 800;
    }

    .nav-mobile__panel .nav-mobile__sep {
        margin: 6px 4px 2px;
        border-top: 1px solid var(--line);
    }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* Botão de conversão. O teal chapado ficava "apagado" sobre o header branco: sem
   profundidade, lia-se como um bloco inerte em vez de algo clicável. O degradê é
   sutil e vai do claro para o escuro (topo iluminado = volume), a sombra tingida
   descola o botão do fundo e o hover afunda a cor e sobe o elemento.

   Contraste conferido: branco sobre #0F7A6D = 5,2:1 e sobre #0C6E62 = 6,1:1 — os
   dois passam no WCAG AA para texto normal. Clarear mais o topo do degradê derruba
   o contraste abaixo de 4,5:1 (o #0F8C7C da marca dá só 4,1:1), então não subir. */
.btn--primary {
    background: linear-gradient(180deg, #0F7A6D 0%, var(--teal) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(12, 110, 98, .34);
}

    .btn--primary:hover {
        background: linear-gradient(180deg, var(--teal) 0%, var(--teal-dark) 100%);
        box-shadow: 0 8px 22px rgba(12, 110, 98, .44);
        transform: translateY(-1px);
    }

    /* Feedback tátil: o botão "afunda" ao ser pressionado. */
    .btn--primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(12, 110, 98, .36);
    }

/* Seta como dica direcional — avança de leve no hover, reforçando o "siga adiante". */
.btn__arrow {
    display: inline-block;
    transition: transform .2s ease;
}

.btn:hover .btn__arrow {
    transform: translateX(3px);
}

.btn--ghost {
    border-color: var(--teal);
    color: var(--teal);
    background: transparent;
}

    .btn--ghost:hover {
        background: var(--teal-wash);
    }

.btn--light {
    background: #fff;
    color: var(--teal);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .22);
}

    .btn--light:hover {
        background: #fff;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .28);
        transform: translateY(-2px);
    }

    .btn--light:active {
        transform: translateY(0);
        box-shadow: 0 3px 10px rgba(15, 23, 42, .24);
    }

.btn--outline-light {
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

    .btn--outline-light:hover {
        background: rgba(255, 255, 255, .12);
    }

.btn--sm {
    padding: 8px 14px;
    font-size: .875rem;
}

/* ---------- Trilha de navegação ---------- */
.crumbs {
    font-size: .82rem;
    padding: 12px 0 0;
    color: rgba(255, 255, 255, .78);
}

    .crumbs ol {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .crumbs li::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    .crumbs li:last-child::after {
        content: none;
    }

    .crumbs a {
        color: rgba(255, 255, 255, .9);
        text-decoration: none;
    }

        .crumbs a:hover {
            text-decoration: underline;
        }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 55%, var(--teal-light) 100%);
    color: #fff;
    padding-bottom: 40px;
}

.hero__body {
    padding-top: 20px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
}

.hero h1 {
    font-size: clamp(1.75rem, 4.4vw, 2.8rem);
    line-height: 1.15;
    font-weight: 800;
    margin: 14px 0 0;
    letter-spacing: -.5px;
}

.hero__lead {
    color: var(--teal-line);
    font-size: 1.08rem;
    margin: 14px 0 0;
    max-width: 760px;
}

.hero__meta {
    margin-top: 18px;
    font-size: .82rem;
    color: rgba(255, 255, 255, .78);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.hero__cta {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

    /* CTA de conversão acima da dobra, no mesmo padrão da landing: botão branco
       chapado sobre o degradê teal. Sem ele, no celular a única porta de entrada
       para o cadastro fica escondida atrás do menu hambúrguer. */
    .hero__cta .btn--light {
        padding: 13px 24px;
        font-weight: 800;
    }

/* ---------- Corpo do artigo ---------- */
.article {
    padding: 36px 0 8px;
}

    .article h2 {
        font-size: clamp(1.4rem, 3vw, 1.85rem);
        font-weight: 800;
        line-height: 1.25;
        margin: 40px 0 12px;
        scroll-margin-top: calc(var(--header-h) + 16px);
        letter-spacing: -.3px;
    }

    .article h3 {
        font-size: 1.12rem;
        font-weight: 700;
        margin: 26px 0 8px;
        scroll-margin-top: calc(var(--header-h) + 16px);
    }

    .article p {
        margin: 0 0 14px;
    }

    .article ul, .article ol {
        margin: 0 0 16px;
        padding-left: 22px;
    }

    .article li {
        margin-bottom: 8px;
    }

    .article strong {
        color: var(--ink);
    }

/* Sumário no topo do conteúdo. */
.toc {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 8px;
}

    .toc h2 {
        font-size: .78rem !important;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--muted);
        margin: 0 0 10px !important;
        font-weight: 700;
    }

    .toc ol {
        margin: 0;
        padding-left: 20px;
        columns: 2;
        column-gap: 28px;
    }

    .toc li {
        margin-bottom: 6px;
        break-inside: avoid;
    }

    .toc a {
        text-decoration: none;
        font-weight: 500;
    }

        .toc a:hover {
            text-decoration: underline;
        }

/* Caixas de destaque. */
.callout {
    border-radius: 14px;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid var(--line);
    background: var(--bg);
}

    .callout p:last-child {
        margin-bottom: 0;
    }

    .callout__title {
        font-weight: 700;
        margin-bottom: 4px;
        display: block;
    }

.callout--tip {
    background: var(--teal-wash);
    border-color: var(--teal-line);
}

    .callout--tip .callout__title {
        color: var(--teal-dark);
    }

.callout--warn {
    background: var(--amber-wash);
    border-color: var(--amber-line);
}

    .callout--warn .callout__title {
        color: #9A3412;
    }

.callout--risk {
    background: var(--red-wash);
    border-color: var(--red-line);
}

    .callout--risk .callout__title {
        color: #991B1B;
    }

/* ---------- Tabelas de referência ---------- */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: 18px 0 10px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .93rem;
    min-width: 520px;
}

thead th {
    background: var(--bg-2);
    text-align: left;
    font-weight: 700;
    color: var(--ink);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--bg-2);
    vertical-align: top;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background: #FCFDFE;
}

td.num, th.num {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.table-note {
    font-size: .8rem;
    color: var(--muted);
    margin: 0 0 24px;
}

/* ---------- Cartões ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 20px 0 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

    .card h3 {
        margin: 0 0 6px !important;
        font-size: 1rem;
    }

    .card p {
        margin: 0;
        font-size: .92rem;
        color: var(--ink-2);
    }

/* Lista de verificação. */
.checklist {
    list-style: none;
    padding-left: 0;
    margin: 16px 0 22px;
}

    .checklist li {
        position: relative;
        padding-left: 30px;
        margin-bottom: 10px;
    }

        .checklist li::before {
            content: "✓";
            position: absolute;
            left: 0;
            top: 0;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--green-wash);
            color: var(--green);
            font-size: .72rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 4px;
        }

/* Passo a passo numerado (mesmo selo da Central de Ajuda). */
.steps {
    list-style: none;
    counter-reset: passo;
    padding-left: 0;
    margin: 16px 0 24px;
}

    .steps li {
        counter-increment: passo;
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding: 7px 0;
    }

        .steps li::before {
            content: counter(passo);
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--teal);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: .85rem;
            margin-top: 2px;
        }

/* ---------- Modelo de orçamento pronto ---------- */
.modelo {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 20px 0 12px;
    background: #fff;
}

.modelo__head {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
    color: #fff;
    padding: 18px 22px;
}

    .modelo__head strong {
        display: block;
        font-size: 1.05rem;
        color: #fff;
    }

    .modelo__head span {
        font-size: .82rem;
        color: var(--teal-line);
    }

.modelo__body {
    padding: 4px 0 0;
}

.modelo__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--teal-wash);
    border-top: 1px solid var(--teal-line);
    padding: 14px 22px;
    font-weight: 800;
    color: var(--teal-dark);
}

    .modelo__foot span:last-child {
        font-size: 1.25rem;
    }

.modelo__obs {
    padding: 14px 22px 18px;
    font-size: .87rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

    .modelo__obs ul {
        margin: 6px 0 0;
        padding-left: 20px;
    }

    .modelo__obs li {
        margin-bottom: 4px;
    }

.modelo .table-scroll {
    border: none;
    border-radius: 0;
    margin: 0;
}

/* ---------- FAQ (sem JavaScript) ---------- */
.faq {
    margin: 18px 0 8px;
}

.faq__item {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}

    .faq__item > summary {
        cursor: pointer;
        list-style: none;
        padding: 15px 46px 15px 18px;
        font-weight: 700;
        position: relative;
    }

        .faq__item > summary::-webkit-details-marker {
            display: none;
        }

        .faq__item > summary::after {
            content: "+";
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--teal);
            font-size: 1.3rem;
            font-weight: 400;
            line-height: 1;
        }

    .faq__item[open] > summary::after {
        content: "–";
    }

    .faq__item > div {
        padding: 0 18px 16px;
        color: var(--ink-2);
    }

        .faq__item > div p:last-child {
            margin-bottom: 0;
        }

/* ---------- Bloco de conversão ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 55%, var(--teal-light) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 28px;
    margin: 32px 0;
    text-align: center;
}

    .cta-band h2 {
        margin: 0 0 8px !important;
        color: #fff;
        font-size: 1.5rem !important;
    }

    .cta-band p {
        color: var(--teal-line);
        max-width: 620px;
        margin: 0 auto 18px;
    }

.cta-band__note {
    display: block;
    margin-top: 14px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .78);
}

/* ---------- Guias relacionados ---------- */
.related {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 34px 0 40px;
    margin-top: 32px;
}

    .related h2 {
        font-size: 1.3rem;
        font-weight: 800;
        margin: 0 0 16px;
    }

.related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.related__card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

    .related__card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 32px rgba(12, 110, 98, .14);
    }

    .related__card strong {
        display: block;
        margin-bottom: 4px;
    }

    .related__card span {
        font-size: .9rem;
        color: var(--muted);
    }

/* ---------- Rodapé (espelha o rodapé da landing) ---------- */
.site-footer {
    background: var(--navy);
    color: #E2E8F0;
    padding: 40px 0 28px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

/* A marca no rodapé é a variante para fundo escuro (mesma do BrandLogo Dark="true"). */
.site-footer .brand img {
    width: 26px;
    height: 26px;
}

.site-footer .brand__word {
    font-size: 1.05rem;
}

    .site-footer .brand__word b {
        color: #F1F5F9;
    }

    .site-footer .brand__word i {
        color: #2EC4AD;
    }

.site-footer p {
    color: var(--muted-2);
    font-size: .9rem;
    max-width: 380px;
    margin: 12px 0 0;
}

.site-footer h2 {
    font-size: .92rem;
    color: #fff;
    margin: 0 0 10px;
    font-weight: 700;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 7px;
}

.site-footer a {
    color: var(--muted-2);
    text-decoration: none;
    font-size: .9rem;
}

    .site-footer a:hover {
        color: #fff;
        text-decoration: underline;
    }

.site-footer__bar {
    border-top: 1px solid #334155;
    margin-top: 26px;
    padding-top: 18px;
    font-size: .8rem;
    color: #64748B;
}

/* ---------- Responsivo ---------- */
@media (min-width: 861px) {
    .nav-mobile {
        display: none;
    }
}

@media (max-width: 860px) {
    .nav {
        display: none;
    }

    .toc ol {
        columns: 1;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 600px) {
    .article {
        padding-top: 26px;
    }

    .cta-band {
        padding: 24px 18px;
    }

    .hero {
        padding-bottom: 32px;
    }

    /* Mobile primeiro: os botões do topo ocupam a linha inteira em vez de
       disputarem espaço lado a lado, virando alvos de toque confortáveis. */
    .hero__cta {
        gap: 10px;
    }

        .hero__cta .btn {
            width: 100%;
        }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}

/* ---------- Impressão: o modelo de orçamento é feito para ser impresso ---------- */
@media print {
    .site-header, .nav, .nav-mobile, .cta-band, .related, .site-footer, .toc, .hero__cta {
        display: none !important;
    }

    body {
        font-size: 11pt;
    }

    .hero {
        background: none !important;
        color: #000 !important;
        padding: 0;
    }

    .hero h1 {
        color: #000;
    }

    .hero__lead, .crumbs, .hero__meta {
        color: #333 !important;
    }

    .modelo, .table-scroll, .callout, .card {
        break-inside: avoid;
    }

    .faq__item > div {
        display: block !important;
    }
}
