/* La Red Mundial — noticias del mundo digital, crazy colorful */
:root {
  --bg: #0b1020;
  --bg-elev: #141c36;
  --bg-card: #1c2748;
  --cream: #fff8ee;
  --cream-dim: #c9c2b4;
  --ink: #0a0f1c;
  --white: #ffffff;

  /* Section bands — brighter than el-internet */
  --mundo: #4f7cff;
  --mundo-deep: #2a4fd4;
  --tech: #00e5c0;
  --tech-deep: #00a88c;
  --cultura: #ff4fd8;
  --cultura-deep: #c21a9e;
  --clima: #7dff4a;
  --clima-deep: #3fad1a;
  --deportes: #ffb020;
  --deportes-deep: #d98900;
  --flash: #ff3b5c;

  --teal: #00e5c0;
  --lime: #d4ff3a;
  --coral: #ff5e4d;
  --purple: #b388ff;
  --border: rgba(255, 248, 238, 0.14);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 45% at 8% -8%, rgba(79, 124, 255, 0.35), transparent),
    radial-gradient(ellipse 55% 40% at 92% 5%, rgba(255, 79, 216, 0.22), transparent),
    radial-gradient(ellipse 50% 35% at 50% 105%, rgba(0, 229, 192, 0.14), transparent);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tech); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lime); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--lime); color: var(--ink);
  padding: .5rem 1rem; z-index: 1000; font-weight: 800;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.92);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: .75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--cream);
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--mundo), var(--cultura), var(--tech));
  color: var(--white); box-shadow: 0 0 18px rgba(79, 124, 255, 0.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.2rem; letter-spacing: -.02em;
}
.brand-tag { font-size: .72rem; color: var(--cream-dim); max-width: 260px; }

