/* =========================================================
   Amar Nutrindo — Blog
   Listagem (cards, filtros, paginação) + página de artigo.
   Reaproveita os design tokens de styles.css (:root).
   ========================================================= */

/* ---------- Cabeçalho da listagem ---------- */
.blog-hero { padding: 56px 0 8px; text-align: center; }
.blog-hero h1 {
  font-size: clamp(30px, 4.5vw, 46px); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 14px; text-wrap: balance;
}
.blog-hero p { font-size: clamp(15px, 2vw, 18px); line-height: 1.6; color: var(--muted); max-width: 620px; margin: 0 auto; }

/* ---------- Barra de filtros ---------- */
.blog-filters { padding: 28px 0 8px; }
.blog-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid rgba(45,28,16,0.12); border-radius: 14px;
  padding: 12px 16px; max-width: 460px; margin: 0 auto 22px;
}
.blog-search svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.blog-search input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; color: var(--roots); background: transparent; }
.blog-search input::placeholder { color: var(--muted-2); }

.filter-group { margin-bottom: 14px; }
.filter-group__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; text-align: center; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.pill {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 100px; transition: all .18s ease;
  background: #fff; color: var(--roots); border: 1px solid rgba(45,28,16,0.12);
}
.pill:hover { border-color: var(--dawn); color: var(--dawn); }
.pill.is-active { background: var(--dawn); color: #fff; border-color: var(--dawn); box-shadow: 0 8px 18px rgba(92,5,242,0.28); }
.pill--tag.is-active { background: var(--citrus); border-color: var(--citrus); box-shadow: 0 8px 18px rgba(255,106,0,0.28); }

/* ---------- Resumo de resultados ---------- */
.blog-resultinfo { text-align: center; font-size: 14px; color: var(--muted); margin: 6px 0 26px; }
.blog-resultinfo button {
  background: none; border: none; font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--dawn); cursor: pointer; text-decoration: underline; padding: 0 0 0 6px;
}

/* ---------- Grade de cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid rgba(45,28,16,0.07); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(92,5,242,0.30); box-shadow: 0 22px 44px -22px rgba(45,28,16,0.30); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--harmony); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.post-card__cat {
  align-self: flex-start; font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 100px; background: var(--dawn-soft); color: var(--dawn);
}
.post-card__title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.post-card__title a { color: var(--roots); }
.post-card__title a:hover { color: var(--dawn); }
.post-card__desc { font-size: 14px; line-height: 1.55; color: var(--muted); flex: 1; }
.post-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.post-card__date { font-size: 12.5px; color: var(--muted-2); }
.post-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-card__tag { font-size: 11px; font-weight: 500; color: var(--muted); background: var(--cream-bg); padding: 3px 9px; border-radius: 100px; }

/* ---------- Estado vazio ---------- */
.blog-empty { text-align: center; padding: 60px 20px; }
.blog-empty__emoji { font-size: 44px; margin-bottom: 14px; }
.blog-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.blog-empty p { font-size: 15px; color: var(--muted); }

/* ---------- Paginação ---------- */
.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 44px 0 8px; flex-wrap: wrap; }
.page-btn {
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px;
  background: #fff; color: var(--roots); border: 1px solid rgba(45,28,16,0.12);
  display: inline-flex; align-items: center; justify-content: center; transition: all .18s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--dawn); color: var(--dawn); }
.page-btn.is-active { background: var(--dawn); color: #fff; border-color: var(--dawn); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { color: var(--muted-2); padding: 0 4px; }

/* =========================================================
   PÁGINA DE ARTIGO (post)
   ========================================================= */
.article { padding: 40px 0 20px; }
.article__head { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.article__back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--dawn); margin-bottom: 22px; }
.article__back:hover { text-decoration: underline; }
.article__cat { display: inline-block; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 100px; background: var(--dawn-soft); color: var(--dawn); margin-bottom: 16px; }
.article__title { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; text-wrap: balance; }
.article__meta { font-size: 14px; color: var(--muted-2); }
.article__cover { max-width: 920px; margin: 0 auto 36px; border-radius: 24px; overflow: hidden; box-shadow: 0 40px 80px -34px rgba(45,28,16,0.35); }
.article__cover img { width: 100%; height: auto; display: block; }

.article__body { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.75; color: var(--roots); }
.article__body > * + * { margin-top: 22px; }
.article__body h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin-top: 40px; }
.article__body h3 { font-size: 20px; font-weight: 600; margin-top: 32px; }
.article__body p { color: #463422; }
.article__body a { color: var(--dawn); text-decoration: underline; }
.article__body ul, .article__body ol { padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.article__body li { line-height: 1.65; }
.article__body blockquote { border-left: 4px solid var(--energy); background: var(--cream-bg); padding: 18px 22px; border-radius: 0 14px 14px 0; font-size: 17px; color: var(--muted); }
.article__body img { border-radius: 16px; }
.article__tags { max-width: 720px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.article__tags .post-card__tag { font-size: 13px; padding: 6px 14px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 36px 0 4px; }
  .article__body { font-size: 16px; }
}
