/* =====================================================
   CSS PARA A PÁGINA PRINCIPAL DO BLOG (index.html)
   ===================================================== */


/*
  1. Use um modelo de box-sizing mais intuitivo.
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

/*
    2. Remova a margem padrão de todos os elementos.
  */
* {
    margin: 0;
}

/*
    3. Permita que elementos de porcentagem de altura funcionem corretamente.
  */
html,
body {
    height: 100%;
}

/*
    4. Adicione melhorias de tipografia: suavização de fonte e altura de linha padrão.
  */
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/*
    5. Melhore o comportamento de mídias (imagens, vídeos, etc.) por padrão.
  */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/*
    6. Remova a herança de fontes padrão em formulários.
  */
input,
button,
textarea,
select {
    font: inherit;
}

/*
    7. Evite quebras de texto indesejadas.
  */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* --- Configurações Globais e Variáveis --- */
:root {
    --cor-fundo: #f8f9fa;
    --cor-fundo-card: #ffffff;
    --cor-texto-principal: #212529;
    --cor-texto-secundario: #6c757d;
    --cor-link: #0056b3;
    --cor-borda: #dee2e6;
    --cor-sombra: rgba(0, 0, 0, 0.07);
    --fonte-titulo: 'Montserrat', sans-serif;
    --fonte-corpo: 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--fonte-corpo);
    line-height: 1.7;
    color: var(--cor-texto-principal);
    background-color: var(--cor-fundo);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Cabeçalho com a Logo --- */
.site-header {
    background-color: #121212;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.logo {
    max-height: 70px;
    width: auto;
}

/* --- Estilos da Lista de Posts --- */
.blog-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

.blog-header h1 {
    font-family: var(--fonte-titulo);
    font-size: 2.8rem;
    color: var(--cor-texto-principal);
    text-align: center;
    margin-bottom: 10px;
}

.blog-header p {
    text-align: center;
    color: var(--cor-texto-secundario);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.post-card {
    background-color: var(--cor-fundo-card);
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px var(--cor-sombra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--cor-sombra);
}

.post-card .post-meta {
    font-size: 0.9rem;
    color: var(--cor-texto-secundario);
    margin-bottom: 15px;
    font-weight: 500;
}

.post-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: var(--fonte-titulo);
    font-size: 1.9rem;
}

.post-card h2 a {
    text-decoration: none;
    color: var(--cor-texto-principal);
    transition: color 0.2s ease;
}

.post-card h2 a:hover {
    color: var(--cor-link);
}

.post-card .post-excerpt {
    color: var(--cor-texto-secundario);
    font-size: 1rem;
}

.post-card .read-more {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    text-decoration: none;
    color: var(--cor-link);
    transition: color 0.2s ease;
}

.post-card .read-more:hover {
    color: var(--cor-texto-principal);
}

/* --- Acessibilidade e Responsividade --- */
a:focus-visible {
    outline: 2px solid var(--cor-link);
    outline-offset: 4px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .blog-container {
        margin-top: 30px;
        padding: 0 15px;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .post-card {
        padding: 20px;
    }

    .post-card h2 {
        font-size: 1.5rem;
    }
}