/* News pages (22 Nov 2026): news.html (every story) and news-<id>.html (one story: main picture, text, the attached
   pictures, share buttons). Markup: build_news.py. Lives inside #mj like the programme pages (tokens: pages-areas.css). */
#mj.nw-page { padding-top: calc(var(--hdr) + 20px); }
#mj .nw-wrap { max-width: 980px; }
#mj .nw-tag { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(242, 140, 40, .12); color: var(--acc); font-size: 13px; font-weight: 700; }
#mj .nw-article h1 { margin: 14px 0 0; font-size: clamp(1.6rem, 2.7vw, 2.4rem); line-height: 1.5; font-weight: 700; color: var(--base); text-wrap: balance; }
#mj .nw-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: var(--medium); font-size: 14px; }
#mj .nw-m { display: inline-flex; align-items: center; gap: 7px; }
#mj .nw-m svg { width: 17px; height: 17px; flex: none; }
#mj .nw-hero { margin: 26px 0 0; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); aspect-ratio: 16 / 9; }
#mj .nw-shot { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
#mj .nw-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
#mj .nw-shot:hover img { transform: scale(1.03); }
#mj .nw-shot:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }
#mj .nw-body { margin-top: 28px; display: grid; gap: 18px; }
#mj .nw-body p { margin: 0; font-size: 17px; line-height: 2.05; color: var(--body); text-wrap: pretty; }
#mj .nw-body .nw-lead { font-size: 19px; font-weight: 600; color: var(--base); }
#mj .nw-gallery { margin-top: 40px; }
#mj .nw-gallery h2, #mj .nw-more h2 { margin: 0; font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 700; color: var(--base); }
#mj .nw-shots { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#mj .nw-shots.nw-n1 { grid-template-columns: minmax(0, 1fr); }
#mj .nw-shots.nw-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#mj .nw-shots.nw-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#mj .nw-shots li { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--soft); }
#mj .nw-shots.nw-n1 li { aspect-ratio: 16 / 9; }
#mj .nw-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(14, 91, 82, .14); }
#mj .nw-share .t { font-weight: 700; color: var(--base); margin-inline-end: 6px; }
#mj .nw-sh { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(14, 91, 82, .22); background: #fff; color: var(--base); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
#mj .nw-sh svg { width: 19px; height: 19px; flex: none; }
#mj .nw-sh:hover { transform: translateY(-2px); }
#mj .nw-sh.fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
#mj .nw-sh.wa:hover { background: #1FAF53; border-color: #1FAF53; color: #fff; }
#mj .nw-sh.cp:hover, #mj .nw-sh.cp.is-done { background: var(--base); border-color: var(--base); color: #fff; }
#mj .nw-sh:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
#mj .nw-copied { font-size: 14px; font-weight: 600; color: var(--base); }
#mj .nw-more { margin-top: 64px; padding: 56px 0 72px; background: var(--soft); }
#mj .nw-article + .nw-more { margin-top: 64px; }
#mj .nw-article:last-child { padding-bottom: 72px; }
#mj .nw-more-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
#mj .nw-alllink { color: var(--acc); font-weight: 700; text-decoration: none; }
#mj .nw-alllink:hover { text-decoration: underline; }
/* cards (the list page and «أخبار أخرى») */
#mj .nw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
#mj .nw-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(14, 91, 82, .08); transition: transform .25s, box-shadow .25s; }
#mj .nw-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(14, 91, 82, .15); }
#mj .nw-card .ph { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
#mj .nw-card .ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
#mj .nw-card:hover .ph img { transform: scale(1.05); }
#mj .nw-card .tx { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; flex: 1; }
#mj .nw-card h3 { margin: 0; font-size: 17px; line-height: 1.7; font-weight: 700; }
#mj .nw-card h3 a { color: var(--base); text-decoration: none; }
#mj .nw-card h3 a::after { content: ""; position: absolute; inset: 0; }                 /* the whole card is the link */
#mj .nw-card h3 a:focus-visible { outline: none; }
#mj .nw-card:focus-within { outline: 3px solid var(--acc); outline-offset: 3px; }
#mj .nw-card p { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#mj .nw-card .nw-meta { margin-top: auto; padding-top: 4px; font-size: 13px; }
/* the list page */
#mj .nw-head h1 { margin: 0; font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.3; font-weight: 700; }
#mj .nw-head h1 .l1 { color: var(--base); }
#mj .nw-head h1 .l2 { color: var(--acc); }
#mj .nw-head p { margin: 12px 0 0; max-width: 720px; font-size: 17px; line-height: 2; color: var(--body); }
#mj .nw-all { padding: 36px 0 80px; }
#mj .nw-empty { padding: 40px 0; color: var(--medium); font-size: 17px; }
/* a picture opened large */
.nw-box { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 30, 27, .94); }
.nw-box::backdrop { background: rgba(6, 30, 27, .6); }
.nw-box[open] { display: grid; place-items: center; }
.nw-box img { max-width: min(94vw, 1500px); max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.nw-box button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .2s; }
.nw-box button:hover { background: rgba(255, 255, 255, .28); }
.nw-box button:focus-visible { outline: 3px solid #F28C28; outline-offset: 2px; }
.nw-box button svg { width: 24px; height: 24px; }
.nw-box .x { top: 18px; inset-inline-end: 18px; }
.nw-box .prev { top: 50%; left: 18px; transform: translateY(-50%); }
.nw-box .next { top: 50%; right: 18px; transform: translateY(-50%); }
.nw-box .count { position: absolute; bottom: 18px; right: 0; left: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: 14px; direction: ltr; }
@media (max-width: 980px) { #mj .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #mj .nw-shots, #mj .nw-shots.nw-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  #mj .nw-grid { grid-template-columns: minmax(0, 1fr); }
  #mj .nw-body p { font-size: 16px; }
  #mj .nw-body .nw-lead { font-size: 17px; }
  #mj .nw-hero { aspect-ratio: 4 / 3; border-radius: 18px; }
  #mj .nw-sh { height: 42px; padding: 0 14px; }
  #mj .nw-more { padding: 40px 0 56px; }
  .nw-box .prev { left: 8px; } .nw-box .next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { #mj .nw-shot img, #mj .nw-card, #mj .nw-card .ph img, #mj .nw-sh { transition: none; } }
