/* ==========================================================================
   AZTECH METAL - SALA DE REDACCIÓN (blog.html)
   Portal de noticias sobre la identidad del sitio: fondo #050404, acento #FF3B34.
   Tema oscuro fijo, igual que el resto de las páginas. Prefijo .nw-
   ========================================================================== */

.nw-body { background: var(--bg-deep, #050404); }

.nw-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

.nw-main { padding: 2.5rem 0 4rem; }

/* La barra de transmisión va fija al fondo y tapaba el final del pie.
   Este colchón deja pasar el último renglón por encima de ella. */
.main-footer { padding-bottom: 140px; }

.nw-header { position: sticky; top: 0; z-index: 1000; }

.nw-listen-btn { white-space: nowrap; }

/* ------------------------------ Última hora ------------------------------ */
.nw-breaking {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--maroon-grid-strong);
  border-bottom: 1px solid var(--maroon-grid-strong);
  background: rgba(10, 4, 5, 0.92);
  overflow: hidden;
}

.nw-breaking-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  background: var(--red-fill, #D91F26);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nw-breaking-viewport {
  flex: 1;
  /* min-width:0 anula el min-width:auto de los flex items: sin esto el
     contenedor crece hasta el ancho del texto y desborda la página. */
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.nw-breaking-track {
  display: flex;
  white-space: nowrap;
  /* La duracion la pone el script segun el ancho real del contenido, para
     que la velocidad sea la misma con cinco titulares que con veinte. */
  animation: nw-scroll var(--nw-dur, 60s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

/* El contenido va en dos tandas identicas, cada una con su margen al final:
   asi el ancho de la pista es exactamente el doble de una tanda y el salto
   de -50% cae en el mismo pixel donde empieza la segunda. Antes el hueco
   entre tandas no cuadraba y se veia un brinco en cada vuelta. */
.nw-breaking-run {
  display: flex;
  flex: none;
  gap: 2.5rem;
  padding: 0 2.5rem 0 0;
}
.nw-breaking-run:first-child { padding-left: 1.5rem; }
.nw-breaking-run:last-child { padding-left: 1.5rem; }

.nw-breaking:hover .nw-breaking-track { animation-play-state: paused; }

@keyframes nw-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* En la portada la franja baja pegada a la cabecera y se queda con ella. */
body.hm-home .nw-breaking {
  position: sticky;
  top: var(--cab-alto, 64px);
  z-index: 999;
}

@media (prefers-reduced-motion: reduce) {
  .nw-breaking-track { animation: none; }
  .nw-breaking-viewport { overflow-x: auto; }
}

.nw-breaking-item {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nw-breaking-item:hover { color: #fff; }

.nw-breaking-kicker {
  color: var(--neon-crimson, #FF3B34);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-right: 0.5rem;
}

/* --------------------------- Kicker y metadatos --------------------------- */
.nw-kicker {
  display: inline-block;
  color: var(--neon-crimson, #FF3B34);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.nw-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.nw-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ------------------------------- Portada ------------------------------- */
.nw-frontpage {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--maroon-grid-strong);
}

.nw-lead-media {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.04);
}

.nw-lead-img,
.nw-side-img,
.nw-wire-img,
.nw-feature-img,
.nw-album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-lead-media:hover .nw-lead-img,
.nw-side-media:hover .nw-side-img,
.nw-wire-media:hover .nw-wire-img,
.nw-feature-media:hover .nw-feature-img,
.nw-album-media:hover .nw-album-img { transform: scale(1.04); }

.nw-lead-text { padding-top: 1.2rem; }

.nw-lead-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.06;
  font-weight: 800;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

.nw-lead-title a,
.nw-side-title a,
.nw-wire-title a,
.nw-feature-title a,
.nw-album-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nw-lead-title a:hover,
.nw-side-title a:hover,
.nw-wire-title a:hover,
.nw-feature-title a:hover,
.nw-album-title a:hover { color: var(--neon-crimson, #FF3B34); }

.nw-lead-deck {
  color: rgba(255, 255, 255, 0.74);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 62ch;
  margin: 0 0 1rem;
}

.nw-lead-side {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  border-left: 1px solid var(--maroon-grid-strong);
  padding-left: 2rem;
}

.nw-side-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 1rem;
  align-items: start;
}

.nw-side-card + .nw-side-card {
  border-top: 1px solid rgba(255, 59, 52, 0.22);
  padding-top: 1.4rem;
}

.nw-side-media {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.nw-side-title {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

/* --------------------------- Cuerpo y columna --------------------------- */
.nw-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 3rem;
  padding-top: 2.5rem;
}

.nw-section { margin-bottom: 3.5rem; }

.nw-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.8rem;
  margin-bottom: 1.6rem;
  border-bottom: 2px solid var(--neon-crimson, #FF3B34);
}

.nw-section-title {
  font-family: var(--font-display, inherit);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.nw-section-link {
  color: var(--neon-crimson, #FF3B34);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.nw-section-link:hover { text-decoration: underline; }

/* --------------------------------- Tabs --------------------------------- */
.nw-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.nw-tab {
  background: transparent;
  border: 1px solid var(--maroon-grid-strong);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nw-tab:hover { color: #fff; border-color: var(--neon-crimson, #FF3B34); }

.nw-tab.is-active {
  background: var(--red-fill, #D91F26);
  border-color: var(--red-fill, #D91F26);
  color: #fff;
}

.nw-tab:focus-visible,
.nw-topic:focus-visible,
.nw-input:focus-visible {
  outline: 2px solid var(--neon-crimson, #FF3B34);
  outline-offset: 2px;
}

/* --------------------------- Hilo de noticias --------------------------- */
.nw-wire { list-style: none; margin: 0; padding: 0; }

.nw-wire-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 150px;
  gap: 1.4rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(255, 59, 52, 0.18);
}

.nw-wire-time {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.nw-wire-hour { color: var(--neon-crimson, #FF3B34); font-weight: 700; }

.nw-wire-title {
  font-size: 1.22rem;
  line-height: 1.28;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.nw-wire-excerpt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  max-width: 68ch;
}

.nw-wire-media {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 3 / 2;
  background: rgba(255, 255, 255, 0.04);
}

.nw-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

/* ------------------------------- Reportaje ------------------------------- */
.nw-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  /* stretch, no center: con center la imagen calculaba su ancho a partir del
     alto de la fila y se salía encima del texto. */
  align-items: stretch;
  border: 1px solid var(--maroon-grid-strong);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 7, 9, 0.9), rgba(8, 3, 4, 0.9));
}

.nw-feature-media {
  display: block;
  overflow: hidden;
  /* El ancho lo manda la columna; el alto lo sigue. Tener a la vez
     aspect-ratio y height: 100% dejaba que el alto mandara sobre el ancho y
     la imagen tapaba el titular. */
  width: 100%;
  height: 100%;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.04);
}

.nw-feature-text { padding: 2rem 2rem 2rem 0; min-width: 0; align-self: center; }

.nw-feature-title {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.18;
  font-weight: 800;
  margin: 0 0 0.8rem;
}

.nw-feature-deck {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* --------------------------------- Discos --------------------------------- */
.nw-album-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.8rem;
}

.nw-album-media {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
}

.nw-album-title {
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.nw-album-excerpt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.83rem;
  line-height: 1.5;
  margin: 0;
}

/* ------------------------------ Columna lateral ------------------------------ */
.nw-rail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
  position: sticky;
  top: 96px;
}

.nw-rail-card {
  border: 1px solid var(--maroon-grid-strong);
  border-radius: 4px;
  padding: 1.4rem;
  background: rgba(12, 5, 6, 0.72);
}

.nw-rail-live {
  border-color: var(--neon-crimson, #FF3B34);
  background: linear-gradient(135deg, rgba(28, 8, 10, 0.95), rgba(10, 4, 5, 0.95));
}

.nw-rail-title {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  margin: 0.6rem 0 0.7rem;
}

.nw-rail-text {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.83rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.nw-rail-cta { width: 100%; justify-content: center; text-align: center; }

.nw-ranked { list-style: none; margin: 0; padding: 0; counter-reset: nwrank; }

.nw-ranked-item {
  counter-increment: nwrank;
  display: flex;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 59, 52, 0.2);
}

.nw-ranked-item:first-child { border-top: 0; padding-top: 0; }

.nw-ranked-item::before {
  content: counter(nwrank);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--neon-crimson, #FF3B34);
  line-height: 1;
  flex-shrink: 0;
}

.nw-ranked-item a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}

.nw-ranked-item a:hover { color: var(--neon-crimson, #FF3B34); }

.nw-ranked-kicker {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.nw-agenda { list-style: none; margin: 0; padding: 0; }

.nw-agenda-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 59, 52, 0.2);
}

.nw-agenda-item:first-child { border-top: 0; padding-top: 0; }

.nw-agenda-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--neon-crimson, #FF3B34);
  text-transform: uppercase;
}

.nw-agenda-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
}

.nw-agenda-link strong { color: #fff; font-size: 0.86rem; font-weight: 600; }

.nw-agenda-link span { color: var(--text-muted); font-size: 0.76rem; }

.nw-agenda-link:hover strong { color: var(--neon-crimson, #FF3B34); }

/* ------------------------------ Formulario ------------------------------ */
.nw-form { display: flex; flex-direction: column; gap: 0.5rem; }

.nw-label {
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nw-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--maroon-grid-strong);
  border-radius: 3px;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-family: var(--font-body, inherit);
  font-size: 0.88rem;
}

.nw-input::placeholder { color: rgba(255, 255, 255, 0.5); }

.nw-input:focus { border-color: var(--neon-crimson, #FF3B34); outline: none; }

.nw-error { color: #ff8a83; font-size: 0.76rem; margin: 0; }

.nw-success { color: #7ad493; font-size: 0.78rem; margin: 0.4rem 0 0; }

/* --------------------------------- Temas --------------------------------- */
.nw-topics { border-top: 1px solid var(--maroon-grid-strong); padding-top: 2.5rem; }

.nw-topic-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.nw-topic {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--maroon-grid-strong);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  padding: 0.4rem 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nw-topic:hover {
  background: var(--red-fill, #D91F26);
  border-color: var(--red-fill, #D91F26);
  color: #fff;
}

/* ------------------------- Aparición al hacer scroll ------------------------- */
.nw-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-reveal.is-visible { opacity: 1; transform: none; }

/* ------------------- Callout dentro del cuerpo del artículo ------------------- */
.callout-title {
  font-family: var(--font-mono);
  color: var(--neon-crimson, #FF3B34);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.callout-body {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   CABECERA RESPONSIVE (aplica a todas las páginas que carguen esta hoja)
   El header original nunca colapsaba: en móvil la navegación y el buscador
   desbordaban el ancho y provocaban scroll horizontal en toda la página.
   ========================================================================== */
@media (max-width: 1180px) {
  .cinematic-header .search-pill { display: none; }
}

@media (max-width: 1024px) {
  .cinematic-header {
    flex-wrap: wrap;
    row-gap: 0.6rem;
    padding-left: clamp(0.8rem, 3vw, 2rem);
    padding-right: clamp(0.8rem, 3vw, 2rem);
  }
  .cinematic-header .category-badge-center { display: none; }
  .cinematic-header .header-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 1rem;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
  }
  .cinematic-header .header-nav::-webkit-scrollbar { display: none; }
  .cinematic-header .header-nav .nav-link { white-space: nowrap; }
}

@media (max-width: 1024px) {
  .cinematic-header .header-nav { min-width: 0; }
}

@media (max-width: 780px) {
  /* La rejilla del pie mantenía columnas fijas y desbordaba en teléfonos. */
  .main-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 620px) {
  .nw-listen-btn { display: none; }
  /* El toast tenía ancho fijo y sobresalía del viewport en teléfonos. */
  .toast-notification {
    max-width: calc(100vw - 2rem);
    right: 1rem;
    left: auto;
  }
}

/* -------------------------------- Responsive -------------------------------- */
@media (max-width: 1080px) {
  .nw-body-grid { grid-template-columns: 1fr; }
  .nw-rail { position: static; }
}

@media (max-width: 900px) {
  .nw-frontpage { grid-template-columns: 1fr; }
  .nw-lead-side {
    border-left: 0;
    padding-left: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--maroon-grid-strong);
  }
  .nw-feature { grid-template-columns: 1fr; }
  .nw-feature-text { padding: 0 1.5rem 1.8rem; }
  .nw-feature-media { aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .nw-main { padding: 1.5rem 0 6rem; }
  .nw-wire-item { grid-template-columns: 1fr; gap: 0.7rem; }
  .nw-wire-time { flex-direction: row; gap: 0.6rem; }
  .nw-wire-media { aspect-ratio: 16 / 9; order: -1; }
  .nw-side-card { grid-template-columns: 88px 1fr; }
  .nw-section-head { flex-direction: column; align-items: flex-start; }
  .nw-lead-title { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nw-breaking-track { animation: none; }
  .nw-reveal { opacity: 1; transform: none; transition: none; }
  .nw-lead-img, .nw-side-img, .nw-wire-img, .nw-feature-img, .nw-album-img { transition: none; }
  .nw-lead-media:hover .nw-lead-img,
  .nw-side-media:hover .nw-side-img,
  .nw-wire-media:hover .nw-wire-img,
  .nw-feature-media:hover .nw-feature-img,
  .nw-album-media:hover .nw-album-img { transform: none; }
}

/* Nota al pie de la tarjeta lateral, en el mismo tono que el resto. */
.nw-rail-nota {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.32);
}

/* La fecha de hoy, dentro de la etiqueta roja de la franja. La escribe
   franja.js (no puede ir en el HTML: quedaría vieja mañana). */
.nw-breaking-fecha {
  margin-left: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;      /* la etiqueta va en mayúsculas; la fecha, no */
  white-space: nowrap;
  opacity: 0.92;
}
/* En pantalla chica la etiqueta ya ocupa lo suyo: la fecha es lo primero
   que sobra. */
@media (max-width: 720px) {
  .nw-breaking-fecha { display: none; }
}
