/* ============================================================
   /news — rediseño "Espectro"
   Firma: el changelog como línea de tiempo por mes. Cada noticia toma el
   color del proveedor que nombran sus tags (--pc); las que no nombran
   ninguno usan el brand. La última va destacada con un "póster" de fecha
   cuando no tiene portada (hoy ninguna la tiene).
   Primitivas comunes en spectrum.css; solo tokens de 01-tokens.css.
   ============================================================ */

:root { --nw-w: 1120px; }

/* ══ Hero del índice ════════════════════════════════════════════ */
.nw-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5rem) var(--sp-gutter) 2rem;
}
.nw-hero-inner {
  max-width: var(--nw-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
}
.nw-hero-copy { max-width: 560px; }
.nw-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent);
  animation: nw-pulse 2.2s ease-in-out infinite;
}
@keyframes nw-pulse { 50% { opacity: 0.45; } }
.nw-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0 0 0.9rem;
}
.nw-lead { font-size: 1rem; line-height: 1.65; color: var(--text-muted); margin: 0; }
.nw-lead-last { display: block; margin-top: 0.35rem; font-size: 0.86rem; color: var(--text); }

.nw-tools { display: flex; flex-direction: column; gap: 0.75rem; width: min(480px, 100%); }
.nw-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.nw-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-15), var(--shadow-sm); }
.nw-search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.nw-search input::placeholder { color: var(--text-muted); }
.nw-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nw-chip-n { font-family: var(--sp-mono); font-size: 0.68rem; opacity: 0.75; }

/* ══ Contenedor ═════════════════════════════════════════════════ */
.nw-wrap { max-width: var(--nw-w); margin: 0 auto; padding: 1rem var(--sp-gutter) 0; }
.nw-filterable[hidden], .nw-month[hidden] { display: none !important; }

.nw-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.nw-meta time { font-family: var(--sp-mono); }
.nw-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nw-tag {
  font-family: var(--sp-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Destacada ────────────────────────────────────────────────── */
.nw-feature {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  border-radius: 26px;
  border: 1px solid color-mix(in srgb, var(--pc) 30%, var(--border));
  background:
    radial-gradient(80% 100% at 0% 0%, color-mix(in srgb, var(--pc) 14%, transparent), transparent 60%),
    var(--card-sheen),
    var(--surface);
  box-shadow: 0 40px 90px -50px color-mix(in srgb, var(--pc) 70%, transparent);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--sp-ease);
}
.nw-feature:hover {
  border-color: color-mix(in srgb, var(--pc) 55%, var(--border));
  box-shadow: 0 46px 100px -46px color-mix(in srgb, var(--pc) 85%, transparent);
  transform: translateY(-2px);
}
.nw-feature-link {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  color: var(--text);
  text-decoration: none;
}
.nw-feature-link:hover { color: var(--text); text-decoration: none; }
.nw-feature-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 26px; }
.nw-feature-copy { display: flex; flex-direction: column; gap: 0.9rem; padding: clamp(1.5rem, 4vw, 2.6rem); }
.nw-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--on-brand);
  background: var(--brand);
}
.nw-feature-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
.nw-feature-sum {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nw-readmore {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text));
}
.nw-readmore span { transition: transform 0.2s var(--sp-ease); }
.nw-feature:hover .nw-readmore span { transform: translateX(4px); }
.nw-feature-cover { width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }

