/* ============================================================
   blog.css — Listagem e Post Individual
   ============================================================ */

/* ── BLOG HERO ───────────────────────────────────────────────── */
.blog-hero {
  background: var(--cor-primaria);
  padding: 3rem 1.5rem 2.5rem;
  color: #fff;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: .5rem;
}
.blog-hero p { color: rgba(255,255,255,.6); font-size: .95rem; }

/* ── CATEGORY FILTERS ────────────────────────────────────────── */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--cor-borda);
  margin-bottom: 2rem;
}
.cat-btn {
  background: #fff;
  border: 1px solid var(--cor-borda);
  border-radius: 20px;
  padding: .4rem 1rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--cor-muted);
  cursor: pointer;
  transition: all .2s;
}
.cat-btn:hover,
.cat-btn.ativo {
  background: var(--cor-primaria);
  color: #fff;
  border-color: var(--cor-primaria);
}

/* ── POST GRID ───────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* ── POST CARD ───────────────────────────────────────────────── */
.post-card {
  background: #fff;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.post-card__link { text-decoration: none; color: inherit; display: block; }
.post-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.post-card__placeholder {
  width: 100%;
  height: 180px;
  background: var(--cor-primaria);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255,255,255,.2);
  letter-spacing: -.02em;
}
.post-card__body { padding: 1.1rem 1.2rem 1.25rem; }
.post-card__tag { margin-bottom: .6rem; }
.post-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cor-primaria);
  margin-bottom: .55rem;
}
.post-card__resumo {
  font-size: .85rem;
  color: var(--cor-muted);
  line-height: 1.55;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .76rem;
  color: var(--cor-muted);
  font-family: var(--font-mono);
}

/* Skeleton card */
.post-card--skeleton .post-card__img-sk {
  width: 100%; height: 180px;
}
.post-card--skeleton .sk-tag  { width: 70px; height: 20px; margin-bottom: .6rem; }
.post-card--skeleton .sk-title { width: 90%; height: 18px; margin-bottom: .4rem; }
.post-card--skeleton .sk-title2 { width: 70%; height: 18px; margin-bottom: .8rem; }
.post-card--skeleton .sk-text  { width: 100%; height: 12px; margin-bottom: .3rem; }
.post-card--skeleton .sk-text2 { width: 85%; height: 12px; margin-bottom: .7rem; }
.post-card--skeleton .sk-meta  { width: 140px; height: 12px; }

/* Load more */
.load-more-wrap { text-align: center; margin: 1.5rem 0 2rem; }
.btn-load-more {
  background: transparent;
  border: 2px solid var(--cor-primaria);
  color: var(--cor-primaria);
  font-weight: 700;
  font-size: .9rem;
  padding: .65rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-load-more:hover { background: var(--cor-primaria); color: #fff; }

/* Empty state */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cor-muted);
}
.empty-state p { font-size: 1.05rem; }

/* ── POST INDIVIDUAL ─────────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { order: 2; }
}

.post-main { min-width: 0; }

/* Breadcrumb */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--cor-muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}
.post-breadcrumb a { color: var(--cor-muted); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--cor-acento); }
.post-breadcrumb span { color: var(--cor-borda); }

/* Post header */
.post-header { margin-bottom: 2rem; }
.post-header__cats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .85rem; }
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .85rem;
}
.post-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .82rem;
  color: var(--cor-muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}
.post-header__meta .author { color: var(--cor-primaria); font-weight: 600; }

/* Hero image */
.post-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Post content */
.post-content { font-size: 1rem; line-height: 1.8; color: #1a1a1a; }
.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 .5rem;
}
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin-bottom: 1rem; }
.post-content li { margin-bottom: .4rem; }
.post-content a { color: var(--cor-acento2); }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--cor-acento);
  padding: .75rem 1.25rem;
  background: #fff8f5;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #333;
}
.post-content pre, .post-content code {
  font-family: var(--font-mono);
  font-size: .88rem;
  background: #1e2330;
  color: #e2e8f0;
  border-radius: 5px;
}
.post-content pre { padding: 1.25rem; overflow-x: auto; margin: 1.25rem 0; }
.post-content :not(pre) > code { padding: .15rem .4rem; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content hr { border: none; border-top: 1px solid var(--cor-borda); margin: 2rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.post-content th { background: var(--cor-primaria); color: #fff; padding: .6rem .9rem; text-align: left; }
.post-content td { padding: .6rem .9rem; border-bottom: 1px solid var(--cor-borda); }
.post-content tr:nth-child(even) td { background: #faf9f6; }

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--cor-borda); }
.post-tags .tag-item {
  background: #f0ede7;
  color: var(--cor-muted);
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.post-sidebar { position: sticky; top: 80px; }

.sidebar-block {
  background: #fff;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-block h3 {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cor-muted);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--cor-borda);
}

/* Sidebar product card */
.sidebar-product {
  display: flex;
  gap: .85rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--cor-borda);
  text-decoration: none;
  color: inherit;
}
.sidebar-product:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-product img {
  width: 56px; height: 56px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--cor-borda);
  flex-shrink: 0;
}
.sidebar-product__info { flex: 1; min-width: 0; }
.sidebar-product__title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--cor-primaria);
  line-height: 1.35;
  margin-bottom: .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-product__price { font-size: .82rem; color: var(--cor-acento); font-weight: 700; }
.sidebar-product__cta {
  display: block;
  margin-top: .4rem;
  font-size: .75rem;
  color: var(--cor-acento2);
  font-weight: 600;
}
