/* =============================================
   HUB.CSS — Newspaper edition
   FutbolHUB
   ============================================= */

/* ── VARIABLES NEWSPAPER ── */
:root {
  --np-paper:    #f4ead2;
  --np-paper2:   #ede0c0;
  --np-ink:      #0f120e;
  --np-red:      #b5221e;
  --np-ink-mid:  rgba(15,18,14,0.68);
  --np-ink-soft: rgba(15,18,14,0.18);
  --np-white:    #ffffff;
}

/* ── BODY OVERRIDE para el hub ── */
body.np-body {
  background: var(--np-paper);
  color: var(--np-ink);
  font-family: 'Inter', sans-serif;
}

/* Textura papel */
body.np-body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.65;
}

.hub { position: relative; z-index: 1; padding-bottom: 40px; }

/* ══════════════════════════════════════════════
   MASTHEAD
   ══════════════════════════════════════════════ */
.masthead {
  padding: 12px 20px 0;
  border-bottom: 2.5px solid var(--np-ink);
}
.masthead-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding-bottom: 8px;
}
.masthead-meta {
  font-family: 'DM Mono', monospace; font-size: 8px;
  letter-spacing: 0.22em; color: var(--np-ink-mid);
  line-height: 1.9; text-transform: uppercase;
}
.masthead-edition {
  font-family: 'DM Mono', monospace; font-size: 8px;
  letter-spacing: 0.18em; color: var(--np-ink-mid);
  text-align: right; line-height: 1.9;
}
.masthead-edition strong {
  display: block; color: var(--np-red);
  font-size: 8px; letter-spacing: 0.22em;
}
.logotype-wrap {
  padding: 8px 0 10px; text-align: center;
  border-top: 1px solid var(--np-ink-soft);
  border-bottom: 1px solid var(--np-ink-soft);
  margin-bottom: 10px;
}
.logotype { display: inline-flex; align-items: baseline; }
.logo-fut {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: clamp(38px, 7vw, 56px);
  color: var(--np-ink); line-height: 0.9;
}
.logo-hub {
  font-family: 'Anton', sans-serif;
  font-size: clamp(38px, 7vw, 56px);
  background: var(--np-ink); color: var(--np-paper);
  padding: 0 8px 2px; margin-left: 3px;
  display: inline-block; line-height: 1;
}

/* ══════════════════════════════════════════════
   TICKER
   ══════════════════════════════════════════════ */
.ticker {
  overflow: hidden; white-space: nowrap;
  background: var(--np-red);
  font-family: 'DM Mono', monospace;
  font-size: 9.5px; letter-spacing: 0.18em;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}
.ticker-strip {
  display: inline-block;
  animation: tickerScroll 38s linear infinite;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.33%); }
}
.tick-label {
  background: rgba(0,0,0,0.2); padding: 0 7px; margin-right: 5px;
  color: var(--np-paper); font-weight: 500; letter-spacing: 0.26em;
}
.tick-accent { color: var(--np-paper); font-weight: 500; }
.tick-normal { color: rgba(244,234,210,0.8); }

/* ══════════════════════════════════════════════
   LAYOUT: anuncios | contenido | anuncios
   ══════════════════════════════════════════════ */
.np-layout {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: start;
  padding: 18px 0 0;
}

/* ── Columnas de anuncios ── */
/* El hub usa ad-cols DENTRO del grid (no fixed como en los juegos).
   Anulamos aquí lo que impone global.css. */
body.np-body .np-layout .ad-col {
  position: static;
  top: auto; bottom: auto; left: auto; right: auto;
  width: auto;
  background: transparent;
  z-index: auto;
}
.ad-col {
  display: flex; flex-direction: column;
  gap: 8px; padding: 0 5px;
  align-self: stretch;
}
.ad-col--left {
  border-right: 1px solid var(--np-ink-soft);
  padding-right: 6px;
}
.ad-col--right {
  border-left: 1px solid var(--np-ink-soft);
  padding-left: 6px;
}

/* Cada strip es una tira fina vertical */
.ad-strip {
  flex: 1;
  border: 1px dashed var(--np-ink-soft);
  background: rgba(15,18,14,0.025);
  display: flex; align-items: center; justify-content: center;
  min-height: 80px;
}
.ad-strip--accent {
  border-color: rgba(181,34,30,0.22);
  background: rgba(181,34,30,0.03);
}
.ad-strip-label {
  font-family: 'DM Mono', monospace;
  font-size: 6px; letter-spacing: 0.16em;
  text-transform: uppercase; text-align: center;
  color: rgba(15,18,14,0.25); line-height: 1.6;
}
.ad-strip--accent .ad-strip-label {
  color: rgba(181,34,30,0.3);
}

/* ══════════════════════════════════════════════
   CONTENIDO PRINCIPAL
   ══════════════════════════════════════════════ */
.np-main { padding: 0 14px; min-width: 0; }

