:root {
  --satinsheengold: #c49a66;
  --richcarmine: #950b0e;
  --bg: #f7f1ea;
  --paper: #fffdf9;
  --ink: #201815;
  --muted: #6d5d53;
  --line: #e7d8c8;
  --shadow: 0 18px 50px rgba(20, 10, 10, 0.08);
  --radius: 18px;
  --content-width: 1240px;
}

/* =========================
   BASE
========================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(90, 70, 50, 0.012),
      rgba(90, 70, 50, 0.012) 1px,
      transparent 1px,
      transparent 7px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(90, 70, 50, 0.008),
      rgba(90, 70, 50, 0.008) 1px,
      transparent 1px,
      transparent 9px
    );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(circle at 14% calc(10% + var(--bg-shift)), rgba(196, 154, 102, 0.12), transparent 28%),
    radial-gradient(circle at 84% calc(82% - var(--bg-shift)), rgba(149, 11, 14, 0.09), transparent 34%),
    radial-gradient(circle at 52% 30%, rgba(255, 255, 255, 0.35), transparent 32%);
}

.site-shell,
.site-header,
.site-main {
  position: relative;
  z-index: 1;
}

.site-shell {
  min-height: 100vh;
}

.site-main {
  padding: 42px 20px 72px;
}

.site-main__inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* =========================
   TYPOGRAPHY
========================= */

h1,
h2,
h3,
h4 {
  color: var(--richcarmine);
  font-family: "Cormorant Garamond", serif;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

h1 {
  margin-bottom: 18px;
  font-size: 3.2rem;
}

h2 {
  margin-top: 56px;
  margin-bottom: 18px;
  font-size: 2.3rem;
}

h3 {
  margin-top: 32px;
  font-size: 1.7rem;
}

p,
li {
  color: var(--ink);
  font-size: 1.02rem;
}

a {
  color: var(--richcarmine);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--satinsheengold);
  text-decoration: none;
}

hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--satinsheengold);
  border-radius: 0 14px 14px 0;
  background: var(--paper);
  box-shadow: var(--shadow);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
  overflow-x: auto;
  padding: 18px 20px;
  border-radius: 16px;
  background: #241919;
  color: #f9f4ef;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* =========================
   TABLES
========================= */

.table,
table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.table th,
.table td,
table th,
table td {
  padding: 14px 16px;
  border: 1px solid var(--line);
}

/* =========================
   LEGACY BOOTSTRAP RESET
========================= */

.container-fluid,
.row-fluid,
.span1,
.span10 {
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.navbar,
.navbar-inner,
.brand,
.nav,
.btn-navbar,
.nav-collapse,
.navbar-search {
  all: unset;
}

/* =========================
   SHELL / HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px 28px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.site-brand__logo {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: transparent;
  object-fit: contain;
}

.site-brand__name {
  color: var(--richcarmine);
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav__list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list li a {
  position: relative;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.site-nav__list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--satinsheengold);
  transition: width 0.25s ease;
}

.site-nav__list li a:hover::after {
  width: 100%;
}

.site-nav__list li a:hover,
.site-nav__list li.active a {
  color: var(--richcarmine);
  border-bottom-color: var(--satinsheengold);
}

.site-search input {
  min-width: 180px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: none;
  font-family: "Inter", sans-serif;
}

.site-search input:focus {
  outline: none;
  border-color: var(--satinsheengold);
  box-shadow: 0 0 0 3px rgba(196, 154, 102, 0.15);
}

/* =========================
   GENERIC CARDS / BUTTONS
========================= */

.article,
.post,
.summary,
.well,
.card,
.archive-entry,
.tag-cloud,
.category-list,
.author-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.metadata,
.post-info,
.article-meta,
.summary .post-info {
  color: var(--muted);
  font-size: 0.95rem;
}

.btn,
button,
input[type="submit"] {
  padding: 11px 18px;
  border: none;
  border-radius: 999px;
  background: var(--richcarmine);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pagination ul {
  display: flex;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

/* =========================
   FOOTER
========================= */

footer,
#footer,
.footer {
  margin-top: 48px;
  padding: 36px 20px 52px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

footer a,
#footer a,
.footer a {
  color: var(--richcarmine);
}

/* =========================
   HOME HERO
========================= */

.nn-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 72vh;
  margin-bottom: 34px;
  border-radius: 28px;
  background: #2a1a18;
  background-blend-mode: overlay;
  box-shadow: var(--shadow);
}

.nn-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015),
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 6px
    );
}

