/*
 * 公司新闻 —— 列表页与详情页样式
 *
 * 版式骨架沿用旧站（1000px 居中、横幅 + 列表 / 标题日期 + 正文），
 * 在此基础上做现代化收尾：
 * - 列表由「浮动 + 固定高度」改成网格行，高低自适应、窄屏自动堆叠；
 * - 列表列为「日期 / 标题 / 操作」：去掉无信息量的流水号，日期前移；
 *   整行是热区（标题链接的伪元素铺满一行），「详情」按钮只作视觉提示；
 * - 行悬停有左侧色条与底色反馈，标题与「详情」按钮一起变主题红；
 * - 分页换成圆角按钮组，保留旧站「总共 N 条」的提示；
 * - 详情页按中文阅读习惯重排（15px / 1.9 行距），多图自动排成网格并可点开放大；
 * - 尊重系统「减少动态效果」设置。
 */

/* ================= 通用容器 ================= */

.news-page .news_wrap {
	width: 1000px;
	margin: 0 auto;
	padding-top: 30px;
}

.news-page .news_page_head {
	margin-bottom: 18px;
}

.news-page .news_page_head h1 {
	position: relative;
	padding-left: 14px;
	font-size: 28px;
	font-weight: normal;
	line-height: 1.3;
	color: #222;
}

.news-page .news_page_head h1::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 4px;
	background: #da251c;
	border-radius: 2px;
}

.news-page .news_page_note {
	margin-top: 8px;
	padding-left: 14px;
	color: #888;
	font-size: 14px;
	line-height: 24px;
}

/* ================= 列表 ================= */

.news-page .news_list_box {
	/* 操作列的宽度：表头「操作」和每行的「详情」按钮共用这一个值，
	   两者宽度一致才能在竖直方向对齐 */
	--nl-act-w: 72px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

.news-page .news_list_head {
	display: grid;
	grid-template-columns: 128px 1fr 108px;
	align-items: center;
	padding: 0 24px;
	height: 48px;
	background: #fafafa;
	border-bottom: 1px solid #ececec;
	color: #999;
	font-size: 14px;
}

/* 表头与行内容对齐：日期、标题居左；「操作」与下方按钮同宽并居中，
   于是「操作」正好压在「详情」按钮正上方 */
.news-page .news_list_head .nl_act {
	text-align: right;
}

.news-page .nl_act_label {
	display: inline-block;
	width: var(--nl-act-w);
	text-align: center;
}

.news-page .news_list_body {
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-page .news_item {
	position: relative;
	display: grid;
	grid-template-columns: 128px 1fr 108px;
	align-items: center;
	padding: 0 24px;
	min-height: 58px;
	border-bottom: 1px dashed #f0f0f0;
	transition: background-color 0.2s ease;
}

.news-page .news_item:last-child {
	border-bottom: 0;
}

.news-page .news_item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #da251c;
	transform: scaleY(0);
	transition: transform 0.2s ease;
}

.news-page .news_item:hover {
	background: #fffaf3;
}

.news-page .news_item:hover::before {
	transform: scaleY(1);
}

.news-page .nl_date {
	color: #666;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.news-page .nl_title {
	min-width: 0;
}

.news-page .nl_link {
	display: block;
	color: #333;
	font-size: 16px;
	line-height: 26px;
	text-decoration: none;
	transition: color 0.2s ease;
}

/* 整行热区：伪元素铺满 <li>，点这一行的任何位置都进详情页。
   它是标题链接本身的一部分，所以悬停整行标题就会变红。 */
.news-page .nl_link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.news-page .nl_link:hover {
	color: #da251c;
}

.news-page .nl_text {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ============ 操作列 ============ */

.news-page .nl_act {
	text-align: right;
}

/* 「详情」形似按钮，实际点击由整行热区接管，这里只负责视觉提示。
   定宽 + 内容居中，让每一行的按钮等宽、也与表头「操作」对齐 */
.news-page .nl_more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: var(--nl-act-w);
	height: 30px;
	box-sizing: border-box;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	background: #fff;
	color: #666;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.news-page .nl_arrow {
	display: block;
	transition: transform 0.2s ease;
}

.news-page .news_item:hover .nl_more {
	border-color: #da251c;
	background: #fff6f5;
	color: #da251c;
}

.news-page .news_item:hover .nl_arrow {
	transform: translateX(2px);
}

/* 列表底部：总数 + 分页 */
.news-page .news_list_foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 22px;
}

.news-page .news_total {
	color: #888;
	font-size: 14px;
}

.news-page .news_total b {
	color: #da251c;
	font-weight: normal;
}

.news-page .news_total_page {
	margin-left: 10px;
}

