/* =====================================================
   BLOG — V3 Design System aligned
   ===================================================== */

/* Hero do blog — mesma animação da home (bgDrift + meshShift + partículas) */
.blog-hero, .page-hero {
  position: relative;
  background: var(--ink, #0A1628);
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero .hero-bg-img, .page-hero .hero-bg-img {
  position: absolute;
  inset: -80px;
  background-image: url('../img/banner.webp');
  background-size: cover;
  background-position: center;
  filter: blur(12.6px) saturate(1.3) brightness(.78);
  transform: scale(1.16);
  opacity: 1;
  z-index: 0;
  animation: blogBgDrift 26s ease-in-out infinite;
  will-change: transform;
}

.blog-hero .hero-bg-overlay, .page-hero .hero-bg-overlay,
.blog-hero .hero-overlay, .page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,.45) 0%, rgba(10,22,40,.55) 50%, rgba(255,255,255,.95) 100%);
  z-index: 1;
}

.blog-hero .hero-bg-overlay::after, .page-hero .hero-bg-overlay::after,
.blog-hero .hero-overlay::after, .page-hero .hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(10,22,40,.35) 100%);
}

.blog-hero::before, .page-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  height: 900px;
  background:
    radial-gradient(ellipse 60% 50% at 25% 30%, rgba(59,91,255,.32), transparent 60%),
    radial-gradient(ellipse 50% 60% at 75% 70%, rgba(212,175,158,.28), transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(63,211,198,.2), transparent 60%);
  filter: blur(30px);
  z-index: 1;
  animation: blogMeshShift 18s ease-in-out infinite;
  mix-blend-mode: multiply;
  opacity: .9;
  pointer-events: none;
}

.blog-hero .blog-particle, .page-hero .blog-particle {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: blogFloatUp linear infinite;
}

@keyframes blogBgDrift {
  0%, 100% { transform: scale(1.18) translate(0, 0); }
  50% { transform: scale(1.22) translate(-1.5%, -1%); }
}

@keyframes blogMeshShift {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-48%) scale(1.06); }
}

@keyframes blogFloatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120vh) translateX(40px); opacity: 0; }
}

.blog-hero .container, .page-hero .container {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 880px;
}

