/* BLOG BANNER */
.blog-banner {
  position: relative;
  overflow: hidden;
  height: 520px;
  min-height: 340px;
}

.blog-banner__image {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  object-fit: cover;
}

.blog-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-banner__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

.blog-banner__container {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px var(--container-padding);
  display: flex;
  align-items: center;
}

.blog-banner__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}

.blog-banner__title {
  font-size: 2.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.15;
  margin: 0;
}

.blog-banner__desc {
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0;
}

/* CATEGORIES SELECTOR */
.blog-grid__categories-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
}

.blog-grid__categories-swiper {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
}

.blog-grid__categories-swiper .swiper-slide--cat {
  width: auto;
}

.blog-grid__cat-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #006492;
  background: #fff;
  color: #006492;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

.blog-grid__cat-arrow:hover {
  background: #006492;
  color: #fff;
  transform: scale(1.08);
}

.blog-grid__cat-arrow.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.blog-grid__cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 24px;
  border: 2px solid #006492;
  border-radius: 30px;
  background: #fff;
  color: #006492;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .3s ease, color .3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}

.blog-grid__cat-btn:hover {
  background: #006492;
  color: #fff;
}

.blog-grid__cat-btn.active {
  background: #006492;
  color: #fff;
}

/* BLOG GRID */
.blog-grid {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3xl) var(--container-padding);
}

.blog-grid__grid-wrap {
  transition: opacity .3s ease;
}

.blog-grid__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
}

/* CARD */
.blog-grid__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}

.blog-grid__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.blog-grid__card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.blog-grid__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CARD CONTENT */
.blog-grid__card-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  background: #eeeeee;
}

.blog-grid__card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-grid__card-desc {
  font-size: 0.85rem;
  font-weight: 400;
  color: #555;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-grid__card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #006492;
  text-decoration: none;
  cursor: pointer;
  margin-top: auto;
}

.blog-grid__card-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: #006492;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* LOADING STATE */
.blog-grid__grid-wrap.is-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity .2s ease;
}

.blog-grid__grid-wrap:not(.is-loading) {
  transition: opacity .2s ease;
}

/* PLACEHOLDER (post sem imagem) */
.blog-grid__card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-grid__card-placeholder::after {
  content: '';
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23bbb' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .5;
}

/* EMPTY STATE */
.blog-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1rem;
  color: #777;
  padding: 40px 0;
}

/* ARCHIVE BANNER (sem imagem) */
.blog-banner--archive {
  height: auto;
  min-height: 160px;
  background: #006492;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-banner--archive .blog-banner__container {
  position: relative;
  max-width: 100%;
  height: auto;
  padding: var(--space-2xl) var(--container-padding);
  justify-content: center;
}

.blog-banner--archive .blog-banner__content {
  max-width: 100%;
  text-align: center;
  align-items: center;
}

.blog-banner--archive .blog-banner__overlay {
  display: none;
}

/* FALLBACK BANNER (categoria sem imagem — fundo cinza) */
.blog-banner--fallback {
  height: auto;
  min-height: 200px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-banner--fallback .blog-banner__container {
  position: relative;
  max-width: 100%;
  height: auto;
  padding: var(--space-2xl) var(--container-padding);
  justify-content: center;
}

.blog-banner--fallback .blog-banner__content {
  max-width: 100%;
  text-align: center;
  align-items: center;
}

.blog-banner--fallback .blog-banner__title {
  color: #333;
  font-size: 2rem;
}

.blog-banner--fallback .blog-banner__desc {
  color: #666;
}

/* PAGINATION */
.blog-grid__pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-xl);
}

.blog-grid__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 600;
  color: #006492;
  text-decoration: none;
  border: 2px solid #006492;
  transition: background .3s ease, color .3s ease;
}

.blog-grid__pagination .page-numbers:hover {
  background: #006492;
  color: #fff;
}

.blog-grid__pagination .page-numbers.current {
  background: #006492;
  color: #fff;
}

.blog-grid__pagination .page-numbers.prev,
.blog-grid__pagination .page-numbers.next {
  border: none;
  font-size: 1.2rem;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .blog-banner {
    height: 340px;
  }

  .blog-banner__container {
    padding: 32px var(--container-padding);
  }

  .blog-banner__title {
    font-size: 1.6rem;
  }

  .blog-grid {
    padding: var(--space-2xl) var(--container-padding);
  }

  .blog-grid__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .blog-banner {
    height: 420px;
  }

  .blog-banner__overlay {
    width: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.1) 100%);
  }

  .blog-banner__container {
    padding: var(--container-padding);
    padding-bottom: 40px;
    align-items: flex-end;
  }

  .blog-banner__content {
    max-width: 100%;
  }

  .blog-banner__title {
    font-size: 1.3rem;
  }

  .blog-grid {
    padding: var(--space-xl) var(--container-padding);
  }

  .blog-grid__container {
    grid-template-columns: 1fr;
  }
}
