/*
	Новости платформы: список, страница новости и окно-напоминание справа.
*/

.news-page,
.news-post {
	--news-accent: #6d5ce6;
	--news-accent-soft: #efeafd;
	--news-ink: #20243a;
	--news-muted: #7c8296;
	--news-line: #e9e9f5;
	--news-surface: #ffffff;
}

.news-hero {
	margin-bottom: 20px;
	padding: 26px 28px;
	border: 1px solid var(--news-line);
	border-radius: 24px;
	background:
		radial-gradient(circle at 92% 8%, rgba(139, 124, 240, .16), transparent 46%),
		var(--news-surface);
	box-shadow: 0 18px 44px rgba(46, 44, 86, .07);
}

.news-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	color: var(--news-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.news-hero h1 {
	margin: 0 0 8px;
	color: var(--news-ink);
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 780;
	letter-spacing: -.03em;
}

.news-hero p {
	max-width: 620px;
	margin: 0;
	color: var(--news-muted);
	font-size: 13.5px;
	line-height: 1.7;
}

.news-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.news-hero-actions .btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(100deg, var(--news-accent), #8b7cf0);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	box-shadow: 0 12px 26px rgba(109, 92, 230, .25);
}

.news-hero-actions .btn.is-ghost {
	border: 1px solid var(--news-line);
	background: #fff;
	color: var(--news-ink);
	box-shadow: none;
}

.news-list {
	display: grid;
	gap: 14px;
}

.news-card {
	position: relative;
	padding: 22px 24px;
	border: 1px solid var(--news-line);
	border-radius: 20px;
	background: var(--news-surface);
	box-shadow: 0 14px 34px rgba(46, 44, 86, .06);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.news-card:hover {
	transform: translateY(-2px);
	border-color: rgba(109, 92, 230, .3);
	box-shadow: 0 20px 44px rgba(46, 44, 86, .1);
}

.news-card-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.news-card-date {
	color: var(--news-muted);
	font-size: 11.5px;
	font-weight: 600;
}

.news-card-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--news-accent-soft);
	color: var(--news-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.news-card-title {
	margin: 0 0 8px;
	font-size: clamp(17px, 2vw, 21px);
	font-weight: 750;
	letter-spacing: -.02em;
	line-height: 1.3;
}

.news-card-title a {
	color: var(--news-ink);
	text-decoration: none;
}

.news-card-title a:hover {
	color: var(--news-accent);
}

.news-card-excerpt {
	margin: 0 0 14px;
	color: #5d6478;
	font-size: 13px;
	line-height: 1.7;
}

.news-card-bottom {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid #f1f1f8;
	color: var(--news-muted);
	font-size: 12px;
}

.news-card-bottom .news-card-author {
	color: #4b5169;
	font-weight: 600;
}

.news-card-views {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.news-card-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-left: auto;
	color: var(--news-accent);
	font-weight: 700;
	text-decoration: none;
}

.news-card-link:hover {
	color: #5042c4;
}

.news-card-link > i {
	transition: transform .18s ease;
}

.news-card-link:hover > i {
	transform: translateX(3px);
}

.news-empty {
	padding: 42px 24px;
	border: 1px dashed var(--news-line);
	border-radius: 20px;
	background: #fbfbfe;
	color: var(--news-muted);
	text-align: center;
}

.news-empty > i {
	display: block;
	margin-bottom: 10px;
	color: #c9c4ef;
	font-size: 30px;
}

.news-empty strong {
	display: block;
	margin-bottom: 6px;
	color: var(--news-ink);
	font-size: 15px;
}

.news-more {
	margin-top: 18px;
	text-align: center;
}

.news-more .btn {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	line-height: 1;
	border: 1px solid var(--news-line);
	border-radius: 999px;
	background: #fff;
	color: var(--news-ink);
	font-size: 12.5px;
	font-weight: 650;
}

.news-aside {
	display: grid;
	gap: 14px;
}

.news-aside-card {
	padding: 20px 22px;
	border: 1px solid var(--news-line);
	border-radius: 20px;
	background: var(--news-surface);
	box-shadow: 0 14px 34px rgba(46, 44, 86, .05);
}

.news-aside-card > h3 {
	margin: 0 0 10px;
	color: var(--news-ink);
	font-size: 14px;
	font-weight: 750;
}

.news-aside-card > p,
.news-aside-card > ul {
	margin: 0;
	color: var(--news-muted);
	font-size: 12.5px;
	line-height: 1.7;
}

.news-aside-card > ul {
	padding-left: 18px;
}

.news-aside-links {
	display: grid;
	gap: 8px;
}

.news-aside-links > a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 11px 13px;
	border: 1px solid var(--news-line);
	border-radius: 13px;
	color: var(--news-ink);
	font-size: 12.5px;
	font-weight: 620;
	text-decoration: none;
	transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.news-aside-links > a:hover {
	border-color: rgba(109, 92, 230, .35);
	background: #faf9ff;
	color: var(--news-accent);
}

/* страница новости */
.news-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	color: var(--news-muted);
	font-size: 12.5px;
	font-weight: 620;
	text-decoration: none;
}

.news-back:hover {
	color: var(--news-accent);
}

.news-article {
	padding: 30px 32px 34px;
	border: 1px solid var(--news-line);
	border-radius: 24px;
	background: var(--news-surface);
	box-shadow: 0 18px 44px rgba(46, 44, 86, .07);
}

.news-article h1 {
	margin: 12px 0 14px;
	color: var(--news-ink);
	font-size: clamp(23px, 3vw, 32px);
	font-weight: 780;
	letter-spacing: -.03em;
	line-height: 1.22;
}

.news-article-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid #f1f1f8;
	color: var(--news-muted);
	font-size: 12px;
}