.nn-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 28%, rgba(196, 154, 102, 0.18), transparent 42%),
    radial-gradient(circle at 78% 72%, rgba(255, 255, 255, 0.06), transparent 40%);
}

.nn-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  will-change: transform;
  animation: nn-hero-bg-float 6s ease-in-out infinite alternate;
  transition: transform 6s ease;
}

.nn-hero:hover .nn-hero__bg {
  transform: scale(1.08);
}

.nn-hero__bg--plain {
  background:
    radial-gradient(circle at top left, rgba(196, 154, 102, 0.22), transparent 40%),
    linear-gradient(135deg, #2b1917 0%, #6c1719 100%);
}

.nn-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(18, 9, 10, 0.78) 0%, rgba(18, 9, 10, 0.42) 55%, rgba(18, 9, 10, 0.18) 100%);
}

.nn-hero__glow {
  position: absolute;
  top: -60px;
  right: -80px;
  z-index: 1;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(196, 154, 102, 0.22) 0%, rgba(196, 154, 102, 0) 70%);
}

.nn-hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 72px 56px;
  color: var(--satinsheengold);
}

.nn-hero__eyebrow,
.nn-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--satinsheengold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nn-hero__title {
  margin: 0 0 16px;
  color: var(--satinsheengold);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.96;
  text-wrap: balance;
}

.nn-hero__subtitle {
  max-width: 58ch;
  margin-bottom: 22px;
  color: rgba(196, 154, 102, 0.95);
  font-size: 1.16rem;
  line-height: 1.75;
}

.nn-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.nn-hero__badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(196, 154, 102, 0.35);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.08);
  color: var(--satinsheengold);
  font-size: 0.92rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.nn-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nn-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nn-button::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.nn-button:hover::after {
  opacity: 1;
  transform: translateX(100%);
}

.nn-button:hover {
  transform: translateY(-1px);
}

.nn-button--primary {
  border: 1px solid var(--satinsheengold);
  background: var(--satinsheengold);
  color: var(--richcarmine);
  box-shadow: 0 10px 24px rgba(196, 154, 102, 0.2);
}

.nn-button--primary:hover {
  color: var(--richcarmine);
  opacity: 0.95;
}

.nn-button--ghost {
  border: 1px solid rgba(196, 154, 102, 0.7);
  background: rgba(196, 154, 102, 0.08);
  color: var(--satinsheengold);
}

.nn-button--ghost:hover {
  background: rgba(196, 154, 102, 0.14);
  color: var(--satinsheengold);
}

/* =========================
   HOME LAYOUT / CARDS
========================= */

.nn-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.nn-home-main,
.nn-home-sidebar {
  min-width: 0;
}

.nn-section-card,
.nn-sidebar-card {
  position: relative;
  isolation: isolate;
  padding: 30px;
  border: 1px solid rgba(231, 216, 200, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 18px 44px rgba(20, 10, 10, 0.07);
  backdrop-filter: blur(6px);
}

.nn-section-card::before,
.nn-sidebar-card::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  opacity: 0.8;
  border-radius: 30px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(196, 154, 102, 0.10) 0%,
    rgba(196, 154, 102, 0.04) 35%,
    rgba(196, 154, 102, 0) 75%
  );
}

.nn-section-card::after,
.nn-sidebar-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  right: 30px;
  height: 2px;
  opacity: 0.7;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(196, 154, 102, 0.95),
    transparent
  );
}

.nn-sidebar-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.nn-sidebar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 154, 102, 0.4);
  box-shadow: 0 18px 40px rgba(20, 10, 10, 0.12);
}

.nn-section-card + .nn-section-card,
.nn-sidebar-card + .nn-sidebar-card {
  margin-top: 24px;
}

