/* CSS Reset / Normalize (Simples) */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Cor de fundo geral */
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: #007bff; /* Cor padrão para links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Variáveis CSS */
:root {
    --primary-color: #007bff; /* Azul primário */
    --secondary-color: #6c757d; /* Cinza secundário */
    --light-bg: #f8f9fa; /* Fundo claro */
    --dark-text: #343a40; /* Texto escuro */
    --light-text: #f8f9fa; /* Texto claro */
    --header-bg: #ffffff; /* Fundo do cabeçalho */
    --footer-bg: #343a40; /* Fundo do rodapé */
    --container-max-width: 1140px;
    --spacing-unit: 1rem; /* ~16px */
}

/* Utilitários */
.container {
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: calc(var(--spacing-unit) * 1.5);
    padding-right: calc(var(--spacing-unit) * 1.5);
}

.section-padding {
    padding-top: calc(var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 3);
}

.bg-light {
    background-color: var(--light-bg);
}

.btn {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.read-more {
    font-weight: bold;
    color: var(--primary-color);
}

.see-all-link {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 2);
}

/* Cabeçalho */
.site-header {
    background-color: var(--header-bg);
    padding: var(--spacing-unit) 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-text);
    text-decoration: none;
}

.main-nav .nav-list {
    display: flex;
    gap: calc(var(--spacing-unit) * 1.5);
}

.main-nav a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-nav a:hover,
.main-nav a.active /* Classe 'active' pode ser adicionada via JS ou manualmente */
{
    color: var(--primary-color);
    text-decoration: none;
}

.menu-toggle {
    display: none; /* Escondido em desktop */
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark-text);
}

/* Seção Hero */
.hero-section {
    background-color: var(--primary-color); /* Ou uma imagem de fundo */
    color: var(--light-text);
    padding: calc(var(--spacing-unit) * 4) 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-unit);
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid de Conteúdo (Notícias, Galerias, etc.) */
.grid-container {
    display: grid;
    gap: calc(var(--spacing-unit) * 2);
}

/* Grid padrão com 3 colunas em desktop */
.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Grid padrão com 2 colunas em desktop para galerias (exemplo) */
.gallery-grid {
     grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.grid-item a {
    text-decoration: none;
    color: inherit;
}

.grid-item-image {
    width: 100%;
    height: 200px; /* Altura fixa para imagens do grid */
    object-fit: cover; /* Garante que a imagem cubra a área sem distorcer */
    border-bottom: 1px solid #eee;
}

.grid-item-title {
    font-size: 1.2rem;
    margin: var(--spacing-unit) var(--spacing-unit) calc(var(--spacing-unit) * 0.5);
    color: var(--dark-text);
}

.grid-item-excerpt {
    font-size: 0.95rem;
    color: var(--secondary-color);
    padding: 0 var(--spacing-unit) var(--spacing-unit);
    flex-grow: 1; /* Faz o parágrafo ocupar espaço disponível */
}

.grid-item .read-more {
     display: block;
     padding: var(--spacing-unit);
     text-align: left;
}

/* Rodapé */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: calc(var(--spacing-unit) * 2) 0;
    margin-top: calc(var(--spacing-unit) * 3);
}

.footer-content {
    display: flex;
    flex-direction: column; /* Empilha em mobile */
    align-items: center;
    text-align: center;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap; /* Quebra linha em mobile */
    justify-content: center;
    gap: var(--spacing-unit);
    margin-top: var(--spacing-unit);
}

.footer-nav a {
    color: #adb5bd; /* Cinza mais claro para links do rodapé */
}

.footer-nav a:hover {
    color: var(--light-text);
}

/* Estilos para Páginas de Categoria (Listagem) */
.page-header {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: calc(var(--spacing-unit) * 2) 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.page-header h1 {
    text-align: center;
    font-size: 2rem;
}

/* Estilos para Página de Artigo */
.article-content img {
    margin-top: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    border-radius: 4px;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.article-content h2 {
    margin-top: calc(var(--spacing-unit) * 2);
    margin-bottom: var(--spacing-unit);
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: var(--spacing-unit);
    
}

/* Estilos para Página de Galeria */
.gallery-page-grid {
    display: grid;
    gap: var(--spacing-unit);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Mais colunas para thumbs */
}

.gallery-page-item figure {
    margin: 0;
    position: relative;
}

.gallery-page-item img {
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.gallery-page-item a:hover img {
    transform: scale(1.03);
}

.gallery-page-item figcaption {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 0.5);
}

/* Responsividade */
@media (max-width: 768px) {
    .main-nav .nav-list {
        display: none; /* Esconde a lista no mobile */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Logo abaixo do header */
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        padding: var(--spacing-unit) 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-nav .nav-list.active {
        display: flex; /* Mostra a lista quando ativa */
    }

    .main-nav li {
        text-align: center;
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: var(--spacing-unit);
        border-bottom: 1px solid #eee;
    }

    .main-nav li:last-child a {
        border-bottom: none;
    }

    .menu-toggle {
        display: block; /* Mostra o botão hambúrguer */
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-nav ul {
        margin-top: var(--spacing-unit);
    }
}

@media (min-width: 769px) {
    .footer-content {
        flex-direction: row; /* Lado a lado em desktop */
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-nav ul {
        margin-top: 0;
    }
}

