/**
 * Fase A — Newsroom Pro
 * Jerarquía de noticiero profesional: single, meta, archivos, header, badges.
 */
:root {
  --nv-news-ink: #0f1419;
  --nv-news-muted: #536471;
  --nv-news-line: #eff3f4;
  --nv-news-surface: #ffffff;
  --nv-news-soft: #f7f9fa;
  --nv-news-accent: var(--nv-primary, #5B4DFF);
  --nv-news-radius: 12px;
  --nv-news-gap: 1.25rem;
}

/* Contenedor lectura */
.nv-single-main,
.nv-s {
  max-width: 720px;
}
.nv-layout.has-sidebar .nv-single-main,
.nv-layout--sidebar .nv-single-main {
  max-width: none;
}

/* Título single — peso editorial */
.nv-single__title,
.nv-s h1.nv-single__title,
.nv-s [class*="__title"] {
  color: var(--nv-news-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0.35rem 0 0.65rem;
}
@media (min-width: 768px) {
  .nv-single__title { line-height: 1.15; }
}

.nv-single__excerpt {
  color: var(--nv-news-muted);
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  font-weight: 450;
}

/* Meta compacta profesional — sin huecos raros */
.nv-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--nv-news-line);
  border-bottom: 1px solid var(--nv-news-line);
}
.nv-meta__avatar { flex-shrink: 0; }
.nv-meta__avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nv-meta__body { min-width: 0; flex: 1; }
.nv-meta__line {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}
.nv-meta__line--name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-weight: 700;
  color: var(--nv-news-ink);
  font-size: 0.92rem;
}
.nv-meta__line--name a { color: inherit; text-decoration: none; }
.nv-meta__line--name a:hover { color: var(--nv-news-accent); }
.nv-meta__line--type {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nv-news-accent);
  letter-spacing: 0.01em;
  margin-top: 0.1rem;
}
.nv-meta__line--date {
  font-size: 0.78rem;
  color: var(--nv-news-muted);
  margin-top: 0.15rem;
}
.nv-meta__line--stats {
  font-size: 0.75rem;
  color: var(--nv-news-muted);
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}
.nv-meta-verified {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0f7b4a;
  background: #e8f8ef;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.nv-meta__flag { margin-right: 0.15rem; }

/* Badges de tipo — contraste garantizado */
.nv-badges,
.nv-tax-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
}
.nv-badge-tipo,
.nv-tax-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  line-height: 1.2;
  color: #fff !important;
  background: var(--nv-news-accent);
  text-decoration: none;
}
/* Fondos claros → texto oscuro (si el admin pone color claro vía style inline se respeta; fallback) */
.nv-badge-tipo[style*="background:#fff"],
.nv-badge-tipo[style*="background: #fff"],
.nv-badge-tipo[style*="background:#f"],
.nv-badge-tipo[style*="background: rgb(255"] {
  color: #0f1419 !important;
}

/* Categoría pill */
.nv-card__cat,
.nv-list-item__cat,
.nv-tax-cat a {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nv-news-accent);
  text-decoration: none;
}

/* Imagen destacada */
.nv-single__featured {
  margin: 1rem 0 0.35rem;
  border-radius: var(--nv-news-radius);
  overflow: hidden;
  background: var(--nv-news-soft);
}
.nv-single__featured img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.nv-single__caption {
  font-size: 0.8rem;
  color: var(--nv-news-muted);
  margin: 0.4rem 0 1rem;
  line-height: 1.4;
}

