/*
Theme Name: Omini Facts Premium
Version: 3.0
*/

:root {
  /* Cores Oficiais do Manual */
  --blue-dark: #192566;
  --blue-brand: #365197;
  --cyan: #269DD1;
  --purple: #7332C0;
  --magenta: #C000FF;
  --gray-ui: #DCDFE8;
  --text-main: #0B1220;

  /* Gradiente e UI Premium */
  --grad-signature: linear-gradient(90deg, #269DD1, #7332C0, #C000FF);
  --shadow-portal: 0 12px 40px rgba(11, 18, 32, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
}

/* --- RESET & GLOBAL --- */
* { box-sizing: border-box; }
body { 
  margin: 0; font-family: "Inter", sans-serif; background: #F8FAFF; color: var(--text-main); 
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Poppins", sans-serif; font-weight: 800; color: var(--blue-dark); margin: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- HEADER --- */
.site-header { background: #fff; padding: 18px 0; border-bottom: 1px solid var(--gray-ui); position: sticky; top: 0; z-index: 1000; }
.nav-list { display: flex; gap: 24px; list-style: none; padding: 0; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.nav-link:hover { color: var(--purple); border-bottom: 3px solid var(--purple); }

/* --- GRID DE NOTÍCIAS (PADRONIZAÇÃO DE IMAGENS) --- */
/* Isso resolve o erro de imagens com tamanhos diferentes */
.grid-portal { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
  gap: 30px; 
  margin: 40px 0; 
}

.card-premium { 
  background: #fff; border-radius: var(--radius-lg); overflow: hidden; 
  box-shadow: var(--shadow-portal); border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-premium:hover { transform: translateY(-10px); }

.card-thumb { 
  width: 100%; 
  aspect-ratio: 16 / 9; /* Força todas as imagens a terem a mesma proporção */
  overflow: hidden; 
  background: var(--gray-ui);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 25px; }
.card-cat { color: var(--purple); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.card-title { font-size: 20px; margin-top: 10px; line-height: 1.3; }

/* --- PÁGINAS & POSTS (CORREÇÃO DE CONTEÚDO CORTE) --- */
.main-wrapper { padding: 60px 0; clear: both; }
.content-box { 
  max-width: 880px; margin: 0 auto; background: #fff; padding: 50px; 
  border-radius: var(--radius-lg); box-shadow: var(--shadow-portal); 
}

/* --- FOOTER (RESTAURAÇÃO VISUAL) --- */
/* O clear:both e a margem garantem que ele não "suba" ou quebre */
.site-footer { 
  background: #0B1220; color: #fff; padding: 80px 0 0; margin-top: 100px; 
  border-top: 5px solid var(--purple); clear: both; display: block;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 60px; }
.footer-title { color: #fff; font-size: 18px; margin-bottom: 25px; position: relative; }
.footer-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 40px; height: 3px; background: var(--grad-signature); }
.footer-list { list-style: none; padding: 0; }
.footer-list li { margin-bottom: 12px; opacity: 0.7; font-size: 15px; }
.footer-list li:hover { opacity: 1; padding-left: 5px; }

/* Responsividade */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-portal { grid-template-columns: 1fr; }
}

/* --- CATEGORIA PREMIUM REFINADA --- */

/* Cabeçalho Editorial */
.category-header-premium {
    padding: 60px 0 40px;
    border-bottom: 2px solid var(--purple);
    margin-bottom: 50px;
}
.category-label {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--purple);
    margin-bottom: 10px;
    display: block;
}
.category-main-title {
    font-size: 48px;
    font-weight: 900;
    color: var(--blue-dark);
    letter-spacing: -1.5px;
}
.category-tagline {
    font-size: 18px;
    color: var(--text-main);
    opacity: 0.7;
    margin-top: 15px;
    max-width: 700px;
}

/* Grid Inteligente: alinha à esquerda mesmo com poucos itens */
.premium-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    align-items: stretch;
}

/* Card Estilo Publisher Internacional */
.premium-news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(11, 18, 32, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 0; 
}

.premium-news-card:hover { transform: translateY(-8px); }

.premium-news-card a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.premium-card-media {
    width: 100%;
    aspect-ratio: 16 / 9; /* Padronização absoluta de todas as fotos */
    overflow: hidden;
}
.standard-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}
.premium-news-card:hover .standard-thumb { transform: scale(1.05); }

.premium-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz o conteúdo ocupar todo o espaço restante do card */
}

.premium-card-date {
    font-size: 13px;
    font-weight: 700;
    color: #999;
    margin-bottom: 15px;
    display: block;
}

.premium-card-title {
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 15px;
    color: var(--blue-dark);
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita títulos muito longos a 3 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.premium-card-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-top: auto; /* Empurra o resumo para baixo se houver espaço */
}

/* Paginação */
.premium-pagination { margin-top: 60px; text-align: center; }
.premium-pagination .page-numbers {
    padding: 12px 20px;
    background: #fff;
    border-radius: 10px;
    margin: 0 5px;
    font-weight: 800;
}
.premium-pagination .current { background: var(--grad-signature); color: #fff; }

@media (max-width: 768px) {
    .premium-category-grid { grid-template-columns: 1fr; }
    .category-main-title { font-size: 36px; }
}

/* --- SISTEMA DE GRID PREMIUM (NIVELADO) --- */

/* Resolve o "desnivelamento" de História e Buscas */
.premium-grid-system {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    align-items: stretch; /* Força cards da mesma linha a terem a mesma altura */
}

.premium-news-card {
    background: #fff;
    border-radius: 18px;
    display: flex;
    flex-direction: column; /* Alinha o conteúdo verticalmente */
    height: 100%; /* Ocupa toda a altura do grid */
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(11,18,32,0.05);
}

.premium-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz esta área crescer para preencher o card */
}

.premium-card-excerpt {
    margin-bottom: 20px;
    flex-grow: 1; /* Empurra a data para o rodapé do card, nivelando tudo */
    font-size: 15px;
    color: #5A6478;
}

/* Padronização de Imagens (16:9) */
.premium-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
}

/* --- ESTILO ESPECÍFICO DA BUSCA --- */
.search-header-premium {
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #DCDFE8;
    margin-bottom: 40px;
}

.search-label {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 800;
    color: #7332C0;
}

.search-term {
    font-size: 42px;
    color: #192566;
    margin: 10px 0;
}

.search-count {
    font-size: 14px;
    font-weight: 600;
    color: #0B1220;
    opacity: 0.6;
}

/* --- REFINAMENTOS DE UI MODERNA --- */

/* 1. Header Translúcido (Glassmorphism) */
.site-header {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(220, 223, 232, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 2. Brilho nos Cards ao passar o mouse */
.premium-news-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(115, 50, 192, 0.15); /* Sombra na cor roxa oficial */
    border-color: var(--cyan);
}

/* 3. Refinamento de Títulos (Impacto Editorial) */
h1, h2, h3 {
    letter-spacing: -1.2px !important;
    text-rendering: optimizeLegibility;
}

/* 4. Barras de Acento em Gradiente */
.category-main-title::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--grad-signature);
    border-radius: 10px;
    margin-bottom: 15px;
}