.nn-section-card__header {
  margin-bottom: 18px;
}

.nn-section-card__header h2,
.nn-sidebar-card h3 {
  margin: 0;
}

.nn-section-card__header--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.nn-inline-link {
  position: relative;
  color: var(--richcarmine);
  font-weight: 700;
  white-space: nowrap;
}

.nn-inline-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--satinsheengold);
  transition: width 0.25s ease;
}

.nn-inline-link:hover::after {
  width: 100%;
}

.nn-richtext > *:first-child {
  margin-top: 0;
}

/* =========================
   ARTICLE LIST / CARDS
========================= */

.nn-article-list {
  display: grid;
  gap: 18px;
}

.nn-article-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid rgba(196, 154, 102, 0.35);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.nn-article-card::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  opacity: 0.65;
  border-radius: 26px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(149, 11, 14, 0.08) 0%,
    rgba(149, 11, 14, 0.03) 38%,
    rgba(149, 11, 14, 0) 75%
  );
}

.nn-article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 154, 102, 0.5);
  box-shadow: 0 28px 60px rgba(20, 10, 10, 0.18);
}

.nn-article-card__image-link {
  display: block;
}

.nn-article-card__image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
/* SOLO PORTADA: artículos recientes sin recorte */

.nn-section-card--articles .nn-article-card__image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6efe7;
  border-radius: 16px;
  overflow: hidden;
}

.nn-section-card--articles .nn-article-card__image {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 260px;
  object-fit: contain;
}
.nn-article-card:hover .nn-article-card__image {
  transform: scale(1.05);
}

.nn-article-card__body {
  min-width: 0;
}

.nn-article-card__meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.nn-article-card__category a {
  color: var(--richcarmine);
  font-weight: 700;
}

.nn-article-card__title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2.2vw, 2.35rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.nn-article-card__title a {
  color: var(--ink);
  transition: color 0.2s ease, letter-spacing 0.2s ease, opacity 0.2s ease;
}

.nn-article-card__title a:hover {
  color: var(--richcarmine);
  letter-spacing: 0.02em;
}