/* Cuerpo — lectura editorial */
.nv-single__content,
.nv-s .entry-content {
  color: var(--nv-news-ink);
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}
.nv-single__content p { margin: 0 0 1.1em; }
.nv-single__content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.6em 0 0.55em;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.nv-single__content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.35em 0 0.45em;
}
.nv-single__content a {
  color: var(--nv-news-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nv-single__content blockquote {
  margin: 1.25em 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--nv-news-accent);
  background: var(--nv-news-soft);
  color: var(--nv-news-muted);
  font-style: italic;
}

/* Quitar rayas decorativas agresivas en skins */
.nv-s::before,
.nv-s::after,
.nv-s1::before,
.nv-s [class*="__rule"],
.nv-s .nv-skin-rule {
  display: none !important;
  border: none !important;
  height: 0 !important;
  background: none !important;
}

/* Share sobrio */
.nv-single__share,
.nv-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.nv-single__share a,
.nv-share a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--nv-news-soft);
  color: var(--nv-news-ink);
  border: 1px solid var(--nv-news-line);
  text-decoration: none;
}
.nv-single__share a:hover { border-color: var(--nv-news-accent); color: var(--nv-news-accent); }

/* Author box */
.nv-author-box {
  display: flex;
  gap: 1rem;
  padding: 1.15rem;
  margin: 1.75rem 0;
  background: var(--nv-news-soft);
  border-radius: var(--nv-news-radius);
  border: 1px solid var(--nv-news-line);
}
.nv-author-box__avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.nv-author-box__name {
  font-weight: 800;
  font-size: 1rem;
  margin: 0 0 0.2rem;
}
.nv-author-box__role {
  font-size: 0.8rem;
  color: var(--nv-news-accent);
  font-weight: 600;
}
.nv-author-box__bio {
  font-size: 0.88rem;
  color: var(--nv-news-muted);
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

/* Tags como botones */
.nv-tags,
.nv-single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0;
}
.nv-tags a,
.nv-single-tags a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--nv-news-soft);
  color: var(--nv-news-ink);
  border: 1px solid var(--nv-news-line);
  text-decoration: none;
}
.nv-tags a:hover {
  background: var(--nv-news-accent);
  color: #fff;
  border-color: var(--nv-news-accent);
}

/* --- Archivos: Card --- */
.nv-card {
  background: var(--nv-news-surface);
  border: 1px solid var(--nv-news-line);
  border-radius: var(--nv-news-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.nv-card:hover {
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.08);
  transform: translateY(-2px);
}
.nv-card__img,
.nv-card img.nv-card__img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  background: var(--nv-news-soft);
}
.nv-card__body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.nv-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--nv-news-ink);
}
.nv-card__title a { color: inherit; text-decoration: none; }
.nv-card__title a:hover { color: var(--nv-news-accent); }
.nv-card__excerpt {
  font-size: 0.88rem;
  color: var(--nv-news-muted);
  line-height: 1.45;
  margin: 0;
}
.nv-card__meta {
  font-size: 0.75rem;
  color: var(--nv-news-muted);
  margin-top: auto;
  padding-top: 0.35rem;
}

/* Grid columns respect */
.nv-layout-grid,
.nv-cards-grid {
  display: grid;
  gap: 1rem;
}
@media (max-width: 767px) {
  .nv-layout-grid { grid-template-columns: repeat(var(--nv-cols-m, 1), 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .nv-layout-grid { grid-template-columns: repeat(var(--nv-cols-t, 2), 1fr); }
}
@media (min-width: 1024px) {
  .nv-layout-grid { grid-template-columns: repeat(var(--nv-cols-d, 3), 1fr); }
}

/* Lista profesional */
.nv-list-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--nv-news-line);
  align-items: start;
}
@media (max-width: 480px) {
  .nv-list-item { grid-template-columns: 96px 1fr; gap: 0.65rem; }
}
.nv-list-item__thumb,
.nv-list-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: var(--nv-news-soft);
}
.nv-list-item__title {
  margin: 0.15rem 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--nv-news-ink);
}
.nv-list-item__title a { color: inherit; text-decoration: none; }
.nv-list-item__title a:hover { color: var(--nv-news-accent); }
.nv-list-item__excerpt {
  font-size: 0.84rem;
  color: var(--nv-news-muted);
  line-height: 1.4;
  margin: 0;
}
.nv-list-item__author,
.nv-list-item__date {
  font-size: 0.75rem;
  color: var(--nv-news-muted);
}