/* 5. Efeito Suave nas Imagens */
.premium-card-media {
    position: relative;
    overflow: hidden;
}

.premium-card-media::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(11, 18, 32, 0.4));
    opacity: 0;
    transition: 0.3s;
}

.premium-news-card:hover .premium-card-media::after {
    opacity: 1;
}

/* --- CORREÇÃO DE LEITURA E LAYOUT --- */

/* Força a Sidebar a ficar na lateral e o conteúdo a respeitar o espaço */
.portal-grid { 
    display: grid !important; 
    grid-template-columns: 1fr 320px !important; 
    gap: 35px; 
    align-items: start;
}

/* Ajuste da Bento Grid para não transbordar */
.bento-grid-wrapper { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); /* 2 colunas dentro do conteúdo */
    gap: 15px; 
    margin-bottom: 30px;
    width: 100%;
}
.bento-main { grid-column: span 2; height: 380px; }
.bento-tile { height: 200px; }

/* LEGIBILIDADE: Força texto BRANCO sobre os gradientes escuros */
.bento-overlay {
    background: linear-gradient(to top, rgba(11, 18, 32, 0.9) 20%, transparent 100%) !important;
    color: #ffffff !important;
}
.bento-title, .bento-excerpt, .bento-cat { 
    color: #ffffff !important; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); 
}
.bento-title { font-weight: 900; line-height: 1.1; }

