/* Novedades (/novedades) con el estilo nuevo. El HTML conserva las clases de siempre (nv-*, cal-*) para que
   se pueda seguir añadiendo días a mano; /novedades.js pone las clases de estado (seen, is-active, oculto, is-target). */

/* Color por tema: el primero de data-cat decide el de la tarjeta */
.nv-day { --cc: var(--steel); }
.nv-day[data-cat^="mundo"] { --cc: var(--green); }
.nv-day[data-cat^="criaturas"] { --cc: var(--orange); }
.nv-day[data-cat^="pvp"] { --cc: var(--red); }
.nv-day[data-cat^="economia"] { --cc: var(--gold); }
.nv-day[data-cat^="comodidad"] { --cc: var(--teal); }
.nv-day[data-cat^="rendimiento"] { --cc: var(--violet); }

/* ── Cabecera: cifras y última entrada ── */
.nv-hero .nv-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.nv-hero .nv-stat { display: flex; flex-direction: column; gap: 4px; background: rgba(0,0,0,.55); color: #fff; border-radius: 14px; padding: 12px 18px 10px; min-width: 116px; }
.nv-hero .nv-stat b { font: 900 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.nv-hero .nv-stat span { font-weight: 800; font-size: .85rem; opacity: .8; }
.nv-hero .guide-updated { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; margin-top: 4px; background: #fff; color: #000; border-radius: 999px; padding: 8px 14px; font-weight: 900; font-size: .9rem; }
.nv-hero .u-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: nvlatido 2s ease-out infinite; }
@keyframes nvlatido { 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.nov { padding-block: 56px 30px; }
.nov .kicker { display: inline-block; font: 900 .78rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.nv-h2 { font: 900 clamp(1.6rem, 3.4vw, 2.4rem)/1 var(--display); text-transform: uppercase; margin: 0 0 20px; }
.nov .cmd { font: 700 .9em ui-monospace, "JetBrains Mono", monospace; background: #1c1e25; border: 1px solid #2b2e37; border-radius: 6px; padding: 1px 6px; color: #fff; white-space: nowrap; }

/* ── Muy pronto ── */
.nv-soon { margin-bottom: 60px; }
.nv-soon-inner { position: relative; overflow: hidden; border-radius: 18px; padding: 30px 32px; background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 20%, var(--coal)) 0%, var(--coal) 60%); border: 2px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.nv-soon-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.nv-soon-list li { position: relative; padding-left: 26px; color: #e6e8ec; font-weight: 700; line-height: 1.5; }
.nv-soon-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 11px; border-radius: 4px; background: var(--gold); rotate: 45deg; }

/* ── Lo más gordo: tarjetas con arte ── */
.nv-feats { margin-bottom: 64px; }
.nv-feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nv-feat { position: relative; display: flex; align-items: flex-end; min-height: 220px; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; background: var(--coal); }
.nv-feat::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--nv-art) var(--nv-pos, center) / cover no-repeat; transition: scale .5s ease; }
.nv-feat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,7,9,0) 30%, rgba(7,7,9,.9) 100%); }
.nv-feat:hover::before { scale: 1.06; }
.nv-feat:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.nv-feat-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.nv-feat-body b { font: 900 1.35rem/1.05 var(--display); text-transform: uppercase; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.nv-feat-body span { font-weight: 700; font-size: .93rem; color: #dfe2e8; }

/* ── Calendarios: uno por mes, en fila ── */
.cal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.cal-wrap { background: var(--coal); border-radius: 18px; padding: 18px 16px 16px; min-width: 0; }
.cal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-mes { font: 900 1.35rem/1 var(--display); text-transform: uppercase; margin: 0; }
.cal-mes span { color: var(--steel); font-size: .8em; }
.cal-meta { color: var(--steel); font-weight: 800; font-size: .78rem; }
.cal-head, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { margin-bottom: 4px; }
.cal-head span { text-align: center; font: 900 .7rem/1 var(--display); color: #5d626d; padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; background: #17181d; color: #5d626d; font: 800 .82rem/1 var(--text); text-decoration: none; }
.cal-day.empty { background: transparent; }
.cal-day.has { background: color-mix(in srgb, var(--red) 82%, #000); color: #fff; box-shadow: 0 3px 0 #5c0a12; transition: translate .15s, background .15s; }
.cal-day.has:hover { translate: 0 -2px; background: var(--red); }
.cal-day.has:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cal-day.is-target { outline: 3px solid #fff; outline-offset: 1px; }
.cal-day .cd-c { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fff; color: #000; font: 900 .62rem/17px var(--display); text-align: center; }
.cal-pie { margin: 12px 2px 0; color: var(--steel); font-size: .8rem; font-weight: 700; line-height: 1.4; }
.cal-grid .cal-wrap:not(:first-child) .cal-pie { display: none; }

/* ── Filtro por tema ── */
.nv-filter { position: sticky; top: 12px; z-index: 6; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 34px 0 30px; padding: 8px 10px 8px 16px; border-radius: 16px; background: rgba(18,19,24,.92); backdrop-filter: blur(10px); border: 1px solid #23262e; }
.nv-filter-lab { font: 900 .78rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.nv-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.nv-chip { border: 0; cursor: pointer; border-radius: 999px; padding: 9px 14px; background: #1c1e25; color: #e6e8ec; font: 800 .9rem/1 var(--text); transition: background .15s; }
.nv-chip:hover { background: #262932; }
.nv-chip.on { background: #fff; color: #000; }
.nv-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nv-filter-count { font: 900 .85rem/1 var(--display); color: var(--steel); white-space: nowrap; padding-right: 6px; }

/* ── Línea del tiempo ── */
.nv-timeline { position: relative; padding-left: 74px; display: flex; flex-direction: column; gap: 16px; }
.nv-line { position: absolute; left: 25px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: #1c1e25; overflow: hidden; }
.nv-line i { display: block; width: 100%; height: 0; border-radius: 4px; background: linear-gradient(180deg, var(--green), var(--teal), var(--red)); }
.nv-vacio { text-align: center; color: var(--steel); font-weight: 800; padding: 30px 0; }
.nv-day { position: relative; scroll-margin-top: 90px; }
.nv-day.oculto { display: none; }
.nv-node { position: absolute; left: -74px; top: 14px; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: var(--coal); border: 3px solid var(--cc); box-shadow: 0 4px 0 #000; transition: scale .2s, background .2s; }
.nv-node img { width: 30px; height: 30px; image-rendering: pixelated; }
.nv-day.is-active .nv-node { scale: 1.08; background: color-mix(in srgb, var(--cc) 25%, var(--coal)); }
.nv-day:target .nv-card { box-shadow: 0 0 0 3px var(--cc); }
.nv-card { background: var(--coal); border-radius: 18px; padding: 20px 24px 22px; border-top: 4px solid var(--cc); min-width: 0; }
.nv-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.nv-date { display: inline-flex; align-items: baseline; gap: 6px; background: var(--cc); color: #0b0b0d; border-radius: 10px; padding: 6px 11px 5px; font: 900 .85rem/1 var(--display); text-transform: uppercase; }
.nv-date b { font-size: 1.25rem; }
.nv-n { color: var(--steel); font-weight: 800; font-size: .88rem; }
.nv-card h2 { font: 900 clamp(1.2rem, 2.2vw, 1.55rem)/1.15 var(--display); text-transform: uppercase; margin: 0 0 14px; text-wrap: balance; }
.nv-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nv-card li { position: relative; padding-left: 22px; color: #c9ccd3; font-weight: 700; line-height: 1.6; }
.nv-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 3px; background: var(--cc); }
.nv-card li > b { color: #fff; font-weight: 900; }
.nv-card a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cc); }
.nv-outro { text-align: center; color: var(--steel); font-weight: 800; margin-top: 30px; }

/* Entrada suave de las tarjetas al hacer scroll (solo si el sistema no pide menos movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .nv-day .nv-card { transition: opacity .5s ease, translate .5s ease; }
  .nv-day:not(.seen) .nv-card { opacity: 0; translate: 0 18px; }
}

.nv-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; width: 50px; height: 50px; border: 0; border-radius: 14px; background: #fff; color: #000; display: grid; place-items: center; cursor: pointer; box-shadow: 0 5px 0 #000, 0 10px 30px rgba(0,0,0,.5); }
.nv-top[hidden] { display: none; }
.nv-top svg { width: 22px; height: 22px; }
.nv-top:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (max-width: 1100px) { .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .nv-feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nv-soon-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .nv-feat-grid { grid-template-columns: minmax(0, 1fr); }
  .nv-feat { min-height: 170px; }
  .nv-soon-inner { padding: 24px 20px; }
  .cal-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 8px; scrollbar-width: none; }
  .cal-grid::-webkit-scrollbar { display: none; }
  .cal-wrap { flex: 0 0 86%; scroll-snap-align: center; }
  .cal-grid .cal-wrap .cal-pie { display: none; }
  .nv-filter { top: 8px; padding: 8px; gap: 8px; }
  .nv-filter-lab { display: none; }
  .nv-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nv-chips::-webkit-scrollbar { display: none; }
  .nv-chip { flex: none; }
  .nv-timeline { padding-left: 0; }
  .nv-line { display: none; }
  .nv-node { position: relative; left: auto; top: auto; width: 44px; height: 44px; border-radius: 12px; margin: 0 0 -22px 18px; z-index: 1; }
  .nv-node img { width: 26px; height: 26px; }
  .nv-card { padding: 30px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { .nv-hero .u-dot { animation: none; } .nv-feat::before, .cal-day.has, .nv-node { transition: none; } }