/* Póster de fecha (cuando no hay portada) */
.nw-poster {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background:
    radial-gradient(70% 70% at 70% 30%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 70%),
    radial-gradient(60% 60% at 20% 90%, color-mix(in srgb, var(--aurora-1) 45%, transparent), transparent 70%),
    var(--panel-deep);
  color: #fff;
}
.nw-poster-ring {
  position: absolute;
  top: 50%; left: 62%;
  width: 420px; height: 420px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: repeating-radial-gradient(circle, transparent 0 28px, rgba(255,255,255,0.07) 28px 29px);
  z-index: -1;
  animation: nw-spin 60s linear infinite;
}
@keyframes nw-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.nw-poster-day {
  font-family: var(--sp-mono);
  font-size: clamp(5rem, 11vw, 8.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nw-poster-month {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.nw-poster-avatar { position: absolute; top: 1.4rem; right: 1.4rem; width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; }

/* ── Línea de tiempo por mes ──────────────────────────────────── */
.nw-timeline { display: flex; flex-direction: column; gap: clamp(2rem, 5vw, 3rem); }
.nw-month {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.nw-month-label {
  position: sticky;
  top: calc(56px + 1.25rem);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  padding-top: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: capitalize;
  color: var(--text);
}
.nw-month-n {
  font-family: var(--sp-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05rem 0.45rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.nw-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.nw-list::before {
  /* el riel pasa por el centro de los puntos */
  content: "";
  position: absolute;
  top: 1.4rem; bottom: 1.4rem;
  left: calc(1.1rem + 52px + 0.9rem + 6px);
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--border), color-mix(in srgb, var(--border) 30%, transparent));
}
.nw-link {
  position: relative;
  display: grid;
  grid-template-columns: 52px 14px minmax(0, 1fr) auto auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1.1rem 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--sp-ease);
}
.nw-link:hover {
  color: var(--text);
  text-decoration: none;
  border-color: color-mix(in srgb, var(--pc) 40%, var(--border));
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--pc) 10%, transparent), transparent 60%),
    var(--surface);
  box-shadow: 0 20px 44px -30px color-mix(in srgb, var(--pc) 80%, transparent);
  transform: translateX(3px);
}
.nw-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nw-date { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding-top: 0.1rem; }
.nw-day { font-family: var(--sp-mono); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.nw-wd { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.nw-dot {
  position: relative;
  z-index: 1;
  width: 14px; height: 14px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px color-mix(in srgb, var(--pc) 40%, transparent), 0 0 14px color-mix(in srgb, var(--pc) 70%, transparent);
  transition: transform 0.2s var(--sp-ease);
}
.nw-link:hover .nw-dot { transform: scale(1.2); }
.nw-body { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.nw-prov { font-weight: 700; color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text)); }
.nw-prov + span::before { content: "·"; margin-right: 0.45rem; color: var(--text-muted); }
.nw-item-title { font-size: 1.1rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.3; margin: 0; }
.nw-item-sum {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nw-thumb { width: 132px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-2); }
.nw-arrow {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s var(--sp-ease);
}
.nw-link:hover .nw-arrow {
  color: var(--on-brand);
  border-color: transparent;
  background: var(--brand);
  transform: translateX(2px);
}

/* ── Vacío / paginación ───────────────────────────────────────── */
.nw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 20px;
  text-align: center;
  color: var(--text-muted);
}
.nw-empty[hidden] { display: none; }
.nw-empty p { margin: 0; }
.nw-empty-title { font-size: 1rem; font-weight: 650; color: var(--text); }
.nw-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }

/* ══ Detalle ════════════════════════════════════════════════════ */
.nw-progress {
  position: fixed;
  top: 56px;                 /* alto de .pub-header */
  left: 0; right: 0;
  z-index: 99;
  height: 3px;
  pointer-events: none;
}
.nw-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pc, var(--brand)), var(--brand));
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand) 70%, transparent);
}

.nw-art-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--sp-gutter) clamp(2rem, 4vw, 3rem);
}
.nw-aurora-pc { width: 620px; height: 520px; top: -220px; right: -160px; background: var(--pc); }
.nw-art-head { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.nw-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
}
.nw-back:hover { color: var(--text); border-color: var(--brand); text-decoration: none; }
.nw-art-meta { font-size: 0.84rem; }
.nw-prov-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.25rem;
  border-radius: 999px;
  font-weight: 700;
  color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text));
  background: color-mix(in srgb, var(--pc) 13%, transparent);
}
.nw-art-title {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
.nw-art-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.6; color: var(--text-muted); margin: 0; }

