/* ==========================================================================
   1. GERAL & UTILITÁRIOS
   ========================================================================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif !important; /* Fonte principal do portal */
    font-size: 1.1rem; /* Aumento da base para melhor leitura */
    color: #333;
}

/* Classes de Utilidade de Texto */
.texto-p { font-size: 1rem; }
.texto-m { font-size: 1.7rem; }
.texto-g { font-size: 2.4rem; }
.texto-branco { color: #fff !important; }
.texto-preto { color: #000; }

p { margin-bottom: 0 !important; }
hr { opacity: 1; }

/* ==========================================================================
   2. CABEÇALHO (TOPO)
   ========================================================================== */
.topo, .menu-topo {
    background: #169939 !important; /* Verde Envira */
}

.barra-topo {
    font-size: 0.8rem;
    background: #f6f7f9;
}

.barra-topo a {
    color: #000;
    text-decoration: none;
}

.topo-desktop { font-size: 0.9rem; }
.topo-desktop .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
}

.menu-topo { font-weight: 600; }
.social-topo img { width: 30px !important; }
.vr { min-height: 1.1vh !important; }

/* ==========================================================================
   3. BLOCOS DA HOME
   ========================================================================== */

/* Seção de Serviços */
.bloco-servicos p { margin-bottom: 0; }

/* Bloco de Vídeos */
.bloco-videos { background: #c3d542; }

/* Bloco de Notícias - Estrutura */
.noticias-home .featured-mobile { display: none; }

.noticias-home .featured-post {
    position: relative;
    overflow: hidden;
}

.noticias-home .featured-post a {
    color: #fff;
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
}

/* Hover News Home */
.noticias-home .featured-post a:hover .featured-image img {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.05);
}

.noticias-home .featured-post .featured-image {
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Ajuste de Imagem Destaque Home */
.noticias-home .featured-post .featured-image img {
    transition: all 0.25s;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    object-fit: cover;
    min-width: 100%;
    min-height: 100%;
}

.noticias-home .featured-left .featured-post .featured-image { height: 450px; }
.noticias-home .featured-right .featured-post .featured-image { height: 163px !important; }

/* Overlay de Texto na Home */
.noticias-home .featured-post .main-text {
    background-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.9) 100%);
    position: absolute;
    left: 0; bottom: 0; right: 0;
    padding: 10px 30px 20px;
}

.noticias-home .featured-post .main-text .post-category {
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    color: #fff;
    text-transform: uppercase;
}

.noticias-home .featured-post .main-text .post-title {
    text-shadow: 1px 1px 1px #000;
    letter-spacing: -0.02em;
    font-weight: 800;
    line-height: 1.1;
}

/* Lista Lateral de Notícias */
.noticias-dir a { text-decoration: none; color: #000; }
.noticias-dir a b { color: #c3d542; }
.noticias-dir a h4 { font-size: 1.4rem; }

/* ==========================================================================
   4. SINGLE POST (PÁGINA DA NOTÍCIA)
   ========================================================================== */

/* Título e Meta */
.post-main-title {
    font-weight: 800;
    color: #169939;
    line-height: 1.2;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.post-meta-simple {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

/* Breadcrumbs Customizados */
.custom-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
}

.custom-breadcrumb .breadcrumb-item a {
    color: #169939;
    text-decoration: none;
    font-weight: 500;
}

/* Imagem Destaque com Corte 16:9 */
.featured-image-container {
    overflow: hidden;
    border-radius: 8px;
}

.featured-img-crop {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Corpo do Texto da Notícia */
.post-content-body {
    font-size: 1.25rem; /* Fonte confortável para leitura */
    line-height: 1.8;
}

.post-content-body p { margin-bottom: 1.8rem; color: #333; }

.post-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Posts Relacionados */
.related-card {
    transition: transform 0.2s;
    height: 100%;
}

.related-card:hover { transform: translateY(-5px); }

.related-card h6 {
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.related-card:hover h6 { color: #169939; }

.object-fit-cover { object-fit: cover; }

/* ==========================================================================
   5. OVERLAY DE BUSCA
   ========================================================================== */
#search {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    transition: all 0.5s ease-in-out;
    transform: translate(0, -100%) scale(0, 0);
    opacity: 0;
}

#search.open {
    transform: translate(0, 0) scale(1, 1);
    opacity: 1;
    z-index: 9999;
}

#search input[type=search] {
    position: absolute;
    top: 50%; width: 100%;
    color: #fff; background: transparent;
    font-size: 60px; font-weight: 300; text-align: center;
    border: 0; margin: -51px auto 0;
    padding: 0 30px; outline: 0;
}

#search .btn {
    position: absolute;
    top: 50%; left: 50%;
    margin-top: 61px; margin-left: -45px;
    background-color: #169939;
}

#search .close {
    border: none; position: fixed;
    top: 15px; right: 15px;
    background: #fff; color: #5a0808;
    border-radius: 50%; height: 50px; width: 50px;
    display: flex; justify-content: center; align-items: center;
}

/* ==========================================================================
   6. RODAPÉ
   ========================================================================== */
.rodape {
    background: #169939 !important;
    color: #fff;
}

.rodape h6 { font-weight: 800; }

.assinatura {
    background: #169939 !important;
}

/* ==========================================================================
   LISTAGEM DE NOTÍCIAS (ARCHIVE)
   ========================================================================== */

.archive-card {
    transition: transform 0.3s ease;
}

.archive-card:hover {
    transform: translateY(-8px);
}

.archive-card .card-title {
    font-size: 1.2rem;
    line-height: 1.4;
    height: 3.4rem; /* Garante alinhamento dos títulos */
    overflow: hidden;
}

/* PAGINAÇÃO CUSTOM */
.pagination-container {
    margin-top: 3rem;
}

.nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.nav-links .page-numbers {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #169939;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-links .page-numbers:hover {
    background: #169939;
    color: #fff;
}

.nav-links .page-numbers.current {
    background: #169939;
    color: #fff;
    border-color: #169939;
}