.nn-article-card__subtitle {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.nn-article-card__summary {
  color: var(--ink);
  line-height: 1.72;
}

.nn-article-card--matematicas {
  border-top-color: #c49a66;
}

.nn-article-card--fisica {
  border-top-color: #950b0e;
}

.nn-article-card--termodinamica {
  border-top-color: #b56e43;
}

.nn-article-card--ciencia-de-datos {
  border-top-color: #5f7486;
}

.nn-article-card--dinamica-de-fluidos {
  border-top-color: #4d7a6d;
}

/* =========================
   SMALL LISTS / CLOUDS
========================= */

.nn-mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nn-mini-list li + li {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nn-mini-list a {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.nn-mini-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nn-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nn-link-cloud a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf5ee;
  color: var(--richcarmine);
  font-weight: 600;
}

/* =========================
   ARTICLE PAGE
========================= */

.nn-article-page {
  display: block;
}

.nn-article-hero {
  margin-bottom: 30px;
}

.nn-article-hero__inner {
  padding: 42px 42px 36px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffdfa 0%, #f9efe4 100%);
  box-shadow: var(--shadow);
}

.nn-article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nn-article-hero__category {
  color: var(--richcarmine);
  font-weight: 700;
}

.nn-article-hero__title {
  margin: 0 0 14px;
  color: var(--richcarmine);
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  line-height: 0.98;
}

.nn-article-hero__subtitle {
  max-width: 55ch;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 1.25rem;
}

.nn-article-hero__summary {
  max-width: 68ch;
  margin: 0;
  font-size: 1.04rem;
}

.nn-article-hero__figure {
  margin: 22px 0 0;
  text-align: center;
}

.nn-article-hero__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 440px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 20px;
}

.nn-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

.nn-article-layout--no-toc {
  grid-template-columns: minmax(0, 1fr);
}

.nn-article-sidebar {
  margin-top: 8px;
}

.nn-article-sidebar .nn-sticky-card {
  position: static;
}

.nn-article-toc,
.nn-article-sidebar,
.nn-article-main {
  min-width: 0;
}

.nn-sticky-card {
  position: sticky;
  top: 110px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.nn-sticky-card h3,
.nn-sticky-card h4 {
  margin-top: 0;
}

.nn-article-toc .nn-sticky-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nn-article-toc .nn-sticky-card nav {
  padding: 0;
}

.nn-article-toc .nn-sticky-card h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nn-article-toc .nn-sticky-card nav > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nn-article-toc .nn-sticky-card nav ul ul {
  margin: 8px 0 0 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(196, 154, 102, 0.22);
  list-style: none;
}

.nn-article-toc .nn-sticky-card nav li + li {
  margin-top: 6px;
}

.nn-article-toc .nn-sticky-card nav a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.nn-article-toc .nn-sticky-card nav a:hover {
  color: var(--richcarmine);
}

.nn-article-content {
  position: relative;
  padding: 34px 34px 34px 350px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.nn-article-content > *:first-child {
  margin-top: 0;
}

.nn-article-content p,
.nn-article-content li {
  font-size: 1.06rem;
  text-align: justify;
}

.nn-article-content h2 {
  margin-top: 48px;
}

.nn-article-content h3 {
  margin-top: 28px;
}

.nn-article-content img {
  margin: 18px 0;
}

.nn-article-content blockquote {
  margin: 30px 0;
}

.nn-article-content .math,
.nn-article-content .MathJax_Display {
  overflow-x: auto;
  overflow-y: hidden;
}

/* TOC REAL GENERADO DENTRO DEL CONTENIDO */

.nn-article-content > .toc {
  position: sticky;
  top: 110px;
  left: 0;
  float: left;
  width: 230px;
  margin: 0 42px 24px -316px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.nn-article-content::after {
  content: "";
  display: block;
  clear: both;
}

.nn-article-content > .toc::before {
  content: "Contenido";
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nn-article-content > .toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nn-article-content > .toc ul ul {
  margin: 8px 0 0 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(196, 154, 102, 0.22);
}

.nn-article-content > .toc li + li {
  margin-top: 6px;
}

.nn-article-content > .toc a {
  display: block;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease;
}

.nn-article-content > .toc a:hover {
  background: #fbf3ea;
  color: var(--richcarmine);
}

.nn-article-content > .toc a.is-active {
  padding: 10px 14px;
  background: rgba(196, 154, 102, 0.14);
  color: var(--richcarmine);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--satinsheengold);
}

.nn-article-content h2,
.nn-article-content h3,
.nn-article-content h4 {
  scroll-margin-top: 120px;
}

.nn-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}

.nn-article-nav__item {
  display: block;
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.nn-article-nav__label {
  display: block;
  margin-bottom: 8px;
  color: var(--satinsheengold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nn-article-nav__title {
  display: block;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  line-height: 1.1;
}

.nn-article-nav__item:hover .nn-article-nav__title {
  color: var(--richcarmine);
}

/* =========================
   ABOUT / SQUAD
========================= */

.nn-squad-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.nn-squad-hero {
  margin-bottom: 30px;
}

.nn-squad-hero__inner {
  position: relative;
  overflow: hidden;
  padding: 44px 38px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(149, 11, 14, 0.96) 0%, rgba(97, 9, 11, 0.96) 100%);
  box-shadow: var(--shadow);
  color: var(--satinsheengold);
}

.nn-squad-hero__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(196, 154, 102, 0.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.06), transparent 28%);
}

.nn-squad-hero__title {
  margin: 0 0 10px;
  color: var(--satinsheengold);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
}

.nn-squad-hero__subtitle {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: none;
  color: rgba(196, 154, 102, 0.95);
  font-size: 1.08rem;
  white-space: nowrap;
}

.nn-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 24px;
}

.nn-player-card {
  position: relative;
  z-index: 1;
  overflow: visible;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nn-player-card:hover {
  z-index: 40;
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(20, 10, 10, 0.14);
}

.nn-player-card__preview {
  position: relative;
  z-index: 1;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.nn-player-card__media {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #d8d0c6;
}

.nn-player-card__image,
.nn-player-card__expanded-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.nn-player-card:hover .nn-player-card__image {
  transform: scale(1.12);
}

.nn-player-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(18, 10, 10, 0.04) 0%,
    rgba(18, 10, 10, 0.14) 55%,
    rgba(18, 10, 10, 0.52) 100%
  );
}

.nn-player-card__base {
  position: relative;
  z-index: 1;
  padding: 18px 20px 22px;
  background: var(--paper);
}

.nn-player-card__role {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--satinsheengold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nn-player-card__name {
  margin: 0;
  color: var(--richcarmine);
  font-size: 2rem;
  line-height: 1.02;
}

.nn-player-card__expanded {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  width: min(920px, calc(100vw - 48px));
  min-height: 430px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 28px 70px rgba(20, 10, 10, 0.22);
  transform: translateX(-50%);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.nn-player-card:hover .nn-player-card__expanded {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-6px);
}

@media (max-width: 1180px) {
  .nn-player-card__expanded {
    left: 0;
    right: 0;
    width: auto;
    transform: none;
  }

  .nn-player-card:hover .nn-player-card__expanded {
    transform: translateY(-6px);
  }
}

.nn-player-card__expanded-media {
  position: relative;
  min-height: 100%;
  background: #d8d0c6;
}

.nn-player-card__expanded-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 30px;
}

.nn-player-card__name--hover {
  margin-bottom: 14px;
}

.nn-player-card__description {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.nn-player-card__link,
.nn-author-box__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf3ea;
  color: var(--richcarmine);
  font-weight: 700;
  text-decoration: none !important;
}

.nn-player-card__link:hover,
.nn-author-box__link:hover {
  background: var(--richcarmine);
  color: #fff;
}

.nn-squad-extra {
  margin-top: 34px;
}

.nn-squad-extra ul {
  margin-top: 12px;
}

/* =========================
   AUTHOR BOX
========================= */

.nn-author-box {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.nn-author-box__avatar img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 18px;
  object-fit: cover;
}

.nn-author-box__label {
  margin-bottom: 8px;
  color: var(--satinsheengold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nn-author-box__name {
  margin: 0 0 10px;
  color: var(--richcarmine);
}

.nn-author-box__bio {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* =========================
   MODALS
========================= */

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  animation: nn-modal-fade-in 0.28s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: nn-backdrop-fade-in 0.28s ease;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92%, 640px);
  margin: 8vh auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(20, 10, 10, 0.22);
  transform-origin: center top;
  animation: nn-modal-card-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.modal-card p {
  margin-bottom: 1.25rem;
  color: var(--muted);
}

#participa-modal .modal-card::before,
#pregunta-modal .modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  display: block;
  height: 4px;
  border-radius: 999px;
}

#participa-modal .modal-card::before {
  background: var(--satinsheengold);
}

#pregunta-modal .modal-card::before {
  background: var(--richcarmine);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  padding: 0.2rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--richcarmine);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--satinsheengold);
  transform: none;
}

