
/* ========================================
   BLOG REDESIGN v2.0
   Visual premium com imagens e TOC
   ======================================== */

/* --- Blog Hero --- */
.blog-hero {
  position: relative;
  background: url('https://images.unsplash.com/photo-1553729459-efe14ef6055d?w=1600&h=600&fit=crop&q=80') center/cover no-repeat;
  padding: 5.5rem 0 4.5rem;
  text-align: center;
  color: white;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,0.88) 0%, rgba(124,58,237,0.82) 50%, rgba(109,40,217,0.78) 100%);
  z-index: 1;
}
.blog-hero .container {
  position: relative;
  z-index: 2;
}
.blog-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.blog-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 2rem;
}
.blog-hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.blog-hero-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.blog-hero-stat span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* --- Category filter bar --- */
.blog-filter-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 20;
  padding: 0.65rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.blog-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.blog-filter-inner::-webkit-scrollbar { display: none; }

/* --- Featured post --- */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(79,70,229,0.1);
  text-decoration: none;
  color: var(--text);
  margin-bottom: 3rem;
  border: 1px solid rgba(79,70,229,0.12);
  transition: box-shadow 0.25s, transform 0.25s;
}
.blog-featured:hover {
  box-shadow: 0 12px 40px rgba(79,70,229,0.18);
  transform: translateY(-3px);
}
.blog-featured-img {
  height: 320px;
  overflow: hidden;
  position: relative;
}
.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-featured:hover .blog-featured-img img { transform: scale(1.04); }
.blog-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.blog-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(79,70,229,0.1);
  color: #4F46E5;
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  width: fit-content;
}
.blog-featured-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.blog-featured-excerpt {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.blog-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #4F46E5;
  font-weight: 700;
  font-size: 0.95rem;
}

