/* ===================== СТРАНИЦА «НОВОСТИ» ===================== */
/* Новости берутся из data/news.json, текст статей из data/news/<id>.json (см. docs/novosti.md): здесь только оформление. */

.news { background: var(--cream); }
.news__sec { padding-top: calc(var(--header-h) + 56px); padding-bottom: 80px; }
.news .section__head { margin-bottom: 34px; }

/* ---- лента ---- */
.news__feed { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ncard {
  display: flex; flex-direction: column; min-width: 0; border-radius: 28px; overflow: hidden; background: #fff; color: var(--ink);
  border: 1px solid var(--border); box-shadow: 0 14px 34px rgba(10,60,35,.07);
  transition: transform .4s cubic-bezier(.22,.8,.3,1), box-shadow .4s ease; -webkit-tap-highlight-color: transparent;
}
a.ncard { cursor: pointer; }
.ncard, .narticle { text-align: left; }
.ncard:first-child { grid-column: 1 / -1; width: 100%; max-width: 720px; justify-self: center; }   /* баннер 1100 px: крупнее на экране он становится мягким */
.ncard__pic { position: relative; display: block; aspect-ratio: 1100 / 450; overflow: hidden; background: linear-gradient(160deg, rgba(46,159,107,.12), rgba(46,159,107,.04)); }
.ncard__pic picture, .narticle__hero picture { display: block; width: 100%; height: 100%; }
.ncard__pic img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.015); transition: opacity .5s ease, transform .9s cubic-bezier(.22,.8,.3,1); }
.ncard__pic img.is-ready { opacity: 1; transform: none; }
.ncard__body { display: flex; flex-direction: column; gap: 10px; padding: 24px 28px 26px; }
.ncard:first-child .ncard__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 30px 28px; }
.ncard__date { font-size: 13px; font-weight: 300; color: var(--ink-soft); letter-spacing: .01em; }
.ncard__title { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 700; line-height: 1.2; text-wrap: balance; }
.ncard__text { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }
.ncard__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--green-dark); white-space: nowrap; }
.ncard__more i { display: flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(46,159,107,.14); font-size: 13px; transition: transform .3s ease, background .3s ease; }
@media (hover: hover) and (pointer: fine) {
  a.ncard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
  a.ncard:hover .ncard__pic img.is-ready { transform: scale(1.025); }
  a.ncard:hover .ncard__more i { transform: translateX(4px); background: rgba(46,159,107,.24); }
}
a.ncard:active { transform: scale(.992); }
.ncard:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.ncard--sk { grid-column: 1 / -1; aspect-ratio: 1100 / 560; border: 0; background: linear-gradient(110deg, rgba(46,159,107,.08) 30%, rgba(46,159,107,.16) 50%, rgba(46,159,107,.08) 70%); background-size: 200% 100%; animation: nsk 1.3s linear infinite; box-shadow: none; }
@keyframes nsk { to { background-position: -200% 0; } }
.news__empty { text-align: center; color: var(--ink-soft); margin-top: 24px; }

