/**
 * Arquivo de Estilo para o Tema G1 Modernizado
 * Versão: 2.5 - Correção final para imagem sem corte EM TODAS AS NOTÍCIAS
 */

/* ==========================================================================
   1. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS
   ========================================================================== */
:root {
    --cor-principal: #C4170C;
    --cor-texto: #212529;
    --cor-texto-suave: #6c757d;
    --cor-fundo: #f8f9fa;
    --cor-branco: #fff;
    --borda-cor: #dee2e6;
    --font-principal: 'Roboto', sans-serif;
    --font-titulos: 'Merriweather', serif;
}
body { background-color: var(--cor-fundo); font-family: var(--font-principal); color: var(--cor-texto); }
a { color: var(--cor-texto); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--cor-principal); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-titulos); font-weight: 700; }

/* ==========================================================================
   2. ESTRUTURA PRINCIPAL (HEADER, NAV, FOOTER)
   ========================================================================== */
.header-principal { background-color: var(--cor-branco); border-bottom: 3px solid var(--cor-principal); }
.navbar-principal { background-color: var(--cor-principal) !important; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.navbar-principal .nav-link { color: rgba(255, 255, 255, 0.85) !important; text-transform: uppercase; font-size: 0.9rem; font-weight: bold; }
.navbar-principal .nav-link:hover, .navbar-principal .nav-link.active { color: var(--cor-branco) !important; }
.footer-principal { background-color: #2b2b2b; color: #ccc; }
.footer-principal a { color: #ccc; }
.footer-principal a:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   3. COMPONENTES (CARDS DE NOTÍCIA E SIDEBAR)
   ========================================================================== */
.categoria-tag { color: var(--cor-principal); font-weight: bold; font-size: 0.8rem; text-transform: uppercase; display: inline-block; margin-bottom: 0.5rem; }
.card-noticia { background-color: var(--cor-branco); border: none; border-radius: 4px; overflow: hidden; height: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-noticia:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); }

/* ==========================================================================
   ESTA É A MUDANÇA MAIS IMPORTANTE
   Ela afeta TODAS as imagens de notícias (destaque, recentes, etc.)
   ========================================================================== */
.card-noticia img {
    width: 100%;
    aspect-ratio: 16 / 9; /* Define a "moldura" como retangular */
    object-fit: contain; /* <<<<<<< MUDAMOS DE 'cover' PARA 'contain' */
    background-color: #f0f0f0; /* Um fundo cinza claro para os espaços vazios */
}

.card-noticia .card-body { padding: 1rem; }
.card-noticia .card-title { font-size: 1rem; line-height: 1.3; }
.card-destaque-principal .card-title { font-size: 1.5rem; line-height: 1.2; margin-top: 0.5rem; }
.sidebar-widget .list-group-item { display: flex; align-items: flex-start; gap: 1rem; border: none; padding: 0.75rem 0; border-bottom: 1px solid var(--borda-cor); }
.sidebar-widget .rank-number { font-family: var(--font-titulos); font-size: 1.5rem; color: var(--cor-principal); line-height: 1; }
.sidebar-widget .titulo-link { font-weight: bold; font-size: 0.95rem; }

/* ==========================================================================
   4. GALERIA DE IMAGENS (JÁ ESTAVA CORRETO, MAS USA A MESMA LÓGICA)
   ========================================================================== */
.gallery-card { display: flex; flex-direction: column; height: 100%; background-color: var(--cor-branco); border-radius: 0.375rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.gallery-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.gallery-image-container { width: 100%; aspect-ratio: 16 / 9; background-color: #f0f0f0; display: flex; align-items: center; justify-content: center; }
.gallery-image-container img { width: 100%; height: 100%; object-fit: contain; }
.gallery-card-caption { padding: 0.75rem; font-size: 0.85rem; color: var(--cor-texto-suave); background-color: var(--cor-branco); border-top: 1px solid var(--borda-cor); flex-grow: 1; }