/* ============================================================
   News premium — cargado solo en vistas /news
   Firma visual: "release rail" — spine vertical con puntos de color
   por proveedor, como un git log de las novedades del producto.
   ============================================================ */

/* ── Cabecera ─────────────────────────────────────────────────── */

.news-eyebrow {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.news-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-15);
  flex-shrink: 0;
}

.news-hero-title {
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.news-hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 52ch;
  margin-bottom: 2.75rem;
}

/* ── Release rail (índice) ───────────────────────────────────── */

.news-rail {
  position: relative;
  padding-left: 2rem;
}

.news-rail::before {
  content: "";
  position: absolute;
  left: 5px; top: 0.5rem; bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.news-entry {
  position: relative;
  text-decoration: none;
  display: block;
  padding: 0 0 2.25rem;
}

.news-entry:last-child { padding-bottom: 0; }

.news-entry::before {
  content: "";
  position: absolute;
  left: -2rem; top: 0.4rem;
  width: 11px; height: 11px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-15), 0 0 0 2px var(--bg);
  transition: transform 0.15s ease;
}

.news-entry:hover::before { transform: scale(1.15); }

.news-entry[data-tag="anthropic"]::before,
.news-entry[data-tag="claude"]::before          { background: var(--chip-anthropic-fg); box-shadow: 0 0 0 4px var(--chip-anthropic-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="openai"]::before,
.news-entry[data-tag="gpt"]::before              { background: var(--chip-openai-fg); box-shadow: 0 0 0 4px var(--chip-openai-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="google"]::before,
.news-entry[data-tag="gemini"]::before           { background: var(--chip-google-fg); box-shadow: 0 0 0 4px var(--chip-google-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="z"]::before,
.news-entry[data-tag="glm"]::before               { background: var(--chip-z-fg); box-shadow: 0 0 0 4px var(--chip-z-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="kimi"]::before,
.news-entry[data-tag="moonshot"]::before          { background: var(--chip-kimi-fg); box-shadow: 0 0 0 4px var(--chip-kimi-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="minimax"]::before           { background: var(--chip-minimax-fg); box-shadow: 0 0 0 4px var(--chip-minimax-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="grok"]::before,
.news-entry[data-tag="xai"]::before               { background: var(--chip-grok-fg); box-shadow: 0 0 0 4px var(--chip-grok-bg), 0 0 0 2px var(--bg); }
.news-entry[data-tag="deepseek"]::before          { background: var(--chip-deepseek-fg); box-shadow: 0 0 0 4px var(--chip-deepseek-bg), 0 0 0 2px var(--bg); }

.news-entry-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1.25rem 1.4rem;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.news-entry:hover .news-entry-card {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: no-preference) {
  .news-entry:hover .news-entry-card { transform: translateY(-1px); }
}

.news-entry--featured .news-entry-card {
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  padding: 1.75rem;
  background: linear-gradient(155deg, var(--surface) 0%, var(--surface-2) 100%);
}

@media (max-width: 720px) {
  .news-entry--featured .news-entry-card { grid-template-columns: 1fr; }
}

.news-entry-date {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.news-entry-tags {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: 0.6rem;
}

.news-tag {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.66rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}

.news-tag[data-tag="anthropic"], .news-tag[data-tag="claude"]  { background: var(--chip-anthropic-bg); color: var(--chip-anthropic-fg); }
.news-tag[data-tag="openai"], .news-tag[data-tag="gpt"]        { background: var(--chip-openai-bg); color: var(--chip-openai-fg); }
.news-tag[data-tag="google"], .news-tag[data-tag="gemini"]     { background: var(--chip-google-bg); color: var(--chip-google-fg); }
.news-tag[data-tag="z"], .news-tag[data-tag="glm"]              { background: var(--chip-z-bg); color: var(--chip-z-fg); }
.news-tag[data-tag="kimi"], .news-tag[data-tag="moonshot"]      { background: var(--chip-kimi-bg); color: var(--chip-kimi-fg); }
.news-tag[data-tag="minimax"]                                    { background: var(--chip-minimax-bg); color: var(--chip-minimax-fg); }
.news-tag[data-tag="grok"], .news-tag[data-tag="xai"]           { background: var(--chip-grok-bg); color: var(--chip-grok-fg); }
.news-tag[data-tag="deepseek"]                                   { background: var(--chip-deepseek-bg); color: var(--chip-deepseek-fg); }

.news-entry-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0.55rem 0 0.4rem;
}

.news-entry--featured .news-entry-title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.news-entry-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-entry-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.news-entry--featured .news-entry-cover { aspect-ratio: 4/3; }

.news-load-more { text-align: center; margin-top: 1rem; }

/* ── Detalle de artículo ──────────────────────────────────────── */

.news-article-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .news-article-wrap { grid-template-columns: 1fr; }
}

.news-article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.news-article-back:hover { color: var(--brand); }

.news-article-title {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.6rem 0 0.75rem;
}

.news-article-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.news-article-cover {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
  display: block;
}

.news-prose { font-size: 1rem; line-height: 1.8; color: var(--text); }
.news-prose p { margin: 0 0 1.1em; }
.news-prose h1, .news-prose h2, .news-prose h3, .news-prose h4 { font-weight: 700; line-height: 1.35; margin: 1.6em 0 0.6em; letter-spacing: -0.01em; }
.news-prose h1 { font-size: 1.5rem; }
.news-prose h2 { font-size: 1.3rem; }
.news-prose h3 { font-size: 1.1rem; }
.news-prose ul, .news-prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.news-prose li { margin-bottom: 0.4em; }
.news-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.news-prose blockquote { margin: 1.2em 0; padding: 0.2em 1.1em; border-left: 3px solid var(--brand); color: var(--text-muted); font-style: italic; }
.news-prose code { background: var(--surface-2); border-radius: 4px; padding: 0.15em 0.4em; font-size: 0.88em; font-family: "JetBrains Mono", monospace; }
.news-prose pre { background: var(--code-bg); border-radius: 8px; padding: 1rem 1.25rem; overflow-x: auto; margin: 1.2em 0; }
.news-prose pre code { background: none; padding: 0; }
.news-prose img { max-width: 100%; border-radius: 8px; margin: 1em 0; border: 1px solid var(--border); }
.news-prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.9rem; }
.news-prose th, .news-prose td { border: 1px solid var(--border); padding: 0.5em 0.75em; text-align: left; }
.news-prose th { background: var(--surface-2); }

/* ── Compartir ────────────────────────────────────────────────── */

.news-share-row {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.news-share-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.news-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.news-share-btn svg { width: 18px; height: 18px; }

.news-share-btn:hover { transform: translateY(-1px); }

.news-share-btn[data-network="linkedin"]:hover { border-color: #0A66C2; color: #0A66C2; background: rgba(10,102,194,0.10); }
.news-share-btn[data-network="whatsapp"]:hover { border-color: #25D366; color: #25D366; background: rgba(37,211,102,0.10); }
.news-share-btn[data-network="x"]:hover        { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.news-share-btn[data-network="copy"]:hover     { border-color: var(--brand); color: var(--brand); background: var(--brand-10); }
.news-share-btn[data-network="copy"].is-copied { border-color: var(--success); color: var(--success); background: var(--success-15); }

@media (prefers-reduced-motion: reduce) {
  .news-share-btn, .news-entry-card, .news-entry::before { transition: none; }
}

/* ── Sidebar "otras noticias" ─────────────────────────────────── */

.news-sidebar-title {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.news-sidebar-list {
  position: relative;
  padding-left: 1.4rem;
  display: grid;
  gap: 1.1rem;
}

.news-sidebar-list::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.35rem; bottom: 0.35rem;
  width: 2px;
  background: var(--border);
}

.news-sidebar-item {
  position: relative;
  text-decoration: none;
  display: block;
}

.news-sidebar-item::before {
  content: "";
  position: absolute;
  left: -1.4rem; top: 0.3rem;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--text-muted);
}

.news-sidebar-item:hover::before { background: var(--brand); }

.news-sidebar-date {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.news-sidebar-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.news-sidebar-item:hover .news-sidebar-item-title { color: var(--brand); }

@media (max-width: 560px) {
  .news-rail { padding-left: 1.5rem; }
  .news-entry::before { left: -1.5rem; }
  .news-entry--featured .news-entry-card { padding: 1.25rem; }
}
