/* --------------------------------------------------------------------------
   «Новости» (page-news.php). Визуальный язык — как у /cases/ и блока
   «Новости ROBIN» на главной: кремовый hero, моно-подписи, акцент #A30C33,
   тёмная navy-плашка CTA. Префикс .rnw-*. JS — assets/js/robin-news-page.js.
   -------------------------------------------------------------------------- */
:root {
	--rnw-parchment: #f6f3f1;
	--rnw-ash: #cecac8;
	--rnw-line: #e7e3e0;
	--rnw-ink: #242424;
	--rnw-graphite: #4e4d4d;
	--rnw-smoke: #797776;
	--rnw-accent: #a30c33;
	--rnw-result: #c52229;
	--rnw-navy: #0e1526;
	--rnw-mono-f: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	/* Цвета категорий (по порядку): акцент, navy, графит, розовый */
	--rnw-c0: #a30c33;
	--rnw-c1: #0e1526;
	--rnw-c2: #8d8a88;
	--rnw-c3: #eab0b2;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.rnw-hero { padding: 32px 48px 44px; border-radius: 24px; background: var(--rnw-parchment); color: var(--rnw-ink); }
.rnw-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; margin-top: 28px; }
.rnw-hero-title { margin: 0; font-family: var(--robin-font-head); font-weight: 500; font-size: 58px; line-height: 1.02; letter-spacing: -0.035em; }
.rnw-hero-title em { display: block; font-style: normal; color: var(--rnw-accent); }
.rnw-hero-sub { margin: 22px 0 0; max-width: 38rem; padding-left: 20px; border-left: 2px solid var(--rnw-accent); font-size: 17px; line-height: 1.55; color: var(--rnw-graphite); }
.rnw-hero-sub a { color: var(--rnw-accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.rnw-ring-wrap { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; }
.rnw-ring { width: 180px; height: 180px; transform: rotate(-90deg); overflow: visible; }
.rnw-ring circle { fill: none; stroke-width: 14; }
.rnw-ring-bg { stroke: #fff; }
.rnw-ring-seg {
	stroke: var(--rnw-c0);
	stroke-dasharray: var(--len) 100;
	stroke-dashoffset: var(--off);
	stroke-linecap: round;
	transition: stroke-width .25s ease, opacity .25s ease;
	animation: rnw-draw 1.2s cubic-bezier(.2, .8, .2, 1) both;
	animation-delay: calc(var(--i) * .15s + .2s);
}
.rnw-ring-seg:nth-of-type(3) { stroke: var(--rnw-c1); }
.rnw-ring-seg:nth-of-type(4) { stroke: var(--rnw-c2); }
.rnw-ring-seg:nth-of-type(5) { stroke: var(--rnw-c3); }
@keyframes rnw-draw { from { stroke-dasharray: 0 100; } }
.rnw-ring-wrap.is-focus .rnw-ring-seg { opacity: .25; }
.rnw-ring-wrap.is-focus .rnw-ring-seg.is-on { opacity: 1; stroke-width: 18; }
.rnw-ring-center {
	position: absolute;
	left: 0; top: 50%;
	width: 180px;
	transform: translateY(-50%);
	display: flex; flex-direction: column; align-items: center;
	pointer-events: none;
}
.rnw-ring-center b { font-family: var(--robin-font-head); font-weight: 400; font-size: 46px; line-height: 1; letter-spacing: -0.04em; }
.rnw-ring-center span { margin-top: 4px; font-family: var(--rnw-mono-f); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--rnw-smoke); }
.rnw-legend { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rnw-legend button {
	display: flex; align-items: center; gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	text-align: left;
	color: var(--rnw-ink);
	cursor: pointer;
	transition: background .2s ease;
}
.rnw-legend button:hover, .rnw-legend button.is-on { background: #fff; }
.rnw-legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--rnw-c0); }
.rnw-legend li:nth-child(2) i { background: var(--rnw-c1); }
.rnw-legend li:nth-child(3) i { background: var(--rnw-c2); }
.rnw-legend li:nth-child(4) i { background: var(--rnw-c3); }
.rnw-legend b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--rnw-smoke); }

/* ==========================================================================
   ФИЛЬТР
   ========================================================================== */
.rnw-filter {
	position: relative;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 5px;
	border-radius: 999px;
	background: var(--rnw-parchment);
}
.rnw-filter-pill {
	position: absolute;
	top: 0; left: 0;
	border-radius: 999px;
	background: var(--rnw-navy);
	opacity: 0;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1), height .35s ease, opacity .2s ease;
	pointer-events: none;
}
.rnw-filter.is-js .rnw-filter-pill { opacity: 1; }
.rnw-chip {
	position: relative;
	z-index: 1;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--rnw-ink);
	cursor: pointer;
	transition: color .25s ease;
}
.rnw-chip-num {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 20px; padding: 0 6px;
	border-radius: 999px;
	background: #fff;
	font-family: var(--rnw-mono-f); font-size: 11px;
	color: var(--rnw-smoke);
	transition: background .25s ease, color .25s ease;
}
.rnw-chip.is-active { color: #fff; }
.rnw-filter:not(.is-js) .rnw-chip.is-active { background: var(--rnw-navy); }
.rnw-chip.is-active .rnw-chip-num { background: rgba(255, 255, 255, .14); color: #fff; }

/* ==========================================================================
   ЛЕНТА
   ========================================================================== */
.rnw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.rnw-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--rnw-line);
	border-radius: 22px;
	background: #fff;
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.rnw-card:hover { transform: translateY(-4px); border-color: var(--rnw-ash); box-shadow: 0 26px 50px -32px rgba(36, 36, 36, .4); }
.rnw-card[hidden] { display: none; }
.rnw-card.is-enter { animation: rnw-in .45s ease both; animation-delay: calc(var(--n, 0) * 40ms); }
@keyframes rnw-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.rnw-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--rnw-parchment); }
.rnw-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.rnw-card:hover .rnw-cover img { transform: scale(1.04); }
.rnw-cover-type {
	position: absolute; inset: 0;
	display: flex; align-items: flex-end;
	padding: 18px 20px;
	background: linear-gradient(160deg, #141d33 0%, #0b1120 60%, #0e1526 100%);
	overflow: hidden;
}
.rnw-cover-type::before {
	content: "";
	position: absolute; right: -60px; top: -80px;
	width: 220px; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(197, 34, 41, .45), rgba(197, 34, 41, 0));
	transition: transform .6s ease;
}
.rnw-card:hover .rnw-cover-type::before { transform: translate(-20px, 20px) scale(1.15); }
.rnw-cover-type span {
	position: relative;
	font-family: var(--robin-font-head);
	font-weight: 300;
	font-size: 34px;
	line-height: 1;
	letter-spacing: -0.04em;
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, .55);
}

