/**
 * 新闻资讯（News & Insights）
 *
 * 结构：居中标题 + [精选卡][精选卡][文字列表] 三栏 + 底部胶囊按钮
 * 视觉优化：卡片抬升 + 图片推近 + 箭头右移；列表项悬停出现强调色竖条；分隔线用伪元素，不占布局
 * 颜色/尺寸都是 CSS 变量，由 Elementor 控件注入。
 */

.wjc-news {
	--wjc-news-accent: #b6c81a;
	--wjc-news-muted: #8b8f95;
	--wjc-news-card-bg: #ffffff;
	--wjc-news-list-bg: #ffffff;
	--wjc-news-divider: rgba(17, 24, 39, 0.07);
	--wjc-news-radius: 10px;
	--wjc-news-ratio: 16/10;
	--wjc-news-btn-hover-bg: #16181b;
	--wjc-news-btn-hover-color: #ffffff;

	position: relative;
	box-sizing: border-box;
	padding: 76px 20px;
}

.wjc-news *,
.wjc-news *::before,
.wjc-news *::after {
	box-sizing: border-box;
}

/* ==================== 标题区 ==================== */
.wjc-news__head {
	max-width: 900px;
	margin: 0 auto 38px;
	text-align: center;
}

.wjc-news__eyebrow {
	margin-bottom: 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wjc-news-accent);
}

.wjc-news__title {
	margin: 0;
	font-size: clamp(23px, 2.2vw, 34px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: #16181b;
	word-break: keep-all;
}

.wjc-news__sub {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--wjc-news-muted);
}

/* ==================== 三栏 ==================== */
.wjc-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
	max-width: 1300px;
	margin: 0 auto;
}

/* ==================== 精选卡 ==================== */
.wjc-news__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--wjc-news-card-bg);
	border-radius: var(--wjc-news-radius);
	color: inherit;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
	transition:
		transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
		box-shadow 0.45s ease;
}

.wjc-news__thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--wjc-news-ratio, 16/10);
	overflow: hidden;
	background-color: #eef0f2;
}

.wjc-news__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wjc-news__tag {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.92);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	color: #1d1f22;
	backdrop-filter: blur(4px);
}

.wjc-news__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	padding: 20px 22px 22px;
}

.wjc-news__card-title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.55;
	color: #1d1f22;
	word-break: keep-all;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.wjc-news__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--wjc-news-muted);
	transition: color 0.25s ease;
}

.wjc-news__more svg {
	flex: 0 0 auto;
	transition: transform 0.25s ease;
}

/* ==================== 文字列表 ==================== */
.wjc-news__list {
	display: flex;
	flex-direction: column;
	padding: 4px;
	background-color: var(--wjc-news-list-bg);
	border-radius: var(--wjc-news-radius);
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.wjc-news__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border-radius: calc(var(--wjc-news-radius) - 2px);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.25s ease;
}

/* 分隔线用伪元素，悬停高亮时不会跟着变色 */
.wjc-news__item + .wjc-news__item::before {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	top: 0;
	height: 1px;
	background-color: var(--wjc-news-divider);
}

/* 悬停时左侧出现强调色竖条 */
.wjc-news__item::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 12px;
	bottom: 12px;
	width: 2px;
	border-radius: 2px;
	background-color: var(--wjc-news-accent);
	transform: scaleY(0);
	transform-origin: center top;
	transition: transform 0.3s ease;
}

.wjc-news__item-date {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--wjc-news-muted);
}

.wjc-news__item-title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.6;
	color: #2b2d31;
	word-break: keep-all;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* ==================== 底部按钮 ==================== */
.wjc-news__foot {
	margin-top: 38px;
	text-align: center;
}

.wjc-news__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 26px;
	border: 1px solid rgba(17, 24, 39, 0.16);
	border-radius: 999px;
	background-color: transparent;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: #2b2d31;
	text-decoration: none;
	transition:
		background-color 0.3s ease,
		color 0.3s ease,
		border-color 0.3s ease,
		transform 0.3s ease;
}

.wjc-news__btn svg {
	flex: 0 0 auto;
	transition: transform 0.3s ease;
}

.wjc-news__btn:active {
	transform: scale(0.97);
}

/* ==================== 悬停效果（仅桌面） ==================== */
@media (hover: hover) {
	.wjc-news__card:hover {
		transform: translateY(-6px);
		box-shadow: 0 20px 44px rgba(17, 24, 39, 0.13);
	}

	.wjc-news__card:hover .wjc-news__thumb img {
		transform: scale(1.06);
	}

	.wjc-news__card:hover .wjc-news__more {
		color: #1d1f22;
	}

	.wjc-news__card:hover .wjc-news__more svg {
		transform: translateX(3px);
	}

	.wjc-news__item:hover {
		background-color: rgba(17, 24, 39, 0.035);
	}

	.wjc-news__item:hover::after {
		transform: scaleY(1);
	}

	.wjc-news__item:hover .wjc-news__item-title {
		color: #16181b;
	}

	.wjc-news__btn:hover {
		background-color: var(--wjc-news-btn-hover-bg);
		border-color: var(--wjc-news-btn-hover-bg);
		color: var(--wjc-news-btn-hover-color);
		transform: translateY(-1px);
	}

	.wjc-news__btn:hover svg {
		transform: translateX(3px);
	}
}

/* 焦点可见性 */
.wjc-news__card:focus-visible,
.wjc-news__item:focus-visible,
.wjc-news__btn:focus-visible {
	outline: 2px solid var(--wjc-news-accent);
	outline-offset: 3px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
	.wjc-news {
		padding: 58px 20px;
	}

	.wjc-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	/* 列表在平板/手机上横跨整行 */
	.wjc-news__list {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.wjc-news {
		padding: 44px 16px;
	}

	.wjc-news__head {
		margin-bottom: 26px;
	}

	.wjc-news__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.wjc-news__body {
		padding: 16px 18px 18px;
		gap: 10px;
	}

	.wjc-news__card-title {
		font-size: 14.5px;
	}

	.wjc-news__item {
		padding: 13px 14px;
	}

	.wjc-news__foot {
		margin-top: 28px;
	}
}

/* ==================== 降低动效 ==================== */
@media (prefers-reduced-motion: reduce) {
	.wjc-news__card,
	.wjc-news__thumb img,
	.wjc-news__more,
	.wjc-news__more svg,
	.wjc-news__item,
	.wjc-news__item::after,
	.wjc-news__btn,
	.wjc-news__btn svg {
		transition: none;
	}

	.wjc-news__card:hover,
	.wjc-news__btn:hover {
		transform: none;
	}

	.wjc-news__card:hover .wjc-news__thumb img {
		transform: none;
	}
}