.nav-toggle {
  display: none; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--cream); border-radius: 10px; padding: .5rem .75rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 600;
}
.nav-links {
  display: flex; flex-wrap: wrap; gap: .3rem .7rem;
  list-style: none; margin: 0; padding: 0; align-items: center;
}
.nav-links a {
  color: var(--cream-dim); text-decoration: none; font-weight: 700;
  font-size: .9rem; padding: .35rem .55rem; border-radius: 8px; transition: .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--cream); background: rgba(255, 255, 255, 0.08);
}
.nav-links a.nav-mundo:hover { color: #9bb6ff; background: rgba(79,124,255,.18); }
.nav-links a.nav-tech:hover { color: var(--tech); background: rgba(0,229,192,.15); }
.nav-links a.nav-cultura:hover { color: #ff9ae6; background: rgba(255,79,216,.15); }
.nav-links a.nav-clima:hover { color: var(--clima); background: rgba(125,255,74,.12); }
.nav-links a.nav-deportes:hover { color: var(--deportes); background: rgba(255,176,32,.15); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--bg-elev); padding: 1rem;
    border-bottom: 1px solid var(--border); align-items: stretch;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .7rem .85rem; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 1.25rem; }

/* Hero */
.hero {
  display: grid; gap: 1.5rem; align-items: center;
  padding: 2.25rem 0 1.5rem;
  grid-template-columns: 1.35fr .9fr;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-block; margin: 0 0 .75rem;
  font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: var(--lime); padding: .28rem .65rem; border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1rem;
}
.hero h1 .flash { color: var(--flash); }
.hero h1 .glow { color: var(--tech); }
.lede { font-size: 1.12rem; color: var(--cream-dim); max-width: 38rem; margin: 0 0 1.35rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  padding: .7rem 1.15rem; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; transition: .2s;
}
.btn-primary { background: var(--flash); color: var(--white); }
.btn-primary:hover { background: #ff617a; color: var(--white); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--cream);
  border-color: rgba(255,248,238,.28);
}
.btn-ghost:hover { border-color: var(--tech); color: var(--tech); }

.hero-visual {
  border-radius: 22px; padding: 1.35rem;
  background: linear-gradient(145deg, rgba(79,124,255,.35), rgba(255,79,216,.25), rgba(0,229,192,.2));
  border: 1px solid var(--border); box-shadow: var(--shadow);
  min-height: 220px; display: grid; place-items: center; text-align: center;
}
.hero-visual .pulse {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 0;
}
.ticker {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; justify-content: center;
}
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 800; font-size: .75rem; padding: .3rem .65rem;
  border-radius: 999px; color: var(--ink);
}
.chip-mundo { background: #9bb6ff; }
.chip-tech { background: var(--tech); }
.chip-cultura { background: #ff9ae6; }
.chip-clima { background: var(--clima); }
.chip-deportes { background: var(--deportes); }
.chip-flash { background: var(--flash); color: var(--white); }

/* Section strips */
.section-strip {
  margin: 1.75rem 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.section-band {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.25rem;
  font-family: var(--font-display);
}
.section-band h2 {
  margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  letter-spacing: -.02em; color: var(--ink);
}
.section-band a {
  color: var(--ink); font-weight: 800; text-decoration: none;
  opacity: .85; white-space: nowrap;
}
.section-band a:hover { opacity: 1; text-decoration: underline; }
.band-mundo { background: linear-gradient(90deg, var(--mundo), #7ea0ff); }
.band-tech { background: linear-gradient(90deg, var(--tech), #6ff5d8); }
.band-cultura { background: linear-gradient(90deg, var(--cultura), #ff8ae8); }
.band-clima { background: linear-gradient(90deg, var(--clima), #b6ff86); }
.band-deportes { background: linear-gradient(90deg, var(--deportes), #ffd06a); }
.band-flash { background: linear-gradient(90deg, var(--flash), #ff7a90); color: var(--white); }
.band-flash h2, .band-flash a { color: var(--white); }

.section-body {
  background: var(--bg-elev);
  padding: 1.15rem 1.25rem 1.35rem;
}
.card-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.1rem;
  display: flex; flex-direction: column; gap: .55rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,248,238,.28);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.card-kicker {
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--cream-dim);
}
.card h3 {
  margin: 0; font-family: var(--font-display);
  font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em;
}
.card h3 a { color: var(--cream); text-decoration: none; }
.card h3 a:hover { color: var(--lime); }
.card p { margin: 0; color: var(--cream-dim); font-size: .95rem; flex: 1; }
.card-meta { font-size: .78rem; color: var(--cream-dim); font-weight: 700; }

/* Page stubs */
.page-hero {
  padding: 2rem 0 1rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 .75rem; letter-spacing: -.02em;
}
.page-hero .lede { margin-bottom: 0; }
.stub-note {
  margin: 1.25rem 0 2rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(255,248,238,.06);
  border: 1px dashed rgba(255,248,238,.25);
  color: var(--cream-dim);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.28);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  display: grid; gap: 1.5rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.site-footer h3 {
  font-family: var(--font-display); margin: 0 0 .65rem;
  font-size: 1rem; letter-spacing: -.01em;
}
.site-footer p, .site-footer li { color: var(--cream-dim); font-size: .92rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: var(--cream); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--tech); }
.sister-sites a {
  display: inline-block; margin: .25rem .45rem .25rem 0;
  padding: .35rem .7rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .85rem;
}
.footer-bottom {
  max-width: var(--max); margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  color: var(--cream-dim); font-size: .82rem;
}

/* Article pages */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}
.article-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .65rem;
  margin: 0 0 1rem;
}
.article-date {
  font-size: .85rem; font-weight: 700; color: var(--cream-dim);
}
.article-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.12; letter-spacing: -.03em;
  margin: 0 0 1rem;
}
.article-lede {
  font-size: 1.18rem; color: var(--cream-dim);
  margin: 0 0 1.5rem; line-height: 1.55;
  border-left: 4px solid var(--tech);
  padding-left: 1rem;
}
.article-body {
  font-size: 1.05rem; line-height: 1.7;
}
.article-body p { margin: 0 0 1.15rem; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem; letter-spacing: -.02em;
  margin: 1.75rem 0 .85rem;
  color: var(--cream);
}
.article-body .pull {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(0, 229, 192, 0.1);
  border: 1px solid rgba(0, 229, 192, 0.28);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.fuentes-box {
  margin: 2.25rem 0 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.fuentes-box h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 .75rem;
  color: var(--lime);
}
.fuentes-box ul {
  margin: 0; padding-left: 1.15rem;
}
.fuentes-box li {
  margin: .4rem 0;
  color: var(--cream-dim);
  font-size: .92rem;
}
.fuentes-box a { font-weight: 700; }
.article-back {
  display: inline-flex; margin-top: 1rem;
  font-weight: 800; text-decoration: none;
}
.article-back:hover { text-decoration: underline; }
.article-tech .article-lede { border-left-color: var(--tech); }
.article-mundo .article-lede { border-left-color: var(--mundo); }

.article-cultura .article-lede { border-left-color: var(--cultura, #ff4fd8); }
.article-clima .article-lede { border-left-color: var(--clima); }
.article-deportes .article-lede { border-left-color: var(--deportes); }
.empty-state {
  margin: 1.25rem 0 2rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: rgba(255,248,238,.06);
  border: 1px dashed rgba(255,248,238,.25);
  color: var(--cream-dim);
  font-weight: 600;
}

/* ===== Story layout + archival sidebars ===== */
.story-layout {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  align-items: start;
  padding: 1.25rem 0 2.5rem;
}
.story-layout .article-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}
.story-main { min-width: 0; }
.story-sidebar { min-width: 0; }
.archive-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.archive-sticky { position: sticky; top: 5.25rem; }
.archive-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 .25rem;
  letter-spacing: -.01em;
  color: var(--lime);
}
.archive-sub {
  margin: 0 0 .85rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.archive-list li {
  padding-bottom: .65rem;
  border-bottom: 1px solid rgba(255,248,238,.08);
}
.archive-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.archive-list a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
}
.archive-list a:hover { color: var(--lime); }
.archive-list time {
  display: block;
  margin-top: .2rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--cream-dim);
}
.archive-empty { color: var(--cream-dim); font-size: .9rem; font-weight: 600; }
.archive-more {
  margin: .95rem 0 0;
  font-size: .85rem;
  font-weight: 800;
}
.archive-more a { text-decoration: none; }
.archive-more a:hover { text-decoration: underline; }

.section-with-archive {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  align-items: start;
  margin-bottom: 2rem;
}
.section-with-archive .section-strip { margin: 0; }

@media (max-width: 900px) {
  .story-layout,
  .section-with-archive {
    grid-template-columns: 1fr;
  }
  .archive-sticky { position: static; }
}

/* ===== Video embed (PD / CC only) ===== */
.video-embed {
  margin: 1.5rem 0 1.75rem;
  padding: 0;
}
.video-embed-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}
.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed figcaption {
  margin-top: .55rem;
  font-size: .82rem;
  color: var(--cream-dim);
  font-weight: 600;
  line-height: 1.45;
}
.video-embed figcaption a { font-weight: 800; }

/* ===== Fuentes upgraded ===== */
.fuentes-note {
  margin: 0 0 .85rem;
  font-size: .88rem;
  color: var(--cream-dim);
  font-weight: 600;
  font-style: italic;
}
.fuentes-box ul { list-style: none; padding-left: 0; }
.fuentes-box li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: 0 0 .85rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,248,238,.08);
}
.fuentes-box li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.fuentes-title {
  color: var(--cream);
  font-weight: 800;
  font-size: .95rem;
}
.fuentes-meta {
  color: var(--cream-dim);
  font-size: .78rem;
  font-weight: 700;
}
.fuentes-box a {
  font-size: .78rem;
  word-break: break-all;
  font-weight: 600;
  opacity: .9;
}

/* ===== Markets strip + page ===== */
.nav-links a.nav-mercados:hover { color: var(--lime); background: rgba(212,255,58,.12); }

.markets-strip {
  margin: 1rem 0 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(28,39,72,.95), rgba(20,28,54,.98));
  overflow: hidden;
  box-shadow: var(--shadow);
}
.markets-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .7rem 1.1rem;
  background: linear-gradient(90deg, #1a3a2a, #2a4a1a);
  border-bottom: 1px solid var(--border);
}
.markets-strip-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--lime);
  letter-spacing: -.01em;
}
.markets-strip-head a {
  color: var(--cream);
  font-weight: 800;
  font-size: .85rem;
  text-decoration: none;
}
.markets-strip-head a:hover { color: var(--lime); text-decoration: underline; }
.markets-strip-meta {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,248,238,.7);
}
.markets-track {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .85rem 1rem 1rem;
}
.market-pill {
  display: inline-flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 7.5rem;
  padding: .55rem .75rem;
  border-radius: 12px;
  background: rgba(255,248,238,.05);
  border: 1px solid rgba(255,248,238,.1);
}
.market-pill .m-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.market-pill .m-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--cream);
}
.market-pill .m-chg {
  font-size: .78rem;
  font-weight: 800;
}
.m-up { color: var(--clima); }
.m-down { color: #ff7a90; }
.m-flat { color: var(--cream-dim); }
.markets-disclaimer {
  margin: 0;
  padding: 0 1rem .85rem;
  font-size: .75rem;
  color: var(--cream-dim);
  font-weight: 600;
}

.markets-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.markets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.markets-table th,
.markets-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,248,238,.08);
}
.markets-table th {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cream-dim);
  background: rgba(0,0,0,.2);
}
.markets-table td { color: var(--cream); font-weight: 700; }
.markets-table tr:last-child td { border-bottom: 0; }
.markets-table .num { font-variant-numeric: tabular-nums; font-family: var(--font-display); }

.chip-mercados { background: var(--lime); }
