/* =========================================
   1. VARIÁVEIS E RESET GLOBAL
   ========================================= */
:root {
    --primary: #0056b3;       /* Azul Liberal */
    --primary-dark: #004494;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-body: #f4f6f9;       /* Fundo cinza bem clarinho para destacar os blocos brancos */
    --white: #ffffff;
    --radius: 6px;            /* Bordas levemente arredondadas */
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; }

/* Container Centralizado */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   2. CABEÇALHO (HEADER)
   ========================================= */
header {
    background-color: var(--primary); /* AGORA O FUNDO É AZUL */
    border-bottom: 3px solid var(--primary-dark); /* Linha sutilmente mais escura em baixo */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Sombra para destacar do fundo cinza */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px; /* Aumentei um pouquinho a altura para a logo respirar */
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 55px; /* Altura da logo */
    width: auto;
    display: block;
    /* Se a logo não for 100% branca, isso força ela a brilhar mais: */
    filter: brightness(0) invert(1); 
}
.logo span { color: #222; }

.nav-links a {
    margin-left: 20px;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff; /* Letra Branca */
    text-transform: uppercase;
    opacity: 0.9; /* Leve transparência para elegância */
    letter-spacing: 0.5px;
}
.nav-links a:hover { 
    color: #ffffff; 
    opacity: 1; 
    text-decoration: underline; /* Sublinhado ao passar o mouse */
}

/* =========================================
   3. HERO SECTION (MANCHETES TOPO)
   Estilo: Moderno, Compacto e Overlay
   ========================================= */
.main-content { padding: 30px 0; }

.hero-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 para Notícias, 1/3 Sidebar */
    gap: 20px;
    margin-bottom: 50px;
}

.portal-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr; /* Ajuste fino para dar mais espaço à notícia */
    gap: 30px;
    align-items: start; /* Impede que sidebar estique sem necessidade */
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Espaço entre o Hero e as Categorias */
}
/* Grade das 4 Notícias */
.hero-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
    gap: 15px;
}

/* O Cartão da Notícia */
.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000; /* Fundo preto caso a img falhe */
    box-shadow: var(--shadow);
}

/* Link cobre tudo */
.hero-card a { display: block; width: 100%; height: 100%; }

/* Imagem de Fundo (Cobre o card todo) */
.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a foto preencha sem esticar */
    transition: transform 0.5s ease;
    opacity: 0.9;
}
.hero-card:hover img { transform: scale(1.05); opacity: 0.7; }

/* Texto Sobreposto (Overlay) */
.hero-card .info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    /* Degradê preto para o texto branco ficar legível */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0.5) 60%, transparent 100%);
    z-index: 2;
}

.hero-card h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero-card span {
    color: #ffd700; /* Data em amarelo/dourado para destacar */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Destaque: A primeira notícia fica maior (Ocupa 2 colunas) */
.hero-news-grid .hero-card:first-child {
    grid-column: span 2;
    grid-row: span 1; 
}
.hero-news-grid .hero-card:first-child h3 { font-size: 1.5rem; }

/* =========================================
   4. SIDEBAR (LATERAL DIREITA)
   ========================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky; /* Opcional: Faz a sidebar seguir a rolagem */
    top: 90px; /* Espaço do header */
}

.sidebar-box {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid #e5e5e5;
    /* box-shadow: var(--shadow); (Opcional: retirei para ficar mais clean) */
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Lista Ranking */
.ranking-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 10px;
}
.ranking-item:last-child {
    border: none;
    padding-bottom: 0;
}

.rank-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #e0e0e0;
    line-height: 1;
}
.rank-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
}
.rank-title:hover { color: var(--primary); }

/* Redes Sociais e Anúncio */
.social-links a {
    display: block;
    padding: 10px;
    background: #f0f2f5;
    margin-bottom: 5px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}
.social-links a:hover { background: #e0e0e0; color: #000; }

.anuncie-aqui {
    display: block;
    background: #222;
    color: #fff;
    text-align: center;
    padding: 30px 10px;
    border-radius: var(--radius);
    font-weight: bold;
}

/* =========================================
   5. SESSÃO DE CATEGORIAS (BAIXO)
   ========================================= */
.cat-section { 
    margin-top: 0; /* Zerado pois o gap da left-column já separa */
}

.cat-header-title {
    font-size: 1.5rem;
    color: var(--primary);
    border-left: 5px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 25px;
    background: #fff;
    padding: 10px 15px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.cat-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mudei para 2 colunas para não ficar apertado */
    gap: 25px;
}

.cat-column h3 {
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.cat-news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.cat-news-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cat-news-item h4 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}
.cat-news-item h4:hover { color: var(--primary); }

.btn-ver-mais {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--primary);
    padding: 6px 15px;
    border-radius: 20px;
}
.btn-ver-mais:hover { background: var(--primary); color: white; }


