@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --navy: #0b2b52;
  --navy-deep: #071b34;
  --cyan: #17b8df;
  --cyan-text: #0d84a3;
  --gold: #f3b45c;
  --gold-text: #a3690a;
  --red: #f05252;
  --red-text: #c8352f;
  --green: #34d399;
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-raised: #e9f2f9;
  --line: rgba(11, 43, 82, .11);
  --text: #0d1e33;
  --text-secondary: #47607e;
  --text-muted: #7c8fa8;
  --card-shadow: 0 1px 2px rgba(11, 43, 82, .05), 0 10px 28px rgba(11, 43, 82, .07);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", ui-rounded, "SF Pro Rounded", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  /* Solo el padding lateral: usar las propiedades largas (en vez del atajo
     "padding") evita pisar el padding vertical que otros elementos (como
     footer, que también lleva la clase wrap) definen para sí mismos. */
  padding-left: clamp(1.5rem, 4vw, 2.5rem);
  padding-right: clamp(1.5rem, 4vw, 2.5rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- masthead ---------- */
/* The brand logo has no light/reversed variant, so only the thin utility
   strip carries the navy brand color; the row that holds the actual
   logo stays light so its ink reads correctly. */
.masthead-top {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-deep) 100%);
}

.masthead-top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  padding-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(238, 246, 255, .8);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd7d5;
  font-weight: 500;
}

.live-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff8b87;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.masthead-main {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(11, 43, 82, .06);
}

.masthead-main .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-logo {
  display: block;
  width: clamp(170px, 17vw, 230px);
  height: auto;
}

nav.primary-nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
}

nav.primary-nav a {
  color: var(--text-secondary);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.primary-nav a:hover,
nav.primary-nav a.is-active {
  color: var(--navy);
  border-color: var(--cyan);
}

.cta-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(240, 82, 82, .24);
}

.cta-live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 2rem;
  padding: 2.25rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  min-width: 0;
}

.lead-story {
  display: none;
  cursor: pointer;
}

.lead-story.is-active {
  display: block;
  animation: heroFade .4s ease;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}

.hero-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-arrow:hover {
  border-color: var(--cyan);
  color: var(--navy);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--line);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
  width: 22px;
  border-radius: 4px;
  transition: width .2s ease;
}

.lead-story img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  background: linear-gradient(135deg, #bfe0f7, #6fa8d8);
  box-shadow: var(--card-shadow);
  transition: box-shadow .18s ease;
}

.lead-story:hover img {
  box-shadow: 0 1px 2px rgba(11, 43, 82, .06), 0 16px 34px rgba(11, 43, 82, .16);
}

.lead-story .eyebrow {
  color: var(--gold-text);
  margin: 18px 0 10px;
}

.lead-story h1 {
  font-size: 38px;
  line-height: 1.14;
  margin-bottom: 14px;
  transition: color .15s ease;
}

