/* ============================================================
   .mp-noticias — Grilla "Últimas noticias" (shortcode
   [mp_ultimas_noticias]). Prefijo de clase: .mp-noticias /
   .mp-noticias-card — no reutilizar en otro componente.
   Réplica del diseño de las cards de /blog/ (mp-blog.css) adaptada
   a 4 columnas. Todos los selectores scoped bajo .mp-noticias.
   Tokens: de :root en assets/css/tokens.css (mp-tokens, dependency).
   Breakpoints del proyecto: 980 · 720 · 640.
   ============================================================ */

.mp-noticias {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  width: 100%;
}
.mp-noticias *, .mp-noticias *::before, .mp-noticias *::after { box-sizing: border-box; }
.mp-noticias a { text-decoration: none; }

/* ===== CABECERA: título (izq) + "Ver todos" (der) ===== */
.mp-noticias__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mp-noticias__title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-dark, #16204a);
}

/* Link "ver más" (DESIGN.md §4): oro oscuro + flecha → */
.mp-noticias__ver-todos {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dark, #e0951a);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.mp-noticias__ver-todos:hover {
  color: var(--navy, #1c3a8a);
}
.mp-noticias__ver-todos span {
  margin-left: 4px;
}

/* ===== GRILLA: 4 columnas ===== */
.mp-noticias__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* ===== TARJETA (idéntica a .mp-blog-card) ===== */
.mp-noticias-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border, #e7e9f0);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mp-noticias-card:hover {
  transform: translateY(-2px);
  border-color: #d5dbf2;
  box-shadow: 0 10px 24px rgba(20, 38, 94, 0.08);
}

/* ===== MEDIA: foto 16/10 o placeholder navy ===== */
.mp-noticias-card__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft, #f6f7fb);
}

.mp-noticias-card__media--placeholder {
  background: linear-gradient(135deg, var(--navy-dark, #14265e), var(--navy-light, #2b4fa8));
}

.mp-noticias-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.mp-noticias-card:hover .mp-noticias-card__img {
  transform: scale(1.04);
}

/* ===== CUERPO ===== */
.mp-noticias-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

/* ===== CATEGORÍA (eyebrow, color por corriente) ===== */
.mp-noticias-card__cat {
  align-self: flex-start;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blue, #2b4fd6);
}

.mp-noticias-card__cat:hover {
  text-decoration: underline;
}

/* Terna fija de corrientes (DESIGN.md §1) */
.mp-noticias-card__cat--justicialismo {
  color: var(--blue, #2b4fd6);
}
.mp-noticias-card__cat--kirchnerismo {
  color: var(--red-wine, #7a1030);
}
.mp-noticias-card__cat--axelismo {
  color: var(--green, #1f8a4c);
}

/* ===== TÍTULO (clamp 2 líneas) ===== */
.mp-noticias-card__title {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-dark, #16204a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-noticias-card__title a {
  color: inherit;
  text-decoration: none;
}

.mp-noticias-card:hover .mp-noticias-card__title a {
  color: var(--navy, #1c3a8a);
}

/* ===== EXCERPT (clamp 3 líneas) ===== */
.mp-noticias-card__excerpt {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body, #3d4560);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== BADGES: distrito y partido (markup de la helper del tema:
   .mp-blog-card__badge* — estilos replicados acá porque mp-blog.css
   solo se encola en /blog/, archivos y búsqueda) ===== */
.mp-noticias-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.mp-noticias .mp-blog-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: var(--gray-bg, #eef0f4);
  color: var(--text-dark, #16204a);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mp-noticias .mp-blog-card__badge:hover {
  background-color: #e2e6ee;
}

.mp-noticias .mp-blog-card__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy, #1c3a8a); /* fallback: el color real viene inline (partido) */
  flex-shrink: 0;
}

/* Partido: tinte y borde con el color del término (--badge-color inline).
   Fallback a la paleta neutra si color-mix no está soportado. */
.mp-noticias .mp-blog-card__badge--partido {
  background-color: var(--gray-bg, #eef0f4);
  background: color-mix(in srgb, var(--badge-color, #7a8296) 14%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--badge-color, #7a8296) 38%, #ffffff);
}

.mp-noticias .mp-blog-card__badge--partido:hover {
  background: color-mix(in srgb, var(--badge-color, #7a8296) 22%, #ffffff);
}

/* ===== META: fecha + comentarios ===== */
.mp-noticias-card__meta {
  margin-top: auto; /* empuja la meta al pie de la tarjeta */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e7e9f0);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted, #7a8296);
}

.mp-noticias-card__date,
.mp-noticias-card__comments {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted, #7a8296);
  text-decoration: none;
}

.mp-noticias-card__date:hover,
.mp-noticias-card__comments:hover {
  color: var(--navy, #1c3a8a);
}

.mp-noticias-card__date svg,
.mp-noticias-card__comments svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* ===== CTA FINAL: "Explorar Noticias" (centrado, → blog del sitio) =====
   CTA principal de DESIGN.md §4: fondo --gold, texto --navy-dark, bold. */
.mp-noticias__footer {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.mp-noticias__explorar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold, #f5a623);
  color: var(--navy-dark, #14265e);
  font-size: 14px;
  font-weight: 800;
  padding: 12px 26px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mp-noticias__explorar:hover {
  background: var(--gold-dark, #e0951a);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .mp-noticias__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .mp-noticias-card__body {
    padding: 14px 16px 16px;
  }
}

@media (max-width: 720px) {
  .mp-noticias__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mp-noticias__header {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .mp-noticias__title {
    font-size: 18px;
  }

  .mp-noticias-card__title {
    font-size: 15.5px;
  }

  .mp-noticias-card__excerpt {
    font-size: 13px;
  }

  .mp-noticias-card__meta {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-noticias-card,
  .mp-noticias-card__img,
  .mp-noticias__ver-todos,
  .mp-noticias__explorar {
    transition: none;
  }
}
