/* ==========================================================================
   Samaj news (Views/News; Docs/website-cms-map.md, "News, redesigned"), laid out like a news portal: a short title
   band, the category tabs with the search box, the top stories and category rows on the front page, the list of
   stories with a side column, and each story's own page. Flat: thin lines, no shadows or gradients.
   Builds on css/shaadi.css (.sh colours, buttons, empty message, toast); everything here is prefixed nw-.
   ========================================================================== */


/* ---------- the news bar: category tabs and search ---------- */
/* the search box at the top of the right-hand column (no news bar above the page: the owner's choice of 4 Dec 2026) */
.nw-side-search { position: relative; padding: 12px; }
.nw-side-search > i { position: absolute; left: 27px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--sh-muted); pointer-events: none; }
.nw-side-search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--sh-line); border-radius: 999px; background: var(--sh-field); font-size: 14.5px; color: var(--sh-ink); }
.nw-side-search input:focus { outline: none; border-color: var(--sh-ink); background: #fff; }

/* ---------- shared pieces ---------- */
.nw-page { padding: 30px 0 70px; background: #fff; }
.nw-sec-title { position: relative; margin: 0; padding-left: 13px; font-family: var(--primary-font); font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--sh-ink); }
.nw-sec-title::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px; border-radius: 2px; background: var(--sh-red); }
.nw-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--sh-line); }
.nw .nw-sec-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--sh-red-ink); white-space: nowrap; }
.nw-meta { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; color: var(--sh-muted); }
.nw-cat { overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-red-ink); }
/* a story without a photo of its own: a flat tile in its category's colour, with the category's icon */
.nw-noimg { display: grid; place-items: center; align-content: center; gap: 8px; width: 100%; height: 100%; background: hsl(var(--nw-hue, 32) 42% 93%); color: hsl(var(--nw-hue, 32) 36% 38%); }
.nw-noimg i { font-size: 38px; line-height: 1; }
.nw-noimg.is-lead i { font-size: 64px; }
.nw-noimg.is-lead span { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.nw-noimg.is-mini { flex: none; width: 76px; height: 54px; border-radius: 8px; }
.nw-noimg.is-mini i { font-size: 20px; }
.nw-item-photo .nw-noimg i { font-size: 34px; }

/* ---------- top stories: a lead story, two more, and the latest headlines ---------- */
.nw-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--sh-line); }
.nw-lead { position: relative; min-width: 0; }
.nw-lead-photo { aspect-ratio: 16 / 10; margin-bottom: 14px; overflow: hidden; border-radius: var(--vs-card-inner); background: #efe7dc; }
.nw-lead-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-lead-title { margin: 6px 0 8px; font-family: var(--primary-font); font-size: 28px; font-weight: 800; line-height: 1.35; }
.nw .nw-lead-title a { color: var(--sh-ink); }
.nw .nw-lead-title a::after { content: ""; position: absolute; inset: 0; }
.nw .nw-lead:hover .nw-lead-title a { color: var(--sh-red-ink); }
.nw-lead-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 !important; font-size: 15.5px; line-height: 1.7; color: var(--sh-ink-2); }
.nw-top-side { display: grid; align-content: start; gap: 24px; min-width: 0; }
.nw .nw .nw-hl-when { font-size: 12px; color: var(--sh-muted); }
.nw 
/* ---------- tiles (top stories, category rows, "More from") ---------- */
.nw-section { margin-bottom: 36px; }
.nw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.nw-tiles.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nw-tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nw-tile-photo { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--vs-card-inner); background: #efe7dc; }
.nw-tile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-tile-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-family: var(--primary-font); font-size: 16px; font-weight: 700; line-height: 1.45; }
.nw .nw-tile-title a { color: var(--sh-ink); }
.nw .nw-tile-title a::after { content: ""; position: absolute; inset: 0; }
.nw .nw-tile:hover .nw-tile-title a { color: var(--sh-red-ink); }

/* ---------- the list of stories and the side column ---------- */
.nw-river-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.nw-river { min-width: 0; }
.nw-river-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--sh-line); }
.nw-river-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.nw-item { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--sh-line); }
.nw-item-photo { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--vs-card-inner); background: #efe7dc; }
.nw-item-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-item-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.nw-item-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-family: var(--primary-font); font-size: 19px; font-weight: 700; line-height: 1.45; }
.nw .nw-item-title a { color: var(--sh-ink); }
.nw .nw-item-title a::after { content: ""; position: absolute; inset: 0; }
.nw .nw-item:hover .nw-item-title a { color: var(--sh-red-ink); }
.nw-item-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 !important; font-size: 14.5px; line-height: 1.65; color: var(--sh-ink-2); }
.nw-lead:has(a:focus-visible), .nw-tile:has(a:focus-visible), .nw-item:has(a:focus-visible) { outline: 2px solid var(--sh-ink); outline-offset: 4px; border-radius: 12px; }

