/* ---------- עמוד "חדשות" במסך הראשי (js/news.js) ---------- */
/* מחשב ושלט בלבד (בטלפון המסך הראשי לא מוצג). העמוד תופס את כל רוחב המסך הראשי, ולוח הפרומו נעלם (הפרומו הוא אחת השקופיות). */

html:not(.mobile) .hub-main.hm-news {
  width: 82vw;
  height: 64vh;
  background: #070b16;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .16), 0 2vh 5vh rgba(0, 0, 0, .45);
}
html:not(.mobile) .hub-promo { transition: opacity .4s, translate .55s var(--ease-out); }
html:not(.mobile) #home.news-mode .hub-promo { opacity: 0; translate: 7vw 0; pointer-events: none; }
/* העתק יוצא של העמוד (hub.js ghostOut): בלי אנימציות פנימיות, כדי שלא יתחיל מחדש בזמן שהוא נעלם */
html:not(.mobile) .hub-main.ghost.hm-news * { animation: none !important; }

.ns { position: absolute; inset: 0; direction: ltr; font-family: var(--fc-font); color: #fff; overflow: hidden; }
.ns-stage { position: absolute; inset: 0 0 7.4vh 0; overflow: hidden; }

/* ---------- שקופית ---------- */
.ns-slide { position: absolute; inset: 0; overflow: hidden; visibility: hidden; --accent: #fff; }
.ns-slide.on { visibility: visible; z-index: 2; }
.ns-slide.out-l, .ns-slide.out-r { visibility: visible; z-index: 1; }
.ns-promo { --accent: #d6aaff; }
.ns-totw  { --accent: #86c8ff; }
.ns-packs { --accent: #ffd54a; }
.ns-mode  { --accent: #8be04e; }

/* כניסה: חיתוך אלכסוני שנפתח מהצד, והשקופית הקודמת נסוגה ומתכהה */
.ns-slide.in-r { animation: ns-wipe-r .9s cubic-bezier(.7, 0, .2, 1) both; }
.ns-slide.in-l { animation: ns-wipe-l .9s cubic-bezier(.7, 0, .2, 1) both; }
.ns-slide.out-l { animation: ns-out-l .9s cubic-bezier(.7, 0, .2, 1) both; }
.ns-slide.out-r { animation: ns-out-r .9s cubic-bezier(.7, 0, .2, 1) both; }
@keyframes ns-wipe-r {
  from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
  to   { clip-path: polygon(-30% 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes ns-wipe-l {
  from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
  to   { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); }
}
@keyframes ns-out-l { to { transform: translateX(-9%) scale(.96); opacity: .25; filter: brightness(.45); } }
@keyframes ns-out-r { to { transform: translateX(9%) scale(.96); opacity: .25; filter: brightness(.45); } }

/* פס אור שעובר על כל המסך בזמן המעבר */
.ns-sweep { position: absolute; inset: -5% -30%; z-index: 6; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .6) 50%, transparent 58%); }
.ns-sweep.go-r { animation: ns-sweep-r .95s cubic-bezier(.7, 0, .2, 1); }
.ns-sweep.go-l { animation: ns-sweep-l .95s cubic-bezier(.7, 0, .2, 1); }
@keyframes ns-sweep-r { from { opacity: 1; transform: translateX(45%); } to { opacity: 0; transform: translateX(-45%); } }
@keyframes ns-sweep-l { from { opacity: 1; transform: translateX(-45%); } to { opacity: 0; transform: translateX(45%); } }

/* ---------- רקע ---------- */
.ns-bg { position: absolute; inset: 0; overflow: hidden; }
.ns-promo .ns-bg { background: radial-gradient(ellipse at 70% 46%, #5a2fa8 0%, #24164f 52%, #0b0822 100%); }
.ns-totw  .ns-bg { background: radial-gradient(ellipse at 70% 46%, #2562c8 0%, #0f2a6a 52%, #050b24 100%); }
.ns-packs .ns-bg { background: radial-gradient(ellipse at 70% 46%, #b57a14 0%, #53320a 52%, #170d04 100%); }
.ns-mode  .ns-bg { background: radial-gradient(ellipse at 70% 46%, #25994f 0%, #0f4a28 52%, #04160b 100%); }
.ns-rays {
  position: absolute;
  left: 70%;
  top: 46%;
  width: 190vmax;
  height: 190vmax;
  translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .085) 0 5deg, rgba(255, 255, 255, 0) 5deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 14%, transparent 62%);
  mask-image: radial-gradient(closest-side, #000 14%, transparent 62%);
  animation: ns-rot 70s linear infinite;
}
@keyframes ns-rot { to { rotate: 360deg; } }
.ns-orb { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); animation: ns-orb 9s ease-in-out infinite alternate; }
.ns-orb-a { left: 52%; top: 8%; width: 30vw; height: 30vw; }
.ns-orb-b { left: 74%; top: 42%; width: 24vw; height: 24vw; animation-delay: -4s; opacity: .8; }
@keyframes ns-orb { from { transform: translate(-2vw, 2vh) scale(.9); } to { transform: translate(3vw, -3vh) scale(1.12); } }
.ns-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: #fff;
  box-shadow: 0 0 1vh 0 var(--accent);
  rotate: 45deg;
  opacity: 0;
  animation: ns-twinkle var(--t) ease-in-out var(--d) infinite;
}
@keyframes ns-twinkle { 0%, 100% { opacity: 0; scale: .4; } 50% { opacity: .9; scale: 1.3; } }

/* ---------- טקסט ---------- */
.ns-text { position: absolute; left: 3.8vw; top: 50%; translate: 0 -50%; width: 37%; direction: ltr; z-index: 3; }
.ns-text > * { direction: rtl; text-align: left; }
.ns-kicker {
  display: inline-block;
  padding: .6vh 1.2vw;
  font-size: 1.9vh;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(255, 255, 255, .1);
  border-left: .5vh solid var(--accent);
  border-radius: .3vh;
}
.ns-title { margin-top: 2.4vh; font-size: 7.4vh; font-weight: 900; line-height: 1.02; text-shadow: 0 .7vh 0 rgba(0, 0, 0, .35), 0 0 3vh rgba(0, 0, 0, .3); }
.ns-body { margin-top: 2.4vh; max-width: 29vw; font-size: 2.5vh; line-height: 1.42; opacity: .92; }
.ns-chips { margin-top: 3.2vh; display: flex; flex-wrap: wrap; gap: 1vh .7vw; direction: ltr; }
.ns-chips > * { direction: rtl; }
.ns-chip { padding: .8vh 1.3vw; border-radius: 99px; font-size: 1.9vh; font-weight: 700; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 .18vh rgba(255, 255, 255, .22); }
.ns-chip-hot { background: #ff4f8b; box-shadow: 0 0 2vh rgba(255, 79, 139, .55); }
.ns-count { font-variant-numeric: tabular-nums; }

/* כניסת הטקסט: כל חלק בתורו */
.ns-slide.on .ns-kicker { animation: ns-rise .7s var(--ease-out) .35s backwards; }
.ns-slide.on .ns-title { animation: ns-title .9s var(--ease-out) .45s backwards; }
.ns-slide.on .ns-body { animation: ns-rise .7s var(--ease-out) .65s backwards; }
.ns-slide.on .ns-chips > * { animation: ns-pop .6s cubic-bezier(.34, 1.56, .64, 1) calc(.85s + var(--k, 0) * .09s) backwards; }
@keyframes ns-rise { from { opacity: 0; transform: translateY(2.4vh); } }
@keyframes ns-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes ns-title { from { opacity: 0; transform: translateX(-3vw) skewX(-10deg); clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- ציור (בצד ימין) ---------- */
.ns-art { position: absolute; right: 2vw; top: 3vh; bottom: 4vh; width: 54%; display: flex; align-items: center; justify-content: center; z-index: 3; }
.ns-slide.on .ns-art { animation: ns-art-in .9s var(--ease-out) .3s backwards; }
@keyframes ns-art-in { from { opacity: 0; } }

/* פרומו: חמשת קלפי התעלומה, מתהפכים פנימה, צפים ומנצנצים */
.ns-mcard {
  position: relative;
  width: 10vw;
  aspect-ratio: 728 / 999;
  margin: 0 -1.5vw;
  display: grid;
  place-items: center;
  border-radius: 1.2vh;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(190, 140, 255, .55), rgba(70, 36, 140, .85));
  box-shadow: inset 0 0 0 .3vh rgba(255, 255, 255, .5), 0 1.6vh 3.2vh rgba(0, 0, 0, .5), 0 0 3vh rgba(190, 140, 255, .45);
  transform: translateY(var(--y)) rotate(var(--r));
  z-index: calc(5 - var(--i));
}
.ns-mcard:nth-child(3) { z-index: 9; scale: 1.1; }
.ns-mcard b { font-size: 9vh; font-weight: 900; color: rgba(255, 255, 255, .8); text-shadow: 0 0 2vh rgba(255, 255, 255, .7); }
.ns-mcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%); transform: translateX(-130%); animation: ns-shine 3.6s ease-in-out calc(1.4s + var(--i) * .35s) infinite; }
@keyframes ns-shine { 0% { transform: translateX(-130%); } 40%, 100% { transform: translateX(130%); } }
.ns-slide.on .ns-mcard { animation: ns-flip .9s cubic-bezier(.34, 1.4, .64, 1) calc(.5s + var(--i) * .12s) backwards, ns-float 4.2s ease-in-out calc(1.6s + var(--i) * .3s) infinite; }
@keyframes ns-flip { from { opacity: 0; transform: translateY(10vh) rotate(var(--r)) rotateY(90deg) scale(.6); } }
@keyframes ns-float { 50% { translate: 0 -1.3vh; } }

/* TOTW: חמישה קלפים בקשת, עפים פנימה מהצד ונוחתים בזה אחר זה */
.ns-tcard {
  position: relative;
  width: 10vw;
  margin: 0 -1.5vw;
  transform: translateY(var(--y)) rotate(var(--r));
  z-index: var(--z);
  filter: drop-shadow(0 1.6vh 1.8vh rgba(0, 0, 0, .55));
}
.ns-tcard.mid { scale: 1.12; filter: drop-shadow(0 0 3vh rgba(130, 190, 255, .65)) drop-shadow(0 1.6vh 1.8vh rgba(0, 0, 0, .55)); }
.ns-slide.on .ns-tcard { animation: ns-fly .95s cubic-bezier(.2, 1.1, .4, 1) calc(.45s + var(--i) * .13s) backwards, ns-float 4.6s ease-in-out calc(1.8s + var(--i) * .35s) infinite; }
@keyframes ns-fly { from { opacity: 0; transform: translateX(16vw) translateY(var(--y)) rotate(calc(var(--r) + 28deg)) scale(.55); } }

/* חבילות: עולות מלמטה בקפיצה, עם תג "חדש" שפועם */
.ns-packs.ns-slide .ns-art { gap: 2.2vw; }
.ns-pack { width: 12.6vw; display: flex; flex-direction: column; align-items: center; gap: 1.1vh; }
.ns-pack-face { position: relative; width: 100%; aspect-ratio: 640 / 930; filter: drop-shadow(0 1.8vh 2.2vh rgba(0, 0, 0, .55)) drop-shadow(0 0 3vh rgba(255, 200, 80, .4)); }
.ns-pack-face img { display: block; width: 100%; height: 100%; clip-path: var(--pack-clip); image-rendering: auto; }
.ns-pack-face::after { content: ""; position: absolute; inset: 0; clip-path: var(--pack-clip); background: linear-gradient(112deg, rgba(255, 255, 255, .36) 0 16%, transparent 16% 28%, rgba(255, 255, 255, .16) 28% 36%, transparent 36%); pointer-events: none; }
.ns-new { position: absolute; z-index: 2; top: -1.4vh; right: -1.6vw; padding: .7vh 1vw; font-size: 1.9vh; font-weight: 900; color: #fff; background: #ff4f8b; border-radius: .8vh; rotate: 10deg; box-shadow: 0 .8vh 1.6vh rgba(0, 0, 0, .45); animation: ns-pulse 1.3s ease-in-out infinite; }
@keyframes ns-pulse { 50% { scale: 1.14; } }
.ns-pack-name { font-size: 2.4vh; font-weight: 800; text-align: center; text-shadow: 0 .4vh 0 rgba(0, 0, 0, .4); }
.ns-pack-price { display: flex; align-items: center; gap: .6vw; font-size: 2.5vh; font-weight: 800; color: #ffd54a; }
.ns-pack-price img { height: 3.2vh; width: auto; image-rendering: pixelated; }
.ns-pack-price .ns-or { width: 1px; height: 2.6vh; margin: 0 .3vw; background: rgba(255, 255, 255, .35); }
.ns-pack-price .gem-num { color: #9eeaff; }
.ns-pack-note { font-size: 1.6vh; opacity: .75; }
.ns-slide.on .ns-pack { animation: ns-pack-in .95s cubic-bezier(.34, 1.5, .64, 1) calc(.5s + var(--i) * .18s) backwards, ns-float 4.4s ease-in-out calc(1.8s + var(--i) * .5s) infinite; }
@keyframes ns-pack-in { from { opacity: 0; transform: translateY(20vh) rotate(9deg) scale(.7); } }

/* מוד חדש: ציור פיקסלים גדול */
.ns-mode-art img { max-width: 70%; max-height: 92%; image-rendering: auto; filter: drop-shadow(0 1.8vh 2vh rgba(0, 0, 0, .5)); animation: bob 3.2s ease-in-out infinite; }

/* ---------- חיצים (עכבר) ---------- */
.ns-arrow { position: absolute; top: 0; bottom: 7.4vh; width: 6vw; z-index: 7; cursor: pointer; opacity: 0; transition: opacity .25s; }
.ns-arrow-l { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent); }
.ns-arrow-r { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .35), transparent); }
.ns-arrow::after { content: ""; position: absolute; top: 50%; width: 1.8vh; height: 1.8vh; border-top: .5vh solid #fff; border-right: .5vh solid #fff; }
.ns-arrow-l::after { left: 2vw; transform: translateY(-50%) rotate(-135deg); }
.ns-arrow-r::after { right: 2vw; transform: translateY(-50%) rotate(45deg); }
body.input-mouse .ns-arrow:hover { opacity: 1; }

/* ---------- פסי ההתקדמות (תחתית) ---------- */
.ns-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 7.4vh; display: flex; align-items: center; gap: 1.1vw; padding: 0 3.8vw; background: linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0)); z-index: 8; }
.ns-seg { flex: 0 0 11.5vw; cursor: pointer; display: flex; flex-direction: column; gap: .8vh; }
.ns-seg-label { direction: rtl; text-align: left; font-size: 1.6vh; font-weight: 700; color: rgba(255, 255, 255, .55); transition: color .3s; white-space: nowrap; }
.ns-seg.on .ns-seg-label { color: #fff; }
.ns-seg-bar { height: .55vh; border-radius: 1vh; background: rgba(255, 255, 255, .22); overflow: hidden; }
.ns-fill { display: block; height: 100%; width: 0; background: #fff; border-radius: 1vh; box-shadow: 0 0 1vh rgba(255, 255, 255, .8); }
.ns-seg.done .ns-fill { width: 100%; }
.ns-seg.on .ns-fill { animation: ns-fill 8s linear forwards; }
@keyframes ns-fill { to { width: 100%; } }
.ns.paused .ns-fill { animation-play-state: paused; }
.ns-hint { margin-left: auto; display: flex; align-items: center; gap: .6vw; font-size: 1.5vh; font-weight: 700; color: rgba(255, 255, 255, .7); direction: ltr; }
.ns-hint span { direction: rtl; }
.ns-hint-key { display: grid; place-items: center; width: 2.6vh; height: 2.6vh; border-radius: .6vh; font-style: normal; font-size: 2vh; line-height: 1; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 .18vh rgba(255, 255, 255, .3); }

@media (prefers-reduced-motion: reduce) {
  .ns-rays, .ns-orb, .ns-spark, .ns-mcard, .ns-tcard, .ns-pack { animation: none !important; }
}
