/* ===== RESET & VARIÁVEIS ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cor-primaria: #2c3e50;
  --cor-secundaria: #3498db;
  --cor-fundo: #f8f9fa;
  --cor-texto: #333;
  --cor-cinza-claro: #ecf0f1;
  --sombra: 0 2px 8px rgba(0, 0, 0, 0.1);
  --borda-radius: 8px;
}

body {
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  line-height: 1.6;
  color: var(--cor-texto);
  background-color: var(--cor-fundo);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== CABEÇALHO ===== */
.cabecalho {
  background-color: white;
  box-shadow: var(--sombra);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.8rem;
  color: var(--cor-primaria);
  font-weight: 600;
}

.navegacao {
  display: flex;
  align-items: center;
}

.menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.menu a {
  text-decoration: none;
  color: var(--cor-primaria);
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.5rem 0;
}

.menu a:hover,
.menu a.ativo {
  color: var(--cor-secundaria);
  border-bottom: 2px solid var(--cor-secundaria);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cor-primaria);
  font-size: 1.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--cor-primaria);
}

/* ===== CONTEÚDO PRINCIPAL ===== */
main.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  margin: 2.5rem auto;
  flex: 1;
}

/* Grid de Posts */
.posts-recentes h2 {
  margin-bottom: 1.5rem;
  color: var(--cor-primaria);
  font-size: 2rem;
  border-bottom: 3px solid var(--cor-secundaria);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card-post {
  background: white;
  border-radius: var(--borda-radius);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.post-imagem {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-conteudo {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-data {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.post-titulo {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--cor-primaria);
  line-height: 1.3;
}

.post-resumo {
  margin-bottom: 1.5rem;
  color: #555;
  flex: 1;
}

.btn-leia-mais {
  display: inline-block;
  background-color: var(--cor-secundaria);
  color: white;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 500;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn-leia-mais:hover {
  background-color: #2980b9;
}

/* ===== SIDEBAR ===== */
.sidebar .widget {
  background: white;
  padding: 1.5rem;
  border-radius: var(--borda-radius);
  box-shadow: var(--sombra);
  margin-bottom: 2rem;
}

.widget h3 {
  margin-bottom: 1rem;
  color: var(--cor-primaria);
  border-left: 4px solid var(--cor-secundaria);
  padding-left: 0.75rem;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.5rem;
}

.widget a {
  color: var(--cor-secundaria);
  text-decoration: none;
}

.widget a:hover {
  text-decoration: underline;
}

/* ===== PÁGINA DE POST COMPLETO ===== */
.pagina-post {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.post-completo {
  background: white;
  border-radius: var(--borda-radius);
  box-shadow: var(--sombra);
  padding: 2rem;
}

.post-cabecalho {
  margin-bottom: 2rem;
}

.post-cabecalho h1 {
  font-size: 2.5rem;
  color: var(--cor-primaria);
  margin-bottom: 0.5rem;
}

.post-metadata {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-imagem-destaque {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--borda-radius);
  margin: 1.5rem 0;
}

.post-texto {
  font-size: 1.1rem;
}

.post-texto h2 {
  margin: 2rem 0 1rem;
  color: var(--cor-primaria);
}

.post-texto p {
  margin-bottom: 1.2rem;
}

.post-texto blockquote {
  margin: 1.5rem 0;
  padding: 1rem 2rem;
  background: var(--cor-cinza-claro);
  border-left: 5px solid var(--cor-secundaria);
  font-style: italic;
}

.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.post-footer a {
  color: var(--cor-secundaria);
  text-decoration: none;
  font-weight: 500;
}

/* ===== RODAPÉ ===== */
.rodape {
  background: var(--cor-primaria);
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
}

.rodape p {
  margin: 0.3rem 0;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .cabecalho .container {
    flex-direction: column;
    align-items: stretch;
  }

  .navegacao {
    justify-content: space-between;
    margin-top: 1rem;
  }

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    background: white;
    padding: 1rem 0;
  }

  .menu.ativo {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  main.container {
    grid-template-columns: 1fr;
  }

  .logo {
    font-size: 1.5rem;
    text-align: center;
  }

  .post-cabecalho h1 {
    font-size: 2rem;
  }

  .post-completo {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .grid-posts {
    grid-template-columns: 1fr;
  }
}
