/* ==========================================================================
   VARIÁVEIS TEMA E BASE (PADRÃO PÁGINA INICIAL)
   ========================================================================== */
:root {
    --primary: #1a237e; 
    --secondary: #2e7d32; 
    --bg: #ffffff;
    --card: #ffffff; 
    --text-main: #1c1c1c; 
    --text-muted: #575757;
    --radius: 14px;
    --whatsapp: #25d366;
    --accent-fire: #e65100;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    background-color: var(--bg); 
    color: var(--text-main); 
    line-height: 1.6; 
    transition: background-color 0.3s; 
    margin: 0;
}

body.dark-mode { 
    --bg: #121212; 
    --card: #1e1e1e; 
    --text-main: #f0f0f0; 
    --text-muted: #b5b5b5; 
}

/* Acessibilidade e Utilitários */
.sr-only {
    position: absolute; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px;
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    border: 0;
}

/* Espaçamento do Conteúdo Principal */
main { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 75px 16px 50px; 
    min-height: 80vh; 
}

/* ==========================================================================
   CABEÇALHO DA NOTÍCIA & METADADOS
   ========================================================================== */
.breadcrumb { 
    font-size: 12px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: var(--secondary); 
    margin-bottom: 10px; 
    letter-spacing: 0.5px; 
}

.breadcrumb a { 
    text-decoration: none; 
    color: inherit; 
}

.noticia-titulo { 
    font-size: 1.5rem; /* Ajustado de 26px para um tamanho equilibrado */
    font-weight: 800; 
    line-height: 1.25; 
    margin-bottom: 10px; 
    color: var(--primary); 
}

body.dark-mode .noticia-titulo { 
    color: #ffffff; 
}

.noticia-meta { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 13px; 
    color: var(--text-muted); 
    margin-bottom: 15px; 
    border-bottom: 1px solid rgba(0,0,0,0.08); 
    padding-bottom: 10px; 
}

body.dark-mode .noticia-meta {
    border-bottom-color: rgba(255,255,255,0.08);
}

.meta-item { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

.meta-item i { 
    color: var(--secondary); 
}

.meta-item a { 
    color: inherit; 
    text-decoration: none; 
    font-weight: 600; 
}

.meta-item a:hover { 
    color: var(--secondary); 
}

/* ==========================================================================
   BANNERS CALL-TO-ACTION (IDÊNTICOS À PÁGINA INICIAL)
   ========================================================================== */
.mid-section-community,
.mid-section-collab {
    margin: 15px 0 20px;
    background: var(--card);
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    gap: 12px;
}

body.dark-mode .mid-section-community,
body.dark-mode .mid-section-collab {
    border-color: rgba(255, 255, 255, 0.08);
}

.mid-section-community:hover {
    border-color: #25d366;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.12);
}

.mid-section-collab:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.12);
}

