/* =====================================================================
   News — list variant A „Мрежа“ (mockup: claude/mockups/front/blog.html#list-a, D-047)
   All classes are prefixed .nw-* ; colours/fonts/radii only via the tokens in custom.css
   ===================================================================== */

/* the title band sits directly on the light section — no white gap */
.bcb:has(+ .nw) { --bcb-gap: 0px; }

/* theme blocks are floats — the new block follows the same rule */
.nw { float: left; clear: both; width: 100%; font-family: var(--font-body); font-size: 15px; line-height: 1.7; color: var(--c-body); }
.nw *, .nw *::before, .nw *::after { box-sizing: border-box; }
.nw a { text-decoration: none; }
.nw img { display: block; max-width: 100%; }
.nw h2, .nw h3 { margin: 0; font-family: var(--font-head); font-weight: 500; letter-spacing: 0; color: var(--c-ink); }
.nw-sec { padding: 64px 0 88px; }
.nw-paper { background: var(--c-paper); }
.nw-ic { width: 16px; height: 16px; flex: none; }
.nw-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- atoms ---------- */
.nw-eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 12px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand-600); }
.nw-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--c-brand); }
.nw-tab { position: absolute; z-index: 2; top: 0; left: 18px; display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 10px 12px 11px; color: #fff; background: var(--c-brand); border-radius: 0 0 var(--r-xs) var(--r-xs); font-family: var(--font-head); text-align: center; }
.nw-tab b { font-size: 26px; font-weight: 500; line-height: 1; }
.nw-tab small { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .55); font-size: 10.5px; line-height: 1.35; letter-spacing: .06em; text-transform: uppercase; }
.nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 13px; line-height: 1.4; color: var(--c-muted); }
.nw-meta span { display: inline-flex; align-items: center; gap: 7px; }
.nw-meta .nw-ic { width: 15px; height: 15px; color: var(--c-brand); }
.nw-more { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font-head); color: var(--c-brand-600) !important; }
.nw-more .nw-ic { transition: transform .2s; }
.nw-more:hover, .nw-more:focus-visible { color: var(--c-ink) !important; }
.nw-more:hover .nw-ic { transform: translateX(4px); }
.nw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 24px; font: 500 14px/1 var(--font-head); color: #fff !important; background: var(--c-brand); border: 0; border-radius: var(--r-xs); transition: background .2s; }
.nw-btn:hover, .nw-btn:focus-visible { background: var(--c-dark); }
.nw-empty { padding: 48px 20px; text-align: center; color: var(--c-muted); background: var(--c-white); border: 1px dashed var(--c-line); border-radius: var(--r-md); }
.nw-empty b { display: block; margin-bottom: 4px; font: 500 18px var(--font-head); color: var(--c-ink); }

