/* --- Variáveis Globais e Estilos Base --- */
:root {
    --primary-brand-color: #001F5C; /* Azul Escuro do logo - Para Títulos, Logo, Destaques */
    --secondary-brand-color: #F7008C; /* Rosa Vibrante do logo - Para Botões, CTAs, Links */
    --text-color: #343a40; /* Texto Escuro para legibilidade */
    --text-light: #6c757d; /* Cinza para textos secundários */
    --background-color: #f8f9fa; /* Fundo Levemente Cinza */
    --light-background: #ffffff; /* Fundo Branco Puro para Cards */
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);

html {
    scroll-behavior: smooth;
}

body { 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    margin: 0; 
    background: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

h1, h2, h3 {
    color: var(--primary-brand-color);
    font-weight: 700;
}

/* --- Cabeçalho --- */
header { 
    background: var(--light-background); 
    border-bottom: 1px solid var(--border-color); 
    box-shadow: 0 2px 4px var(--shadow-color); 
    padding: 15px 0; 
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-img-container { 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
}

.logo-img-container img { 
    height: 40px; 
    width: auto; 
}

nav a { 
    margin-left: 25px; 
    color: var(--text-color); 
    text-decoration: none; 
    font-weight: 500; 
    transition: color 0.3s ease; 
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav a:hover { 
    color: var(--secondary-brand-color); 
    border-bottom-color: var(--secondary-brand-color);
}

/* Estilo para o link da página ativa no menu */
nav a.active {
    color: var(--secondary-brand-color); /* Cor de destaque */
    font-weight: 700; /* Deixa o texto em negrito */
    cursor: default; /* Remove o cursor de link */
    pointer-events: none; /* Desativa o clique no link */
    border-bottom-color: transparent; /* Remove o efeito de hover */
}

/* --- Menu Hambúrguer (Desktop - Oculto) --- */
.hamburger-menu,
.nav-close {
    display: none;
}

/* --- Barra de Pesquisa (Desktop) --- */
.search-container {
    display: flex;
    flex-grow: 1;
    margin: 0 30px;
    max-width: 500px;
}

.search-container input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 50px 0 0 50px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-container input:focus {
    border-color: var(--secondary-brand-color);
    box-shadow: 0 0 0 2px rgba(247, 0, 140, 0.2);
}

.search-container button {
    padding: 8px 15px;
    border: 1px solid var(--primary-brand-color);
    background-color: var(--primary-brand-color);
    color: white;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-container button:hover {
    background-color: #001441;
}

/* --- Banner Principal (Hero) --- */
.hero-blog { 
    background: linear-gradient(rgba(0, 31, 92, 0.85), rgba(0, 31, 92, 0.9)), url('https://images.unsplash.com/photo-1557682250-33bd709cbe85?q=80&w=2070&auto=format&fit=crop') no-repeat center center; 
    background-size: cover; 
    color: white; 
    padding: 80px 20px; 
    text-align: center; 
    margin-bottom: 50px; 
}

.hero-blog h1 { 
    font-size: 2.8rem; 
    margin-bottom: 15px; 
    color: white;
}

.hero-blog p { 
    font-size: 1.2rem; 
    opacity: 0.9; 
    max-width: 700px;
    margin: 0 auto;
}

/* --- Seção de Posts --- */
.posts-section h2, .download-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--secondary-brand-color);
    display: inline-block;
    padding-bottom: 10px;
}

.posts-section {
    text-align: center;
    margin-bottom: 50px;
}

.post-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 25px; 
    margin-bottom: 40px; 
    text-align: left;
}

.post-card { 
    display: flex;
    flex-direction: column;
    background: var(--light-background); 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    box-shadow: 0 4px 6px var(--shadow-color);
}

.post-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 12px 20px rgba(0,0,0,0.1); 
}

.post-image { 
    height: 220px; 
    overflow: hidden;
    display: block; /* Garante que o link se comporte como um bloco e aceite a altura */
}