/* Ad Placeholders Premium */
.ad-placeholder-vertical { min-height: 600px; background: #f9f9f9; border: 1px dashed #ddd; display: flex; align-items: center; justify-content: center; color: #bbb; border-radius: 18px; }
.ad-placeholder-horizontal { min-height: 90px; background: #f9f9f9; border-radius: 12px; margin: 20px 0; }

@media (max-width: 1024px) {
    .portal-grid { grid-template-columns: 1fr !important; }
    .sidebar-right { display: none; }
}

/* ESTRUTURA MESTRE */
.portal-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px; /* Mantém a sidebar com largura fixa */
    gap: 30px;
    align-items: start;
}

/* --- MOSAICO BENTO (ESTILO IMAGE_375A6F) --- */
.bento-mosaico {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr; /* 3 colunas dentro da área de conteúdo */
    grid-template-rows: repeat(2, 240px);
    gap: 15px;
    margin-bottom: 40px;
}
.bento-big { grid-row: span 2; grid-column: span 1; }
.bento-small { grid-column: span 1; }

.bento-wrapper {
    position: relative; height: 100%; width: 100%;
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.bento-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.bento-wrapper:hover img { transform: scale(1.05); }

/* LEGIBILIDADE: Texto Branco com Gradiente Escuro */
.bento-content-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px;
    background: linear-gradient(to top, rgba(11, 18, 32, 0.95), transparent);
    color: #ffffff !important;
}
.bento-headline { 
    font-family: "Poppins", sans-serif; font-weight: 800; color: #fff !important; margin: 0;
    line-height: 1.1; letter-spacing: -0.5px;
}
.bento-big .bento-headline { font-size: 32px; }
.bento-small .bento-headline { font-size: 15px; }
.bento-tag { color: var(--cyan); font-weight: 800; text-transform: uppercase; font-size: 11px; margin-bottom: 8px; display: block; }

/* SIDEBAR E CARDS */
.sidebar-portal { position: sticky; top: 100px; }
.widget-popular { background: #fff; padding: 25px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.pop-item { display: flex; gap: 15px; margin-bottom: 15px; text-decoration: none; color: inherit; }
.pop-rank { font-size: 24px; font-weight: 900; color: #eee; }
.pop-title { font-size: 14px; font-weight: 700; line-height: 1.3; margin: 0; }

.ad-vertical-placeholder { min-height: 600px; background: #f9f9f9; border: 1px dashed #ddd; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #ccc; }

/* RESPONSIVIDADE */
@media (max-width: 1100px) {
    .portal-layout-wrapper { grid-template-columns: 1fr; }
    .sidebar-portal { display: none; }
    .bento-mosaico { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .bento-big { grid-column: span 2; height: 350px; }
}

/* --- CARROSSEL EM ALTA (INFINITO) --- */
.trending-bar {
    background: #fff;
    border-bottom: 1px solid var(--gray-ui);
    height: 45px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.trending-container {
    display: flex;
    align-items: center;
}

.trending-label {
    background: #fff;
    padding-right: 20px;
    z-index: 10;
    position: relative;
}

.badge-em-alta {
    border: 2px solid #7332C0;
    color: #7332C0;           
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

/* Container do Carrossel */
.trending-carousel {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

/* Trilha que se move */
.trending-track {
    display: inline-flex;
    gap: 40px;
    animation: scroll-left 40s linear infinite; /* Ajuste a velocidade aqui */
}

/* Para o carrossel ao passar o mouse */
.trending-carousel:hover .trending-track {
    animation-play-state: paused;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.trending-item:hover {
    color: var(--purple);
}

.trending-dot {
    width: 6px;
    height: 6px;
    background: var(--grad-signature);
    border-radius: 50%;
}

/* Animação do Looping */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- REFINAMENTO FINAL: BARRA EM ALTA --- */

/* 1. Garante altura e alinhamento vertical perfeito */
.trending-bar {
    height: 54px; /* Um pouco mais alta para dar respiro */
    background: #fff;
    border-bottom: 1px solid var(--gray-ui);
    display: flex;
    align-items: center; /* Centraliza tudo verticalmente */
}

/* 2. Ajusta o container flex para espaçamento correto */
.trending-flex {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 3. Dá mais espaço após o badge "EM ALTA" e garante que ele fique sobre o texto */
.trending-label {
    background: #fff; /* Essencial para cobrir o texto que passa por baixo */
    padding-right: 30px; /* Aumentei o espaço para ficar mais elegante */
    z-index: 20; /* Garante que fique sempre por cima */
    display: flex;
    align-items: center;
    height: 100%;
}

/* 4. Estilo do Badge (mantive o seu, só conferindo) */
.badge-em-alta {
    border: 2px solid #7332C0;
    color: #7332C0;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 5. O toque Premium: Pontinho com Gradiente */
.ticker-dot {
    width: 7px;
    height: 7px;
    /* Usa o gradiente da sua marca em vez de preto sólido */
    background: var(--grad-signature); 
    border-radius: 50%;
    margin-right: 2px; /* Ajuste fino de distância do texto */
}

/* 6. Refinamento do Texto do Link */
.ticker-item {
    font-size: 15px; /* Um pouco maior para melhor leitura */
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px; /* Deixa o texto mais compacto e moderno */
}

/* --- DARK MODE DEFINITIVO & COMPETITIVO --- */
.dark-mode {
    --bg-site: #0B1220; /* Fundo neutro oficial do manual */
    --bg-card: #161e2e; /* Tom marinho profundo para profundidade */
    --text-main: #e2e8f0; 
    --gray-ui: #2D3651;
    --accent: #269DD1; /* Ciano para detalhes */
    
    background-color: var(--bg-site) !important;
}

/* 1. Unificação Total do Fundo (Resolve a "Barriga Branca") */
.dark-mode body, 
.dark-mode .omini-home, 
.dark-mode .main-wrapper, 
.dark-mode main {
    background-color: var(--bg-site) !important;
    color: var(--text-main) !important;
}

/* 2. Cards e Sidebar com Efeito de Profundidade */
.dark-mode .premium-news-card, 
.dark-mode .sidebar-widget, 
.dark-mode .widget-popular, 
.dark-mode .bento-wrapper,
.dark-mode .news-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--gray-ui) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
}

/* 3. Ajuste de Visibilidade dos Números (Mais Lidas) */
.dark-mode .pop-rank, 
.dark-mode .side-num {
    color: var(--accent) !important; /* Ciano oficial para os números brilharem */
    text-shadow: 0 0 10px rgba(38, 157, 209, 0.3);
    opacity: 0.8;
}

/* 4. Títulos e Links do Header */
.dark-mode .nav-link, 
.dark-mode .site-header .brand-text {
    color: #ffffff !important;
}

/* 5. Refinamento do "Em Alta" no Dark Mode */
.dark-mode .trending-bar {
    background-color: #0f172a !important;
    border-bottom: 1px solid var(--gray-ui) !important;
}

.dark-mode .trending-label {
    background-color: #0f172a !important;
}

.dark-mode .ticker-item {
    color: #94a3b8 !important; /* Cinza azulado para não brigar com o título do post */
}

/* 6. Input de Busca (Search Bar) */
.dark-mode .search-form input, 
.dark-mode .search-field {
    background: #1e293b !important;
    border: 1px solid var(--gray-ui) !important;
    color: #fff !important;
}

/* --- UNIFICAÇÃO DO HEADER NO DARK MODE --- */
.dark-mode .site-header {
    background-color: var(--bg-site) !important; /* Cor Neutra do Manual #0B1220 */
    border-bottom: 1px solid var(--gray-ui) !important;
}

/* 1. Links do Menu em Branco */
.dark-mode .nav-link, 
.dark-mode .brand-text {
    color: #ffffff !important;
}

.dark-mode .nav-link:hover {
    color: var(--purple) !important;
}

/* 2. Barra "Em Alta" no Dark Mode */
.dark-mode .trending-bar, 
.dark-mode .trending-label {
    background-color: #0f172a !important; /* Tom marinho para profundidade */
    border-bottom: 1px solid var(--gray-ui) !important;
}

.dark-mode .ticker-item {
    color: #e2e8f0 !important;
}

/* 3. Caixa de Busca (Search Input) */
.dark-mode .search-form, 
.dark-mode .search-field {
    background-color: #1e293b !important;
    border: 1px solid var(--gray-ui) !important;
    color: #ffffff !important;
}

.dark-mode .search-form::placeholder {
    color: #94a3b8 !important;
}

/* 4. Ícone da Lua/Sol */
.dark-mode .theme-toggle {
    background: var(--bg-card) !important;
    color: #ffffff !important;
    border-color: var(--gray-ui) !important;
}

/* --- AJUSTES URGENTES: MOBILE OPTIMIZATION --- */

@media (max-width: 768px) {
    /* 1. Corrige o Transbordo (Horizontal Scroll) */
    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }

    /* 2. Ajuste do Header e Logo */
    .site-header { padding: 10px 0; }
    .custom-logo { height: 32px !important; } /* Diminui o logo no celular */
    
    /* 3. Ajuste Crítico: Barra "Em Alta" no Mobile */
    .trending-bar { height: auto; padding: 8px 0; }
    .trending-flex { flex-direction: column; align-items: flex-start; gap: 8px; }
    .trending-label { padding-right: 0; height: auto; margin-bottom: 5px; }
    .badge-em-alta { padding: 2px 8px; font-size: 10px; }
    .trending-ticker { width: 100%; }
    .ticker-item { font-size: 13px; }

    /* 4. Mosaico Bento -> Lista Vertical (Resolve o "muito grande") */
    .bento-mosaico {
        grid-template-columns: 1fr !important; /* Força uma coluna só */
        grid-template-rows: auto !important;
        gap: 20px;
    }
    .bento-big, .bento-small { 
        grid-column: span 1 !important; 
        grid-row: auto !important; 
        height: 300px !important; 
    }
    .bento-big .bento-headline { font-size: 24px !important; }
    .bento-small .bento-headline { font-size: 18px !important; }

    /* 5. Títulos Gerais e Resumos */
    h1, .page-title-bold { font-size: 28px !important; }
    .feature-title { font-size: 26px !important; }
    .card-title { font-size: 18px !important; }
    
    /* 6. Espaçamentos (Paddings) */
    .container { padding: 0 15px; }
    .main-column, .page-card, .single-wrap { 
        padding: 20px !important; 
        border-radius: 0; /* Remove bordas arredondadas nas laterais no mobile */
    }
}

/* Ajuste para telas minúsculas (iPhone SE, etc) */
@media (max-width: 380px) {
    .bento-big, .bento-small { height: 250px !important; }
    .bento-big .bento-headline { font-size: 20px !important; }
}

/* --- CORREÇÃO MOBILE DEFINITIVA --- */
@media (max-width: 768px) {
    /* 1. Trava o site para não "dançar" pros lados */
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        position: relative;
    }

    .container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden;
    }

    /* 2. Header e Logo (image_41ca5b.png) */
    .site-header { padding: 8px 0 !important; }
    .custom-logo { height: 28px !important; width: auto !important; }
    
    /* 3. Ajuste do Carrossel "Em Alta" */
    .trending-bar { 
        height: auto !important; 
        padding: 5px 0 !important; 
    }
    .trending-flex { 
        flex-direction: row !important; /* Mantém em linha, mas diminui */
        flex-wrap: nowrap !important;
    }
    .trending-label { padding-right: 10px !important; }
    .badge-em-alta { 
        padding: 2px 6px !important; 
        font-size: 9px !important; 
        line-height: 1 !important;
    }
    .ticker-item { font-size: 12px !important; }

    /* 4. Mosaico Bento (Empilhamento Vertical) */
    .bento-mosaico {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 15px !important;
    }
    
    .bento-big, .bento-small { 
        width: 100% !important;
        height: 280px !important; /* Altura fixa para não ficar "gigante" */
    }

    /* 5. Títulos (Escala de leitura Apple/The Verge) */
    .bento-headline { 
        letter-spacing: -0.5px !important; 
    }
    .bento-big .bento-headline { font-size: 24px !important; }
    .bento-small .bento-headline { font-size: 18px !important; }
    
    .feature-title { font-size: 26px !important; line-height: 1.1 !important; }
    .card-title-text { font-size: 18px !important; }

    /* 6. Sidebar (Esconde widgets desnecessários no mobile) */
    .sidebar-portal { 
        margin-top: 40px !important; 
        width: 100% !important;
    }
}

/* Ajuste Dark Mode no Mobile */
.dark-mode .trending-bar, 
.dark-mode .trending-label {
    background-color: var(--bg-site) !important;
}

/* --- FIX: GRID SECUNDÁRIO (IMAGENS GIGANTES) --- */
.posts-secondary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Restaura as 2 colunas no desktop */
    gap: 30px !important;
    margin-top: 40px;
}

.standard-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.standard-card:hover {
    transform: translateY(-5px);
}

.card-img-box {
    width: 100%;
    aspect-ratio: 16 / 9 !important; /* PADRONIZAÇÃO: Impede imagens gigantes ou verticais */
    overflow: hidden;
    background: #f0f0f0;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a imagem preencher a moldura sem distorcer */
}

.card-info {
    padding: 20px;
}

.card-title-text {
    font-family: "Poppins", sans-serif;
    font-size: 19px !important;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* --- FIX: MOBILE "TEIMOSO" (FIM DO SCROLL LATERAL) --- */
@media (max-width: 768px) {
    /* Trava a largura da tela para impedir o transbordo */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }

    .container {
        padding: 0 15px !important;
        max-width: 100vw !important;
    }

    /* No celular, os posts secundários voltam a ser 1 por linha para legibilidade */
    .posts-secondary-grid {
        grid-template-columns: 1fr !important;
    }

    /* Corrige o badge EM ALTA que está empurrando a tela (image_41c661.png) */
    .trending-bar {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden;
    }

    .badge-em-alta {
        padding: 3px 8px !important;
        font-size: 9px !important;
        white-space: nowrap; /* Impede o badge de quebrar linha ou crescer demais */
    }
}

/* --- ESTILIZAÇÃO PREMIUM PARA ANÚNCIOS --- */

/* Container mestre dos anúncios */
.ad-container-home, 
.sidebar-sticky-ad, 
.ad-container {
    margin: 30px 0;
    text-align: center;
}

/* Rótulo "Publicidade" (Refinado) */
.ad-label, .ad-hint {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8; /* Cinza discreto */
    margin-bottom: 10px;
}

/* O "Box" do Anúncio (Onde o Google AdSense vai carregar) */
.ad-placeholder-horiz, 
.ad-placeholder-vert, 
.ad-placeholder,
.ad-placeholder-vertical,
.inline-ad {
    background: #ffffff; /* Fundo limpo */
    border-radius: 18px !important; /* Raio padrão do seu tema */
    border: 1px solid rgba(220, 223, 232, 0.5) !important; /* Linha sutil do manual */
    box-shadow: 0 10px 24px rgba(11,18,32,.07) !important; /* Sombra suave (shadow-sm) */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}