#participa-form,
#pregunta-form {
  display: grid;
  gap: 0.85rem;
}

#participa-form label,
#pregunta-form label {
  color: var(--ink);
  font-weight: 600;
}

#participa-form input,
#participa-form textarea,
#pregunta-form input,
#pregunta-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

#participa-form input:focus,
#participa-form textarea:focus,
#pregunta-form input:focus,
#pregunta-form textarea:focus {
  outline: none;
  border-color: var(--satinsheengold);
  box-shadow: 0 0 0 3px rgba(196, 154, 102, 0.15);
}

#participa-form textarea,
#pregunta-form textarea {
  min-height: 140px;
  resize: vertical;
}

#participa-form button[type="submit"],
#pregunta-form button[type="submit"] {
  justify-self: start;
  margin-top: 0.5rem;
}

/* =========================
   REVEAL
========================= */

.nn-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.nn-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   ACCESSIBILITY
========================= */

.nn-button:focus-visible,
.modal-close:focus-visible,
#participa-form input:focus-visible,
#participa-form textarea:focus-visible,
#pregunta-form input:focus-visible,
#pregunta-form textarea:focus-visible {
  outline: 3px solid rgba(196, 154, 102, 0.28);
  outline-offset: 2px;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes nn-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nn-backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nn-modal-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nn-hero-bg-float {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-8px, -6px, 0);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
  .nn-article-hero__inner {
    padding: 26px 22px 22px;
  }

  .nn-article-hero__figure {
    margin-top: 18px;
  }

  .nn-article-hero__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
    border-radius: 18px;
  }

  .site-nav__list {
    flex-wrap: wrap;
  }

  .site-search {
    display: flex;
    justify-content: center;
  }

  .nn-home-grid {
    grid-template-columns: 1fr;
  }

  .nn-article-layout,
  .nn-article-layout--no-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .nn-article-content {
    display: block;
    padding: 22px;
  }

  .nn-article-content > .toc {
    float: none;
    position: static;
    width: auto;
    max-height: none;
    margin: 0 0 24px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow: visible;
  }

  .nn-sticky-card {
    position: static;
  }

  .nn-article-card {
    grid-template-columns: 1fr;
  }

  .nn-section-card--articles .nn-article-card__image {
   min-height: 0;
   max-height: 240px;
  }

  .nn-hero__content {
    padding: 56px 28px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .nn-player-card {
    min-height: auto;
  }

  .nn-player-card__expanded {
    position: static;
    display: block;
    width: 100%;
    margin-top: 0;
    opacity: 1;
    pointer-events: auto;
    border-top: 1px solid var(--line);
    border-radius: 0 0 24px 24px;
    box-shadow: none;
    transform: none;
  }

  .nn-player-card:hover .nn-player-card__preview {
    opacity: 1;
    transform: none;
  }

  .nn-player-card__expanded-media {
    display: none;
  }

  .nn-player-card__role--hover,
  .nn-player-card__name--hover {
    display: none;
  }

  .nn-player-card__expanded-content {
    padding: 22px 20px;
  }
}