/* ---------- bar: count · years · search ---------- */
.nw-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 34px; }
.nw-bar-l { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.nw-count { font: 500 15px var(--font-head); color: var(--c-ink); }
.nw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-chip { padding: 8px 16px; font: 400 13px/1 var(--font-head); color: var(--c-body) !important; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-pill); transition: color .15s, border-color .15s, background .15s; }
.nw-chip:hover, .nw-chip:focus-visible { color: var(--c-ink) !important; border-color: var(--c-ink); }
.nw-chip.is-on { color: #fff !important; background: var(--c-ink); border-color: var(--c-ink); }
.nw-chip sup { top: -.4em; margin-left: 4px; font-size: 10px; opacity: .6; }
.nw-search { position: relative; display: block; width: 300px; max-width: 100%; margin: 0; }
.nw-search input[type="search"] { width: 100%; height: 44px; margin: 0; padding: 0 44px 0 16px !important; font: 400 14px var(--font-body); color: var(--c-ink); background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-xs); outline: 0; box-shadow: none; -webkit-appearance: none; appearance: none; transition: border-color .15s; }
.nw-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.nw-search input[type="search"]:focus { border-color: var(--c-brand); }
.nw-search-btn { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: var(--c-muted); background: none; border: 0; cursor: pointer; }
.nw-search-btn:hover, .nw-search-btn:focus-visible { color: var(--c-brand-600); }
.nw-search-clear { position: absolute; top: 12px; right: 44px; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: #fff !important; background: var(--c-muted); border-radius: 50%; }
.nw-search-clear .nw-ic { width: 12px; height: 12px; }
.nw-search-clear:hover { background: var(--c-ink); }
.nw-search:has(.nw-search-clear) input[type="search"] { padding-right: 72px !important; }

/* ---------- featured (newest, first page without filters) ---------- */
.nw-feat { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 30px; overflow: hidden; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.nw-feat-img { position: relative; display: block; min-height: 420px; overflow: hidden; background: var(--c-paper); }
.nw-feat-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.nw-feat:hover .nw-feat-img img { transform: scale(1.04); }
.nw-feat-body { display: flex; flex-direction: column; justify-content: center; padding: 48px 52px; }
.nw-feat h2 { margin: 18px 0 16px; font-size: 30px; line-height: 1.25; }
.nw-feat h2 a { color: var(--c-ink); transition: color .15s; }
.nw-feat h2 a:hover, .nw-feat h2 a:focus-visible { color: var(--c-brand-600); }
.nw-feat p { margin: 0 0 22px; font-size: 16px; line-height: 1.75; }
.nw-feat .nw-meta { margin-bottom: 30px; }

/* ---------- grid of cards ---------- */
.nw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.nw-card { display: flex; flex-direction: column; overflow: hidden; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-md); transition: transform .25s, box-shadow .25s; }
.nw-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 21, 30, .09); }
.nw-card-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-paper); }
.nw-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.nw-card:hover .nw-card-img img { transform: scale(1.05); }
.nw-card-img.is-empty, .nw-feat-img.is-empty { background: var(--c-paper) url('../img/logo-light.png') center / 90px auto no-repeat; }
.nw-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px 26px; }
.nw-card h3 { margin: 12px 0 10px; font-size: 20px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-card h3 a { color: var(--c-ink); transition: color .15s; }
.nw-card h3 a:hover, .nw-card h3 a:focus-visible { color: var(--c-brand-600); }
.nw-card p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-card-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--c-line); }

/* ---------- pager ---------- */
.nw-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.nw-pager a, .nw-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; font: 500 14px var(--font-head); color: var(--c-ink) !important; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-xs); transition: border-color .15s; }
.nw-pager a:hover, .nw-pager a:focus-visible { border-color: var(--c-ink); }
.nw-pager .is-on { color: #fff !important; background: var(--c-brand); border-color: var(--c-brand); }
.nw-pager .is-disabled { opacity: .35; }
.nw-pager .is-gap { min-width: 24px; background: none; border: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
	.nw-feat-body { padding: 36px 38px; }
	.nw-feat h2 { font-size: 26px; }
	.nw-grid { gap: 24px; }
}
@media (max-width: 991px) {
	.nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nw-feat { grid-template-columns: minmax(0, 1fr); }
	.nw-feat-img { min-height: 320px; }
}
@media (max-width: 767px) {
	.nw { font-size: 14.5px; }
	.nw-sec { padding: 40px 0 60px; }
	.nw-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.nw-bar { flex-direction: column; align-items: stretch; }
	.nw-search { width: 100%; }
	.nw-feat-img { min-height: 220px; }
	.nw-feat-body { padding: 26px 22px 28px; }
	.nw-feat h2 { font-size: 22px; }
	.nw-card-body { padding: 20px; }
	.nw-card h3 { font-size: 18px; }
	.nw-tab { left: 14px; min-width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
	.nw-card, .nw-card-img img, .nw-feat-img img, .nw-more .nw-ic { transition: none; }
	.nw-card:hover { transform: none; }
	.nw-card:hover .nw-card-img img, .nw-feat:hover .nw-feat-img img { transform: none; }
}