.community-info,
.collab-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.community-icon-box,
.collab-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.community-icon-box {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.collab-icon-box {
    background: rgba(26, 35, 126, 0.08);
    color: var(--primary);
}

body.dark-mode .community-icon-box {
    background: rgba(37, 211, 102, 0.15);
}

body.dark-mode .collab-icon-box {
    background: rgba(144, 202, 249, 0.15);
    color: #90caf9;
}

.community-text-details,
.collab-text-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.community-title,
.collab-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-sub,
.collab-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-btn-action,
.collab-btn-action {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.community-btn-action { color: #25d366; }
.collab-btn-action { color: var(--primary); }

body.dark-mode .collab-btn-action { color: #90caf9; }

/* ==========================================================================
   MÍDIA E IMAGEM DE CAPA
   ========================================================================== */
.noticia-imagem-container-capa { 
    width: 100%; 
    margin-bottom: 8px; 
    background: transparent; 
    border-radius: var(--radius); 
    overflow: hidden; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.noticia-imagem-container-capa img { 
    width: 100%; 
    height: auto; 
    max-width: 100%; 
    object-fit: contain; 
    display: block; 
    border-radius: var(--radius); 
}

.noticia-legenda,
.noticia-corpo figcaption,
.noticia-corpo .imagem-legenda { 
    font-size: 13px !important; 
    color: var(--text-muted) !important; 
    border-left: 3px solid var(--secondary); 
    padding-left: 10px; 
    margin: 8px 0 20px; 
    font-style: italic !important; 
    display: block; 
    line-height: 1.4 !important;
}

.noticia-corpo { 
    font-size: 1rem; /* Base padronizada em 16px */
    margin-bottom: 30px; 
    color: var(--text-main); 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

.noticia-corpo p { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.98rem !important; /* ~15.7px - Proporção exata de leitura */
    font-weight: 400 !important;
    line-height: 1.55 !important; 
    letter-spacing: normal !important;
    margin-top: 0 !important; 
    margin-bottom: 14px !important; 
    color: var(--text-main) !important;
}

.noticia-corpo p *,
.noticia-corpo span,
.noticia-corpo font {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
}

.noticia-corpo p strong, 
.noticia-corpo p b,
.noticia-corpo strong,
.noticia-corpo b { 
    font-weight: 700 !important; 
}

.noticia-corpo p em, 
.noticia-corpo p i,
.noticia-corpo em,
.noticia-corpo i { 
    font-style: italic !important; 
}

.noticia-corpo ul, .noticia-corpo ol {
    margin-bottom: 14px !important;
    padding-left: 20px;
}

.noticia-corpo li {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
    margin-bottom: 6px;
}

/* Imagens normais no corpo (que não pertencem a cards de notícia) */
.noticia-corpo img:not(.news-card img) { 
    max-width: 100% !important; 
    height: auto !important; 
    display: block;
    margin: 15px auto;
    border-radius: var(--radius); 
}

.noticia-corpo button, .noticia-corpo .remove-image, .noticia-corpo .delete-btn { 
    display: none !important; 
}

/* Links normais no corpo (que não pertencem a cards de notícia) */
.noticia-corpo a:not(.news-card) { 
    color: var(--primary); 
    font-weight: 600; 
    text-decoration: none; 
    border-bottom: 1px solid rgba(26, 35, 126, 0.2); 
    transition: 0.2s; 
}

.noticia-corpo a:not(.news-card):hover { 
    border-bottom-color: var(--primary); 
    background: rgba(26, 35, 126, 0.05); 
}

body.dark-mode .noticia-corpo a:not(.news-card) { 
    color: #8c9eff; 
    border-bottom-color: rgba(140, 158, 255, 0.3); 
}

/* ==========================================================================
   EMBEDS E MÍDIAS INCORPORADAS (INSTAGRAM, TWITTER, FACEBOOK, YOUTUBE, IFRAMES)
   ========================================================================== */
.noticia-embed,
.noticia-corpo .noticia-embed,
.noticia-corpo iframe,
.noticia-corpo .instagram-media,
.noticia-corpo .twitter-tweet {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 25px auto !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: var(--radius) !important;
    overflow: hidden !important;
}

/* Ajuste específico para iFrames (YouTube, Facebook, etc.) */
.noticia-corpo iframe {
    border: none !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    max-width: 550px !important;
    width: 100% !important;
}

body.dark-mode .noticia-corpo iframe {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Ajustes de borda e tamanho para Instagram */
.noticia-corpo .instagram-media,
.noticia-corpo .instagram-media-rendered {
    border-radius: var(--radius) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 540px !important;
    min-width: 280px !important;
}

body.dark-mode .noticia-corpo .instagram-media,
body.dark-mode .noticia-corpo .instagram-media-rendered {
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Ajustes de borda e tamanho para Twitter/X */
.noticia-corpo .twitter-tweet,
.noticia-corpo .twitter-tweet-rendered {
    border-radius: var(--radius) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 550px !important;
}

/* Container de embeds gerais */
.noticia-embed {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}

/* ==========================================================================
   CARDS DE NOTÍCIA NO CORPO DO TEXTO (EXATAMENTE IGUAIS À HOME)
   ========================================================================== */
.noticia-corpo .news-card { 
    display: flex !important; 
    flex-direction: row !important;
    background: var(--card) !important; 
    padding: 10px !important; 
    border-radius: 14px !important; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important; 
    cursor: pointer !important; 
    border: 1px solid rgba(0, 0, 0, 0.06) !important; 
    transition: border-color 0.2s, transform 0.2s !important; 
    align-items: center !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    margin: 20px 0 !important;
    width: 100% !important;
}

body.dark-mode .noticia-corpo .news-card {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.noticia-corpo .news-card:hover { 
    border-color: var(--secondary) !important; 
    transform: translateY(-1px) !important;
}

.noticia-corpo .news-card img { 
    width: 95px !important; 
    height: 65px !important; 
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important; 
    border-radius: 10px !important; 
    flex-shrink: 0 !important; 
    display: block !important;
    margin: 0 !important;
}

.noticia-corpo .news-card .news-content { 
    margin-left: 12px !important; 
    display: flex !important; 
    flex-direction: column !important; 
    justify-content: center !important; 
    width: 100% !important; 
}

.noticia-corpo .news-card .news-content h3 { 
    font-size: 0.95rem !important; 
    font-weight: 500 !important; 
    margin-bottom: 4px !important; 
    line-height: 1.2 !important; 
    color: var(--text-main) !important;
}

.noticia-corpo .news-card .news-meta { 
    font-size: 11px !important; 
    color: var(--text-muted) !important; 
    display: flex !important; 
    align-items: center !important; 
    gap: 8px !important; 
    margin-top: 0 !important;
}

.noticia-corpo .news-card .news-meta .author { 
    font-weight: 600 !important; 
    color: var(--secondary) !important; 
}

.noticia-corpo .news-card .news-meta .dot { 
    width: 3px !important; 
    height: 3px !important; 
    background: #ccc !important; 
    border-radius: 50% !important; 
}

/* Convite do Canal no WhatsApp dentro do Corpo */
.article-channel-invite {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 20px 0;
    text-decoration: none !important;
    color: var(--text-main) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-channel-invite:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.15);
}

.article-channel-invite i {
    font-size: 1.8rem;
    color: #25d366;
    flex-shrink: 0;
}

.article-channel-invite .text {
    display: flex;
    flex-direction: column;
}

.article-channel-invite .invite-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #25d366;
}

.article-channel-invite p {
    font-size: 0.8rem !important;
    margin: 2px 0 0 !important;
    color: var(--text-muted) !important;
    line-height: 1.3 !important;
}

/* ==========================================================================
   TAGS & BOTÕES DE COMPARTILHAMENTO
   ========================================================================== */
.tag-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-bottom: 20px; 
}

.tag-item { 
    background: rgba(0,0,0,0.05); 
    color: var(--text-muted); 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 600; 
    text-decoration: none; 
    transition: 0.2s; 
}

body.dark-mode .tag-item { 
    background: rgba(255,255,255,0.08); 
}

.tag-item:hover { 
    background: var(--primary); 
    color: #ffffff; 
}

.share-label { 
    font-size: 12px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    display: block; 
    margin-bottom: 8px; 
}

.share-bar { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-bottom: 30px; 
}

.share-btn { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #ffffff; 
    text-decoration: none; 
    border: none; 
    cursor: pointer; 
    font-size: 14px; 
    transition: transform 0.2s, opacity 0.2s; 
}

.share-btn:hover { 
    transform: translateY(-2px); 
    opacity: 0.9; 
}

.btn-wa { background: #25d366; }
.btn-x { background: #000000; }
.btn-tg { background: #0088cc; }
.btn-fb { background: #1877f2; }
.btn-in { background: #0a66c2; }
.btn-native { background: var(--primary); }
.btn-copy { background: #6c757d; }

/* ==========================================================================
   SEÇÃO: NOTÍCIAS RELACIONADAS (CARROSSEL COM CARDS VERTICAIS)
   ========================================================================== */
.relacionadas-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .relacionadas-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.relacionadas-titulo {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

body.dark-mode .relacionadas-titulo {
    color: #90caf9;
}

.relacionadas-titulo::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .relacionadas-titulo::after {
    background: rgba(255, 255, 255, 0.08);
}

.carrossel-wrapper {
    width: 100%;
    overflow: hidden;
}

.carrossel-container {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
}

.carrossel-container::-webkit-scrollbar {
    height: 4px;
}

.carrossel-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.carrossel-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Formatting dos Cards Relacionados (Layout Vertical no Carrossel) */
.carrossel-container .news-card { 
    display: flex; 
    flex-direction: column;
    background: var(--card); 
    padding: 10px; 
    border-radius: 14px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
    cursor: pointer; 
    border: 1px solid rgba(0, 0, 0, 0.06); 
    transition: border-color 0.2s, transform 0.2s; 
    align-items: stretch;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    flex: 0 0 220px;
    min-width: 200px;
}

body.dark-mode .carrossel-container .news-card {
    border-color: rgba(255, 255, 255, 0.08);
}

.carrossel-container .news-card:hover { 
    border-color: var(--secondary); 
    transform: translateY(-2px);
}

.carrossel-container .news-card img { 
    width: 100%; 
    height: 120px; 
    aspect-ratio: 16 / 9;
    object-fit: cover; 
    border-radius: 10px; 
    flex-shrink: 0; 
    display: block;
    overflow: hidden;
}

.carrossel-container .news-content { 
    margin-left: 0; 
    margin-top: 10px;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    width: 100%; 
    flex: 1;
}

.carrossel-container .news-content h3 { 
    font-size: 0.88rem; 
    font-weight: 600; 
    margin-bottom: 8px; 
    line-height: 1.3; 
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carrossel-container .news-meta { 
    font-size: 11px; 
    color: var(--text-muted); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    flex-wrap: wrap;
    margin-top: auto;
}

.carrossel-container .news-meta .author { 
    font-weight: 600; 
    color: var(--secondary); 
}

.carrossel-container .news-meta .dot { 
    width: 3px; 
    height: 3px; 
    background: #ccc; 
    border-radius: 50%; 
}

@media (max-width: 600px) {
    .carrossel-container .news-card {
        flex: 0 0 190px;
        min-width: 180px;
    }
    .carrossel-container .news-card img {
        height: 105px;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1rem;
    color: var(--text-muted);
}