@media (max-width: 900px) {
  .nn-squad-hero__subtitle {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding-top: 28px;
  }

  .site-header__inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
    text-align: center;
  }

  .site-brand {
    display: none;
  }

  .site-nav__list {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-nav__list li a {
    padding-bottom: 4px;
    font-size: 0.85rem;
  }

  .site-search {
    display: flex;
    justify-content: center;
  }

  .site-search input {
    min-width: 140px;
  }

  .nn-hero {
    min-height: 60vh;
    border-radius: 20px;
  }

  .nn-hero__bg {
    animation-duration: 6s;
  }

  .nn-hero__content {
    padding: 42px 22px;
  }

  .nn-hero__badges {
    gap: 8px;
    margin-bottom: 24px;
  }

  .nn-hero__badges span {
    padding: 7px 12px;
    font-size: 0.82rem;
  }

  .nn-section-card,
  .nn-sidebar-card,
  .nn-article-hero__inner,
  .nn-article-content,
  .nn-sticky-card,
  .nn-article-nav__item {
    padding: 22px;
    border-radius: 18px;
  }

  .nn-section-card__header--row {
    display: block;
  }

  .nn-article-nav {
    grid-template-columns: 1fr;
  }

  .nn-squad-hero__inner {
    padding: 30px 22px;
    border-radius: 20px;
  }

  .nn-player-card {
    border-radius: 18px;
  }

  .nn-player-card__media {
    height: 300px;
  }

  .nn-player-card__expanded-content {
    padding: 18px;
  }

  .nn-player-card__name {
    font-size: 1.7rem;
  }

  .nn-author-box {
    grid-template-columns: 1fr;
  }

  .nn-author-box__avatar img {
    width: 100px;
    height: 100px;
  }

  .modal {
  padding: 18px 12px 12px;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 30px);
  margin: 0 auto;
  padding: 1.2rem;
  border-radius: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

#pregunta-modal .modal-card {
  margin-top: 24px;
}

  h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}

/* =========================
   EXPLORE PAGE
========================= */

.nn-explore-page {
  display: block;
}

.nn-explore-hero {
  margin-bottom: 30px;
}