.news-page .news_pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.news-page .news_pager_item a,
.news-page .news_pager_item span {
	display: inline-block;
	min-width: 38px;
	height: 36px;
	padding: 0 12px;
	box-sizing: border-box;
	border: 1px solid #e4e4e4;
	border-radius: 4px;
	background: #fff;
	color: #555;
	font-size: 14px;
	line-height: 34px;
	text-align: center;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.news-page .news_pager_item a:hover {
	border-color: #da251c;
	color: #da251c;
}

.news-page .news_pager_item .current {
	border-color: #da251c;
	background: #da251c;
	color: #fff;
}

.news-page .news_pager_item .dots {
	border: 0;
	color: #bbb;
}

.news-page .news_empty {
	padding: 80px 0;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fff;
	color: #999;
	font-size: 15px;
	text-align: center;
}

/* ================= 详情 ================= */

/* 旧站 .news_detail 是 float + 固定宽，这里按卡片重排 */
.news-single .news_detail_box {
	width: 1000px;
	margin: 0 auto;
}

.news-single .news_detail {
	float: none;
	width: auto;
	margin-top: 0;
	padding: 30px 36px 34px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	color: #333;
	font-size: 15px;
	line-height: 1.95;
}

.news-single .news_detail_head {
	padding-bottom: 18px;
	margin-bottom: 24px;
	border-bottom: 1px dashed #ececec;
	text-align: center;
}

.news-single .news_detail_title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: normal;
	line-height: 1.5;
	color: #1f1f1f;
}

.news-single .news_detail_meta {
	color: #999;
	font-size: 14px;
	line-height: 24px;
}

.news-single .news_detail_meta time {
	font-variant-numeric: tabular-nums;
}

.news-single .news_detail_cat {
	display: inline-block;
	margin-left: 10px;
	padding: 1px 10px;
	border-radius: 10px;
	background: #fdecea;
	color: #c0271c;
	font-size: 12px;
	line-height: 20px;
}

/* 正文排版 */
.news-single .news_content p {
	margin: 0 0 16px;
}

.news-single .news_content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.news-single .news_content picture {
	display: contents;
}

.news-single .news_content .news-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
	gap: 12px;
	margin: 22px 0;
}

.news-single .news_content .news-shot {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	line-height: 0;
	cursor: zoom-in;
}

/* 缩略图统一 4:3，避免竖图横图混排时高低参差；点开看的是原图 */
.news-single .news_content .news-shot img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.35s ease;
}

.news-single .news_content .news-shot:hover img {
	transform: scale(1.04);
}

.news-single .news_content .news-video {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 22px 0;
	border-radius: 6px;
	background: #000;
}

/* 上一篇 / 下一篇 */
.news-single .news_nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px dashed #ececec;
}

.news-single .news_nav_item {
	display: block;
	padding: 12px 16px;
	border: 1px solid #eee;
	border-radius: 6px;
	background: #fcfcfc;
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.news-single a.news_nav_item:hover {
	border-color: #da251c;
	background: #fffaf3;
}

.news-single .news_nav_item span {
	display: block;
	margin-bottom: 4px;
	color: #999;
	font-size: 13px;
}

.news-single .news_nav_item em {
	display: block;
	overflow: hidden;
	color: #333;
	font-size: 15px;
	font-style: normal;
	line-height: 24px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.news-single .news_nav_item.is-next {
	text-align: right;
}

.news-single .news_nav_item.is-empty em {
	color: #c8c8c8;
}

.news-single .news_back {
	margin: 20px 0 0;
	text-align: center;
}

.news-single .news_back a {
	color: #da251c;
	font-size: 14px;
}

.news-single .news_back a:hover {
	text-decoration: underline;
}

/* ================= 图片放大（灯箱） ================= */

.news_lb {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.86);
}

.news_lb img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.news_lb_close {
	position: absolute;
	top: 16px;
	right: 22px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 24px;
	line-height: 42px;
	cursor: pointer;
}

.news_lb_close:hover {
	background: rgba(255, 255, 255, 0.26);
}

body.news_lb_open {
	overflow: hidden;
}

/* ================= 窄屏 ================= */

@media (max-width: 1040px) {
	.news-page .news_wrap,
	.news-single .news_detail_box {
		width: 100%;
		max-width: 1000px;
		padding-left: 14px;
		padding-right: 14px;
		box-sizing: border-box;
	}
}

@media (max-width: 780px) {
	.news-page .news_list_head {
		display: none;
	}

	.news-page .news_item {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"date act"
			"title title";
		align-items: center;
		min-height: 0;
		padding: 14px 16px;
		row-gap: 7px;
	}

	.news-page .news_item .nl_date {
		grid-area: date;
		color: #999;
		font-size: 13px;
	}

	.news-page .news_item .nl_title {
		grid-area: title;
	}

	.news-page .news_item .nl_text {
		white-space: normal;
	}

	.news-page .news_item .nl_act {
		grid-area: act;
	}

	.news-page .news_list_foot {
		flex-direction: column;
		align-items: flex-start;
	}

	.news-single .news_detail {
		padding: 20px 18px 24px;
	}

	.news-single .news_detail_title {
		font-size: 20px;
	}

	.news-single .news_nav {
		grid-template-columns: 1fr;
	}

	.news-single .news_nav_item.is-next {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.news-page .news_item,
	.news-page .news_item::before,
	.news-page .nl_link,
	.news-page .nl_more,
	.news-page .nl_arrow,
	.news-page .news_pager_item a,
	.news-single .news_content .news-shot img,
	.news-single .news_nav_item {
		transition: none;
	}
}