.news-article-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.news-article-content {
	color: #333a4f;
	font-size: 14.5px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.news-article-content > *:first-child {
	margin-top: 0;
}

.news-article-content > *:last-child {
	margin-bottom: 0;
}

.news-article-content h3,
.news-article-content h4 {
	margin: 24px 0 10px;
	color: var(--news-ink);
	font-weight: 750;
	letter-spacing: -.02em;
}

.news-article-content p {
	margin: 0 0 14px;
}

.news-article-content ul,
.news-article-content ol {
	margin: 0 0 14px;
	padding-left: 22px;
}

.news-article-content li {
	margin-bottom: 6px;
}

.news-article-content a {
	color: var(--news-accent);
	font-weight: 620;
	text-decoration: none;
}

.news-article-content a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.news-article-content blockquote {
	margin: 16px 0;
	padding: 12px 18px;
	border-left: 3px solid var(--news-accent);
	border-radius: 0 12px 12px 0;
	background: #f8f7ff;
	color: #4b5169;
}

.news-article-content code {
	padding: 2px 6px;
	border-radius: 6px;
	background: #f3f2fb;
	color: #5042c4;
	font-size: 12.5px;
}

.news-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

.news-article-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.news-article-footer .btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--news-line);
	border-radius: 999px;
	background: #fff;
	color: var(--news-ink);
	font-size: 12.5px;
	font-weight: 650;
}

.news-article-footer .btn.is-primary {
	border: 0;
	background: linear-gradient(100deg, var(--news-accent), #8b7cf0);
	color: #fff;
	box-shadow: 0 12px 26px rgba(109, 92, 230, .25);
}

.news-article-updated {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 16px;
	color: #9aa0b4;
	font-size: 11.5px;
}

/* окно-напоминание справа */
.news-popup {
	position: fixed;
	z-index: 1080;
	right: 22px;
	bottom: 22px;
	width: min(360px, calc(100vw - 32px));
	pointer-events: none;
}

.news-popup-card {
	position: relative;
	padding: 20px 22px 18px;
	border: 1px solid rgba(233, 232, 246, .9);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(35, 33, 70, .22);
	pointer-events: auto;
	animation: newsPopupIn .34s cubic-bezier(.22, .8, .3, 1) both;
}

.news-popup-card.is-active {
	display: block;
}

.news-popup-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 8px;
	color: #6d5ce6;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.news-popup-label > em {
	color: #9aa0b4;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.news-popup-title {
	margin: 0 0 8px;
	padding-right: 26px;
	color: #20243a;
	font-size: 15.5px;
	font-weight: 750;
	letter-spacing: -.02em;
	line-height: 1.35;
}