.nw-art-layout {
  max-width: var(--nw-w);
  margin: 0 auto;
  padding: 0 var(--sp-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.nw-art { max-width: 72ch; width: 100%; justify-self: center; }
.nw-art-cover { width: 100%; border-radius: 18px; border: 1px solid var(--border); margin-bottom: 2rem; display: block; }

.nw-prose { font-size: 1.04rem; line-height: 1.8; color: var(--text); }
.nw-prose > :first-child { margin-top: 0; }
.nw-prose p { margin: 0 0 1.15em; }
.nw-prose h1, .nw-prose h2, .nw-prose h3, .nw-prose h4 { font-weight: 750; line-height: 1.3; margin: 1.8em 0 0.6em; letter-spacing: -0.02em; }
.nw-prose h1 { font-size: 1.6rem; }
.nw-prose h2 { font-size: 1.4rem; }
.nw-prose h3 { font-size: 1.15rem; }
.nw-prose ul, .nw-prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.nw-prose li { margin-bottom: 0.4em; }
.nw-prose li::marker { color: color-mix(in srgb, var(--pc) var(--ink-mix), var(--text)); }
.nw-prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.nw-prose strong { color: var(--text); font-weight: 700; }
.nw-prose blockquote {
  margin: 1.4em 0;
  padding: 0.9em 1.2em;
  border-left: 3px solid var(--pc);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--pc) 7%, var(--surface));
  color: var(--text);
}
.nw-prose blockquote p:last-child { margin-bottom: 0; }
.nw-prose code { background: var(--surface-2); border-radius: 5px; padding: 0.15em 0.4em; font-size: 0.88em; font-family: var(--sp-mono); }
.nw-prose pre { background: var(--code-bg); color: #E6E8F0; border-radius: 12px; padding: 1rem 1.25rem; overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--hairline); }
.nw-prose pre code { background: none; padding: 0; color: inherit; }
.nw-prose img { max-width: 100%; border-radius: 12px; margin: 1em 0; border: 1px solid var(--border); }
.nw-prose hr { border: 0; height: 1px; background: var(--border); margin: 2em 0; }
.nw-prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.nw-prose th, .nw-prose td { border-bottom: 1px solid var(--border); padding: 0.6em 0.8em; text-align: left; }
.nw-prose th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

.nw-share {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.nw-share-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-right: 0.3rem; }
.nw-share-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s, transform 0.15s;
}
.nw-share-btn[hidden] { display: none; }
.nw-share-btn svg { width: 18px; height: 18px; }
.nw-share-btn:hover { transform: translateY(-2px); }
.nw-share-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nw-share-btn[data-network="linkedin"]:hover { border-color: #0A66C2; color: #0A66C2; background: rgba(10,102,194,0.10); }
.nw-share-btn[data-network="whatsapp"]:hover { border-color: #25D366; color: #1DA851; background: rgba(37,211,102,0.10); }
.nw-share-btn[data-network="x"]:hover,
.nw-share-btn[data-network="native"]:hover { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.nw-share-btn[data-network="copy"]:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-10); }
.nw-share-btn.is-copied { border-color: var(--success); color: var(--success); background: var(--success-15); }

.nw-aside { position: sticky; top: calc(56px + 1.5rem); display: flex; flex-direction: column; gap: 1rem; }
.nw-aside-title { margin: 0; }
.nw-others { list-style: none; margin: 0; padding: 0 0 0 1.3rem; position: relative; display: flex; flex-direction: column; gap: 0.35rem; }
.nw-others::before { content: ""; position: absolute; left: 4px; top: 0.9rem; bottom: 0.9rem; width: 2px; background: var(--border); border-radius: 2px; }
.nw-others li { position: relative; }
.nw-others li::before {
  content: "";
  position: absolute;
  left: -1.3rem; top: 0.95rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 0 3px var(--bg);
}
.nw-other {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s;
}
.nw-other:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nw-other time { font-family: var(--sp-mono); font-size: 0.7rem; color: var(--text-muted); }
.nw-other-title { font-size: 0.9rem; font-weight: 650; line-height: 1.35; }
.nw-aside-all { align-self: flex-start; }

/* ══ Responsive ═════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nw-feature-link { grid-template-columns: 1fr; }
  .nw-poster { min-height: 220px; order: -1; }
  .nw-month { grid-template-columns: 1fr; gap: 0.75rem; }
  .nw-month-label {
    top: 56px;
    z-index: 2;
    padding: 0.6rem 0;
    background: linear-gradient(var(--bg) 70%, transparent);
  }
  .nw-art-layout { grid-template-columns: 1fr; }
  .nw-aside { position: static; border-top: 1px solid var(--border); padding-top: 1.75rem; }
}
@media (max-width: 600px) {
  .nw-link { grid-template-columns: 40px 12px minmax(0, 1fr); gap: 0.7rem; padding: 0.95rem 0.6rem; }
  .nw-list::before { left: calc(0.6rem + 40px + 0.7rem + 5px); }
  .nw-dot { width: 12px; height: 12px; }
  .nw-day { font-size: 1.25rem; }
  .nw-thumb, .nw-arrow { display: none; }
  .nw-link:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nw-live, .nw-poster-ring { animation: none; }
  .nw-feature, .nw-link, .nw-dot, .nw-arrow, .nw-readmore span, .nw-share-btn, .nw-back { transition: none; }
  .nw-feature:hover, .nw-link:hover, .nw-share-btn:hover { transform: none; }
}