.rnw-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 24px; }
.rnw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rnw-tag {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--rnw-parchment);
	font-family: var(--rnw-mono-f);
	font-size: 10px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rnw-accent);
}
.rnw-date { font-family: var(--rnw-mono-f); font-size: 11px; color: var(--rnw-smoke); }
.rnw-title { margin: 12px 0 0; font-size: 16px; font-weight: 500; line-height: 1.4; letter-spacing: -0.015em; color: var(--rnw-ink); transition: color .2s ease; }
.rnw-card:hover .rnw-title { color: var(--rnw-accent); }

/* Первая новость — крупно, на 2 колонки, горизонтально */
.rnw-card--lead { grid-column: span 2; flex-direction: row; }
.rnw-card--lead .rnw-cover { flex: 0 0 58%; aspect-ratio: auto; min-height: 280px; }
.rnw-card--lead .rnw-body { justify-content: flex-end; padding: 28px; }
.rnw-card--lead .rnw-title { font-family: var(--robin-font-head); font-size: 26px; font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.rnw-grid.is-filtered .rnw-card--lead { grid-column: auto; flex-direction: column; }
.rnw-grid.is-filtered .rnw-card--lead .rnw-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
.rnw-grid.is-filtered .rnw-card--lead .rnw-body { padding: 20px 22px 24px; justify-content: flex-start; }
.rnw-grid.is-filtered .rnw-card--lead .rnw-title { font-family: inherit; font-size: 16px; line-height: 1.4; letter-spacing: -0.015em; }

.rnw-empty { margin: 32px 0 0; padding: 32px; border-radius: 22px; background: var(--rnw-parchment); text-align: center; color: var(--rnw-smoke); }

/* ==========================================================================
   CTA
   ========================================================================== */
.rnw-cta {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 28px;
	align-items: center;
	padding: 36px 40px;
	border-radius: 28px;
	background: linear-gradient(160deg, #141d33 0%, #0b1120 60%, #0e1526 100%);
	color: #fff;
}
.rnw-cta::after {
	content: ""; position: absolute; left: -100px; bottom: -160px;
	width: 360px; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(197, 34, 41, .32), rgba(197, 34, 41, 0));
	pointer-events: none;
}
.rnw-cta-ico {
	position: relative; z-index: 1;
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px;
	border-radius: 20px;
	background: var(--rnw-result);
	animation: rnw-fly 3.2s ease-in-out infinite;
}
@keyframes rnw-fly { 0%, 100% { transform: none; } 50% { transform: translate(3px, -4px) rotate(-4deg); } }
.rnw-cta-text h2 { margin: 0; font-family: var(--robin-font-head); font-weight: 400; font-size: 32px; letter-spacing: -0.03em; }
.rnw-cta-text p { margin: 10px 0 0; max-width: 40rem; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .7); }
.rnw-cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.rnw-cta-ghost {
	display: inline-flex; align-items: center;
	padding: 14px 26px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 999px;
	font-size: 14px; font-weight: 500;
	color: #fff;
	transition: background .2s ease, border-color .2s ease;
}
.rnw-cta-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1023px) {
	.rnw-hero { padding: 24px 28px 32px; }
	.rnw-hero-grid { grid-template-columns: 1fr; gap: 36px; }
	.rnw-hero-title { font-size: 44px; }
	.rnw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rnw-cta { grid-template-columns: auto minmax(0, 1fr); }
	.rnw-cta-actions { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
	.rnw-hero { padding: 20px 18px 24px; border-radius: 20px; }
	.rnw-hero-title { font-size: 34px; }
	.rnw-ring-wrap { grid-template-columns: 1fr; justify-items: center; }
	.rnw-ring-center { left: 50%; top: 90px; transform: translate(-50%, -50%); }
	.rnw-legend { width: 100%; }
	.rnw-filter { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.rnw-filter::-webkit-scrollbar { display: none; }
	.rnw-chip { flex: none; }
	.rnw-grid { grid-template-columns: 1fr; }
	.rnw-card--lead { grid-column: auto; flex-direction: column; }
	.rnw-card--lead .rnw-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
	.rnw-card--lead .rnw-title { font-size: 21px; }
	.rnw-cta { grid-template-columns: 1fr; padding: 28px 22px; }
	.rnw-cta-text h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.rnw-ring-seg, .rnw-cta-ico, .rnw-card.is-enter { animation: none; }
	.rnw-filter-pill { transition: none; }
}