.news-popup-text {
	margin: 0 0 14px;
	color: #5d6478;
	font-size: 12.5px;
	line-height: 1.65;
}

.news-popup-actions {
	display: flex;
	align-items: center;
	gap: 9px;
}

.news-popup-actions .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.news-popup-read {
	flex: 1 1 auto;
	background: linear-gradient(100deg, #6d5ce6, #8b7cf0);
	color: #fff;
	box-shadow: 0 10px 22px rgba(109, 92, 230, .26);
}

.news-popup-later {
	border: 1px solid #e9e9f5 !important;
	background: #fff;
	color: #5d6478;
}

.news-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	width: 30px;
	height: 30px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #9aa0b4;
	font-size: 13px;
	transition: background .16s ease, color .16s ease;
}

.news-popup-close:hover,
.news-popup-close:focus-visible {
	outline: none;
	background: #f4f3fb;
	color: #20243a;
}

.news-popup-date {
	display: block;
	margin-top: 10px;
	color: #9aa0b4;
	font-size: 11px;
}

@keyframes newsPopupIn {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767px) {
	.news-popup {
		right: 10px;
		bottom: 12px;
		left: 10px;
		width: auto;
	}

	.news-popup-card {
		padding: 18px 18px 16px;
		border-radius: 18px;
	}

	.news-article {
		padding: 22px 18px 26px;
		border-radius: 20px;
	}

	.news-hero {
		padding: 20px 18px;
		border-radius: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.news-popup-card {
		animation: none;
	}

	.news-card {
		transition: none;
	}
}

html[data-bs-theme="dark"] .news-page,
html[data-bs-theme="dark"] .news-post {
	--news-ink: #eceaf6;
	--news-muted: #9aa0b4;
	--news-line: #2b2b3d;
	--news-surface: #1c1c2a;
	--news-accent-soft: rgba(109, 92, 230, .18);
}

html[data-bs-theme="dark"] .news-hero {
	background: radial-gradient(circle at 92% 8%, rgba(139, 124, 240, .18), transparent 46%), #1c1c2a;
}

html[data-bs-theme="dark"] .news-card,
html[data-bs-theme="dark"] .news-aside-card,
html[data-bs-theme="dark"] .news-article {
	border-color: #2b2b3d;
	background: #1c1c2a;
}

html[data-bs-theme="dark"] .news-card-excerpt,
html[data-bs-theme="dark"] .news-article-content,
html[data-bs-theme="dark"] .news-popup-text {
	color: #b9bed0;
}

html[data-bs-theme="dark"] .news-card-bottom,
html[data-bs-theme="dark"] .news-article-meta {
	border-color: #262637;
}

html[data-bs-theme="dark"] .news-card-bottom .news-card-author {
	color: #dfe2ee;
}

html[data-bs-theme="dark"] .news-hero-actions .btn.is-ghost,
html[data-bs-theme="dark"] .news-more .btn,
html[data-bs-theme="dark"] .news-article-footer .btn,
html[data-bs-theme="dark"] .news-aside-links > a {
	border-color: #2b2b3d;
	background: #22222f;
	color: #eceaf6;
}

html[data-bs-theme="dark"] .news-empty {
	border-color: #2b2b3d;
	background: #191926;
}

html[data-bs-theme="dark"] .news-empty strong {
	color: #eceaf6;
}

html[data-bs-theme="dark"] .news-article-content code {
	background: #262637;
	color: #cfc8ff;
}

html[data-bs-theme="dark"] .news-article-content blockquote {
	background: #22222f;
	color: #c6cadd;
}

html[data-bs-theme="dark"] .news-popup-card {
	border-color: #2b2b3d;
	background: #1c1c2a;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

html[data-bs-theme="dark"] .news-popup-title {
	color: #eceaf6;
}

html[data-bs-theme="dark"] .news-popup-later {
	border-color: #2b2b3d !important;
	background: #22222f;
	color: #c6cadd;
}

html[data-bs-theme="dark"] .news-popup-close:hover,
html[data-bs-theme="dark"] .news-popup-close:focus-visible {
	background: #262637;
	color: #eceaf6;
}