.nn-explore-hero__inner {
  padding: 40px 36px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffdfa 0%, #f9efe4 100%);
  box-shadow: var(--shadow);
}

.nn-explore-hero__title {
  margin: 0 0 10px;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 0.98;
}

.nn-explore-hero__subtitle {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.nn-explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.nn-explore-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.nn-explore-card__header {
  margin-bottom: 18px;
}

.nn-explore-card__header h2 {
  margin: 0 0 8px;
}

.nn-explore-card__header p {
  margin: 0;
  color: var(--muted);
}

.nn-explore-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nn-explore-list__item + .nn-explore-list__item {
  margin-top: 10px;
}

.nn-explore-list__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #fffaf4;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nn-explore-list__item a:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 154, 102, 0.45);
  box-shadow: 0 10px 22px rgba(20, 10, 10, 0.08);
}

.nn-explore-list__name {
  color: var(--ink);
  font-weight: 600;
}

.nn-explore-list__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(196, 154, 102, 0.14);
  color: var(--richcarmine);
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .nn-explore-grid {
    grid-template-columns: 1fr;
  }

  .nn-explore-hero__inner,
  .nn-explore-card {
    padding: 22px;
    border-radius: 18px;
  }
}

/* ABOUT PROJECT LOGO */

.nn-about-project__content::after {
  content: "";
  display: block;
  clear: both;
}

.nn-about-project__logo {
  float: right;
  display: block;
  width: 150px;
  max-width: 32%;
  height: auto;
  margin: 14px 2px 4px 8px;
  object-fit: contain;
  border-radius: 0;
}

@media (max-width: 640px) {
  .nn-about-project__logo {
    float: none;
    width: 120px;
    max-width: 100%;
    margin: 0 auto 18px;
  }
}

/* JUSTIFICADO GLOBAL EN BLOQUES CLAVE */

#about-project .nn-richtext p,
#about-project .nn-richtext li,
.nn-sidebar-card p,
.nn-sidebar-card li,
.nn-player-card__description,
.nn-author-box__bio,
.nn-article-content p,
.nn-article-content li,
.nn-richtext p,
.nn-richtext li {
  text-align: justify;
}

.nn-squad-hero__subtitle,
.nn-explore-hero__subtitle,
.nn-archives-hero__subtitle {
  text-align: justify;
}

@media (max-width: 640px) {
  #about-project .nn-richtext p,
  #about-project .nn-richtext li,
  .nn-sidebar-card p,
  .nn-sidebar-card li,
  .nn-player-card__description,
  .nn-author-box__bio,
  .nn-richtext p,
  .nn-richtext li,
  .nn-squad-hero__subtitle,
  .nn-explore-hero__subtitle,
  .nn-archives-hero__subtitle,
  .nn-random-fact {
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow-wrap: break-word;
  }
}

/* =========================
   ARTICLE META CARD
========================= */

.nn-article-meta-card {
  display: grid;
  gap: 18px;
}

.nn-article-meta-card__section {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf4;
}

.nn-article-meta-card__section--share {
  background: var(--paper);
}

.nn-article-meta-card__eyebrow {
  margin-bottom: 12px;
  color: var(--satinsheengold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nn-article-meta-row + .nn-article-meta-row {
  margin-top: 16px;
}

.nn-article-meta-row--stack {
  display: block;
}

.nn-article-meta-row__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nn-article-meta-row__value {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.nn-article-meta-badges,
.nn-article-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nn-article-meta-badge,
.nn-article-meta-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf3ea;
  color: var(--richcarmine);
  font-weight: 600;
  line-height: 1.2;
}

.nn-article-meta-badge:hover,
.nn-article-meta-tag:hover {
  border-color: rgba(196, 154, 102, 0.55);
  background: #f8ecdf;
  color: var(--richcarmine);
}

.nn-article-meta-badge--category {
  background: rgba(196, 154, 102, 0.16);
  border-color: rgba(196, 154, 102, 0.35);
}

.nn-article-meta-tag__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(149, 11, 14, 0.08);
  color: var(--richcarmine);
  font-size: 0.78rem;
  font-weight: 700;
}

.nn-article-meta-card__share-text {
  margin: 0 0 12px;
  color: var(--muted);
  text-align: left;
}

.nn-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nn-share-actions__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf5ee;
  color: var(--richcarmine);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nn-share-actions__button:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 154, 102, 0.45);
  background: #f8ecdf;
  color: var(--richcarmine);
}

