/* Sonapp — telas que o site estático aprovado não tinha: índice do blog,
   artigo, arquivo, busca e 404. Usa os mesmos tokens de site.css; nada aqui
   deve redefinir a paleta nem mexer no layout da home. */

/* ---------- neutralizar o que o Gutenberg traz por padrão ---------- */


.wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- cards de artigo ---------- */

.post-list {
  margin: 0 auto;
  max-width: 760px;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  padding: 28px 30px;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.post-card-title a {
  color: var(--ink);
  text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus-visible {
  color: var(--primary-deep);
  text-decoration: underline;
}

.post-card-excerpt {
  color: var(--ink-body);
  margin: 0 0 12px;
}

.post-card-excerpt .wp-block-post-excerpt__more-link {
  color: var(--primary-deep);
  font-weight: 700;
  text-decoration: none;
}

.post-card-excerpt .wp-block-post-excerpt__more-link:hover {
  text-decoration: underline;
}

.post-meta {
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin: 0;
}

.post-list-related {
  max-width: 900px;
}

.post-list-related .wp-block-post-template {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.post-list-related .post-card {
  margin-bottom: 0;
  padding: 22px 24px;
}

.post-list-related .post-card-title {
  font-size: 1.1rem;
  margin: 0;
}

/* ---------- paginação ---------- */

.post-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

.post-pagination a,
.post-pagination .page-numbers {
  color: var(--primary-deep);
  font-weight: 700;
  text-decoration: none;
}

.post-pagination a:hover {
  text-decoration: underline;
}

.post-pagination .page-numbers.current {
  color: var(--ink);
}

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

.post-hero .post-meta {
  margin-top: 10px;
}

.post-cover img {
  border-radius: var(--radius-lg);
  height: auto;
  margin-bottom: 28px;
  width: 100%;
}

.post-body {
  color: var(--ink-body);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 720px;
}

.post-body h2 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 40px 0 14px;
}

.post-body h3 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 30px 0 10px;
}

.post-body p {
  margin: 0 0 18px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body a {
  color: var(--primary-deep);
}

.post-body img {
  border-radius: var(--radius);
  height: auto;
  max-width: 100%;
}

.post-body blockquote {
  border-left: 3px solid var(--lilac-2);
  color: var(--ink);
  font-family: var(--font-serif);
  margin: 26px 0;
  padding: 4px 0 4px 20px;
}

/* Aviso médico dentro do artigo: <blockquote class="notice-inline"> */
.post-body .notice-inline {
  background: var(--amber-bg);
  border: 0;
  border-radius: var(--radius);
  color: var(--amber-text);
  font-family: var(--font-body);
  padding: 18px 20px;
}

/* ---------- busca ---------- */

.post-search {
  margin: 20px auto 0;
  max-width: 460px;
}

.post-search .wp-block-search__input {
  border: 1px solid var(--lilac-2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  padding: 12px 14px;
}

.post-search .wp-block-search__button {
  background: var(--primary);
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 12px 18px;
}

/* Card de tema que virou link.

   O site.css tem uma regra .edu-card-link herdada do gerador antigo, que
   empilha ícone e texto em coluna e deixa o card 25px mais alto que os
   vizinhos. Ela nunca chegou a ser usada — o gerador foi suspenso antes de
   publicar artigo — então não existe versão aprovada dela. O único visual
   aprovado é o card de 86px com ícone e texto na mesma linha, e é ele que
   vale aqui: o link não muda a caixa, só o comportamento. */

.edu-card > a {
  color: inherit;
  text-decoration: none;
}

.edu-card > a:hover {
  color: var(--primary-deep);
}

.edu-card > a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ---------- 404 e CTA do blog ---------- */

.center-cta .btn + .btn {
  margin-left: 10px;
}

@media (max-width: 560px) {
  .post-card { padding: 22px 20px; }
  .center-cta .btn + .btn { margin: 10px 0 0; }
}

/* ---------- índice de /conteudo/ ---------- */

/* Os 8 temas como uma sequência numerada, não como feed cronológico.
   Reaproveita .edu-icon do CSS aprovado para o ícone de cada tema. */

.conteudo-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  list-style: none;
  margin: 0 auto;
  max-width: 940px;
  padding: 0;
}

.conteudo-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 28px 24px;
  position: relative;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.conteudo-card:hover,
.conteudo-card:focus-within {
  box-shadow: 0 8px 28px -8px rgba(44, 30, 86, 0.22);
  transform: translateY(-2px);
}

/* O número fica no canto, discreto: ordena a leitura sem competir com o título. */
.conteudo-num {
  color: var(--lilac-2);
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  position: absolute;
  right: 24px;
  top: 22px;
}

.conteudo-icone {
  margin-bottom: 14px;
}

.conteudo-titulo {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 0 0 10px;
  padding-right: 46px;
}

.conteudo-titulo a {
  color: inherit;
  text-decoration: none;
}

.conteudo-titulo a::after {
  content: "";
  inset: 0;
  position: absolute;
}

.conteudo-card:hover .conteudo-titulo a {
  color: var(--primary-deep);
}

.conteudo-titulo a:focus-visible::after {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.conteudo-resumo {
  color: var(--ink-body);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0 0 14px;
}

.conteudo-data {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin: 0;
}

/* Tema ainda sem artigo: mostra que existe, sem fingir que é link. */
.conteudo-card-embreve {
  background: transparent;
  border: 1px dashed var(--lilac-2);
  box-shadow: none;
}

.conteudo-card-embreve:hover {
  box-shadow: none;
  transform: none;
}

.conteudo-card-embreve .conteudo-titulo {
  color: var(--ink-soft);
}

.conteudo-card-embreve .conteudo-icone {
  opacity: 0.55;
}

.conteudo-status {
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .conteudo-card { padding: 22px 20px; }
  .conteudo-num { font-size: 1.6rem; right: 18px; top: 18px; }
}