@media (max-width: 600px) {
  .blog-hero .hero-bg-img, .page-hero .hero-bg-img {
    filter: blur(20px) saturate(1.1) brightness(.78);
    opacity: .85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero .hero-bg-img, .page-hero .hero-bg-img,
  .blog-hero::before, .page-hero::before,
  .blog-hero .blog-particle, .page-hero .blog-particle {
    animation: none !important;
  }
}

/* Controles (busca + filtros) */
.blog-controls {
  margin-top: -40px;
  margin-bottom: 20px;
  background: var(--white, #fff);
  padding: 24px 26px;
  border-radius: 20px;
  box-shadow: 0 24px 50px -16px rgba(10,22,40,.15);
  border: 1px solid var(--line, #E6EAF0);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.search-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
}
.search-wrapper i.fa-search {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2, #8A93A3);
  font-size: 14px;
}
.search-wrapper input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  border: 1px solid var(--line, #E6EAF0);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--bg, #FAFBFC);
  color: var(--ink, #0A1628);
  transition: all .3s;
  outline: none;
}
.search-wrapper input:focus {
  border-color: var(--indigo, #3B5BFF);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,91,255,.08);
}
.search-wrapper input::placeholder { color: var(--muted-2, #8A93A3) }

.filter-wrapper,
.categories-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-controls-wrap {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.blog-listing {
  padding-top: 0 !important;
  padding-bottom: 80px !important;
}

.blog-listing .section-head {
  margin-bottom: 40px;
}
.blog-hero-inner h1,
.blog-hero .blog-hero-inner h1 {
  color: #fff !important;
  font-size: clamp(36px, 5.5vw, 64px) !important;
  font-weight: 700 !important;
  letter-spacing: -.04em !important;
  line-height: 1.05 !important;
  margin-bottom: 16px !important;
}

.blog-hero-inner h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold, #D4AF9E);
}

.blog-hero-inner p {
  color: rgba(255,255,255,.85) !important;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.55;
  max-width: 680px;
  margin: 0 auto;
}

.blog-social {
  padding-top: 80px !important;
  padding-bottom: 80px !important;
}

.blog-social-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.blog-social-head h2 {
  font-size: clamp(28px, 4vw, 40px) !important;
  font-weight: 700 !important;
  letter-spacing: -.03em !important;
  color: var(--ink, #0A1628) !important;
  margin-bottom: 12px !important;
}

.blog-social-head p {
  color: var(--muted, #5B6678);
  line-height: 1.6;
}

.social-connect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}

.social-card-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 20px;
  background: var(--white, #fff);
  border: 1px solid var(--line, #E6EAF0);
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink, #0A1628);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
  box-shadow: 0 8px 24px -12px rgba(10,22,40,.1);
}

.social-card-large:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 24px 48px -16px rgba(10,22,40,.16);
}

.social-card-large .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  transition: transform .35s;
}

.social-card-large:hover .icon-circle {
  transform: scale(1.08);
}

.social-card-large span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.social-card-large.instagram .icon-circle {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-card-large.facebook .icon-circle {
  background: #1877F2;
}

.social-card-large.youtube .icon-circle {
  background: #FF0000;
}

.social-card-large.whatsapp .icon-circle {
  background: #25D366;
}

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

@media (max-width: 480px) {
  .social-connect-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted, #5B6678);
  font-size: 15px;
}

@media (max-width: 900px) {
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .categories-wrapper {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
}
.filter-btn, .category-btn {
  padding: 10px 18px;
  border-radius: 100px;
  background: var(--bg, #FAFBFC);
  border: 1px solid var(--line, #E6EAF0);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2, #1E2A3D);
  cursor: pointer;
  transition: all .3s;
  letter-spacing: -.01em;
}
.filter-btn:hover, .category-btn:hover {
  border-color: var(--ink, #0A1628);
}
.filter-btn.active, .category-btn.active {
  background: var(--ink, #0A1628);
  color: #fff;
  border-color: var(--ink, #0A1628);
}

/* Grid de artigos */
.articles-grid, .posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 80px;
}
@media (max-width: 900px) { .articles-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px } }
@media (max-width: 600px) { .articles-grid, .posts-grid { grid-template-columns: 1fr } }

.article-card, .blog-card {
  background: var(--white, #fff);
  border: 1px solid var(--line, #E6EAF0);
  border-radius: 24px;
  overflow: hidden;
  transition: all .5s cubic-bezier(.2,.8,.2,1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.article-card:hover, .blog-card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 30px 60px -20px rgba(10,22,40,.18);
}
.article-card-image, .blog-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--bg, #FAFBFC);
}
.article-card-image img, .blog-card-image img,
.article-card > img, .blog-card > img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  transition: transform 1s;
}
.article-card:hover img { transform: scale(1.05) }
.article-card-content, .blog-card-content {
  padding: 26px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-meta, .blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted, #5B6678);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.article-cat, .blog-cat, .post-cat {
  background: var(--indigo-soft, #E8EDFF);
  color: var(--indigo, #3B5BFF);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.article-card h3, .blog-card h3, .article-card h2, .blog-card h2 {
  font-family: 'Inter', sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  color: var(--ink, #0A1628) !important;
  line-height: 1.25 !important;
  margin: 4px 0 !important;
}
.article-card p, .blog-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #5B6678);
  flex: 1;
}
.article-card-cta, .read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #0A1628);
  margin-top: 8px;
  transition: gap .3s, color .3s;
  text-decoration: none;
}
.article-card:hover .read-more,
.article-card:hover .article-card-cta { color: var(--indigo, #3B5BFF); gap: 12px }

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 60px 0;
}
.pagination a, .pagination button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white, #fff);
  border: 1px solid var(--line, #E6EAF0);
  color: var(--ink, #0A1628);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all .3s;
  cursor: pointer;
}
.pagination a:hover, .pagination button:hover {
  border-color: var(--ink, #0A1628);
}
.pagination .active, .pagination a.current {
  background: var(--ink, #0A1628);
  color: #fff;
  border-color: var(--ink, #0A1628);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted, #5B6678);
}
.empty-state i {
  font-size: 48px;
  color: var(--muted-2, #8A93A3);
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink, #0A1628);
  margin-bottom: 12px;
}