/* Header estable */
.nv-header {
  background: var(--nv-news-surface);
  border-bottom: 1px solid var(--nv-news-line);
  position: relative;
  z-index: 100;
}
.nv-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--nv-header-h-m, 56px);
  max-width: var(--nv-container, 1200px);
  margin: 0 auto;
  padding-left: 8px;
  padding-right: 8px;
}
@media (min-width: 768px) {
  .nv-header__inner {
    min-height: var(--nv-header-h-t, 64px);
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (min-width: 1024px) {
  .nv-header__inner {
    min-height: var(--nv-header-h-d, 72px);
    padding-left: 15px;
    padding-right: 15px;
  }
}
.nv-header .custom-logo,
.nv-header .nv-logo img {
  height: var(--nv-logo-h-m, 28px);
  width: auto;
  max-height: 100%;
  object-fit: contain;
}
@media (min-width: 768px) {
  .nv-header .custom-logo,
  .nv-header .nv-logo img { height: var(--nv-logo-h-t, 32px); }
}
@media (min-width: 1024px) {
  .nv-header .custom-logo,
  .nv-header .nv-logo img { height: var(--nv-logo-h-d, 36px); }
}

/* Márgenes site */
@media (max-width: 767px) {
  .nv-site-main,
  .nv-layout,
  .site-content,
  .nv-wrap {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .nv-site-main,
  .nv-layout,
  .site-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
@media (min-width: 1024px) {
  .nv-site-main,
  .nv-layout,
  .site-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Sidebar sticky tablet+ */
@media (min-width: 768px) {
  .nv-sidebar,
  aside.nv-sidebar,
  .nv-layout .widget-area {
    position: sticky;
    top: calc(var(--nv-header-h-t, 64px) + 12px);
    align-self: start;
  }
}
@media (min-width: 1024px) {
  .nv-sidebar,
  aside.nv-sidebar {
    top: calc(var(--nv-header-h-d, 72px) + 16px);
  }
}

/* Archive title */
.nv-archive-title,
.page-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nv-news-ink);
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--nv-news-ink);
}

/* Related */
.nv-related {
  margin: 2rem 0 1rem;
}
.nv-related__title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.85rem;
  letter-spacing: -0.01em;
}

/* Dark mode contrast */
body.nv-dark,
html[data-theme="dark"] body {
  --nv-news-ink: #e7e9ea;
  --nv-news-muted: #8b98a5;
  --nv-news-line: #2f3336;
  --nv-news-surface: #15202b;
  --nv-news-soft: #1e2732;
}
body.nv-dark .nv-card,
body.nv-dark .nv-header,
html[data-theme="dark"] .nv-card {
  background: var(--nv-news-surface);
  border-color: var(--nv-news-line);
}
body.nv-dark .nv-meta-verified {
  background: #0d3d28;
  color: #6ee7b0;
}


/* Fase E — Portada */
.nv-section--block {
  margin: 0 0 1.75rem;
}
.nv-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--nv-news-ink, #0f1419);
}
.nv-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nv-news-ink, #0f1419);
}
.nv-home-more a,
.nv-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--nv-news-accent, #5B4DFF);
  color: #fff !important;
  text-decoration: none;
}
.nv-home-more a:hover { opacity: 0.92; }
.nv-trends-list { list-style: none; margin: 0; padding: 0; }
.nv-trends-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--nv-news-line, #eff3f4);
}
.nv-trends-rank {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--nv-news-accent, #5B4DFF);
}
.nv-trends-item--top .nv-trends-rank { color: #dc2626; }
.nv-trends-item__title {
  display: block;
  font-weight: 750;
  line-height: 1.3;
  color: var(--nv-news-ink, #0f1419);
}