.nw-side { display: grid; gap: 20px; min-width: 0; }   /* scrolls with the page: taller than a screen, so it does not stick */
.nw-side-box { padding: 18px 20px; border: 1px solid var(--sh-line); border-radius: var(--vs-card-radius); background: #fff; }
.nw-side-box .nw-sec-title { margin-bottom: 8px; font-size: 16px; }
.nw .nw-mini { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--sh-line); color: var(--sh-ink); }
.nw .nw-mini:last-child { border-bottom: 0; }
.nw .nw-mini:hover b { color: var(--sh-red-ink); }
.nw-mini img { width: 76px; height: 54px; border-radius: 8px; object-fit: cover; background: #efe7dc; }
.nw-mini-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nw-mini-text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.45; }
.nw-mini-text small { font-size: 12px; color: var(--sh-muted); }
.nw-cat-list { margin: 6px 0 0; padding: 0; list-style: none; }
.nw .nw-cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; color: var(--sh-ink); }
.nw .nw-cat-list a:hover { background: var(--sh-field); }
.nw .nw-cat-list a.is-on { background: var(--sh-ink); color: #fff; }
.nw-cat-list small { font-size: 12.5px; font-weight: 700; color: var(--sh-muted); }
.nw-cat-list a.is-on small { color: rgba(255, 255, 255, .75); }
.nw-side-note p { margin: 0 0 12px !important; font-size: 14px; color: var(--sh-ink-2); }


/* ---------- a story's page ---------- */
.nw-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.nw-article { min-width: 0; }
.nw .nw-kicker { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sh-red-ink); }
.nw .nw-kicker:hover { text-decoration: underline; }
.nw-article-title { margin: 8px 0 12px; font-family: var(--primary-font); font-size: 38px; font-weight: 800; line-height: 1.32; color: var(--sh-ink); overflow-wrap: anywhere; }
.nw-byline { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--sh-muted); }
.nw-byline span { display: inline-flex; align-items: center; gap: 7px; }
.nw-share { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; padding: 14px 0; border-top: 1px solid var(--sh-line); border-bottom: 1px solid var(--sh-line); }
.nw .nw-share-btn { display: inline-flex; align-items: center; gap: 7px; height: var(--vs-btn-h-sm, 36px); padding: 0 16px; border: 1.5px solid var(--vs-btn-line); border-radius: 999px; background: transparent; font-size: 13.5px; font-weight: 700; color: var(--vs-btn-ink); cursor: pointer; transition: border-color .15s; }
.nw .nw-share-btn:hover { border-color: var(--vs-btn-line-hover); color: var(--vs-btn-ink); }   /* small secondary */
.nw-share-btn i { font-size: 15px; }
.nw-share-btn.is-wa i { color: #1fa855; }
.nw .nw-share-btn.nw-save.is-on { border-color: var(--sh-red); color: var(--sh-red-ink); }
.nw-article-photo { margin: 0 0 26px; overflow: hidden; border-radius: 16px; background: #efe7dc; }
.nw-article-photo img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.nw-article-body { max-width: 760px; font-size: 19px; line-height: 1.95; color: #2b3a44; }
.nw-article-body p { margin: 0 0 1.1em; }
.nw-article-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--sh-line); font-size: 14px; }
.nw .nw-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--vs-chip-line); border-radius: 999px; background: var(--vs-chip-bg); font-size: 13px; font-weight: var(--vs-chip-weight); color: var(--vs-chip-text); transition: border-color .15s; }
.nw .nw-chip:hover { border-color: var(--vs-chip-text); color: var(--vs-chip-text); }
.nw-story-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.nw .nw-story-step { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--sh-line); border-radius: var(--vs-card-radius); color: var(--sh-ink); transition: border-color .15s; }
.nw .nw-story-step:hover { border-color: var(--vs-card-line-hover); }
.nw-story-step.is-older { align-items: flex-end; text-align: right; }
.nw-story-step small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--sh-muted); }
.nw-story-step b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.45; }
.nw-related { margin-top: 36px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1199px) {
    .nw-top { grid-template-columns: minmax(0, 1fr); }
    .nw-top-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nw-river-grid, .nw-article-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 32px; }
}
@media (max-width: 991px) {
    .nw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nw-river-grid, .nw-article-grid { grid-template-columns: minmax(0, 1fr); }
    .nw-article-title { font-size: 32px; }
}
@media (max-width: 767px) {
    .nw-page { padding: 22px 0 60px; }
    .nw-lead-title { font-size: 23px; }
    .nw-item { grid-template-columns: 124px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
    .nw-item-title { font-size: 16px; -webkit-line-clamp: 3; }
    .nw-item-text { display: none; }
    .nw-tiles.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nw-article-title { font-size: 26px; }
    .nw-article-body { font-size: 17px; }
    .nw-story-nav { grid-template-columns: minmax(0, 1fr); }
    .nw-story-step.is-older { align-items: flex-start; text-align: left; }
}
@media (max-width: 575px) {
    .nw .nw-share-btn span { display: none; }
    .nw .nw-share-btn { width: var(--vs-btn-h-sm, 36px); justify-content: center; padding: 0; }
    .nw .nw-share-btn.nw-save span { display: inline; }
    .nw .nw-share-btn.nw-save { width: auto; padding: 0 14px; }
}
@media (max-width: 420px) {
    .nw-top-side, .nw-tiles, .nw-tiles.is-three { grid-template-columns: minmax(0, 1fr); }
}