.lead-story:hover h1 {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.lead-story .dek {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 62ch;
  margin-bottom: 14px;
}

.byline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.onair {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
  box-shadow: var(--card-shadow);
}

.onair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.onair-head .eyebrow {
  color: var(--red-text);
}

.channel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.channel-tabs[hidden] {
  display: none;
}

.channel-tab {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
}

.channel-tab:hover {
  border-color: var(--cyan);
}

.channel-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  background:
    linear-gradient(135deg, rgba(23, 184, 223, .1), transparent),
    #05070b;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}

video {
  display: block;
  width: 100%;
  height: 100%;
  background: #05070b;
  object-fit: contain;
}

.video-state {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(7, 9, 13, .78);
  backdrop-filter: blur(14px);
  border-radius: 8px;
  padding: 9px 10px;
  color: #d8dfeb;
  font-size: 13px;
}

.video-state p {
  flex: 1 1 200px;
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.video-state.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7f8a9a;
}

.status-dot.loading { background: var(--gold); }

.status-dot.playing {
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(52, 211, 153, .14);
}

.status-dot.error { background: var(--red); }

.sound-button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 0 11px;
  background: var(--cyan);
  color: #07101a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sound-button[hidden] { display: none; }

.onair-foot {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- ticker ---------- */
.ticker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  font-size: 13px;
}

.ticker .tag {
  flex: 0 0 auto;
  background: var(--gold);
  color: #3a2707;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 3px;
}

.ticker-track {
  display: flex;
  gap: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-item {
  color: var(--text-secondary);
  white-space: nowrap;
}

.ticker-item:hover {
  color: var(--navy);
  text-decoration: underline;
}

.ticker-item span {
  color: var(--text-muted);
  margin-right: 8px;
}

/* ---------- news grid ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2rem 0 1.1rem;
}

.section-head h2 { font-size: 22px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.filters button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
}

.filters button.is-active {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(23, 184, 223, .14);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.75rem;
  padding-bottom: 3rem;
}

.card {
  display: block;
  cursor: pointer;
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #d8e9f8, #a9cbe8);
  box-shadow: var(--card-shadow);
  transition: box-shadow .18s ease;
}

.card:hover img {
  box-shadow: 0 1px 2px rgba(11, 43, 82, .06), 0 14px 28px rgba(11, 43, 82, .16);
}

.card .eyebrow {
  color: var(--cyan-text);
  margin-bottom: 8px;
}

.card h3 {
  font-size: 19px;
  line-height: 1.28;
  margin-bottom: 8px;
  transition: color .15s ease;
}

.card:hover h3 {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.empty-news {
  padding: 1.5rem 0 3rem;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- publicidad ---------- */
.ad-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ad-skyscraper {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  z-index: 5;
  text-align: center;
}

/* Alineados al espacio libre a los costados del contenido (590px es la
   mitad del ancho máximo de .wrap), no al borde de la ventana, para que
   no se alejen del artículo en monitores muy anchos. */
.ad-skyscraper-left { left: calc(50% - 590px - 220px); }
.ad-skyscraper-right { right: calc(50% - 590px - 220px); }

@media (min-width: 1750px) {
  .ad-skyscraper { display: block; }
}

.ad-banner {
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.ad-banner a { display: block; }

/* ---------- rotador de publicidad ---------- */
.ad-rotator {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--card-shadow);
  background: var(--surface-raised);
}

.ad-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}

.ad-slide.is-active {
  opacity: 1;
}

.ad-skyscraper .ad-rotator { height: 560px; }

.ad-banner .ad-rotator {
  max-width: 720px;
  aspect-ratio: 3 / 1;
  margin: 0 auto;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

footer .brand-logo {
  width: 150px;
}

footer a { color: var(--text-secondary); }
footer a:hover { color: var(--cyan-text); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* ---------- article page ---------- */
.article-page {
  padding: 2rem 0 3.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.back-link:hover {
  color: var(--navy);
}

.article-full {
  max-width: 760px;
  margin: 0 auto;
}

.article-full > .eyebrow {
  color: var(--cyan-text);
  margin-bottom: 12px;
}

.article-full h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin-bottom: 14px;
}

.article-full .dek {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.article-full .byline {
  display: block;
  margin-bottom: 20px;
}

.article-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: linear-gradient(135deg, #bfe0f7, #6fa8d8);
  box-shadow: var(--card-shadow);
  margin-bottom: 28px;
}

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.article-media {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: linear-gradient(135deg, #bfe0f7, #6fa8d8);
  box-shadow: var(--card-shadow);
}

video.article-media {
  background: #05070b;
  cursor: default;
}

.article-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
}

.article-body p { margin: 0 0 1.2em; }

.article-body h2,
.article-body h3 {
  margin: 1.6em 0 .6em;
  font-size: 1.3em;
}

.article-body a {
  color: var(--cyan-text);
  text-decoration: underline;
}

.article-body strong { font-weight: 700; }

.article-body blockquote {
  margin: 1.4em 0;
  padding: .2em 0 .2em 1.2em;
  border-left: 3px solid var(--cyan);
  color: var(--text-secondary);
  font-style: italic;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.4em 0;
  box-shadow: var(--card-shadow);
}

.article-body iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 8px;
  margin: 1.4em 0;
}

.article-missing {
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
}

.article-missing h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.article-missing .dek {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* ---------- image lightbox ---------- */
.is-zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(5, 10, 20, .92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.lightbox-stage img { cursor: zoom-out; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, .18);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, .18); }
.lightbox-nav[hidden] { display: none; }

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
}

.lightbox-counter[hidden] { display: none; }

@media (max-width: 600px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 17px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  nav.primary-nav { display: none; }
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .masthead-main { gap: 1rem; }
  .lead-story h1 { font-size: 28px; }
}
