/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fafafa;
  color: #1f1d2b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #7c3aed; text-decoration: none; }
a:hover { color: #6d28d9; text-decoration: underline; }

/* === Layout === */
.blog-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.blog-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: minmax(0, 1fr) 320px; } }

/* === Header === */
.blog-header {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}
.brand-text { font-weight: 700; color: #1f1d2b; font-size: 1.05rem; }
.brand-text span { color: #7c3aed; font-weight: 400; }

.blog-nav { display: flex; align-items: center; gap: 0.25rem; }
.blog-nav a {
  padding: 0.5rem 1rem; border-radius: 8px;
  color: #4b5563; font-size: 0.92rem; font-weight: 500;
  transition: all 0.2s;
}
.blog-nav a:hover { background: #f3f4f6; color: #1f1d2b; text-decoration: none; }
.blog-nav a.active { color: #7c3aed; background: rgba(124,58,237,0.08); }
.blog-nav .cta-wa {
  margin-left: 0.75rem;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff !important;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(22,163,74,0.25);
}
.blog-nav .cta-wa:hover { background: linear-gradient(135deg, #15803d, #14532d); transform: translateY(-1px); }

@media (max-width: 700px) {
  .blog-nav a:not(.cta-wa) { display: none; }
  .blog-nav .cta-wa { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
}

/* === Hero do blog === */
.blog-hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-bottom: 1px solid #f1f1f4;
}
.blog-hero h1 {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 0.875rem;
  letter-spacing: -0.02em;
}
.blog-hero h1 .accent {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero p { font-size: 1.075rem; color: #6b7280; margin: 0; max-width: 700px; }

/* === Search box no hero === */
.blog-search { margin-top: 1.5rem; max-width: 540px; }
.blog-search form { display: flex; gap: 0.5rem; }
.blog-search input {
  flex: 1; padding: 0.7rem 1rem; border-radius: 10px;
  border: 1px solid #e5e7eb; font-size: 0.95rem;
  background: #fff; transition: all 0.2s;
}
.blog-search input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.blog-search button {
  padding: 0.7rem 1.5rem; border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #fff; font-weight: 600; border: 0; cursor: pointer;
  font-size: 0.95rem;
}

/* === Lista de posts (cards) === */
.blog-main { padding: 2.5rem 0 4rem; }
.posts-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }

.post-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid #f1f1f4;
  transition: all 0.25s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.post-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08); border-color: #e5e7eb;
}
.post-card .cover {
  aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
}
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .cover img { transform: scale(1.04); }
.post-card .body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.post-card .cat-pill {
  display: inline-block; align-self: flex-start;
  padding: 3px 10px; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(124,58,237,0.1); color: #7c3aed;
}
.post-card h2 {
  font-size: 1.125rem; font-weight: 800; line-height: 1.3;
  margin: 0; color: #1f1d2b;
}
.post-card .excerpt { color: #6b7280; font-size: 0.92rem; margin: 0; flex: 1; }
.post-card .meta { display: flex; align-items: center; gap: 0.625rem; font-size: 0.78rem; color: #9ca3af; margin-top: 0.5rem; }

/* === Sidebar === */
.blog-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.side-card {
  background: #fff; border: 1px solid #f1f1f4; border-radius: 12px; padding: 1.25rem;
}
.side-card h3 { margin: 0 0 0.875rem; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; }
.side-card .cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6;
  color: #1f1d2b; font-weight: 500; font-size: 0.92rem;
}
.side-card .cat-list a:hover { color: #7c3aed; text-decoration: none; }
.side-card .cat-list a:last-child { border-bottom: 0; }
.side-card .cat-list span { background: #f3f4f6; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; color: #6b7280; }
.side-card .pop-list { display: flex; flex-direction: column; gap: 0.875rem; }
.side-card .pop-item { display: flex; gap: 0.625rem; align-items: flex-start; text-decoration: none; }
.side-card .pop-item:hover { text-decoration: none; }
.side-card .pop-item .num { font-size: 1.25rem; font-weight: 900; color: #7c3aed; line-height: 1; flex-shrink: 0; width: 1.4rem; }
.side-card .pop-item h4 { margin: 0; font-size: 0.88rem; color: #1f1d2b; font-weight: 600; line-height: 1.3; }
.side-card.cta {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  color: #fff; border: 0;
}
.side-card.cta h3 { color: rgba(255,255,255,0.85); }
.side-card.cta h4 { color: #fff; font-weight: 800; font-size: 1.125rem; margin: 0 0 0.5rem; line-height: 1.25; }
.side-card.cta p { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin: 0 0 1rem; }
.side-card.cta a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.625rem 1.125rem; background: #fff; color: #7c3aed; border-radius: 9999px; font-weight: 700; font-size: 0.88rem; }
.side-card.cta a:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

/* === Paginação === */
.pagination { display: flex; gap: 0.4rem; justify-content: center; align-items: center; margin: 2.5rem 0 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.5rem 0.875rem; border-radius: 8px;
  border: 1px solid #e5e7eb; font-size: 0.92rem; color: #4b5563;
  background: #fff; min-width: 38px; text-align: center;
}
.pagination a:hover { background: #f3f4f6; text-decoration: none; }
.pagination .current { background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 600; }

/* === Página individual do post === */
.post-page { padding: 2.5rem 0 4rem; }
.post-header { margin-bottom: 2rem; }
.breadcrumb { font-size: 0.82rem; color: #9ca3af; margin-bottom: 1rem; }
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #7c3aed; text-decoration: none; }
.breadcrumb .sep { margin: 0 0.4rem; }
.post-header h1 {
  font-size: clamp(1.875rem, 5vw, 2.875rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.875rem; font-size: 0.875rem; color: #6b7280; }
.post-meta .cat-pill { background: rgba(124,58,237,0.1); color: #7c3aed; padding: 4px 12px; border-radius: 9999px; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.post-cover { aspect-ratio: 16/9; overflow: hidden; border-radius: 14px; margin-bottom: 2rem; background: linear-gradient(135deg, #ede9fe, #dbeafe); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* === Conteúdo do post === */
.post-content {
  font-size: 1.05rem; line-height: 1.75; color: #1f1d2b;
  max-width: 720px;
}
.post-content > * + * { margin-top: 1rem; }
.post-content h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 800; margin: 2.25rem 0 0.875rem;
  line-height: 1.25; color: #111827; letter-spacing: -0.01em;
}
.post-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.875rem 0 0.625rem; color: #111827; }
.post-content p { margin: 0 0 1rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin: 1rem 0; }
.post-content li { margin: 0.4rem 0; }
.post-content blockquote {
  border-left: 3px solid #7c3aed;
  padding: 0.5rem 0 0.5rem 1.25rem; margin: 1.5rem 0;
  font-style: italic; color: #4b5563;
  background: rgba(124,58,237,0.04); border-radius: 0 8px 8px 0;
}
.post-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; }
.post-content pre { background: #1f2937; color: #e5e7eb; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.post-content pre code { background: transparent; color: inherit; padding: 0; }
.post-content img, .post-content figure { border-radius: 10px; margin: 1.5rem 0; }
.post-content a { color: #7c3aed; font-weight: 500; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content th, .post-content td { padding: 0.625rem 0.875rem; border-bottom: 1px solid #e5e7eb; text-align: left; }
.post-content th { background: #f9fafb; font-weight: 700; }
.post-content strong { color: #111827; }

/* === Compartilhamento === */
.post-share {
  display: flex; gap: 0.625rem; align-items: center; flex-wrap: wrap;
  padding: 1.5rem 0; margin: 2rem 0; border-top: 1px solid #f1f1f4; border-bottom: 1px solid #f1f1f4;
}
.post-share .label { font-weight: 600; color: #6b7280; font-size: 0.88rem; }
.post-share button, .post-share a {
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  border: 1px solid #e5e7eb; background: #fff; cursor: pointer; color: #4b5563;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.post-share button:hover, .post-share a:hover { background: #f3f4f6; text-decoration: none; }

/* === CTA final === */
.post-cta {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  color: #fff; padding: 2.5rem 2rem; border-radius: 16px;
  margin: 2.5rem 0; text-align: center;
}
.post-cta h2 { color: #fff; font-size: 1.625rem; margin: 0 0 0.625rem; font-weight: 800; }
.post-cta p { color: rgba(255,255,255,0.9); margin: 0 0 1.5rem; font-size: 1.025rem; }
.post-cta a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; color: #7c3aed; padding: 0.875rem 2rem;
  border-radius: 9999px; font-weight: 700; font-size: 1.02rem;
}
.post-cta a:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.18); text-decoration: none; }

/* === Posts relacionados === */
.related-posts { padding: 2.5rem 0; border-top: 1px solid #f1f1f4; }
.related-posts h2 { font-size: 1.375rem; font-weight: 800; margin: 0 0 1.5rem; color: #111827; }

/* === Footer === */
.blog-footer {
  background: #111827; color: #d1d5db;
  margin-top: 4rem; padding: 3rem 0 1.5rem;
}
.footer-row { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #1f2937; }
@media (min-width: 700px) { .footer-row { grid-template-columns: 2fr 1fr 1fr; } }
.footer-row .brand-text { color: #fff; }
.footer-tag { color: #9ca3af; font-size: 0.92rem; margin: 0.625rem 0 0; max-width: 380px; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links strong { color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.footer-links a { color: #9ca3af; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; color: #6b7280; }

/* === WhatsApp FAB === */
.wa-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.45);
  transition: all 0.2s; z-index: 100;
}
.wa-fab:hover { transform: scale(1.1); color: #fff; text-decoration: none; }
.wa-fab::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; background: #25d366;
  animation: wa-pulse 2s ease-out infinite; z-index: -1;
}
@keyframes wa-pulse { 0%{transform:scale(1);opacity:1} 100%{transform:scale(1.5);opacity:0} }

/* === Empty state === */
.empty {
  background: #fff; border: 1px dashed #e5e7eb; padding: 3rem 1.5rem;
  border-radius: 12px; text-align: center; color: #6b7280;
}
.empty h3 { color: #1f1d2b; margin: 0 0 0.5rem; }
