/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #2d3748;
    line-height: 1.6;
}

/* Header */
header {
    background-color: #1e3a8a;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    width: 250px;
    font-size: 0.9rem;
}

.search-box button {
    padding: 0.5rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2563eb;
}

/* Navegação */
nav {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
}

.nav-container a {
    padding: 1rem 0;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-container a:hover {
    color: #1e3a8a;
    border-bottom-color: #3b82f6;
}

/* Container Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

/* Publicidade */
.ad-top {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    min-height: 100px; /* Altura mínima para o "Carregando" */
    height: 250px;
    width: 100%;
    max-width: 970px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.ad-horizontal {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    min-height: 100px; /* Altura mínima */
    height: 250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 2rem 0;
}

.ad-sidebar {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    min-height: 250px; /* Altura mínima */
    height: 600px;
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Estilos para anúncios carregados (esconde o 'Carregando...') */
.ad-top.anuncio-carregado,
.ad-horizontal.anuncio-carregado,
.ad-sidebar.anuncio-carregado {
    background-color: transparent;
    border: none;
    height: auto; /* Permite que o anúncio defina a altura */
    min-height: 0;
}

/* Notícia Destaque */
.destaque {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.noticia-principal {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.noticia-principal img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.3s;
}

.noticia-principal:hover img {
    transform: scale(1.05);
}

.noticia-principal .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 2rem;
}

.noticia-principal .categoria {
    display: inline-block;
    background-color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.noticia-principal h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.noticia-principal .meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

.noticias-secundarias {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.noticia-card-pequeno {
    background-color: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.noticia-card-pequeno:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.noticia-card-pequeno img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.noticia-card-pequeno .conteudo {
    padding: 1rem;
}

.noticia-card-pequeno h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.noticia-card-pequeno .meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Seção de Notícias */
.secao {
    margin-bottom: 3rem;
}

.secao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3b82f6;
}

.secao-header h2 {
    font-size: 1.5rem;
    color: #1e3a8a;
}

.secao-header a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.secao-header a:hover {
    text-decoration: underline;
}

/* Grid de Notícias */
.grid-noticias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.noticia-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.noticia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.noticia-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.noticia-card .conteudo {
    padding: 1.25rem;
}

.noticia-card .categoria {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.noticia-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.4;
}

.noticia-card .resumo {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.noticia-card .meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* Layout com Sidebar */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Footer */
footer {
    background-color: #1e293b;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #3b82f6;
}

.copyright {
    color: #64748b;
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Responsividade */
@media (max-width: 1024px) {
    .destaque {
        grid-template-columns: 1fr;
    }

    .grid-noticias {
        grid-template-columns: repeat(2, 1fr);
    }

    .layout-sidebar {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .grid-noticias {
        grid-template-columns: 1fr;
    }

    .noticias-secundarias {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ad-top {
        height: 150px;
    }
}

/* --- ESTILOS DO NOVO TOP BAR (PRE-HEADER) --- */
.top-bar {
    background-color: #1e293b; 
    color: white;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Lado Esquerdo: Ticker de Notícias */
.latest-news-ticker {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ticker-content {
    position: relative;
    height: 1.5em;
    flex: 1;
}

.ticker-item {
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-item.active {
    opacity: 1;
}

.ticker-item a {
    color: white;
    text-decoration: none;
}
.ticker-item a:hover {
    text-decoration: underline;
}

/* Lado Direito: Data, Tempo e Sociais */
.header-info-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

#dateTime {
    white-space: nowrap;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.social-icons-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icons-top .social-icon {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-weight: bold;
    font-family: Arial, sans-serif;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.social-icons-top .social-icon.social-yt {
    font-size: 0.7rem;
}

.social-icons-top .social-icon:hover {
    opacity: 1;
    background-color: white;
    color: #1e293b;
}

/* --- CORREÇÃO DO ÍCONE E LABEL --- */

.ticker-label {
    display: flex; /* Alinha o [círculo+ícone] e o [texto] */
    align-items: center; 
    background-color: white;
    color: #1e293b;
    padding: 2px 12px 2px 3px; /* 2px topo, 12px dir, 2px baixo, 3px esq */
    border-radius: 20px; /* Borda arredondada */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-right: 1rem;
}

/* ▼▼▼ SUBSTITUA O SELETOR AQUI ▼▼▼ */
.ticker-label .fa-solid.fa-bolt {
    background-color: #5555ff; /* Cor do círculo (azul vibrante) */
    color: white; /* Cor do ícone (raio) */
    
    border-radius: 50%; /* Círculo perfeito */
    
    width: 26px; /* Tamanho do círculo */
    height: 26px; /* Tamanho do círculo */
    
    /* Correção: Usar text-align/line-height para centrar o ícone (que é um "caractere" de fonte) */
    display: inline-block;
    font-size: 13px; /* Tamanho do raio */
    line-height: 26px; /* Centraliza verticalmente (deve ser igual à altura) */
    text-align: center; /* Centraliza horizontalmente */
    
    margin-right: 0.5rem; /* Espaço entre o círculo e o texto "Últimas" */
    
    /* Impede que o ícone seja selecionado como texto */
    user-select: none;
}

.ticker-label span {
    color: #1e293b;
    vertical-align: middle; /* Garante alinhamento com o ícone */
}

/* Responsividade para o Top Bar */
@media (max-width: 768px) {
    .top-bar-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    .latest-news-ticker {
        width: 100%;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .header-info-right {
        justify-content: space-between;
        width: 100%;
    }
}

/* ============================================
   SEÇÃO SUB-DESTAQUES (BULLET POINTS) - V3 (2x2 Grid)
   ============================================ */

.secao-subdestaques {
    margin: 2.5rem 0; /* Espaçamento */
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e2e8f0; /* Borda para separar */
}

/* * Usamos 'display: grid' para criar duas colunas 
*/
.grid-subdestaques {
    display: grid;
    grid-template-columns: 1fr 1fr; /* <-- Define 2 colunas */
    gap: 2rem; /* Espaço entre linhas e colunas */
    list-style: none;
    padding: 0;
    margin: 0;
}

.subdestaque-item {
    position: relative;
    padding-left: 1.5rem; /* Espaço para o bullet */
    /* Removemos 'flex: 1' e 'min-width' */
}

.subdestaque-item::before {
    content: '•';
    position: absolute;
    left: 0;
    top: -2px;
    color: #1e3a8a; 
    font-size: 1.5rem;
    font-weight: 700;
}

.subdestaque-item a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748; 
    text-decoration: none;
    line-height: 1.4;
}

.subdestaque-item a:hover {
    color: #689bed;
    text-decoration: none;
}

/* Responsividade: empilha os itens (1 coluna) */
@media (max-width: 768px) {
     .grid-subdestaques {
        grid-template-columns: 1fr; /* <-- Muda para 1 coluna */
        gap: 1.5rem;
     }
}

/* ============================================
   WIDGETS DA SIDEBAR (HOME)
   ============================================ */

.sidebar-widget {
    margin-top: 2rem;
    background-color: #f8fafc; /* Mesmo fundo do 'mais lidas' em outras pág. */
    padding: 1.5rem;
    border-radius: 8px;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3b82f6; /* Destaque do título */
}

.sidebar-widget-lista .loading-small {
    text-align: center;
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.sidebar-item-noticia {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sidebar-item-noticia:hover {
    background-color: #f1f5f9;
    /* Truque para o hover parecer maior */
    margin: 0 -1.5rem; 
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.sidebar-item-noticia:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sidebar-item-noticia:first-child {
    padding-top: 0;
}

.sidebar-item-noticia img {
    width: 100px; /* Tamanho da imagem */
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-item-noticia-conteudo {
    flex: 1;
}

.sidebar-item-noticia-conteudo h4 {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.sidebar-item-noticia-conteudo .meta {
    font-size: 0.8rem;
    color: #94a3b8;
}