/* News detail immersive reading layout */

.news-reading-page {
  --news-bg: #050b16;
  --news-panel: rgba(8, 16, 31, 0.86);
  --news-panel-strong: rgba(8, 15, 28, 0.95);
  --news-border: rgba(102, 162, 255, 0.24);
  --news-text: #e9f3ff;
  --news-text-soft: #9fb8db;
  --news-accent: #49c3ff;
  --news-accent-alt: #ff656a;
  --news-shadow: 0 20px 50px rgba(2, 8, 20, 0.55);
  background: radial-gradient(circle at 18% -10%, rgba(73, 195, 255, 0.17), transparent 32%),
              radial-gradient(circle at 88% -14%, rgba(255, 101, 106, 0.14), transparent 28%),
              var(--news-bg);
}

.news-reading-main {
  padding-bottom: 4rem;
}

.news-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1080;
  background: rgba(255, 255, 255, 0.06);
}

.news-reading-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--news-accent), var(--news-accent-alt));
  box-shadow: 0 0 18px rgba(73, 195, 255, 0.55);
  transition: width 0.12s linear;
}

.news-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 52vh, 520px);
  border-bottom: 1px solid var(--news-border);
}

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

.news-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.03) contrast(1.05);
}

.news-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to bottom,
      rgba(3, 10, 21, 0.36) 0%,
      rgba(4, 10, 22, 0.7) 44%,
      rgba(5, 11, 24, 0.95) 100%
  );
}

.news-hero-content {
  position: relative;
  z-index: 1;
  padding-top: clamp(6.5rem, 11vh, 8.5rem);
  padding-bottom: clamp(2rem, 4.5vh, 3rem);
}

.news-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(146, 194, 255, 0.36);
  background: rgba(6, 14, 28, 0.5);
  color: #d7e8ff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 0.72rem;
}

.news-back-pill:hover {
  color: #ffffff;
  border-color: rgba(146, 194, 255, 0.6);
  background: rgba(10, 21, 42, 0.74);
}

.news-meta-row {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-chip {
  border: 1px solid rgba(145, 186, 246, 0.35);
  background: rgba(7, 16, 34, 0.64);
  color: #d6e9ff;
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-chip-category {
  border-color: rgba(73, 195, 255, 0.56);
  color: #bdefff;
}

.news-title {
  font-family: "Rajdhani", "Exo 2", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(2rem, 5vw, 3.35rem);
  margin: 0;
  max-width: 920px;
  color: #f3f8ff;
  text-wrap: balance;
  line-height: 0.98;
}

.news-subtitle {
  margin-top: 1rem;
  margin-bottom: 0;
  max-width: 860px;
  color: #b8cdec;
  font-size: clamp(0.98rem, 1.9vw, 1.1rem);
  line-height: 1.55;
}

.news-reading-layout {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-top: -1.6rem;
}

.noticia-detalle.news-article-shell {
  position: relative;
  background: linear-gradient(145deg, var(--news-panel), var(--news-panel-strong));
  border: 1px solid var(--news-border);
  border-radius: 16px;
  padding: clamp(1.2rem, 2.8vw, 2.3rem);
  box-shadow: var(--news-shadow);
}

.noticia-detalle.news-article-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(73, 195, 255, 0.08), transparent 32%),
              linear-gradient(320deg, rgba(255, 101, 106, 0.08), transparent 30%);
}

.noticia-body {
  position: relative;
  z-index: 1;
  color: var(--news-text);
  font-family: "Exo 2", sans-serif;
  line-height: 1.86;
  font-size: clamp(1.01rem, 1.55vw, 1.15rem);
}

.noticia-body h1,
.noticia-body h2,
.noticia-body h3,
.noticia-body h4,
.noticia-body h5,
.noticia-body h6 {
  color: #ffffff;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
  line-height: 1.23;
  letter-spacing: 0.02em;
}

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

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

.noticia-body a {
  color: #7bd6ff;
  text-decoration: underline;
  text-decoration-color: rgba(123, 214, 255, 0.55);
  text-underline-offset: 0.12em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.noticia-body a:hover {
  color: #a8e6ff;
  text-decoration-color: rgba(168, 230, 255, 0.9);
}

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

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

.noticia-body blockquote {
  margin: 1.5em 0;
  border-left: 3px solid rgba(73, 195, 255, 0.7);
  padding: 1rem 1.1rem;
  border-radius: 0 10px 10px 0;
  background: rgba(6, 14, 28, 0.7);
  color: #d8e8fa;
}

.noticia-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.6em auto;
  border: 1px solid rgba(144, 187, 240, 0.22);
  box-shadow: 0 16px 30px rgba(3, 10, 22, 0.38);
}

.noticia-body iframe {
  max-width: 100%;
  margin: 1.5em 0;
  border-radius: 12px;
}

.noticia-body pre {
  background: rgba(4, 10, 20, 0.95);
  color: #d5e8ff;
  border: 1px solid rgba(102, 162, 255, 0.24);
  border-radius: 12px;
  padding: 1em;
  overflow-x: auto;
}

.noticia-body blockquote.twitter-tweet {
  background: rgba(7, 16, 30, 0.96);
  border: 1px solid rgba(102, 162, 255, 0.24);
  border-left: 3px solid rgba(73, 195, 255, 0.7);
  border-radius: 12px;
  margin: 1.5em auto !important;
  color: #d9e8fb;
}

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

.news-side-panel {
  display: grid;
  gap: 0.9rem;
}

.news-side-card {
  border: 1px solid var(--news-border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: linear-gradient(145deg, rgba(7, 16, 31, 0.88), rgba(5, 13, 24, 0.92));
  box-shadow: 0 12px 28px rgba(2, 9, 20, 0.35);
}

.news-side-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: #86a8d1;
  font-weight: 700;
}

.news-side-value {
  margin: 0.35rem 0 0;
  color: #e2f0ff;
  font-weight: 600;
}

.news-tags {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.news-tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cfe7ff;
  border: 1px solid rgba(102, 162, 255, 0.28);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  background: rgba(7, 17, 33, 0.66);
}

.news-tag-pill:hover {
  color: #ffffff;
  border-color: rgba(124, 188, 255, 0.56);
  background: rgba(8, 22, 43, 0.86);
}

.news-side-link {
  display: block;
  color: #7ed7ff;
  text-decoration: none;
  margin-top: 0.52rem;
  font-size: 0.9rem;
}

.news-side-link:hover {
  color: #afe6ff;
  text-decoration: underline;
}

/* Responsive 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;
}

@supports not (aspect-ratio: 16 / 9) {
  .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"] {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
  }
  .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"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

@media (min-width: 992px) {
  .news-reading-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
  }

  .news-side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

@media (max-width: 991.98px) {
  .news-hero-content {
    padding-top: 5.3rem;
  }

  .news-title {
    line-height: 1.02;
  }
}

@media (max-width: 576px) {
  .news-reading-progress {
    height: 2px;
  }

  .news-meta-row {
    gap: 0.4rem;
  }

  .news-chip {
    font-size: 0.67rem;
    padding: 0.28rem 0.56rem;
  }

  .noticia-body {
    font-size: 1rem;
    line-height: 1.78;
  }

  .noticia-body blockquote.twitter-tweet {
    max-width: 100%;
  }
}