.post-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content { 
    padding: 25px; 
    flex-grow: 1;
    display: flex; flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.post-content h3 { 
    margin-top: 0; 
    font-size: 1.3rem; /* Reduzido para melhor ajuste no card */
    line-height: 1.4;
} 

.post-content p { 
    font-size: 1rem; 
    color: var(--text-light); 
    margin-bottom: 20px;
    flex-grow: 1; /* Faz o parágrafo crescer e empurrar o botão para baixo */
}

.post-read-more { 
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    color: var(--secondary-brand-color); 
    text-decoration: none; 
    font-weight: bold; 
    transition: gap 0.3s ease;
} 

.post-read-more:hover {
    gap: 12px;
}

/* --- Estilos do Modal de Artigo --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--light-background);
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-brand-color);
}

.modal-content h2 {
    font-size: 2rem;
    margin-top: 0;
    padding-top: 0; /* Remove o espaçamento superior para que o título role */
    margin-bottom: 20px;
}

/* Estilo para o título que agora está DENTRO do corpo do modal */
.modal-body h2 {
    font-size: 2rem;
    margin-top: 0;
    padding-right: 40px;
    margin-bottom: 20px;
    color: var(--primary-brand-color); /* #001F5C */
}
/* --- Botões e Links de Ação --- */
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.cta-button.primary {
    background-color: var(--primary-brand-color);
    color: white;
}

.cta-button.primary:hover {
    background-color: #001441;
    transform: translateY(-2px);
}

.cta-button.secondary {
    background-color: var(--secondary-brand-color);
    color: white;
}

.cta-button.secondary:hover {
    background-color: #e0007e;
    transform: translateY(-2px);
}

.cta-button i {
    margin-right: 8px;
}

/* --- Seção de Downloads --- */
.download-section { 
    background: var(--light-background); 
    padding: 40px; 
    border-radius: 8px; 
    border-top: 4px solid var(--primary-brand-color); 
    margin-bottom: 50px; 
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.download-section h2 {
    border-bottom: none;
    margin-bottom: 15px;
}

.download-section p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
}

.download-list a {
    display: block;
    margin: 15px auto;
    max-width: 500px;
}

/* --- Rodapé --- */
footer { 
    background: #1F1F1F; 
    color: #e9ecef; 
    padding: 40px 20px; 
    text-align: center; 
    font-size: 0.9rem; 
}

.footer-links {
    margin: 15px 0;
}

.footer-links a { 
    color: #ced4da; 
    margin: 0 10px; 
    text-decoration: none; 
    transition: color 0.3s ease;
}

.footer-links a:hover { 
    color: var(--secondary-brand-color); 
} 

/* --- Responsividade --- */
@media (max-width: 768px) {
    .search-container {
        display: none; /* Esconde a barra de pesquisa no mobile */
    }

    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--primary-brand-color);
        cursor: pointer;
        z-index: 1002;
    }
    .nav-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 25px;
        background: none;
        border: none;
        font-size: 2.5rem;
        color: white;
        z-index: 1002;
    }
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 31, 92, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transform: translateX(-100%);
        z-index: 1001;
        transition: transform 0.3s ease-in-out;
    }
    nav.nav-open {
        transform: translateX(0);
    }
    nav a {
        color: white;
        font-size: 1.5rem;
        margin: 0;
        border: none;
    }
    .hero-blog h1 { 
        font-size: 2.2rem; 
    }
    .hero-blog p { 
        font-size: 1rem; 
    }
}

/* Ajuste para 4 colunas em telas maiores */
@media (min-width: 1200px) {
    .post-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

/* Ajusta a largura do conteúdo principal em telas maiores para páginas específicas */
@media (min-width: 1024px) {
    body.narrow-content-page .container,
    body.narrow-content-page footer .max-w-6xl {
        max-width: 960px;
    }
}
}