.yftj-news-sidebar {
	--yftj-news-heading-color: #173b5e;
	--yftj-news-link-color: #173b5e;
	--yftj-news-accent-color: #51a5ed;
	--yftj-news-divider-color: #e5e7eb;
	--yftj-news-image-width: 96px;
	--yftj-news-image-height: 72px;
	--yftj-news-post-gap: 14px;
	--yftj-news-image-object-fit: contain;
	--yftj-news-image-scale: 100%;
	--yftj-news-image-position: center center;
	--yftj-news-title-lines: 2;
	--yftj-news-heading-accent: #51a5ed;
	--yftj-news-heading-accent-width: 38px;
	--yftj-news-heading-accent-height: 3px;
	--yftj-news-category-background: #ffffff;
	--yftj-news-category-hover-background: #eef7ff;
	--yftj-news-post-divider: #edf1f5;
	--yftj-news-post-divider-height: 1px;
	--yftj-news-image-hover-scale: 1;
	box-sizing: border-box;
	background: #f8fafc;
	border: 1px solid #edf1f5;
	padding: 22px;
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

:where(.yftj-news-sidebar) *,
:where(.yftj-news-sidebar) *::before,
:where(.yftj-news-sidebar) *::after {
	box-sizing: border-box;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__section + .yftj-news-sidebar__section {
	margin-top: 40px;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__heading {
	position: relative;
	margin: 0 0 18px;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--yftj-news-divider-color);
	color: var(--yftj-news-heading-color);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__heading::after {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	bottom: -1px;
	width: min(100%, var(--yftj-news-heading-accent-width));
	height: var(--yftj-news-heading-accent-height);
	background: var(--yftj-news-heading-accent);
	pointer-events: none;
}

.yftj-news-sidebar .yftj-news-sidebar__category-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	padding-inline: 0;
	list-style: none;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-item {
	margin: 0;
	padding: 0;
	min-width: 0;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a {
	color: var(--yftj-news-link-color);
	text-decoration: none;
	transition: color 200ms ease;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link {
	display: block;
	overflow: hidden;
	max-width: 100%;
	padding: 0;
	text-align: left;
	line-height: 1.65;
	font-size: 15px;
	min-height: 34px;
	align-content: center;
	background: var(--yftj-news-category-background);
	transition: color 200ms ease, background-color 200ms ease;
	white-space: nowrap;
	text-overflow: ellipsis;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link:hover,
:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link:focus-visible {
	background: var(--yftj-news-category-hover-background);
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link:hover,
:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link:focus-visible,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a:hover,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a:focus-visible {
	color: var(--yftj-news-accent-color);
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link:focus-visible,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a:focus-visible,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image:focus-visible {
	outline: 2px solid var(--yftj-news-accent-color);
	outline-offset: 3px;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post {
	display: block;
	min-width: 0;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post:not(:last-child) {
	padding-bottom: 16px;
	border-bottom: var(--yftj-news-post-divider-height) solid var(--yftj-news-post-divider);
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post.has-featured-image {
	display: grid;
	grid-template-columns: minmax(0, min(var(--yftj-news-image-width), calc(100% - var(--yftj-news-post-gap)))) minmax(0, 1fr);
	align-items: center;
	gap: var(--yftj-news-post-gap);
	max-width: 100%;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image {
	display: block;
	min-width: 0;
	max-width: 100%;
	width: 100%;
	height: var(--yftj-news-image-height);
	overflow: hidden;
	border-radius: 4px;
	background: #ffffff;
	border: 1px solid #edf1f5;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--yftj-news-image-object-fit);
	object-position: var(--yftj-news-image-position);
	transform: scale(var(--yftj-news-image-scale));
	transform-origin: var(--yftj-news-image-position);
	transition: transform 250ms ease;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image:hover .yftj-news-sidebar__post-thumbnail,
:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image:focus-visible .yftj-news-sidebar__post-thumbnail {
	transform: scale(var(--yftj-news-image-scale)) scale(var(--yftj-news-image-hover-scale));
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-content {
	min-width: 0;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title {
	margin: 0;
	min-width: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a {
	display: -webkit-box;
	overflow: hidden;
	max-width: 100%;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--yftj-news-title-lines);
	line-clamp: var(--yftj-news-title-lines);
	overflow-wrap: anywhere;
	text-overflow: ellipsis;
}

:where(.yftj-news-sidebar) .yftj-news-sidebar__post-date {
	display: block;
	margin-top: 6px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.4;
}

@media (max-width: 480px) {
	.yftj-news-sidebar {
		--yftj-news-image-width: 80px;
		--yftj-news-image-height: 60px;
		--yftj-news-post-gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(.yftj-news-sidebar) .yftj-news-sidebar__category-link,
	:where(.yftj-news-sidebar) .yftj-news-sidebar__post-title a,
	:where(.yftj-news-sidebar) .yftj-news-sidebar__post-thumbnail {
		transition: none;
	}

	:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image:hover .yftj-news-sidebar__post-thumbnail,
	:where(.yftj-news-sidebar) .yftj-news-sidebar__post-image:focus-visible .yftj-news-sidebar__post-thumbnail {
		transform: scale(var(--yftj-news-image-scale));
	}
}
