/* Новости лиги (решение 0013): первый экран «Афиша» — свежий постер боя целиком справа от рваного золотого края,
   стена постеров в их пропорциях (без обрезки лиц и надписей), страница записи с плеером VK, галереей и бойцами.
   Подключается на /news/, странице записи, видео дня и там, где есть блок новостей (боец, турнир). */

/* ---------- стена постеров: ряды одной высоты, ширина плитки — по пропорциям постера ---------- */
.nwall { --rh: 290px; display: flex; flex-wrap: wrap; gap: 14px; }
.nwall::after { content: ''; flex: 1000 1 0; }
.nwall.nrow { --rh: 250px; }
.nt { --a: 1.7778; position: relative; flex: var(--a) 1 calc(var(--a) * var(--rh)); min-width: 0; display: flex; flex-direction: column; background: var(--blk); border-top: 3px solid var(--red); container-type: inline-size; isolation: isolate; transition: transform .52s var(--shift), opacity .68s var(--fade); }
.nt.vid { border-top-color: var(--gold); }
.nt-im { position: relative; display: block; aspect-ratio: var(--a); overflow: hidden; background: radial-gradient(80% 90% at 70% 30%, #26090a 0, #0c0c0e 70%); }
.nt-im > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--shift), filter .5s var(--fade); }
.nt.none .nt-im > img.nt-x { left: auto; right: -6%; top: 8%; width: auto; height: 84%; object-fit: contain; opacity: .22; }
.nt-v { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 13px 0 14px; background: var(--red); color: #fff; font: 600 22px/1 var(--d); letter-spacing: .02em; font-variant-numeric: tabular-nums; z-index: 1; }
.nt-v svg { width: 13px; height: 14px; flex: none; }
.nt-v b { font-weight: 600; padding-top: 2px; }
.nt-t { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 18px; min-width: 0; flex: 1; }
.nt-t small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 700 11px/1 var(--t); text-transform: uppercase; letter-spacing: .07em; color: var(--grey); }
.nt-t em { font-style: normal; color: #050506; background: var(--gold); padding: 4px 7px 3px; }
.nt-t i { font-style: normal; color: var(--gold); }
.nt-t b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font: 600 30px/.95 var(--d); text-transform: uppercase; overflow-wrap: anywhere; transition: color .25s; }
.nt-t b.nt-d span { color: var(--gold); font-size: .62em; vertical-align: .14em; padding: 0 .1em; }
.nt-t u { text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 600 12px/1.35 var(--t); text-transform: uppercase; letter-spacing: .03em; color: var(--grey); }
@container (max-width: 300px) { .nt-t { padding: 12px 12px 14px; } .nt-t b { font-size: 23px; -webkit-line-clamp: 4; } .nt-v { height: 36px; font-size: 19px; padding: 0 10px; } }
@container (min-width: 620px) { .nt-t b { font-size: 40px; -webkit-line-clamp: 2; } }
a.nt:hover { transform: translateY(-6px); }
a.nt:hover .nt-im > img:not(.nt-x) { scale: 1.035; }
a.nt:hover .nt-t b { color: var(--gold); }

