/* =========================
   LATEST POSTS
========================= */
.latest-posts {
  position: relative;
  background: transparent;
}

.latest-posts__header {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 42px);
  max-width: 860px;
  justify-items: center;
  text-align: center;
  margin-inline: auto;
}

.latest-posts__eyebrow {
  width: fit-content;
}

.latest-posts__title {
  max-width: 18ch;
  color: var(--color-heading);
  line-height: 1.05;
}

.latest-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 24px);
}

.latest-posts__item {
  min-width: 0;
}

.latest-posts__card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 17, 21, 0.08);
  box-shadow: 0 18px 44px rgba(15, 17, 21, 0.08);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.latest-posts__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(15, 17, 21, 0.12);
  border-color: rgba(224, 31, 38, 0.18);
}

.latest-posts__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(224, 31, 38, 0.08),
    rgba(15, 17, 21, 0.03)
  );
}

.latest-posts__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 72px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.08) 100%);
  pointer-events: none;
}

.latest-posts__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.latest-posts__card:hover .latest-posts__media img {
  transform: scale(1.04);
}

.latest-posts__content {
  display: grid;
  gap: 12px;
  padding: 22px 22px 24px;
}

.latest-posts__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(224, 31, 38, 0.08);
  border: 1px solid rgba(224, 31, 38, 0.12);
  color: var(--color-primary);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.latest-posts__card-title {
  color: var(--color-heading);
  font-size: clamp(1.12rem, 1.6vw, 1.35rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.latest-posts__state {
  margin-top: 18px;
  color: var(--color-text-faint);
}

.latest-posts__state.is-hidden {
  display: none;
}

.latest-posts__empty {
  grid-column: 1 / -1;
  padding: 20px 0 0;
  color: var(--color-text-soft);
}

.latest-posts__actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, 3vw, 34px);
  margin-bottom: 6px;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 980px) {
  .latest-posts__title {
    max-width: 22ch;
  }

  .latest-posts__grid {
    grid-template-columns: 1fr;
  }

  .latest-posts__card {
    border-radius: 22px;
  }
}

@media (max-width: 640px) {
  .latest-posts__header {
    gap: 14px;
    margin-bottom: 26px;
  }

  .latest-posts__title {
    max-width: 100%;
  }

  .latest-posts__content {
    padding: 18px 18px 20px;
  }

  .latest-posts__card-title {
    font-size: 1.08rem;
  }
}
