/* ==========================================================================
   Comuniva — Blog e páginas de conteúdo
   Hub do blog, artigos e páginas de caso de uso.
   Complementa css/home.css (variáveis) e css/pages.css (hero e prose base).
   ========================================================================== */

/* ------------------------------------------------------------ hub do blog */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #D7DEEC;
}
.post-card .post-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--indigo);
  background: #EEF0FE;
  border-radius: 999px;
  padding: 5px 11px;
}
.post-card h3 {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: var(--ink);
}
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { color: var(--indigo); }
.post-card p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-3);
}
.post-card .post-meta {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------- artigo */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 56px;
  align-items: start;
}

.article-body { max-width: 720px; }
.article-body h2 {
  margin-top: 44px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.03em;
  color: var(--ink);
}
.article-body h3 {
  margin-top: 32px;
  font-size: 19px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.article-body p {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-3);
}
.article-body ul,
.article-body ol {
  margin-top: 16px;
  padding-left: 22px;
}
.article-body li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-3);
  margin-top: 9px;
}
.article-body li::marker { color: var(--indigo); }
.article-body strong { color: var(--ink-2); font-weight: 700; }
/* Só links de texto corrido. Sem o :not(), este seletor (0,1,1) vence
   .button-primary (0,1,0) e pinta o rótulo do botão de índigo sobre
   o fundo índigo — o texto some. */
.article-body a:not(.button):not(.btn) { color: var(--indigo); }

.article-lead {
  font-size: 19px !important;
  line-height: 1.65 !important;
  color: var(--ink-2) !important;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  font-size: 14px;
  color: #C7D2FE;
}

.callout {
  margin-top: 28px;
  border-left: 3px solid var(--indigo);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
}
.callout p { margin-top: 0; font-size: 16px; }
.callout p + p { margin-top: 12px; }

.checklist {
  margin-top: 22px;
  list-style: none;
  padding-left: 0;
}
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-top: 12px;
}
.checklist li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 13px;
  color: var(--teal);
}

/* ---------------------------------------------------------- barra lateral */

.article-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}
.aside-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.aside-card h2 {
  font-size: 17px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.aside-card p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.aside-card .btn { margin-top: 16px; width: 100%; justify-content: center; }
.aside-card.cta { background: var(--grad-brand); border-color: transparent; }
.aside-card.cta h2, .aside-card.cta p { color: #fff; }
.aside-card.cta p { color: #C7D2FE; }

.aside-links { list-style: none; padding-left: 0; margin-top: 12px; }
.aside-links li { margin-top: 10px; }
.aside-links a {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-decoration: none;
}
.aside-links a:hover { color: var(--indigo); text-decoration: underline; }

/* ------------------------------------------------------ caso de uso / nicho */

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.usecase-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.usecase-card .icon-wrap {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: #EEF0FE;
  color: var(--indigo);
}
.usecase-card h3 { margin-top: 16px; font-size: 18px; color: var(--ink); }
.usecase-card p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--ink-3); }

/* ------------------------------------------------------------- comparação */

.compare-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}
.compare-table thead th {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}
.compare-table tbody th { font-weight: 700; color: var(--ink-2); width: 30%; }
.compare-table td { color: var(--ink-3); }

/* ------------------------------------------------------------- migalhas */

.breadcrumb {
  font-size: 14px;
  color: #A5B4FC;
}
.breadcrumb a { color: #C7D2FE; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; opacity: .6; }

/* ------------------------------------------------------------ responsivo */

@media (max-width: 980px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-aside { position: static; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .post-grid,
  .usecase-grid { grid-template-columns: minmax(0, 1fr); }
  .article-body p, .article-body li { font-size: 16px; }
  .compare-table { font-size: 14.5px; }
  .compare-table th, .compare-table td { padding: 12px 12px; }
}

/* ------------------------------------------------- figuras de tutorial */

.shot {
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.shot img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}
.shot figcaption {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
  max-width: 46ch;
}
.shot figcaption b { color: var(--ink-2); font-weight: 600; }

/* duas telas lado a lado quando houver espaco */
.shot-par {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.shot-par .shot { margin: 0; }

@media (max-width: 620px) {
  .shot-par { grid-template-columns: minmax(0, 1fr); }
}

/* aviso de que a figura e ilustracao, nao captura de tela */
.shot-nota {
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* passo numerado */
.passo {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  margin-top: 26px;
  align-items: start;
}
.passo .n {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}
.passo h3 { margin-top: 3px; }
.passo p:first-of-type { margin-top: 8px; }

/* tabela de custo em creditos */
.creditos td:last-child,
.creditos th:last-child { text-align: right; white-space: nowrap; }

/* .button tem white-space:nowrap (certo no cabecalho, onde o rotulo e curto).
   No corpo do artigo o CTA e mais longo e precisa poder quebrar, senao
   estoura a viewport no celular. 0,2,0 vence o 0,1,0 de .button. */
.article-body .button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