/* --- Blog grid v2 --- */
.blog-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* --- Blog card v2 --- */
.blog-card-v2 {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.blog-card-v2:hover {
  box-shadow: 0 8px 28px rgba(79,70,229,0.14);
  transform: translateY(-4px);
}
.blog-card-v2-img {
  height: 190px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.blog-card-v2-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card-v2:hover .blog-card-v2-img img { transform: scale(1.06); }
.blog-card-v2-cat {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(255,255,255,0.95);
  color: #4F46E5;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}
.blog-card-v2-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-v2-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.55rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-v2-excerpt {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}
.blog-card-v2-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.blog-card-v2-date {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.blog-card-v2-read {
  font-size: 0.76rem;
  font-weight: 600;
  color: #4F46E5;
}

/* --- Reading progress bar --- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #4F46E5, #EC4899);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* --- Post hero image --- */
.blog-post-hero {
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 2rem;
  position: relative;
}
.blog-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-post-hero .blog-img-fallback {
  border-radius: 16px;
  font-size: 6rem;
}
.blog-post-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  border-radius: 0 0 16px 16px;
}

/* --- Blog post layout --- */
.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.blog-post-main { min-width: 0; }
.blog-post-sidebar {
  position: sticky;
  top: 90px;
}

/* --- TOC --- */
.blog-toc {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.blog-toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-toc-list li { margin-bottom: 0.25rem; }
.blog-toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.845rem;
  line-height: 1.4;
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.blog-toc-list a:hover,
.blog-toc-list a.toc-active {
  color: #4F46E5;
  background: rgba(79,70,229,0.07);
  border-left-color: #4F46E5;
}

/* --- Share box --- */
.blog-share-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.blog-share-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.blog-share-btns {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.blog-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.2s, opacity 0.2s;
  font-weight: 600;
}
.blog-share-btn:hover { transform: scale(1.12); opacity: 0.85; }
.blog-share-btn-wa { background: #25D366; color: white; }
.blog-share-btn-tw { background: #1DA1F2; color: white; }
.blog-share-btn-copy { background: var(--bg); color: var(--text); border: 1px solid var(--border); font-size: 0.85rem; }

/* --- Sidebar CTA box --- */
.blog-sidebar-cta {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  border-radius: 14px;
  padding: 1.5rem;
  color: white;
  text-align: center;
}
.blog-sidebar-cta .sidebar-emoji { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.blog-sidebar-cta h4 { font-size: 1rem; font-weight: 800; margin-bottom: 0.4rem; }
.blog-sidebar-cta p { font-size: 0.82rem; opacity: 0.9; margin-bottom: 1rem; line-height: 1.4; }
.blog-sidebar-cta a {
  display: block;
  background: white;
  color: #4F46E5;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.88rem;
  transition: transform 0.2s;
}
.blog-sidebar-cta a:hover { transform: scale(1.03); }

/* --- Article header --- */
.blog-article-header { margin-bottom: 2rem; }
.blog-article-cats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.blog-article-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}
.blog-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.865rem;
  color: var(--text-muted);
}

/* --- Content v2 --- */
.blog-content-v2 {
  line-height: 1.85;
  font-size: 1.05rem;
  color: #1F2937;
}
.blog-content-v2 h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  scroll-margin-top: 90px;
}
.blog-content-v2 h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
  scroll-margin-top: 90px;
}
.blog-content-v2 p { margin-bottom: 1.15rem; }
.blog-content-v2 ul,
.blog-content-v2 ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}
.blog-content-v2 li { margin-bottom: 0.55rem; }
.blog-content-v2 a {
  color: #4F46E5;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-content-v2 a:hover { color: #3730a3; }
.blog-content-v2 strong { font-weight: 700; }
.blog-content-v2 blockquote {
  border-left: 4px solid #4F46E5;
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(79,70,229,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}
.blog-content-v2 table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.blog-content-v2 th {
  background: #4F46E5;
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}
.blog-content-v2 td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.blog-content-v2 tr:last-child td { border-bottom: none; }
.blog-content-v2 tr:nth-child(even) td { background: rgba(79,70,229,0.03); }
.blog-content-v2 .highlight-box {
  background: linear-gradient(135deg, rgba(79,70,229,0.07), rgba(124,58,237,0.07));
  border: 1px solid rgba(79,70,229,0.18);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

/* --- FAQ accordion --- */
.blog-faq-section {
  margin: 3rem 0;
  background: #F9FAFB;
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid var(--border);
}
.blog-faq-section > h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}
.faq-question:hover { background: rgba(79,70,229,0.04); }
.faq-question.faq-open { color: #4F46E5; background: rgba(79,70,229,0.04); }
.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--text-muted);
}
.faq-question.faq-open .faq-chevron {
  transform: rotate(180deg);
  color: #4F46E5;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer.faq-open { max-height: 600px; }
.faq-answer-inner {
  padding: 0.75rem 1.25rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

/* --- CTA v2 --- */
.blog-cta-v2 {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 60%, #6D28D9 100%);
  color: white;
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.blog-cta-v2::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -5%;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.blog-cta-v2::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}
.blog-cta-v2 h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.blog-cta-v2 p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  font-size: 1rem;
}
.blog-cta-v2 .cta-btn {
  display: inline-block;
  background: white;
  color: #4F46E5;
  font-weight: 800;
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.blog-cta-v2 .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.blog-cta-v2 .cta-note {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

/* --- Related posts v2 --- */
.related-posts-v2 {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.related-posts-v2 h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.related-posts-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.related-card-v2 {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.related-card-v2:hover {
  box-shadow: 0 4px 16px rgba(79,70,229,0.1);
  transform: translateY(-2px);
}
.related-card-v2-img {
  height: 90px;
  overflow: hidden;
  flex-shrink: 0;
}
.related-card-v2-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-card-v2-img .blog-img-fallback { font-size: 1.8rem; }
.related-card-v2-body { padding: 0.75rem; flex: 1; }
.related-card-v2-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

/* --- Category page hero --- */
.blog-cat-hero {
  padding: 3rem 0;
  text-align: center;
  color: white;
}
.blog-cat-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.blog-cat-hero p { opacity: 0.88; font-size: 1rem; }

/* Category hero gradients */
.cat-bg-pesquisas { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.cat-bg-renda-extra { background: linear-gradient(135deg, #059669, #10B981); }
.cat-bg-pix { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.cat-bg-dicas { background: linear-gradient(135deg, #F59E0B, #D97706); }
.cat-bg-seguranca { background: linear-gradient(135deg, #EF4444, #F97316); }
.cat-bg-geral { background: linear-gradient(135deg, #6366F1, #8B5CF6); }

/* --- Section title separator --- */
.blog-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.blog-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Blog post container wrapper --- */
.blog-page-wrap {
  background: var(--bg);
  min-height: auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .blog-post-layout { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .blog-post-sidebar { display: none; }
  .blog-grid-v2 { grid-template-columns: repeat(2, 1fr); }
  .related-posts-grid-v2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-hero h1 { font-size: 2rem; }
  .blog-hero-stats { gap: 1.5rem; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { height: 220px; }
  .blog-featured-body { padding: 1.5rem; }
  .blog-featured-title { font-size: 1.3rem; }
  .blog-post-hero { height: 250px; border-radius: 12px; }
  .blog-article-h1 { font-size: 1.7rem; }
  .blog-grid-v2 { grid-template-columns: 1fr; }
  .related-posts-grid-v2 { grid-template-columns: 1fr; }
  .blog-cta-v2 { padding: 2rem 1.5rem; }
  .blog-cta-v2 h3 { font-size: 1.3rem; }
  .blog-post-layout { padding: 1.5rem 1rem; }
  .blog-article-h1 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .blog-hero { padding: 2.5rem 0 2rem; }
  .blog-hero h1 { font-size: 1.7rem; }
}
