/* ═══════════════════════════════════════════════════════════════════
   NEWS ARTICLE DETAIL — Vibrant Block / Maximalist rebrand
   Brand tokens: --mx-bg #010729  --mx-surface #001E46
                 --mx-surface-2 #0B2E6B  --mx-accent #AFDFF9
                 --mx-primary #004B9C   --mx-red #D30535
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --mx-bg:          #010729;
  --mx-surface:     #001E46;
  --mx-surface-2:   #0B2E6B;
  --mx-accent:      #AFDFF9;
  --mx-primary:     #004B9C;
  --mx-red:         #D30535;
  --mx-text:        #ffffff;
  --mx-text-soft:   rgba(175, 223, 249, 0.82);
  --mx-text-muted:  rgba(175, 223, 249, 0.50);
  --mx-font-d:      "Bakbak One", sans-serif;
  --mx-font-b:      "Space Mono", monospace;
  --mx-border:      rgba(175, 223, 249, 0.12);
  --mx-border-s:    rgba(175, 223, 249, 0.28);
}

/* ─── PAGE ──────────────────────────────────────────────────────── */
.news-reading-page {
  background: var(--mx-bg);
  color: var(--mx-text);
}

/* ─── READING PROGRESS BAR ──────────────────────────────────────── */
.news-reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 1080;
  background: transparent;
}

.news-reading-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mx-accent);
  transition: width 0.1s linear;
}

/* ─── HERO — full-bleed, dark gradient at bottom ────────────────── */
.news-hero {
  position: relative;
  overflow: hidden;
  height: clamp(480px, 72vh, 820px);
}

.news-hero-media {
  position: absolute;
  inset: 0;
}

.news-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* Gradient: transparent top → very dark at bottom */
.news-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(1, 7, 41, 0.08) 0%,
    rgba(1, 7, 41, 0.12) 40%,
    rgba(1, 7, 41, 0.70) 68%,
    rgba(1, 7, 41, 0.97) 100%
  );
}

/* Hero content anchored to bottom */
.news-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 0 clamp(2rem, 4vw, 3.5rem);
}

/* ─── BACK LINK ─────────────────────────────────────────────────── */
.news-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mx-text-muted);
  font-family: var(--mx-font-b);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 180ms ease;
}

.news-back-link::before {
  content: "←";
  font-size: 0.85em;
}

.news-back-link:hover {
  color: var(--mx-accent);
}

/* ─── META ROW — author / date bar ─────────────────────────────── */
.news-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--mx-font-b);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
}

.news-meta-cat {
  color: var(--mx-accent);
}

.news-meta-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.news-meta-date {
  color: var(--mx-text-muted);
}

/* ─── TITLE ─────────────────────────────────────────────────────── */
.news-title {
  font-family: var(--mx-font-d);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.94;
  margin: 0 0 0;
  max-width: 960px;
  color: var(--mx-text);
  text-wrap: balance;
}

/* Accent line separator after title */
.news-title-sep {
  display: block;
  width: 80px;
  height: 2px;
  background: var(--mx-accent);
  margin: 1.25rem 0 0.85rem;
}

