/* ============================================
   Blog da imobilirIA
   Complementa css/styles.css (tokens, header,
   botões, footer). Só classes do artigo.
   ============================================ */

.blog-main {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

/* ---------- Índice ---------- */

.blog-hero {
  max-width: 44rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  margin: 0 0 0.85rem;
}

.blog-hero__lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--ink-300);
}

.post-card__cat {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

.post-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  flex: 1;
}

.post-card__meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- Artigo ---------- */

.post {
  max-width: 44rem;
  margin: 0 auto;
}

.post__kicker {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.75rem;
}

.post__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 1rem;
}

.post__meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.prose {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-700);
}

.prose p { margin: 0 0 1.25rem; }

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.4375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text);
  margin: 2.25rem 0 0.85rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 1.75rem 0 0.6rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

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

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong { color: var(--text); }

.prose .table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--surface);
}

.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--ink-50);
}

/* Tabela comparativa (vs/): a 1ª coluna é rótulo de linha em <th>. Sem nowrap, senão o
   rótulo longo engole a largura e espreme as colunas de conteúdo. */
.prose thead th { white-space: nowrap; }
.prose thead th:first-child { white-space: normal; }
.prose tbody th {
  width: 30%;
  white-space: normal;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-700, var(--text));
}
.prose tbody td { line-height: 1.45; }

.prose tr:last-child th, .prose tr:last-child td { border-bottom: none; }

/* Tabela larga (post-lista, 6 colunas): rola dentro do .table-wrap, mas sem espremer coluna a
   ponto de quebrar "R$ 129,90" em quatro linhas. */
.prose thead th:not(:first-child) { min-width: 8.5rem; }

/* Comparativo de exatamente 3 colunas no celular: terços iguais, sem rolagem lateral, pra
   coluna do concorrente não sumir da tela. */
@media (max-width: 560px) {
  .prose table:has(thead th:nth-child(3):last-child) {
    table-layout: fixed;
    font-size: 0.8125rem;
  }
  .prose table:has(thead th:nth-child(3):last-child) th,
  .prose table:has(thead th:nth-child(3):last-child) td {
    padding: 0.55rem 0.5rem;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .prose table:has(thead th:nth-child(3):last-child) tbody th { width: 30%; font-size: 0.75rem; }
}

.prose blockquote {
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--brand-soft);
  color: var(--ink-600);
  font-style: italic;
}

/* Bloco de template copiável */
.tpl {
  background: var(--ink-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-700);
  white-space: pre-line;
}

.tpl__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* Box de CTA do post */
.post-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  margin: 2.5rem 0 0;
  box-shadow: var(--shadow-sm);
}

.post-cta__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.post-cta__body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0 0 1.1rem;
}

.post-cta__note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* Relacionados */
.related {
  max-width: 44rem;
  margin: 2.75rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.related__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.related__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.related__list a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

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

/* Nota de atualização (página de números) */
.updated-note {
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--ink-50);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* Botão dentro do corpo do artigo: não herda estilo de link do .prose */
.prose .btn,
.prose .btn:hover {
  color: #fff;
  text-decoration: none;
}

/* ---------- Blocos extraíveis (resposta direta, FAQ, fontes) ---------- */

/* Resposta curta logo abaixo do título: o fato antes da narrativa. */
.post__answer {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink-50);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.75rem;
}

.post__answer p { margin: 0; }

/* Perguntas frequentes do post */
.post-faq {
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.post-faq__title {
  font-family: var(--font-display);
  font-size: 1.4375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.post-faq__q {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 1.5rem 0 0.4rem;
}

.post-faq__a {
  margin: 0;
  color: var(--ink-700);
}

/* Fontes citadas */
.sources {
  margin: 2.25rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.sources__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.sources ol {
  margin: 0;
  padding-left: 1.2rem;
}

.sources li { margin-bottom: 0.4rem; }

/* Trilha de navegação: espelha o BreadcrumbList do JSON-LD */
.crumbs {
  max-width: 44rem;
  margin: 0 auto 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.crumbs [aria-current="page"] {
  color: var(--text-body);
}

/* ---------- Figuras dos posts ---------- */

.post-figure {
  margin: 0 0 1.75rem;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--ink-50);
}

.post-figure figcaption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Miniatura no card do índice: mesma figura do post, 600 px */
.post-card__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--ink-50);
}
