/* ==========================================================================
   article.css — tipografia de texto longo (blog e paginas institucionais)

   POR QUE ESTE ARQUIVO EXISTE:
   os templates usavam "prose prose-lg", classes do plugin @tailwindcss/typography.
   O plugin NAO esta instalado (tailwind.config.js tem plugins: []), entao essas
   classes nunca existiram no output.css — eram texto morto. Resultado: o preflight
   do Tailwind zerava h2/h3 (font-size: inherit; font-weight: inherit) e a margem
   dos <p>, e o artigo inteiro saia como um bloco unico sem hierarquia.

   Este arquivo resolve sem depender de build do Tailwind. Aplique a classe
   .article-body no container do conteudo (o que recebe o HTML do post).

   Nao define font-family de proposito: herda o tema ativo do base.html
   (Inter / Poppins / Playfair Display conforme o tema do site).
   ========================================================================== */

.article-body {
    font-size: 1.125rem;      /* 18px */
    line-height: 1.75;
    color: #374151;
    max-width: none;
}

/* ---- Paragrafos ---- */
.article-body p {
    margin: 0 0 1.35em;
}

.article-body > *:first-child {
    margin-top: 0;
}

.article-body > *:last-child {
    margin-bottom: 0;
}

/* ---- Titulos de secao ----
   O respiro ANTES do titulo e maior que o DEPOIS de proposito: e isso que
   agrupa visualmente o titulo com o texto dele e separa das secoes vizinhas. */
.article-body h2 {
    font-size: 1.75rem;       /* 28px */
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin: 2.75rem 0 0.9rem;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.article-body h3 {
    font-size: 1.25rem;       /* 20px */
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    margin: 2rem 0 0.6rem;
    text-wrap: balance;
}

.article-body h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1f2937;
    margin: 1.75rem 0 0.5rem;
}

/* ---- Listas ----
   O preflight do Tailwind aplica list-style: none em ul/ol, entao os marcadores
   precisam ser devolvidos explicitamente. */
.article-body ul,
.article-body ol {
    margin: 1.25rem 0 1.5rem;
    padding-left: 1.5rem;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
    padding-left: 0.25rem;
}

.article-body li:last-child { margin-bottom: 0; }

.article-body li::marker {
    color: var(--primary-color, #0095D0);
}

.article-body li > ul,
.article-body li > ol {
    margin: 0.6rem 0 0.25rem;
}

/* ---- Enfase ---- */
.article-body strong,
.article-body b {
    font-weight: 600;
    color: #111827;
}

.article-body em { font-style: italic; }

.article-body a {
    color: var(--primary-color, #0095D0);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    font-weight: 500;
}

.article-body a:hover {
    text-decoration-thickness: 2px;
}

/* ---- Blocos ---- */
.article-body blockquote {
    margin: 1.75rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--primary-color, #0095D0);
    color: #4b5563;
    font-style: italic;
}

.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.75rem 0;
}

.article-body figure { margin: 1.75rem 0; }

.article-body figcaption {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.6rem;
}

/* Tabelas longas rolam dentro do proprio bloco em vez de esticar a pagina */
.article-body table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}

.article-body th,
.article-body td {
    border: 1px solid #e5e7eb;
    padding: 0.6rem 0.85rem;
    text-align: left;
}

.article-body th {
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.article-body code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 0.3rem;
    font-size: 0.9em;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
    .article-body {
        font-size: 1.0625rem;   /* 17px */
        line-height: 1.7;
    }

    .article-body h2 {
        font-size: 1.5rem;      /* 24px */
        margin: 2.25rem 0 0.75rem;
    }

    .article-body h3 {
        font-size: 1.1875rem;   /* 19px */
        margin: 1.75rem 0 0.5rem;
    }

    .article-body ul,
    .article-body ol {
        padding-left: 1.25rem;
    }
}