/* ─── SUBTITLE ──────────────────────────────────────────────────── */
.news-subtitle {
  margin: 0;
  max-width: 780px;
  color: var(--mx-text-soft);
  font-family: var(--mx-font-b);
  font-size: clamp(0.82rem, 1.4vw, 0.95rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* ─── READING LAYOUT ────────────────────────────────────────────── */
.news-reading-main {
  padding-bottom: 5rem;
}

.news-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
}

/* ─── ARTICLE BODY ──────────────────────────────────────────────── */
.noticia-detalle.news-article-shell {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  max-width: 760px;
  margin: 0 auto;
}

.noticia-detalle.news-article-shell::before {
  display: none;
}

/* ─── BODY TYPOGRAPHY ───────────────────────────────────────────── */
.noticia-body {
  color: var(--mx-text-soft);
  font-family: var(--mx-font-b);
  font-size: 0.88rem;
  line-height: 1.85;
  max-width: 760px;
}

.noticia-body p {
  margin-bottom: 1.5em;
}

.noticia-body h2,
.noticia-body h3,
.noticia-body h4 {
  font-family: var(--mx-font-d);
  color: var(--mx-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2em 0 0.6em;
  line-height: 1.08;
}

.noticia-body h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.noticia-body h3 { font-size: clamp(1.1rem, 1.9vw, 1.4rem); }
.noticia-body h4 { font-size: 1.1rem; }

.noticia-body p + h2,
.noticia-body p + h3 { margin-top: 2.5em; }

.noticia-body a {
  color: var(--mx-accent);
  text-decoration: underline;
  text-decoration-color: rgba(175, 223, 249, 0.35);
  text-underline-offset: 0.15em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.noticia-body a:hover {
  color: #fff;
  text-decoration-color: rgba(175, 223, 249, 0.8);
}

.noticia-body ul,
.noticia-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.noticia-body li {
  margin-bottom: 0.45em;
}

.noticia-body blockquote {
  margin: 2em 0;
  border-left: 3px solid var(--mx-accent);
  border-radius: 0;
  padding: 0.85rem 1.5rem;
  background: rgba(175, 223, 249, 0.05);
  color: var(--mx-text);
  font-style: italic;
}

/* Images inside article */
.noticia-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2em 0;
  border: 1px solid var(--mx-border);
  border-radius: 0;
}

.noticia-body iframe {
  max-width: 100%;
  margin: 2em 0;
}

.noticia-body pre {
  background: var(--mx-surface);
  color: var(--mx-text);
  border: 1px solid var(--mx-border);
  border-radius: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
}

.noticia-body blockquote.twitter-tweet {
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-left: 3px solid var(--mx-accent);
  border-radius: 0;
  margin: 2em auto !important;
  color: var(--mx-text);
}

.noticia-body .twitter-tweet-rendered {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 560px;
}

/* ─── RESPONSIVE VIDEO EMBEDS ───────────────────────────────────── */
.contenido-richtext iframe[src*="youtube.com"],
.contenido-richtext iframe[src*="youtu.be"],
.contenido-richtext iframe[src*="player.vimeo.com"],
.contenido-richtext iframe[src*="dailymotion.com"] {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000;
  border: none;
}

/* ─── ARTICLE FOOTER ────────────────────────────────────────────── */
.news-article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--mx-border);
  display: grid;
  gap: 1.5rem;
}

.news-article-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Tags */
.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-tag-pill {
  display: inline-block;
  font-family: var(--mx-font-b);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
  border: 1px solid var(--mx-border);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  background: transparent;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease;
}

.news-tag-pill:hover {
  color: var(--mx-accent);
  border-color: var(--mx-border-s);
}

/* Nav links */
.news-nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.news-nav-link {
  font-family: var(--mx-font-b);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.news-nav-link:hover {
  color: var(--mx-accent);
}

/* ─── RELATED ARTICLES SECTION ──────────────────────────────────── */
.news-related {
  background: var(--mx-surface-2);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  margin-top: 3rem;
  border-top: 3px solid var(--mx-accent);
}

.news-related-title {
  font-family: var(--mx-font-d);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mx-text);
  margin-bottom: 1.75rem;
}

.news-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.news-related-card {
  border: 1px solid rgba(175, 223, 249, 0.14);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: var(--mx-surface);
  text-decoration: none;
  color: var(--mx-text);
  display: block;
  transition: border-left-color 0.2s ease, transform 0.2s ease;
}

.news-related-card:hover {
  border-left-color: var(--mx-accent);
  transform: translateY(-3px);
  color: var(--mx-text);
}

.news-related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.news-related-card-body {
  padding: 0.9rem 1rem 1.1rem;
}

.news-related-card-title {
  font-family: var(--mx-font-d);
  font-size: 1rem;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 0.4rem;
}

.news-related-card-date {
  font-family: var(--mx-font-b);
  font-size: 0.60rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
}

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .news-hero {
    height: clamp(380px, 65vw, 520px);
  }

  .news-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 0.98;
  }

  .noticia-detalle.news-article-shell {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .news-article-footer {
    max-width: 100%;
  }

  .news-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .news-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
