/* --- ESTILOS GLOBAIS E RESET --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: #222222;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* Container centralizado */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Layout Principal (Grid de duas colunas) */
.main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin: 40px auto;
}


/* --- CORPO DO ARTIGO (POST CONTENT) --- */
.post-content {
  background-color: #ffffff;
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.post-header {
  border-bottom: 1px solid #f1f3f5;
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.post-category {
  display: inline-block;
  background-color: #e7ecef;
  color: #495057;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  margin-bottom: 10px;
}

.post-full-title {
  font-size: 2.2rem;
  color: #1b263b;
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-meta {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Tipografia interna do Artigo */
.post-body p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #333333;
}

.post-body h2 {
  margin: 35px 0 15px 0;
  color: #1b263b;
}

.post-body code {
  background-color: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95rem;
}

.post-body blockquote {
  border-left: 4px solid #3a86ff;
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: #495057;
}

/* Bloco de Destaque para o Foreword */
.post-foreword {
  background-color: #f1f5f9; /* Tom azul/cinza suave */
  border-left: 4px solid #64748b; /* Borda lateral neutra */
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 30px;
}

.post-foreword h3 {
  font-size: 1.1rem;
  color: #334155;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-foreword p {
  font-size: 1rem;
  color: #475569;
  font-style: italic;
  margin-bottom: 0; /* Remove a margem padrão apenas dentro deste bloco */
}

/* --- SEÇÃO DE COMENTÁRIOS --- */
.comments-section {
  margin-top: 50px;
  border-top: 2px solid #f1f3f5;
  padding-top: 30px;
}

.comment-form {
  margin: 20px 0 35px 0;
}

.form-group {
  margin-bottom: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #3a86ff;
}

.btn-submit {
  background-color: #3a86ff;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-submit:hover {
  background-color: #2563eb;
}

/* Lista de comentários */
.comment-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f8f9fa;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background-color: #6c757d;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.comment-details h4 {
  font-size: 0.95rem;
  color: #1b263b;
  margin-bottom: 4px;
}

.comment-time {
  font-weight: normal;
  font-size: 0.8rem;
  color: #adb5bd;
  margin-left: 8px;
}

.comment-details p {
  color: #495057;
  font-size: 0.95rem;
}

/* --- BARRA LATERAL (SIDEBAR) --- */
.sidebar .widget {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-bottom: 2px solid #f1f3f5;
  padding-bottom: 8px;
}

.related-posts {
  list-style: none;
}

.related-posts li {
  margin-bottom: 10px;
}

.related-posts li a {
  color: #3a86ff;
  text-decoration: none;
}

.related-posts li a:hover {
  text-decoration: underline;
}


/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  
  .post-content {
    padding: 20px;
  }
  
  .post-full-title {
    font-size: 1.8rem;
  }
}