/* ---------- первый экран ленты «Афиша» ---------- */
.nwp .nav { position: fixed; left: 0; right: 0; top: 0; }
.nwh { position: relative; min-height: max(680px, min(100svh, 900px)); display: flex; flex-direction: column; justify-content: flex-end; background: var(--blk); overflow: hidden; isolation: isolate; }
.nwh.plain { min-height: 520px; }
.nwh-st, .nph-st { position: absolute; inset: 0; z-index: -1; }
.nwh-bg { position: absolute; inset: -60px; overflow: hidden; }
.nwh-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.25) brightness(.42); }
.nwh-f { position: absolute; inset: 0; clip-path: var(--clip); background: linear-gradient(270deg, rgba(5,5,6,.25), rgba(5,5,6,.6)); }
.nwh.plain .nwh-f, .nph.plain .nph-f { background: linear-gradient(270deg, #3a0606, #170303 30%, #050506 60%); }
.nwh-po { position: absolute; left: 46%; right: var(--g); top: 124px; bottom: 104px; display: block; }
.nwh-po img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; filter: drop-shadow(0 30px 60px rgba(0,0,0,.7)); }
.nwh-xw { position: absolute; right: 8%; top: 18%; height: 64%; width: auto; opacity: .3; }
.nwh-seam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nwh-seam path { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(231,183,64,.7)); }
.nwh-sh { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,5,6,.75) 0, rgba(5,5,6,0) 22%, rgba(5,5,6,0) 70%, rgba(26,26,28,.85) 94%, var(--bg) 100%), linear-gradient(90deg, rgba(5,5,6,.82) 0, rgba(5,5,6,.45) 32%, rgba(5,5,6,0) 48%); }
.nwh-c { position: relative; width: 44%; min-width: 0; padding: 150px 0 112px var(--g); }
.nwh-c > * + * { margin-top: 18px; }
.nwh-m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 700 12px/1 var(--t); text-transform: uppercase; letter-spacing: .07em; color: var(--lt); }
.nwh-m em { font-style: normal; color: #050506; background: var(--gold); padding: 5px 8px 4px; }
.nwh-v { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.nwh-v svg { width: 11px; height: 12px; color: var(--red); }
.nwh-m a { border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.nwh-m a:hover { color: var(--gold); border-color: var(--gold); }
.nwh-k { font: 700 14px/1.35 var(--t); text-transform: uppercase; letter-spacing: .04em; color: var(--lt); max-width: 34em; }
.nwh-d { font: 700 clamp(56px, 6.4vw, 116px)/.84 var(--d); text-transform: uppercase; letter-spacing: -.005em; text-shadow: 0 4px 40px rgba(0,0,0,.55); }
.nwh-d a, .nwh-d { display: block; }
.nwh-d span { display: block; white-space: nowrap; overflow: hidden; padding-bottom: .04em; }
.nwh-d .x { display: block; height: .5em; width: auto; margin: .06em 0 .12em; filter: drop-shadow(0 0 14px rgba(231,183,64,.45)); }
.nwh-t { font: 700 clamp(52px, 5.6vw, 96px)/.86 var(--d); text-transform: uppercase; text-shadow: 0 4px 40px rgba(0,0,0,.55); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; overflow-wrap: anywhere; }
.nwh-t.long { font-size: clamp(40px, 3.9vw, 66px); }
.nwh-t a, .nwh-d a { transition: color .3s; }
.nwh-t a:hover, .nwh-d a:hover { color: var(--gold-hi); }
.nwh-c .go { margin-top: 30px; }
.nwh-c .go .btn.r { min-width: 240px; }

/* разделы и страницы */
.nws { scroll-margin-top: 72px; }
.nwf { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.nwf a { display: inline-flex; align-items: baseline; gap: 8px; font: 700 13px/1 var(--t); text-transform: uppercase; letter-spacing: .03em; padding: 13px 16px 12px; border: 1px solid var(--line2); color: var(--lt); transition: color .25s, border-color .25s, background-color .25s; }
.nwf a i { font: 600 18px/.6 var(--d); font-style: normal; color: var(--grey); font-variant-numeric: tabular-nums; }
.nwf a:hover { color: #fff; border-color: #fff; }
.nwf a.on { color: #050506; background: var(--gold); border-color: var(--gold); }
.nwf a.on i { color: #050506; }
.npg { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.npg-n { display: flex; gap: 4px; align-items: center; }
.npg-n a, .npg-n b, .npg-n i { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font: 600 22px/1 var(--d); font-style: normal; font-variant-numeric: tabular-nums; color: var(--lt); }
.npg-n a:hover { color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.npg-n b { color: #050506; background: #fff; }
.nwp .empty { color: var(--grey); padding: 40px 0; }

/* ---------- страница записи ---------- */
.nph { position: relative; min-height: max(560px, min(78svh, 760px)); display: flex; flex-direction: column; justify-content: flex-end; background: var(--blk); overflow: hidden; isolation: isolate; }
.nph.short { min-height: 520px; }
.nph-f { position: absolute; inset: 0; clip-path: var(--clip); background: linear-gradient(270deg, rgba(254,0,0,.16), rgba(5,5,6,0) 60%); }
.nph-sh { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,5,6,.75) 0, rgba(5,5,6,.1) 28%, rgba(5,5,6,.2) 60%, var(--bg) 100%), linear-gradient(90deg, rgba(5,5,6,.7) 0, rgba(5,5,6,.2) 60%); }
.nph-c { position: relative; padding: 150px 0 64px; }
.nph-c > * + * { margin-top: 18px; }
.nph-cr a { color: var(--gold); transition: color .25s; } .nph-cr a:hover { color: #fff; }
.nph-cr span { color: var(--line2); }
.nph-c .nwh-d { font-size: clamp(56px, 7.6vw, 140px); max-width: 100%; }
.nph-t { font: 700 clamp(56px, 7vw, 120px)/.86 var(--d); text-transform: uppercase; max-width: 15em; text-shadow: 0 4px 40px rgba(0,0,0,.55); overflow-wrap: anywhere; }
.nph-t.mid { font-size: clamp(46px, 5vw, 88px); max-width: 18em; }
.nph-t.long { font-size: clamp(36px, 3.6vw, 62px); max-width: 24em; line-height: .92; }
.nph-ev { color: var(--gold); }
.nph-draft { display: inline-block; font: 800 12px/1 var(--t); text-transform: uppercase; letter-spacing: .05em; color: #050506; background: #fff; padding: 7px 10px; }

/* постер или плеер — на стыке первого экрана и текста */
.npm-w { position: relative; z-index: 2; }
.npm { margin: 0 auto; max-width: 1180px; background: var(--blk); border-top: 4px solid var(--gold); box-shadow: 0 40px 90px rgba(0,0,0,.55); }
.npm-po { width: min(100%, calc(82svh * var(--a))); }
.npm-po a { display: block; cursor: zoom-in; }
.npm-po img { display: block; width: 100%; height: auto; }
.vplay-w { width: 100%; }
.vplay-w.vert { width: min(100%, 460px); }
.vplay { position: relative; display: block; aspect-ratio: var(--a); overflow: hidden; background: #000; cursor: pointer; }
.vplay > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: scale .9s var(--shift), filter .5s; }
.vplay::after { content: ''; position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(5,5,6,.05), rgba(5,5,6,.45)); pointer-events: none; }
.vplay-b { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff; z-index: 1; box-shadow: 0 0 0 0 rgba(254,0,0,.5); transition: transform .52s var(--shift), box-shadow .6s; }
.vplay-b svg { width: 34px; height: 38px; margin-left: 6px; }
.vplay-t { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 18px 11px; background: rgba(5,5,6,.82); font: 800 13px/1 var(--t); text-transform: uppercase; letter-spacing: .06em; z-index: 1; }
.vplay-t b { font: 600 22px/1 var(--d); color: var(--gold); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.vplay:hover .vplay-b { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(254,0,0,0); }
.vplay:hover > img { scale: 1.02; }
.vplay iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
.vplay.on::after, .vplay.on .vplay-b, .vplay.on .vplay-t { display: none; }

/* текст, галерея */
.npb { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; margin-top: 54px; }
.npb-t { font: 400 18px/1.62 var(--t); color: #e4e4e8; }
.npb-t p + p { margin-top: 1em; }
.npb-t a { color: var(--gold); border-bottom: 1px solid rgba(231,183,64,.35); transition: border-color .25s; overflow-wrap: anywhere; }
.npb-t a:hover { border-color: var(--gold); }
.npb-t.rich h3 { font: 600 40px/.95 var(--d); text-transform: uppercase; margin: 1.2em 0 .5em; color: #fff; }
.npb-t.rich ul { margin: 0 0 1em 1.2em; }
.npb-rp { font-size: 14px; color: var(--grey); margin-bottom: 18px; } .npb-rp a { color: var(--lt); border-bottom: 1px solid var(--line2); }
.npg-ph { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 34px; }
.npg-ph.n2, .npg-ph.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.npg-ph.n1 { grid-template-columns: minmax(0, 1fr); }
.npg-ph a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blk); cursor: zoom-in; }
.npg-ph img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--shift), opacity .4s; }
.npg-ph a:hover img { scale: 1.05; }
.npb-tg { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--grey); }
.npb-tg summary { cursor: pointer; font: 700 12px/1 var(--t); text-transform: uppercase; letter-spacing: .06em; }
.npb-tg ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.npb-tg li > * { display: inline-block; padding: 6px 10px; border: 1px solid var(--line2); color: var(--lt); }
.npb-a { margin-top: 30px; }

/* бойцы, соседние записи */
.npf.n1, .npf.n2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nnb { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nnb-i { position: relative; display: flex; align-items: flex-end; min-height: 220px; padding: 22px; background: var(--blk); overflow: hidden; isolation: isolate; border-top: 3px solid var(--line2); transition: border-color .3s; }
.nnb-i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; transition: opacity .5s, scale .9s var(--shift); }
.nnb-i::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #050506 10%, rgba(5,5,6,.55) 60%, rgba(5,5,6,.3)); }
.nnb-i.new { justify-content: flex-end; text-align: right; }
.nnb-i small { display: flex; align-items: center; gap: 10px; font: 800 12px/1 var(--t); text-transform: uppercase; letter-spacing: .06em; color: var(--lt); }
.nnb-i.new small { justify-content: flex-end; }
.nnb-i small svg { width: 16px; height: 10px; }
.nnb-i b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 10px; font: 600 32px/.95 var(--d); text-transform: uppercase; }
.nnb-i:hover { border-color: var(--gold); } .nnb-i:hover img { opacity: .75; scale: 1.04; } .nnb-i:hover b { color: var(--gold); }

/* видео дня */
.ndv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.ndv-i { background: var(--blk); border-top: 3px solid var(--gold); }
.ndv-i .vplay-b { width: 72px; height: 72px; margin: -36px 0 0 -36px; } .ndv-i .vplay-b svg { width: 24px; height: 26px; margin-left: 4px; }
.ndv-i figcaption { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.ndv-i figcaption b { font: 600 28px/1 var(--d); text-transform: uppercase; flex: 1; min-width: 0; }
.ndv-i figcaption span { font: 600 20px/1 var(--d); color: var(--gold); }
.ndv-i figcaption a { font: 800 12px/1 var(--t); text-transform: uppercase; letter-spacing: .05em; color: var(--lt); border-bottom: 1px solid var(--line2); padding-bottom: 3px; }

/* лайтбокс */
.lb { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(5,5,6,.96); }
.lb[hidden] { display: none; }
.lb-i { max-width: calc(100vw - 160px); max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb button { position: absolute; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); color: #fff; background: rgba(5,5,6,.6); transition: background-color .25s, color .25s; }
.lb button:hover { background: #fff; color: #050506; }
.lb button svg { width: 16px; height: 16px; }
.lb-x { right: 22px; top: 22px; } .lb-p { left: 22px; top: 50%; margin-top: -27px; } .lb-n { right: 22px; top: 50%; margin-top: -27px; }
.lb-c { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font: 600 22px/1 var(--d); color: var(--lt); font-variant-numeric: tabular-nums; }

/* движение первого экрана: как у остальных страниц — поле съезжает, шов загорается, текст поднимается */
.js-anim :is(.nwh-c, .nph-c) > * { opacity: 0; transform: translateY(26px); }
.go :is(.nwh-c, .nph-c) > * { opacity: 1; transform: none; transition: opacity .6s .2s var(--fade), transform .9s .2s var(--shift); }
.go :is(.nwh-c, .nph-c) > :nth-child(2) { transition-delay: .28s; } .go :is(.nwh-c, .nph-c) > :nth-child(3) { transition-delay: .36s; }
.go :is(.nwh-c, .nph-c) > :nth-child(n+4) { transition-delay: .44s; }
.js-anim .nwh-seam { opacity: 0; } .go .nwh-seam { opacity: 1; transition: opacity .3s .6s; }
.js-anim .nwh-f { transform: translateX(30%); } .go .nwh-f { transform: none; transition: transform .8s cubic-bezier(.3, 0, .2, 1); }
.js-anim .nwh-po img { opacity: 0; transform: scale(.96); } .go .nwh-po img { opacity: 1; transform: none; transition: opacity .8s .45s var(--fade), transform 1.2s .45s var(--shift); }

@media (max-width: 1100px) {
  .nwall { --rh: 230px; }
  .nwh-c { width: 52%; }
  .nwh-po { left: 50%; }
  .npf.n1, .npf.n2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nwall { --rh: 190px; gap: 10px; }
  .nwall.nrow { --rh: 190px; }
  .nwall::after { display: none; }  /* на телефоне последняя плитка ряда — во всю ширину, как остальные */
  .nt-t b { font-size: 26px; }
  .nwh { min-height: 0; justify-content: flex-start; }
  .nwh-f { clip-path: none; background: rgba(5,5,6,.4); }
  .nwh-seam { display: none; }
  .nwh-po { left: 16px; right: 16px; top: 84px; bottom: auto; aspect-ratio: var(--a); }
  .nwh-sh { background: linear-gradient(180deg, rgba(5,5,6,.6) 0, rgba(5,5,6,0) 14%, rgba(5,5,6,.3) 50%, rgba(26,26,28,.92) 82%, var(--bg) 100%); }
  .nwh-c { width: 100%; padding: calc(106px + (100vw - 32px) / var(--a, 1.78)) var(--g) 46px; }
  .nwh.plain .nwh-c { padding-top: 140px; }
  .nwh-c > * + * { margin-top: 14px; }
  .nwh-d { font-size: 54px; }
  .nwh-t, .nwh-t.long { font-size: 42px; -webkit-line-clamp: 6; }
  .nwh-c .go .btn { width: 100%; }
  .nwf { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--g)) 16px; padding: 0 var(--g); scrollbar-width: none; }
  .nwf::-webkit-scrollbar { display: none; }
  .nwf a { flex: none; padding: 12px 13px 11px; font-size: 12px; }
  .nph { min-height: 0; }
  .nph-c { padding: 104px 0 30px; }
  .nph-f { clip-path: none; }
  .nwh-seam { display: none; }
  .nph-c .nwh-d { font-size: 50px; }
  .nph-t { font-size: 50px; } .nph-t.mid { font-size: 40px; } .nph-t.long { font-size: 32px; }
  .npm { margin-inline: calc(-1 * var(--g)); width: auto; max-width: none; }
  .npm-po { width: auto; }
  .vplay-w.vert { width: auto; margin-inline: 0; }
  .vplay-b { width: 76px; height: 76px; margin: -38px 0 0 -38px; } .vplay-b svg { width: 26px; height: 28px; margin-left: 4px; }
  .npb { margin-top: 32px; }
  .npb-t { font-size: 17px; }
  .npg-ph { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .npf.n1, .npf.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nnb { grid-template-columns: 1fr; gap: 10px; }
  .nnb-i { min-height: 150px; padding: 16px; } .nnb-i b { font-size: 26px; }
  .ndv { grid-template-columns: 1fr; }
  .lb-i { max-width: 100vw; max-height: calc(100svh - 140px); }
  .lb-p, .lb-n { top: auto; bottom: 14px; margin: 0; } .lb-p { left: 14px; } .lb-n { right: 14px; } .lb-x { right: 14px; top: 14px; }
  .lb-c { bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .nt, .nt-im > img, .vplay > img, .vplay-b, .nnb-i img { transition: none !important; }
  a.nt:hover { transform: none; } a.nt:hover .nt-im > img { scale: none; }
}