#article-sidebar #sidebar-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

#article-sidebar #sidebar-social-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf5ee;
  box-shadow: none;
}

#article-sidebar #sidebar-social-link a svg,
#article-sidebar #sidebar-social-link a img {
  display: block;
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

@media (max-width: 640px) {
  .nn-article-meta-card__section {
    padding: 16px;
  }

  .nn-share-actions {
    grid-template-columns: 1fr;
  }

  #article-sidebar #sidebar-social-link a {
    width: 38px;
    height: 38px;
  }

  #article-sidebar #sidebar-social-link a svg,
  #article-sidebar #sidebar-social-link a img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
}

.nn-share-actions__button {
  gap: 8px;
}

.nn-share-actions__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* =========================
   HOME SIDEBAR FEATURED
========================= */

.nn-sidebar-card--featured {
  background: linear-gradient(180deg, #fffdfa 0%, #fdf4ea 100%);
}

.nn-sidebar-featured {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nn-sidebar-featured__title {
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.08;
}

.nn-sidebar-featured__title:hover {
  color: var(--richcarmine);
}

.nn-sidebar-featured__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nn-sidebar-featured__text {
  margin: 0;
  color: var(--ink);
  text-align: justify;
  line-height: 1.7;
}

.nn-sidebar-featured__button {
  margin-top: 4px;
}

@media (max-width: 980px) {
  .nn-sidebar-featured__title {
    font-size: 1.8rem;
  }
}

@media (max-width: 640px) {
  .nn-sidebar-featured__title {
    font-size: 1.65rem;
  }

  .nn-sidebar-featured {
    gap: 10px;
  }
}

/* BOTONES UNIFICADOS SIDEBAR HOME */

.nn-home-sidebar__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 44px;
  padding: 11px 18px;
  border: none;
  border-radius: 999px;
  background: var(--richcarmine);
  color: #fff !important;
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none;
  cursor: pointer;
}

.nn-home-sidebar__button:hover {
  background: var(--richcarmine);
  color: #fff !important;
  opacity: 0.92;
  transform: translateY(-1px);
}

/* DATO RELÁMPAGO */

.nn-sidebar-card--flash {
  background: linear-gradient(180deg, #fffdfa 0%, #fdf4ea 100%);
}

.nn-random-fact {
  margin: 0;
  color: var(--ink);
  text-align: justify;
  line-height: 1.75;
  font-size: 1.02rem;
}
@media (max-width: 640px) {
  .nn-player-card,
  .nn-player-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .nn-player-card__preview,
  .nn-player-card:hover .nn-player-card__preview {
    opacity: 1;
    transform: none;
  }

  .nn-player-card__image,
  .nn-player-card:hover .nn-player-card__image {
    transform: none;
  }

  .nn-player-card__expanded,
  .nn-player-card:hover .nn-player-card__expanded {
    position: static;
    display: block;
    width: 100%;
    min-height: auto;
    margin-top: 0;
    opacity: 1;
    pointer-events: auto;
    border-top: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    box-shadow: none;
    transform: none;
    left: auto;
    top: auto;
  }
}
@media (max-width: 640px) {
  .nn-article-hero__subtitle,
  .nn-article-hero__summary,
  .nn-article-content > .toc a,
  .nn-article-content > .toc::before {
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
    -ms-hyphens: manual;
  }
}
.nn-search-empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #fffaf4;
  text-align: center;
}

.nn-search-empty__image {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
/* OFFSET REAL PARA ANCLAS DE TAGS Y CATEGORÍAS */

[id$="-ref"]:target::before {
  content: "";
  display: block;
  height: 170px;
  margin-top: -170px;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  [id$="-ref"]:target::before {
    height: 150px;
    margin-top: -150px;
  }
}