/* ── Regla de sección ── */
.section-rule {
  display: flex; align-items: center; gap: 10px;
  border-top: 2px solid var(--np-ink); padding-top: 6px;
  margin: 0 0 14px;
}
.section-rule h3 {
  font-family: 'DM Mono', monospace; font-size: 9px;
  letter-spacing: 0.34em; text-transform: uppercase;
  white-space: nowrap; margin: 0;
}
.rule-line { flex: 1; height: 1px; background: var(--np-ink-soft); }
.rule-num {
  font-family: 'DM Mono', monospace; font-size: 8px;
  letter-spacing: 0.22em; color: var(--np-ink-mid); white-space: nowrap;
}

/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */

/* ── Partes comunes ── */
.np-card {
  display: block;
  background: var(--np-white);
  border: 1px solid var(--np-ink-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.np-card:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--np-ink), 0 10px 28px rgba(15,18,14,0.14);
}

.np-card-art {
  overflow: hidden; background: var(--np-paper2);
  width: 100%; aspect-ratio: 8/3; flex-shrink: 0;
  border-bottom: 1px solid var(--np-ink-soft);
}
.np-card-art svg,
.np-card-art img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}

.np-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }

.np-card-eyebrow {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap;
}
.np-num {
  font-family: 'DM Mono', monospace; font-size: 8px;
  letter-spacing: 0.28em; color: var(--np-ink-mid);
}
.np-cat {
  font-family: 'DM Mono', monospace; font-size: 8px;
  letter-spacing: 0.2em; color: var(--np-red); text-transform: uppercase;
}
.np-cat::before { content: "· "; }

.np-title {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: clamp(15px, 2.4vw, 19px);
  line-height: 1.05; letter-spacing: -0.01em;
  margin: 0 0 5px; color: var(--np-ink);
}
.np-title--featured {
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.0; margin: 0 0 7px;
}

.np-desc {
  font-size: 10.5px; line-height: 1.4;
  color: rgba(15,18,14,0.68); margin: 0 0 8px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.np-desc--featured {
  font-size: 12.5px; line-height: 1.5; -webkit-line-clamp: 4;
  margin: 0 0 10px;
}

.np-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-top: auto;
}
.np-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.np-tag {
  font-family: 'DM Mono', monospace; font-size: 7px;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--np-ink-soft);
  padding: 2px 5px; color: rgba(15,18,14,0.55);
}
.np-cta {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 13px; color: var(--np-red); white-space: nowrap;
  flex-shrink: 0; transition: letter-spacing 0.25s;
}
.np-card:hover .np-cta { letter-spacing: 0.07em; }

/* ── Featured card ── */
.np-card--featured {
  margin-bottom: 16px;
  animation: slideUp 0.4s ease both;
}
.np-card-art--hero {
  width: 100%; aspect-ratio: 16/5;
  border-bottom: 1px solid var(--np-ink-soft);
}

/* ── Grid 2 columnas ── */
.np-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.np-card--reg {
  display: flex; flex-direction: column;
}

/* Stagger de entrada */
.np-card--featured               { animation: slideUp 0.4s ease both 0.0s; }
.np-grid .np-card:nth-child(1)   { animation: slideUp 0.4s ease both 0.06s; }
.np-grid .np-card:nth-child(2)   { animation: slideUp 0.4s ease both 0.12s; }
.np-grid .np-card:nth-child(3)   { animation: slideUp 0.4s ease both 0.18s; }
.np-grid .np-card:nth-child(4)   { animation: slideUp 0.4s ease both 0.24s; }
.np-grid .np-card:nth-child(5)   { animation: slideUp 0.4s ease both 0.30s; }
.np-grid .np-card:nth-child(6)   { animation: slideUp 0.4s ease both 0.36s; }
.np-grid .np-card:nth-child(7)   { animation: slideUp 0.4s ease both 0.42s; }
.np-grid .np-card:nth-child(8)   { animation: slideUp 0.4s ease both 0.48s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.np-footer {
  margin-top: 28px; padding: 11px 16px;
  border-top: 2px solid var(--np-ink);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
  font-family: 'DM Mono', monospace; font-size: 7.5px;
  letter-spacing: 0.22em; color: var(--np-ink-mid);
  text-transform: uppercase;
}
.np-footer-link {
  color: var(--np-ink-mid); text-decoration: underline;
  text-underline-offset: 2px;
}
.np-footer-link:hover { color: var(--np-red); }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 760px) {
  .np-layout {
    grid-template-columns: 52px 1fr 52px;
  }
  /* El global oculta .ad-col a 759px; el hub las mantiene hasta 540px */
  body.np-body .np-layout .ad-col { display: flex; }
}
@media (max-width: 540px) {
  .np-layout {
    grid-template-columns: 1fr;
  }
  body.np-body .np-layout .ad-col { display: none; }
  .np-grid { grid-template-columns: 1fr; }
  .logo-fut, .logo-hub { font-size: 38px; }
}