/* ---- статья ---- */
.narticle { max-width: 780px; margin: 0 auto; }
.narticle__back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 9px 18px 9px 12px; border-radius: 100px; border: 1px solid var(--border); background: #fff; color: var(--green-dark); font-size: 13.5px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .25s ease, background .25s ease; }
.narticle__back i { display: flex; font-size: 18px; }
@media (hover: hover) { .narticle__back:hover { transform: translateX(-3px); background: rgba(46,159,107,.08); } }
.narticle__hero { display: block; margin: 0; border-radius: 28px; overflow: hidden; background: rgba(46,159,107,.1); box-shadow: 0 18px 44px rgba(10,60,35,.12); aspect-ratio: 1100 / 450; }
.narticle__hero img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.narticle__hero img.is-ready { opacity: 1; }
.narticle__head { padding: 30px 4px 0; }
.narticle__date { font-size: 13.5px; font-weight: 300; color: var(--ink-soft); }
.narticle__title { margin: 8px 0 0; font-size: clamp(1.45rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.nb { margin-top: 34px; }
.nb__title { margin: 0 0 16px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 600; }
.nb--lead { margin-top: 18px; }
.nb--lead p { margin: 0; font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 300; line-height: 1.65; color: var(--ink); max-width: 62ch; }
.nb--text p { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.7; color: var(--ink-soft); max-width: 66ch; }
.nb--text .btn { margin-top: 18px; }
.nb p { text-wrap: pretty; }

.nsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.nstep { position: relative; padding: 24px 22px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 28px rgba(10,60,35,.06); }
.nstep__n { display: flex; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 50%; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(46,159,107,.3); }
.nstep__t { margin: 0 0 8px; font-size: 1.02rem; font-weight: 600; }
.nstep__d { margin: 0; font-size: 13.5px; font-weight: 300; line-height: 1.55; color: var(--ink-soft); }

.nfeature { position: relative; overflow: hidden; padding: 34px 36px; border-radius: 28px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #1f8a4f 0%, #0a632d 55%, #08481f 100%); box-shadow: 0 20px 44px rgba(10,99,45,.28); }
.nfeature::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,102,.35), rgba(255,214,102,0) 70%); pointer-events: none; }
.nfeature__t { position: relative; margin: 0 0 12px; font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 700; line-height: 1.2; color: #ffe08a; }
.nfeature__d { position: relative; margin: 0; max-width: 60ch; font-size: 15px; font-weight: 300; line-height: 1.65; color: rgba(255,255,255,.92); }

.nfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nfact { padding: 22px 24px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 28px rgba(10,60,35,.06); }
.nfact__k { display: block; font-size: clamp(1.02rem, 1.8vw, 1.25rem); font-weight: 700; color: var(--green-dark); line-height: 1.25; }
.nfact__d { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 300; line-height: 1.5; color: var(--ink-soft); }

/* ---- правила акции: раскрывающиеся разделы ---- */
.nrules { border-radius: 26px; background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 28px rgba(10,60,35,.06); overflow: hidden; }
.nrules__top { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border: 0; background: transparent; font: inherit; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nrules__top i { display: flex; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 18px; transition: transform .35s cubic-bezier(.22,.8,.3,1); }
.nrules.is-open .nrules__top i { transform: rotate(180deg); }
.nrules__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.22,.8,.3,1); }
.nrules.is-open .nrules__panel { grid-template-rows: 1fr; }
.nrules__inner { min-height: 0; overflow: hidden; }
.nrules__body { padding: 4px 26px 26px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
/* текст правил на казахском выводится системным шрифтом: в Unbounded нет казахских букв, а в юридическом тексте их нельзя заменять */
.nrules--sys .nrules__body, .nrules--sys .nsec__t { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.nrules__lead { margin: 0 0 18px; padding: 16px 18px; border-radius: 16px; background: rgba(46,159,107,.08); color: var(--ink); }
.nrules__lead p { margin: 0 0 6px; font-weight: 500; font-size: 13.5px; }
.nrules__lead p:last-child { margin: 0; font-weight: 300; }
.nsec { border-top: 1px solid var(--border); }
.nsec > summary { display: flex; align-items: center; gap: 12px; padding: 16px 2px; cursor: pointer; list-style: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.nsec > summary::-webkit-details-marker { display: none; }
.nsec__n { display: flex; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 12.5px; font-weight: 600; }
.nsec__t { flex: 1; font-size: 14.5px; font-weight: 500; }
.nsec > summary::after { content: ''; width: 8px; height: 8px; margin-right: 6px; border-right: 2px solid var(--green-dark); border-bottom: 2px solid var(--green-dark); transform: rotate(45deg) translateY(-2px); transition: transform .3s ease; }
.nsec[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.nsec__body { padding: 0 2px 18px 42px; }
.nsec__body p { margin: 0 0 10px; }
.nsec__body p b { color: var(--ink); font-weight: 600; }
.nsec__body p.sub { margin-top: 14px; font-weight: 600; color: var(--ink); }
.nsec__body ul { margin: 0 0 10px; padding-left: 20px; }
.nsec__body li { margin: 0 0 4px; }
.nrules__foot { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.nrules__foot p { margin: 0 0 4px; }
.nrules__foot p:first-child { font-weight: 600; color: var(--ink); }

/* появление блоков статьи */
.nb.rv, .narticle__head.rv { opacity: 0; transform: translateY(20px); }
.nb.rv.is-in, .narticle__head.rv.is-in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.22,.8,.3,1), transform .7s cubic-bezier(.22,.8,.3,1); }
.narticle.is-in-view { animation: nart .5s cubic-bezier(.22,.8,.3,1) both; }
@keyframes nart { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  .news__sec { padding-top: calc(var(--header-h) + 34px); padding-bottom: 60px; }
  .news .section__head { margin-bottom: 24px; }
  .news__feed { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .news__feed, .narticle { max-width: 560px; }   /* планшеты: узкий баннер 850 px не растягиваем на всю ширину */
  .ncard:first-child { max-width: none; }
  .ncard { border-radius: 22px; }
  .ncard__pic { aspect-ratio: 850 / 450; }
  .ncard__body, .ncard:first-child .ncard__body { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 18px 18px 20px; }
  .narticle__hero { border-radius: 20px; aspect-ratio: 850 / 450; }
  .narticle__head { padding-top: 20px; }
  .narticle__title { font-size: 1.25rem; line-height: 1.22; margin-top: 6px; }
  .ncard__title { font-size: 1.1rem; }
  .nb { margin-top: 28px; }
  .nb--lead { margin-top: 12px; }
  .nb--lead p { font-size: .96rem; line-height: 1.6; }
  .nsteps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .nstep { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 16px; padding: 18px; border-radius: 20px; }
  .nstep__n { grid-row: 1 / span 2; margin: 0; }
  .nstep__t { margin-bottom: 4px; align-self: end; }
  .nfeature { padding: 20px 18px 22px; border-radius: 20px; }
  .nfeature__t { font-size: 1.05rem; margin-bottom: 8px; }
  .nfeature__d { font-size: 13.5px; line-height: 1.6; }
  .nfacts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .nrules { border-radius: 22px; }
  .nrules__top { padding: 18px 18px; }
  .nrules__body { padding: 2px 16px 20px; }
  .nsec__body { padding-left: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .ncard, .ncard__pic img, .nrules__panel, .nrules__top i, .nsec > summary::after { transition: none; }
  .nb.rv, .narticle__head.rv { opacity: 1; transform: none; }
  .ncard--sk { animation: none; }
  .narticle.is-in-view { animation: none; }
}

/* прозрачная кнопка (как «Больше выбора» на главной) */
.btn--clear { background: transparent; box-shadow: none; border: 1.5px solid rgba(10,99,45,.3); color: var(--green-dark); }
.btn--clear i { background: rgba(46,159,107,.14); }
@media (hover: hover) and (pointer: fine) { .btn--clear:hover { background: rgba(46,159,107,.08); border-color: var(--green-dark); box-shadow: none; } }
