/* app/static/css/artigos_publicos.css */
.article-page,
.articles-list-page {
    background: #f4f6f8;
}
.article-shell {
    width: min(960px, calc(100% - 32px));
    margin: 34px auto 56px;
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 18px;
    padding: 34px 42px 44px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}
.article-breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    color: #007185;
    font-size: 14px;
    font-weight: 700;
}
.article-breadcrumb a { color: #007185; text-decoration: none; }
.article-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef7f7;
    color: #006b75;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.article-title {
    max-width: 860px;
    margin: 0 0 12px;
    color: #071726;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}
.article-meta {
    margin-bottom: 22px;
    color: #5f6f7f;
    font-size: 14px;
}
.article-hero {
    overflow: hidden;
    margin: 0 0 24px;
    border: 1px solid #dce5ee;
    border-radius: 16px;
    background: #f8fafc;
}
.article-hero img {
    display: block;
    width: 100%;
    max-height: 470px;
    object-fit: cover;
}
.article-description {
    margin: 0 0 24px;
    color: #24384a;
    font-size: 18px;
    line-height: 1.65;
}
.article-content {
    color: #182b3d;
    font-size: 17px;
    line-height: 1.72;
}
.article-content h2 {
    margin: 34px 0 12px;
    color: #071726;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.article-content p { margin: 0 0 16px; }
.article-content ul { margin: 0 0 22px; padding-left: 22px; }
.article-content li { margin-bottom: 9px; }
.article-content a { color: #007185; font-weight: 700; }
.article-note {
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid #cfe2f3;
    border-radius: 14px;
    background: #f6fbff;
}
.article-note strong {
    display: block;
    margin-bottom: 6px;
    color: #0b3a61;
    font-size: 16px;
}
.article-note p { margin: 0; color: #29485f; }
.article-related {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e1e7ee;
}
.article-related h2 { margin: 0 0 16px; font-size: 24px; }
.article-related-grid,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.article-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}
.article-card img {
    width: 120px;
    height: 92px;
    border-radius: 10px;
    object-fit: cover;
    background: #eef2f6;
}
.article-card small { color: #007185; font-weight: 800; text-transform: uppercase; font-size: 11px; }
.article-card strong { display: block; margin-top: 5px; color: #071726; line-height: 1.22; }
.articles-list-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 34px auto 56px;
}
.articles-list-head {
    margin-bottom: 22px;
    padding: 28px 32px;
    border: 1px solid #dce5ee;
    border-radius: 18px;
    background: #ffffff;
}
.articles-list-head h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #071726;
}
.articles-list-head p { margin: 0; color: #415568; font-size: 17px; line-height: 1.55; }
.articles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.articles-grid .article-card { grid-template-columns: 1fr; align-items: start; }
.articles-grid .article-card img { width: 100%; height: 178px; }
@media (max-width: 760px) {
    .article-shell { width: min(100% - 22px, 960px); margin: 18px auto 36px; padding: 22px 18px 30px; border-radius: 14px; }
    .article-title { font-size: clamp(28px, 9vw, 38px); }
    .article-description, .article-content { font-size: 16px; }
    .article-related-grid, .articles-grid { grid-template-columns: 1fr; }
    .article-card { grid-template-columns: 96px 1fr; }
    .article-card img { width: 96px; height: 78px; }
    .articles-grid .article-card { grid-template-columns: 1fr; }
    .articles-list-shell { width: min(100% - 22px, 1160px); margin: 18px auto 36px; }
    .articles-list-head { padding: 22px 18px; }
}


/* Ajuste editorial: cards de artigos sem recorte agressivo de imagem. */
.article-related .article-card img,
.articles-grid .article-card img {
    object-fit: contain;
    padding: 6px;
    background: #f5f9fc;
}

.article-related .article-card,
.articles-grid .article-card {
    overflow: hidden;
}

.article-related .article-card span,
.articles-grid .article-card span {
    min-width: 0;
}

.article-related .article-card strong,
.articles-grid .article-card strong {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .article-related .article-card img {
        object-fit: contain;
        padding: 5px;
    }
}

/* Blocos editoriais compartilhados com o construtor do Admin. */
.article-content .builder-paragrafo {
    margin: 0 0 18px;
}

.article-content .builder-lista {
    margin: 22px 0;
    padding: 18px 20px;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #fbfcfd;
}

.article-content .builder-lista h3,
.article-content .builder-texto-imagem h3,
.article-content .builder-tabela h3,
.article-content .builder-pros-contras h3 {
    margin: 0 0 12px;
    color: #102538;
    font-size: 20px;
    line-height: 1.25;
}

.article-content .builder-lista ul,
.article-content .builder-pros-contras ul {
    margin: 0;
}

.article-content .builder-imagem {
    margin: 26px 0;
}

.article-content .builder-imagem img,
.article-content .builder-texto-imagem img,
.article-content .builder-texto-imagem video,
.article-content .builder-video-local video {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.article-content .builder-imagem img,
.article-content .builder-texto-imagem img {
    width: min(100%, 560px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f7f9fb;
}

.article-content .builder-video,
.article-content .builder-video-local {
    margin: 26px 0;
}

.article-content .builder-video {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 14px;
    background: #0b1220;
}

.article-content .builder-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-content .builder-texto-imagem {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 28px;
    align-items: center;
    margin: 28px 0;
    padding: 22px;
    border: 1px solid #dce5ee;
    border-radius: 16px;
    background: #fbfcfd;
}

.article-content .builder-texto-imagem.pc-direita .ti-texto { order: 1; }
.article-content .builder-texto-imagem.pc-direita .ti-imagem { order: 2; }
.article-content .builder-texto-imagem.pc-esquerda .ti-imagem { order: 1; }
.article-content .builder-texto-imagem.pc-esquerda .ti-texto { order: 2; }
.article-content .builder-texto-imagem--sem-midia { grid-template-columns: 1fr; }
.article-content .builder-texto-imagem--sem-midia .ti-texto { order: 1; }
.article-content .ti-texto-content { line-height: 1.72; }
.article-content .ti-imagem { text-align: center; }

.article-content .builder-tabela {
    margin: 28px 0;
    padding: 20px;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #fff;
}

.article-content .builder-tabela dl { margin: 0; }
.article-content .builder-spec-item {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr);
    gap: 18px;
    padding: 11px 0;
    border-top: 1px solid #edf1f4;
}
.article-content .builder-spec-item:first-child { border-top: 0; }
.article-content .builder-spec-item dt { font-weight: 800; color: #20384d; }
.article-content .builder-spec-item dd { margin: 0; color: #4b5f72; }

.article-content .builder-pros-contras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0;
}
.article-content .builder-pros-box,
.article-content .builder-contras-box {
    padding: 20px;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #fff;
}
.article-content .builder-pros-box { border-top: 4px solid #2f7d4a; }
.article-content .builder-contras-box { border-top: 4px solid #b66a2f; }

.article-content .builder-cta-block {
    display: flex;
    margin: 24px 0;
}
.article-content .builder-cta-block.align-left { justify-content: flex-start; }
.article-content .builder-cta-block.align-center { justify-content: center; }
.article-content .builder-cta-block.align-right { justify-content: flex-end; }
.article-content .article-editorial-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 999px;
    background: #0f7a35;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}
.article-content .article-editorial-cta--secondary { background: #0056b3; }

@media (max-width: 760px) {
    .article-content .builder-texto-imagem,
    .article-content .builder-pros-contras {
        grid-template-columns: 1fr;
    }
    .article-content .builder-texto-imagem.mobile-topo .ti-imagem { order: 1; }
    .article-content .builder-texto-imagem.mobile-topo .ti-texto { order: 2; }
    .article-content .builder-texto-imagem.mobile-baixo .ti-texto { order: 1; }
    .article-content .builder-texto-imagem.mobile-baixo .ti-imagem { order: 2; }
    .article-content .builder-texto-imagem--sem-midia .ti-texto { order: 1; }
    .article-content .builder-spec-item { grid-template-columns: 1fr; gap: 3px; }
}
