/* ==========================================================================
   Ajudo — Blog (índice + post único)
   UX de leitura + sinais de autoridade (E-E-A-T): byline com autor, datas,
   tempo de leitura, capa, caixa do autor, compartilhar e posts relacionados.
   ========================================================================== */

/* ---------- Índice do blog ------------------------------------------------ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop), var(--shadow-md);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop), 0 14px 30px rgba(0,0,0,0.12); }
.post-card-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-deep);
  background: #e4ecdf;
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 3px 11px;
}
.post-card h2, .post-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.18;
  margin: 4px 0 0;
  color: var(--ink);
}
.post-card:hover h2, .post-card:hover h3 { color: var(--green-deep); }
.post-card p { font-size: 0.93rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.post-card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-top: auto; padding-top: 4px; }

/* ---------- Post único ---------------------------------------------------- */
.blog-single .post { max-width: 760px; margin: 0 auto; }

.post-header { margin-bottom: 24px; }
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.1;
  margin: 6px 0 18px;
}

/* Byline (autor + datas) */
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
}
.post-author { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.post-author:hover .post-author-name { color: var(--green-deep); }
.post-author-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.post-author-meta { display: flex; flex-direction: column; line-height: 1.25; }
.post-author-name { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.post-author-role { font-size: 0.8rem; color: var(--ink-soft); }
.post-dates { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; font-size: 0.85rem; color: var(--ink-soft); }
.post-readtime { font-weight: 600; color: var(--green-deep); }

/* Capa */
.post-cover {
  margin: 0 0 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-pop), var(--shadow-md);
}
.post-cover img { display: block; width: 100%; height: auto; }

/* Corpo do texto — leitura confortável */
.blog-content { font-size: 1.06rem; line-height: 1.72; color: var(--ink); }
.blog-content > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
}
.blog-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 1.7em 0 0.5em;
}
.blog-content h3 { font-size: 1.2rem; margin: 1.3em 0 0.4em; }
.blog-content p { margin: 0 0 1.1em; }
.blog-content ul, .blog-content ol { margin: 0 0 1.2em 1.3em; }
.blog-content li { margin-bottom: 0.5em; }
.blog-content a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.blog-content a:hover { color: var(--green); }
.blog-content strong { font-weight: 700; }
.blog-content blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--mustard);
  font-style: italic;
  color: var(--ink);
}
.blog-content em { font-style: italic; }
.blog-content img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* Compartilhar */
.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0;
  padding: 16px 0;
  border-top: 1.5px solid var(--line);
}
.post-share-label { font-weight: 700; font-size: 0.9rem; }
.post-share-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: var(--green-deep);
  background: var(--paper);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 7px 16px;
  transition: background 0.15s ease, color 0.15s ease;
}
.post-share-btn:hover { background: var(--green); color: var(--paper); }
.post-share-hint { font-size: 0.85rem; font-weight: 600; color: var(--green-deep); }

/* Caixa do autor (E-E-A-T) */
.post-authorbox {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--paper-deep);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-top: 8px;
}
.post-authorbox-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--mustard);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.post-authorbox-body { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.post-authorbox-eyebrow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin: 0 0 2px; }
.post-authorbox-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin: 0 0 6px; }
.post-authorbox-role { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.post-authorbox-body p { margin: 0 0 8px; }
.post-authorbox-links a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.post-authorbox-links a:hover { text-decoration: underline; }

/* "Leia também" / relacionados herdam .blog-grid acima.
   Section "Do blog" na home */
.section-blog .blog-grid { margin-top: 24px; }

@media (max-width: 560px) {
  .post-byline { gap: 10px; }
  .post-dates { align-items: flex-start; }
  .post-authorbox { flex-direction: column; gap: 12px; }
}
