/* Entradas WordPress vía REST API (/noticias/) */

.wp-posts-section {
  background: #ffffff;
  padding: clamp(72px, 9vw, 96px) 24px;
}

/* Tras otra .blog-section (p. ej. FAQ) site-shared anula padding-top; restablecer simetría */
.blog-section.wp-posts-section {
  padding-top: clamp(72px, 9vw, 96px);
  padding-bottom: clamp(72px, 9vw, 96px);
}

.wp-posts-section .blog-section-head,
.blog-section.wp-posts-feed .blog-section-head {
  margin-bottom: clamp(36px, 5vw, 48px);
}

.blog-grid--posts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 28px);
}

.blog-grid--posts .blog-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #ececec;
  overflow: hidden;
  line-height: 0;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-card-media:hover img {
  transform: scale(1.03);
}

.blog-card-body {
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.2vw, 24px) clamp(22px, 2.5vw, 28px);
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.blog-grid--posts .blog-card-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.blog-grid--posts .blog-card-title {
  font-family: var(--font-heading, "Inter Tight", sans-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.28;
  font-weight: 600;
  color: #101217;
  margin: 0 0 10px;
}

.blog-grid--posts .blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-grid--posts .blog-card-title a:hover {
  color: var(--accent, #d83b2d);
}

.blog-grid--posts .blog-card-excerpt {
  font-size: 0.92rem;
  line-height: 1.58;
  color: #404040;
  margin: 0;
}

.blog-section-more {
  margin-top: clamp(36px, 5vw, 48px);
  text-align: center;
}

.blog-section-more[hidden] {
  display: none;
}

.blog-feed-message {
  grid-column: 1 / -1;
  text-align: center;
  color: #404040;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

.blog-feed-message a {
  color: var(--accent, #d83b2d);
  font-weight: 600;
}

.blog-card--skeleton .blog-card-media {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: wp-posts-shimmer 1.2s ease-in-out infinite;
}

.blog-card--skeleton .blog-card-skeleton-line {
  height: 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: wp-posts-shimmer 1.2s ease-in-out infinite;
}

.blog-card-skeleton-line--short {
  width: 42%;
}

.blog-card-skeleton-line--title {
  width: 88%;
  height: 16px;
}

@keyframes wp-posts-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 1100px) {
  .blog-grid--posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-grid--posts {
    grid-template-columns: 1fr;
  }

  .wp-posts-section .blog-section-title {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card-media img,
  .blog-card--skeleton .blog-card-media,
  .blog-card--skeleton .blog-card-skeleton-line {
    animation: none;
    transition: none;
  }
}