/* =========================================
   6. PÁGINA INTERNA (LER NOTÍCIA)
   ========================================= */
.noticia-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 20px;
    max-width: 900px; /* Leitura confortável */
    margin-left: auto;
    margin-right: auto;
}

.noticia-header h1 {
    font-size: 2.2rem;
    color: #222;
    line-height: 1.2;
    margin-bottom: 10px;
}

.noticia-subtitulo {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 20px;
}

.noticia-meta {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.noticia-img-destaque {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.noticia-conteudo {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.noticia-conteudo p { margin-bottom: 20px; }
.noticia-conteudo img { max-width: 100%; height: auto; border-radius: 4px; }
.noticia-conteudo iframe { max-width: 100%; margin: 20px 0; }

.btn-voltar {
    display: inline-block;
    margin-top: 30px;
    color: #666;
    font-weight: bold;
}

/* =========================================
   7. RODAPÉ (FOOTER)
   ========================================= */
footer {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}
footer p { font-size: 0.9rem; opacity: 0.9; }

/* =========================================
   8. RESPONSIVO (CELULAR E TABLET)
   ========================================= */
@media (max-width: 900px) {
    .portal-grid { grid-template-columns: 1fr; } /* Vira uma coluna só no celular */
    .hero-news-grid .hero-card:first-child { grid-column: span 1; }
    .cat-grid-container { grid-template-columns: 1fr; }
    .sidebar { position: static; } /* Desliga o sticky no mobile */
}

@media (max-width: 600px) {
    /* No Celular, menu empilha e destaques ficam um abaixo do outro */
    .logo img {
        max-height: 40px; /* Um pouco menor no celular */
    }
    .navbar { flex-direction: column; height: auto; padding: 15px 0; }
    .nav-links { margin-top: 15px; display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
    .nav-links a { margin: 0; font-size: 13px; }
    
    .hero-news-grid { grid-template-columns: 1fr; } /* Uma coluna só */
    .hero-news-grid .hero-card:first-child { grid-column: span 1; }
    
    .noticia-container { padding: 20px; }
    .noticia-header h1 { font-size: 1.6rem; }
}

/* =========================================
   ESTILO MODERNO PARA PÁGINA DE CATEGORIA
   ========================================= */

/* Container da Lista */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Espaço entre as notícias */
}

/* O Cartão Horizontal */
.cat-card-horizontal {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Sombra suave */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 180px; /* Altura fixa para ficar organizado */
}

.cat-card-horizontal:hover {
    transform: translateY(-3px); /* Sobe um pouquinho */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* Sombra aumenta */
    border-color: var(--primary-light);
}

/* Link cobre o card (para clicar em qualquer lugar) */
.cat-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Imagem na Esquerda */
.cat-card-img {
    width: 280px; /* Largura fixa da imagem */
    flex-shrink: 0; /* Não deixa a imagem espremer */
    position: relative;
    overflow: hidden;
}

.cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom na imagem ao passar o mouse */
.cat-card-horizontal:hover .cat-card-img img {
    transform: scale(1.05);
}

/* Conteúdo na Direita */
.cat-card-body {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1; /* Ocupa o resto do espaço */
}

/* Tipografia */
.cat-card-date {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cat-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 10px;
    transition: color 0.2s;
    /* Limita a 2 linhas e coloca ... se for grande */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-horizontal:hover .cat-card-title {
    color: var(--primary); /* Título fica azul no hover */
}

.cat-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    /* Limita a 2 linhas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Responsivo (Celular) --- */
@media (max-width: 768px) {
    .cat-card-horizontal {
        height: auto; /* Altura automática no celular */
        flex-direction: column; /* Vira vertical */
    }
    
    .cat-card-link { flex-direction: column; }
    
    .cat-card-img {
        width: 100%;
        height: 200px;
    }
    
    .cat-card-body { padding: 15px; }
    .cat-card-title { font-size: 1.1rem; }
}

/* --- NOVO DESIGN DA SIDEBAR --- */

/* 1. Ranking Mais Lidas (Com Foto e Número Azul) */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduzi de 15px para 8px (Bem mais perto) */
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px; /* Reduzi de 15px para 8px */
}
.ranking-item:last-child { border: none; padding-bottom: 0; }

.rank-number {
    font-size: 2.5rem; /* Número Grande */
    font-weight: 900;
    color: var(--primary); /* Azul */
    line-height: 1;
    min-width: 30px; /* Garante alinhamento */
}

.rank-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0; /* Não deixa esmagar a foto */
}

.rank-title {
    font-size: 0.85rem; /* Levemente menor */
    font-weight: 600;
    line-height: 1.2;
}
.rank-title:hover { color: var(--primary); }

/* 2. Botões Redes Sociais (Azul com ícone branco) */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza o texto e icone */
    width: 100%;             /* Garante que o botão encha a caixa */
    padding: 15px 0;         /* Altura do botão */
    
    /* FORÇANDO A COR AZUL */
    background-color: #0056b3 !important; 
    color: #ffffff !important; /* Texto Branco */
    
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombra leve para destacar do fundo branco */
}

.btn-social:hover {
    background-color: #004494 !important; /* Azul mais escuro */
    transform: translateY(-2px); /* Sobe um pouquinho */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-social i {
    margin-right: 10px; /* Espaço entre ícone e texto */
    font-size: 1.2rem;
}

/* Ajuste no Banner */
.sidebar-banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* =========================================
   PÁGINA DE CONTATO (MODERNA)
   ========================================= */

.contact-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.contact-intro {
    margin-bottom: 30px;
    color: #555;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Nome e Empresa lado a lado */
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: 0.3s;
    font-family: inherit;
}

/* Efeito ao clicar no campo */
.form-control:focus {
    border-color: var(--primary);
    outline: none;
    background: #f9fbff;
}

.btn-enviar {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-enviar:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Responsivo para celular */
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .contact-box { padding: 20px; }
}

/* =========================================
   CORREÇÃO DE TEXTO DA NOTÍCIA
   ========================================= */

/* Força todo parágrafo dentro da notícia a ficar alinhado */
.conteudo-texto p {
    margin-left: 0 !important;   /* Remove recuo esquerdo */
    padding-left: 0 !important;  /* Remove preenchimento esquerdo */
    margin-right: 0 !important;  
    text-align: justify;         /* Deixa o texto justificado (quadradinho) */
    line-height: 1.6;            /* Altura da linha confortável para leitura */
    font-family: inherit;        /* Usa a fonte do site, ignora a do Word */
    background-color: transparent !important; /* Remove fundo rosa/cinza se vier */
}

/* Garante que o texto ocupe a largura correta */
.conteudo-texto {
    width: 100%;
    overflow-wrap: break-word;
}

/* =========================================
   RODAPÉ MODERNO (FOOTER)
   ========================================= */
footer {
    background-color: var(--primary); /* FUNDO AZUL */
    color: #ffffff; /* Texto branco puro */
    padding: 60px 0 30px;
    margin-top: 60px;
    /* Adicionando um degradê sutil para ficar mais elegante que o azul chapado */
    background: linear-gradient(to bottom, var(--primary), #003366);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

/* --- COLUNA 1: LOGO --- */
.footer-col-left {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
    /* Garante que a logo fique 100% branca */
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9); /* Branco com leve transparência */
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6); /* Cinza azulado */
    margin-top: 10px;
}

/* --- COLUNA 2: MENU (MEIO) --- */
.footer-col-center {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
    opacity: 0.8;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
    transform: translateX(5px);
}

/* --- COLUNA 3: LEGAL E ANUNCIE (DIREITA) --- */
.footer-col-right {
    flex: 1;
    min-width: 200px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* BOTÃO INVERTIDO (Branco com texto Azul) */
.btn-anuncie-footer {
    display: inline-block;
    background: #ffffff; /* Botão Branco */
    color: var(--primary); /* Texto Azul */
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    transition: 0.3s;
    align-self: flex-end;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Sombra para destacar */
}

.btn-anuncie-footer:hover {
    background: #f0f0f0; /* Cinza bem clarinho no hover */
    transform: translateY(-2px);
}

.link-legal {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.link-legal:hover { 
    color: #fff; 
    text-decoration: underline; 
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-col-center, .footer-col-right {
        text-align: center;
        align-items: center;
        width: 100%;
    }
    .btn-anuncie-footer { align-self: center; }
}

/* =========================================
   SISTEMA DE COOKIES (GDPR / LGPD)
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999; /* Fica acima de tudo */
    border-left: 5px solid var(--primary);
    
    /* Começa invisível, o JS vai mostrar se precisar */
    opacity: 0; 
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Classe que o JS adiciona para mostrar o banner */
.cookie-banner.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-text {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

.cookie-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px; /* Botão redondinho */
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap; /* Não quebra linha no botão */
    transition: 0.3s;
}

.cookie-btn:hover {
    background-color: #003366;
    transform: scale(1.05);
}

/* Responsivo para celular */
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 15px 15px 0 0; /* Arredonda só em cima */
    }
}