/* news_aggregator — tarjetas de noticia y widgets ("Hoy en Monterrey", clima, lo más leído).
   Usa los tokens --enm-* de assets/enm/enm-ds.css (con valores de respaldo por si se incrusta fuera del layout). */

/* ---------- Tarjeta de noticia ---------- */
.ne-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--enm-color-surface, #fff);
  border: 1px solid var(--enm-color-border, #dde3eb); border-radius: var(--enm-radius-lg, 14px); overflow: hidden;
  box-shadow: var(--enm-shadow-xs, 0 1px 2px rgba(17,26,46,.06)); transition: box-shadow var(--enm-duration, 160ms) ease, transform var(--enm-duration, 160ms) ease; }
.ne-card:hover { box-shadow: var(--enm-shadow-md, 0 4px 14px rgba(17,26,46,.09)); }
.ne-card__media { display: block; aspect-ratio: 16 / 9; background: var(--enm-gray-100, #eceff4); overflow: hidden; }
.ne-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ne-card:hover .ne-card__media img { transform: scale(1.03); }
.ne-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; min-width: 0; }
.ne-card__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--enm-text-xs, .75rem); line-height: 1.3; }
.ne-cat { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-weight: 600; letter-spacing: .01em;
  color: var(--ne-c, #0369a1) !important; background: color-mix(in srgb, var(--ne-c, #0369a1) 11%, #fff); text-decoration: none !important; position: relative; z-index: 1; }
.ne-cat:hover { background: color-mix(in srgb, var(--ne-c, #0369a1) 20%, #fff); }
.ne-src { font-weight: 600; color: var(--enm-color-text-muted, #475569); text-transform: uppercase; letter-spacing: .04em; }
.ne-card__title { margin: 0; font-size: var(--enm-text-md, 1.125rem); font-weight: 700; line-height: var(--enm-leading-snug, 1.35); color: var(--enm-color-text, #1a2741); }
.ne-card__title a { color: inherit !important; text-decoration: none !important; }
.ne-card__title a:hover { color: var(--enm-color-primary, #0369a1) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.ne-card__title a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta es clicable */
.ne-card__text { margin: 0; color: var(--enm-color-text-muted, #475569); font-size: var(--enm-text-sm, .875rem); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ne-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--enm-text-xs, .75rem); color: var(--enm-color-text-subtle, #64748b); }
.ne-also::before { content: "•"; margin-right: 8px; color: var(--enm-gray-300, #c6cfdb); }

/* Placeholder digno cuando el medio no da imagen: color e icono de la categoría + nombre del medio */
.ne-ph { position: relative; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 100%; padding: 14px 16px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ne-c, #1a2741) 70%, #fff) 0%, var(--ne-c, #1a2741) 45%, color-mix(in srgb, var(--ne-c, #1a2741) 55%, #000) 100%); color: #fff; }
.ne-ph i { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); font-size: clamp(56px, 9vw, 92px); opacity: .2; }
.ne-ph__src { position: relative; font-weight: 800; font-size: var(--enm-text-lg, 1.25rem); letter-spacing: -.01em; line-height: 1.15; max-width: 75%; text-shadow: 0 1px 2px rgba(0,0,0,.25); }

/* Destacada */
.ne-card--lead .ne-card__title { font-size: var(--enm-text-2xl, 1.9rem); line-height: var(--enm-leading-tight, 1.2); letter-spacing: -.01em; }
.ne-card--lead .ne-card__body { padding: 18px 20px 20px; gap: 10px; }
.ne-card--lead .ne-card__text { -webkit-line-clamp: 4; font-size: var(--enm-text-base, 1rem); }
@media (min-width: 900px) {
  .ne-card--lead { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .ne-card--lead .ne-card__media { aspect-ratio: auto; min-height: 320px; }
  .ne-card--lead .ne-card__body { padding: 28px 28px 24px; justify-content: center; }
}

/* En teléfono la rejilla pasa a lista compacta: foto pequeña a la derecha */
@media (max-width: 639.98px) {
  .ne-card--card { display: grid; grid-template-columns: minmax(0, 1fr) 108px; grid-template-areas: "body media"; align-items: start; }
  .ne-card--card .ne-card__media { grid-area: media; aspect-ratio: 1 / 1; margin: 14px 14px 14px 0; border-radius: var(--enm-radius-md, 10px); }
  .ne-card--card .ne-card__body { grid-area: body; padding: 14px 14px 14px 16px; gap: 6px; }
  .ne-card--card .ne-card__title { font-size: var(--enm-text-base, 1rem); }
  .ne-card--card .ne-card__text { display: none; }
  .ne-card--card .ne-ph { padding: 8px; justify-content: center; align-items: center; }
  .ne-card--card .ne-ph i { position: static; transform: none; font-size: 30px; opacity: .55; }
  .ne-card--card .ne-ph__src { display: none; }
  .ne-card--lead .ne-card__title { font-size: var(--enm-text-xl, 1.4rem); }
}

/* Mini (widgets y barra lateral): sólo texto */
.ne-card--mini { border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.ne-card--mini:hover { box-shadow: none; }
.ne-card--mini .ne-card__body { padding: 0; gap: 4px; }
.ne-card--mini .ne-card__title { font-size: var(--enm-text-base, 1rem); font-weight: 600; line-height: 1.35; }
.ne-card--mini .ne-cat { padding: 2px 8px; }

/* ---------- Cajas y listas de los widgets ---------- */
.hem-box { background: var(--enm-color-surface, #fff); border: 1px solid var(--enm-color-border, #dde3eb); border-radius: var(--enm-radius-lg, 14px); padding: 18px 18px 16px; box-shadow: var(--enm-shadow-xs, 0 1px 2px rgba(17,26,46,.06)); }
.hem-h { margin: 0 0 12px; font-size: var(--enm-text-lg, 1.25rem); font-weight: 700; color: var(--enm-color-text, #1a2741); line-height: 1.25; }
.hem-sub { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--enm-text-base, 1rem); font-weight: 700; color: var(--enm-color-text, #1a2741); }
.hem-sub i { color: var(--enm-color-accent, #c2410c); }
.hem-news, .hem-rank, .hem-list { list-style: none; margin: 0; padding: 0; }
.hem-news > li, .hem-list > li { padding: 12px 0; border-top: 1px solid var(--enm-color-border, #dde3eb); }
.hem-news > li:first-child, .hem-list > li:first-child { border-top: 0; padding-top: 2px; }
.hem-rank { counter-reset: hem; }
.hem-rank > li { position: relative; padding: 12px 0 12px 42px; border-top: 1px solid var(--enm-color-border, #dde3eb); counter-increment: hem; }
.hem-rank > li:first-child { border-top: 0; padding-top: 2px; }
.hem-rank > li::before { content: counter(hem); position: absolute; left: 0; top: 8px; width: 30px; text-align: center; font-size: 1.6rem; font-weight: 800;
  color: var(--enm-color-primary, #0369a1); line-height: 1; }
.hem-rank > li:first-child::before { top: 0; }
.hem-more { display: inline-flex; align-items: center; gap: 8px; min-height: var(--enm-touch, 44px); margin-top: 6px; font-weight: 600; font-size: var(--enm-text-sm, .875rem);
  color: var(--enm-color-link, #0369a1) !important; text-decoration: none !important; }
.hem-more:hover { text-decoration: underline !important; }
.hem-empty { margin: 0; color: var(--enm-color-text-muted, #475569); font-size: var(--enm-text-sm, .875rem); line-height: 1.55; }
.hem-empty a { color: var(--enm-color-link, #0369a1); }
.hem-credit { margin: 12px 0 0; font-size: var(--enm-text-xs, .75rem); color: var(--enm-color-text-subtle, #64748b); }
.hem-credit a { color: inherit !important; text-decoration: underline; }

/* Eventos */
.hem-event { display: flex; gap: 12px; align-items: flex-start; }
.hem-event__dot { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ne-c, #c2410c) 12%, #fff); color: var(--ne-c, #c2410c); font-size: 15px; }
.hem-event__name { display: block; font-weight: 600; line-height: 1.35; color: var(--enm-color-text, #1a2741) !important; text-decoration: none !important; }
.hem-event__name:hover { color: var(--enm-color-primary, #0369a1) !important; text-decoration: underline !important; }
.hem-event__meta { display: block; margin-top: 2px; font-size: var(--enm-text-xs, .75rem); color: var(--enm-color-text-muted, #475569); }

/* ---------- Clima ---------- */
.hem-weather .hem-h { margin-bottom: 8px; }
.hem-weather__now { display: flex; align-items: center; gap: 14px; }
.hem-weather__icon { font-size: 44px; color: #f59e0b; width: 52px; text-align: center; }
.hem-weather__icon.fa-cloud, .hem-weather__icon.fa-smog, .hem-weather__icon.fa-moon, .hem-weather__icon.fa-cloud-moon { color: var(--enm-gray-500, #64748b); }
.hem-weather__icon.fa-cloud-rain, .hem-weather__icon.fa-cloud-showers-heavy, .hem-weather__icon.fa-cloud-bolt, .hem-weather__icon.fa-cloud-sun-rain { color: var(--enm-blue-600, #0b7bc0); }
.hem-weather__temp { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--enm-color-text, #1a2741); letter-spacing: -.02em; }
.hem-weather__temp span { font-size: 1.1rem; font-weight: 600; vertical-align: top; margin-left: 2px; color: var(--enm-color-text-muted, #475569); }
.hem-weather__label { font-size: var(--enm-text-sm, .875rem); color: var(--enm-color-text-muted, #475569); margin-top: 4px; }
.hem-weather__range { margin-left: auto; display: flex; flex-direction: column; gap: 2px; font-weight: 700; font-size: var(--enm-text-sm, .875rem); color: var(--enm-color-text, #1a2741); text-align: right; }
.hem-weather__facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hem-weather__facts li { background: var(--enm-gray-50, #f4f6f9); border-radius: 10px; padding: 8px 6px; text-align: center; }
.hem-weather__facts span { display: block; font-size: 11px; color: var(--enm-color-text-muted, #475569); }
.hem-weather__facts strong { display: block; font-size: var(--enm-text-sm, .875rem); color: var(--enm-color-text, #1a2741); }
.hem-aqi { margin: 10px 0 0; font-size: var(--enm-text-sm, .875rem); color: var(--enm-color-text, #1a2741); }
.hem-aqi i { margin-right: 4px; }
.hem-aqi span { color: var(--enm-color-text-muted, #475569); }
.hem-aqi--good strong, small.hem-aqi--good { color: #15803d; }
.hem-aqi--ok strong, small.hem-aqi--ok { color: #a16207; }
.hem-aqi--sens strong, small.hem-aqi--sens { color: #c2410c; }
.hem-aqi--bad strong, small.hem-aqi--bad, .hem-aqi--vbad strong, small.hem-aqi--vbad, .hem-aqi--haz strong, small.hem-aqi--haz { color: #b91c1c; }
.hem-forecast { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--enm-color-border, #dde3eb); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.hem-forecast li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--enm-text-sm, .875rem); color: var(--enm-color-text, #1a2741); }
.hem-forecast__day { font-weight: 700; }
.hem-forecast i { font-size: 20px; color: var(--enm-blue-600, #0b7bc0); }
.hem-forecast__t { color: var(--enm-color-text-muted, #475569); }
.hem-forecast__t strong { color: var(--enm-color-text, #1a2741); }
.hem-forecast__rain { min-height: 1.2em; font-size: var(--enm-text-xs, .75rem); color: var(--enm-blue-700, #0369a1); }
.hem-pill { display: inline-flex; align-items: center; gap: 10px; min-height: var(--enm-touch, 44px); padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff !important; text-decoration: none !important; white-space: nowrap; font-size: var(--enm-text-sm, .875rem); }
.hem-pill i { font-size: 20px; color: #fcd34d; }
.hem-pill:hover { background: rgba(255,255,255,.2); }

/* ---------- "Hoy en Monterrey" ---------- */
.hem { background: var(--enm-color-surface, #fff); border: 1px solid var(--enm-color-border, #dde3eb); border-radius: var(--enm-radius-xl, 20px); overflow: hidden;
  box-shadow: var(--enm-shadow-sm, 0 1px 3px rgba(17,26,46,.08)); color: var(--enm-color-text, #1a2741); font-family: var(--enm-font-sans, inherit); }
.hem__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px;
  background: var(--enm-gradient-hero, linear-gradient(135deg, #111a2e 0%, #1a2741 45%, #12406b 100%)); color: #fff; }
.hem__title { margin: 0; font-size: var(--enm-text-xl, 1.5rem); font-weight: 800; line-height: 1.15; color: #fff; letter-spacing: -.01em; }
.hem__date { margin: 4px 0 0; color: #dbe7f5; font-size: var(--enm-text-sm, .875rem); }
.hem__wx { display: flex; align-items: center; gap: 12px; }
.hem__wx > i { font-size: 34px; color: #fcd34d; }
.hem__wx strong { font-size: 1.6rem; font-weight: 800; }
.hem__wx span { color: #e6eef8; }
.hem__wx small { display: block; color: #dbe7f5; font-size: var(--enm-text-xs, .75rem); margin-top: 2px; }
.hem__wx small[class*="hem-aqi--"] { color: #dbe7f5; }
.hem__grid { display: grid; gap: 22px 28px; padding: 18px 20px 6px; }
.hem-events .hem-empty + .hem-list { margin-top: 8px; }
@media (min-width: 768px) { .hem__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.hem .hem-credit { padding: 0 20px 16px; }
.hem-newsbox .ne-card__title { font-size: var(--enm-text-base, 1rem); }

@media (prefers-reduced-motion: reduce) {
  .ne-card, .ne-card__media img { transition: none; }
  .ne-card:hover .ne-card__media img { transform: none; }
}
.ne-card__media, .ne-card__media:hover, .ne-card__media:focus { text-decoration: none !important; color: #fff; }
.ne-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
