/* News Center Section - 储能检测新闻中心模块（严格对照设计图） */

.news-center {
	position: relative;
	padding: clamp(40px, 5.33vw, 64px) 0 clamp(48px, 6.67vw, 80px);
	background: #ffffff;
}

.news-center__inner {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(16px, 2vw, 24px);
}

/* ========== 顶部标题区 ========== */
.nc-header {
	text-align: center;
	margin-bottom: clamp(20px, 2.33vw, 28px);
}

.nc-header__title {
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	color: #1f3a2a;
	line-height: 1.3;
	letter-spacing: 1px;
}

.nc-header__title-accent {
	color: #0f8c44;
}

.nc-header__subtitle {
	margin: 10px 0 0;
	font-size: clamp(14px, 1.33vw, 16px);
	color: #6b7a72;
	line-height: 1.6;
	letter-spacing: 0.5px;
}

/* ========== Tab 栏 ========== */
.nc-tabs-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	gap: 16px;
	flex-wrap: wrap;
}

.nc-tabs {
	display: inline-flex;
	align-items: stretch;
}

/* ---- 左侧 3 个 Tab 组合 ---- */
.nc-tabs--left {
	flex-shrink: 0;
	/* 容器：白底 + 浅灰边框 + 圆角，三个按钮连为一体 */
	background: #ffffff;
	border: 1px solid #d7e0db;
	border-radius: 8px;
	padding: 0;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(20, 60, 35, 0.05);
}

/* —— Tab 基础（三个并排，高 44，字 15/600，间距 28）默认：白底 + 绿字 —— */
.nc-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: clamp(40px, 3.67vw, 44px);
	padding: 0 clamp(20px, 2.33vw, 28px);
	font-size: clamp(13px, 1.25vw, 15px);
	font-weight: 600;
	line-height: 1;
	color: #0f8c44;
	background: #ffffff;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	user-select: none;
}

/* 三个 Tab 之间的分隔线（默认白底时：1px浅灰色竖线；激活/hover时隐藏避免破坏绿块感） */
.nc-tabs--left .nc-tab:not(:last-child)::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 22px;
	width: 1px;
	background: #dde6e1;
	transition: opacity 0.2s ease;
}
.nc-tabs--left .nc-tab:hover:not(:last-child)::after,
.nc-tabs--left .nc-tab--active:not(:last-child)::after {
	opacity: 0;
}
/* 相邻Tab也激活/hover时，前一个的分隔线也应隐藏 */
.nc-tabs--left .nc-tab:has(+ .nc-tab:hover):not(:last-child)::after,
.nc-tabs--left .nc-tab:has(+ .nc-tab--active):not(:last-child)::after {
	opacity: 0;
}

/* —— 第 1 个 Tab（nc-tab--first）：左圆角 —— */
.nc-tab--first {
	border-top-left-radius: 7px;
	border-bottom-left-radius: 7px;
}

/* —— 最后 1 个 Tab（nc-tab--last）：右圆角 —— */
.nc-tab--last {
	border-top-right-radius: 7px;
	border-bottom-right-radius: 7px;
}

/* —— 图标：统一 stroke=currentColor，尺寸 18×18（颜色随文字绿/白自动切换） —— */
.nc-tab__icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	display: inline-block;
}

/* Tab没有图标时：去掉图标占位空间，让文字左右居中对称 */
.nc-tab--no-icon {
	gap: 0;
	padding-left: 28px; /* 与 padding-right 对称，默认 padding 是 0 28px */
}

/* Tab 区域无任何子分类时的提示条（保持与Tab同高对齐） */
.nc-empty--tabs {
	margin: 0;
	height: 44px;
	padding: 0 18px;
	font-size: 13px;
	color: #8a4b4b;
	background: #fff5f5;
	border: 1px dashed #e5bbbb;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
}

/* =========================================================
   nc-tab hover / active —— 鼠标停留 & 激活：绿底 + 白字
   · 激活：额外加 4px 全宽白色渐变底部下划线 + 字体加粗 + 微抬投影
   ========================================================= */
.nc-tab--active::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	border-radius: 3px 3px 0 0;
}

/* —— hover：绿底 + 白字 —— */
.nc-tab--green:hover {
	color: #ffffff;
	background: linear-gradient(180deg, #1db259 0%, #0e823e 100%);
}

/* —— active：更亮绿底 + 白字 + 加粗 + 白渐变下划线 + 外投影 —— */
.nc-tab--green.nc-tab--active {
	color: #ffffff;
	background: linear-gradient(180deg, #26c26a 0%, #17a657 100%);
	box-shadow: 0 3px 10px rgba(15, 140, 68, 0.20);
	font-weight: 700;
}
.nc-tab--green.nc-tab--active::before {
	background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 50%, #ffffff 100%);
	box-shadow: 0 -1px 3px rgba(255, 255, 255, 0.35);
}

/* —— 激活态 Tab 被 hover 时：仍保留激活态视觉（不被普通 hover 覆盖） —— */
.nc-tab--green.nc-tab--active:hover {
	background: linear-gradient(180deg, #26c26a 0%, #17a657 100%);
}

/* ---- 右侧：认证案例 Tab（独立按钮，圆角 + 阴影 + 星星图标） ---- */
.nc-tabs--right {
	flex-shrink: 0;
}

.nc-tab--case {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 30px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(180deg, #1aa251 0%, #0f8c44 100%);
	border: none;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(15, 140, 68, 0.25);
	transition: all 0.25s ease;
	white-space: nowrap;
}

.nc-tab--case:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(15, 140, 68, 0.35);
	background: linear-gradient(180deg, #1db259 0%, #0e823e 100%);
}

/* 星星：用 SVG 代替 ★ 字符，更清晰一致 */
.nc-tab__star {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.nc-tab--case .nc-tab__star::before {
	content: '';
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12 2.5l2.9 6.2 6.6.8-4.8 4.7 1.2 6.6L12 17.6 6.1 20.8l1.2-6.6L2.5 9.5l6.6-.8L12 2.5z'/></svg>");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

/* ========== 内容区 左右两栏 ========== */
.nc-content {
	display: flex;
	gap: 28px;
	align-items: stretch;
}

/* ---- 左侧 65% ---- */
.nc-left {
	flex: 0 0 65%;
	max-width: 65%;
	min-width: 0;
	position: relative;
}

/* 每组子分类文章容器：默认隐藏，只有 --active 时才显示；
   内部结构保持原有的 flex column + gap 20px，无缝衔接原有布局 */
.nc-left-pane {
	display: none;
	flex-direction: column;
	gap: 20px;
}
.nc-left-pane--active {
	display: flex;
}

/* ---- 右侧 35% ---- */
.nc-right {
	flex: 0 0 calc(35% - 28px);
	max-width: calc(35% - 28px);
	min-width: 0;
}

/* ========== 左侧：大文章卡 ========== */
.nc-featured {
	display: flex;
	gap: clamp(16px, 2vw, 24px);
	padding: clamp(16px, 2vw, 24px);
	background: #ffffff;
	border: 1px solid #e8ecea;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(20, 60, 35, 0.04);
	transition: all 0.3s ease;
	/* 作为 <a>：清除默认链接样式 */
	text-decoration: none;
	color: inherit;
}

.nc-featured:hover {
	box-shadow: 0 6px 22px rgba(15, 140, 68, 0.1);
	border-color: #cfe6d8;
	transform: translateY(-2px);
}

.nc-featured__image {
	flex: 0 0 42%;
	max-width: 42%;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	overflow: hidden;
	display: block;
	background: #f0f4f2;
}

.nc-featured__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.nc-featured:hover .nc-featured__image img {
	transform: scale(1.04);
}

.nc-featured__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(8px, 1vw, 12px);
}

.nc-featured__title {
	margin: 0;
	font-size: clamp(15px, 1.58vw, 19px);
	font-weight: 700;
	line-height: 1.45;
	color: #1f3a2a;
	transition: color 0.2s ease;
}

/* 整条卡片 hover 时标题变色（替换原先内部 a:hover） */
.nc-featured:hover .nc-featured__title {
	color: #0f8c44;
}

.nc-featured__excerpt {
	margin: 0;
	font-size: clamp(13px, 1.17vw, 14px);
	line-height: 1.75;
	color: #5a6961;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nc-featured__more {
	margin-top: auto;
	align-self: flex-end;
	font-size: clamp(13px, 1.17vw, 14px);
	font-weight: 600;
	color: #0f8c44;
	letter-spacing: 1px;
	transition: all 0.2s ease;
}

/* 整条卡片 hover 时 more 变化（替换原先内部 a:hover） */
.nc-featured:hover .nc-featured__more {
	color: #0e7c3d;
	letter-spacing: 2px;
}

/* ========== 左侧：小文章两列网格 ========== */
.nc-small-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(10px, 1.33vw, 16px) clamp(18px, 2.33vw, 28px);
}

.nc-small-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 16px 14px 10px;
	background: #ffffff;
	border-bottom: 1px dashed #d7e0db;
	transition: all 0.25s ease;
	/* 作为 <a>：清除默认链接样式 */
	text-decoration: none;
	color: inherit;
}

.nc-small-item:hover {
	background: #f6faf7;
	border-bottom-color: #0f8c44;
	transform: translateX(2px);
}

.nc-small-item__dot {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eaf7ef;
	border-radius: 50%;
}

.nc-small-item__dot svg {
	width: 12px;
	height: 12px;
	display: block;
}

.nc-small-item__body {
	flex: 1;
	min-width: 0;
}

.nc-small-item__title {
	margin: 0;
	font-size: clamp(13px, 1.21vw, 14.5px);
	font-weight: 600;
	line-height: 1.5;
	color: #1f3a2a;
	transition: color 0.2s ease;
}

/* 整条 hover 时标题变色（替换原先内部 a:hover） */
.nc-small-item:hover .nc-small-item__title {
	color: #0f8c44;
}

.nc-small-item__excerpt {
	margin: 6px 0 0;
	font-size: clamp(12px, 1.08vw, 13px);
	line-height: 1.6;
	color: #7a8880;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ========== 右侧：无缝循环滚动区 ========== */
.nc-right {
	background: #ffffff;
	border: 1px solid #e8ecea;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(20, 60, 35, 0.04);
	overflow: hidden;
}

/* 滚动容器：固定高度 + overflow:hidden，只显示视口内部分 */
.nc-scroll {
	height: 480px;
	overflow: hidden;
	position: relative;
	mask-image: linear-gradient(
		180deg,
		transparent 0,
		#000 24px,
		#000 calc(100% - 24px),
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		180deg,
		transparent 0,
		#000 24px,
		#000 calc(100% - 24px),
		transparent 100%
	);
}

/* 滚动轨道：两份列表纵向拼接，translateY 做位移 */
.nc-scroll__track {
	position: relative;
	will-change: transform;
}

.nc-scroll__list {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.nc-scroll__list--clone {
	/* 视觉辅助已足够，aria-hidden=true 防止屏幕阅读器朗读两次 */
}

.nc-scroll__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 16px 22px 16px 18px;
	border-bottom: 1px dashed #d7e0db;
	transition: background 0.25s ease;
	/* 作为 <a>：清除默认链接样式 */
	text-decoration: none;
	color: inherit;
}

/* 原先 nc-scroll__item 是 li，现在是 li 内的 a，所以最后一条改由父 li 指定 */
.nc-scroll__list li:last-child .nc-scroll__item {
	border-bottom: none;
}

.nc-scroll__item:hover {
	background: #f6faf7;
}

.nc-scroll__dot {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	margin-top: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eaf7ef;
	border-radius: 50%;
}

.nc-scroll__dot svg {
	width: 14px;
	height: 14px;
	display: block;
}

.nc-scroll__body {
	flex: 1;
	min-width: 0;
}

.nc-scroll__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	color: #1f3a2a;
	transition: color 0.2s ease;
}

/* 整条 hover 时标题变色（替换原先内部 a:hover） */
.nc-scroll__item:hover .nc-scroll__title {
	color: #0f8c44;
}

.nc-scroll__excerpt {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #6b7a72;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ========== 空状态 ========== */
.nc-empty {
	padding: 24px;
	font-size: 14px;
	color: #9aaca2;
	background: #f8faf9;
	border-radius: 8px;
	line-height: 1.7;
}

/* ========== 平板/手机端：右侧内容区顶部按钮（默认桌面端隐藏） ========== */
.nc-right-header {
	display: none;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1199px) {
	/* ========== 992~1199px：完全保持原结构（和截图一致），仅尺寸微调 ========== */
	.news-center {
		padding: 52px 0 64px;
	}

	.nc-header__title {
		font-size: 32px;
	}

	/* Tab尺寸稍微缩小，但不改变布局结构（仍三个默认宽度 + 右侧绿色按钮） */
	.nc-tab {
		height: 42px;
		padding: 0 20px;
		font-size: 14px;
	}
	.nc-tab--no-icon {
		padding-left: 20px;
		padding-right: 20px;
	}
	.nc-tab__icon {
		width: 16px;
		height: 16px;
	}
	.nc-tab--case {
		height: 42px;
		padding: 0 22px;
		font-size: 14px;
	}

	.nc-featured {
		gap: 20px;
		padding: 22px;
	}
	.nc-featured__title {
		font-size: 18px;
	}

	.nc-scroll {
		height: 440px;
	}
}

@media (max-width: 991px) {
	/* ========== ≤991px：一次性触发所有结构变化（Tab平分+按钮下移+上下排列+隐藏图片） ========== */
	.news-center {
		padding: 44px 0 56px;
	}

	.nc-header__title {
		font-size: 28px;
	}

	.nc-header__subtitle {
		font-size: 15px;
	}

	/* 1. Tab栏：隐藏右侧桌面端绿色按钮，左侧三个Tab独占整行平分 */
	.nc-tabs-bar {
		flex-direction: row;
		align-items: stretch;
		gap: 0;
	}
	.nc-tabs-bar .nc-tabs--right-desktop {
		display: none;
	}
	.nc-tabs-bar .nc-tabs--left {
		flex: 1 1 100%;
		max-width: 100%;
		display: flex;
	}
	.nc-tabs-bar .nc-tabs--left .nc-tab {
		flex: 1;
		justify-content: center;
		min-width: 0;
		height: 40px;
		padding: 0 14px;
		font-size: 14px;
	}
	.nc-tabs-bar .nc-tab--no-icon {
		padding-left: 14px;
		padding-right: 14px;
	}
	.nc-tabs-bar .nc-tab__icon {
		width: 16px;
		height: 16px;
	}
	.nc-right .nc-right-header .nc-tab--case {
		height: 40px;
		padding: 0 24px;
		font-size: 15px;
	}

	/* 2. 右侧内容区顶部：显示绿色按钮（居中） */
	.nc-right .nc-right-header {
		display: flex;
		justify-content: center;
		padding: 20px 22px 12px;
	}

	/* 3. 内容区：上下排列（左侧内容在上，右侧<按钮+滚动>在下） */
	.nc-content {
		flex-direction: column;
		gap: 24px;
	}
	.nc-content .nc-left,
	.nc-content .nc-right {
		flex-basis: 100%;
		max-width: 100%;
	}

	.nc-scroll {
		height: 420px;
	}

	.nc-featured {
		gap: 16px;
		padding: 18px;
	}
	.nc-featured__title {
		font-size: 16px;
	}

	/* 4. 隐藏大文章卡片图片（用ID+父子选择器提高优先级） */
	#ncLeftPanes .nc-featured > .nc-featured__image {
		display: none;
		flex: 0 0 0;
		max-width: 0;
		width: 0;
		height: 0;
		overflow: hidden;
		visibility: hidden;
		margin: 0;
		padding: 0;
	}
}

@media (max-width: 767px) {
	.news-center {
		padding: 36px 0 44px;
	}

	.news-center__inner {
		padding: 0 16px;
	}

	.nc-header__title {
		font-size: 24px;
	}

	.nc-header__subtitle {
		font-size: 14px;
	}

	/* 手机：Tab可以换行，每行的Tab平分该行宽度 */
	.nc-tabs-bar .nc-tabs--left {
		flex-wrap: wrap;
	}
	.nc-tabs-bar .nc-tabs--left .nc-tab {
		flex: 1 1 0;
		min-width: 0;
		height: 36px;
		padding: 0 12px;
		font-size: 13px;
		gap: 6px;
		justify-content: center;
	}
	.nc-tabs-bar .nc-tab__icon {
		width: 15px;
		height: 15px;
	}
	.nc-tabs-bar .nc-tab--no-icon {
		padding-left: 12px;
		padding-right: 12px;
	}
	.nc-right .nc-right-header .nc-tab--case {
		height: 36px;
		padding: 0 20px;
		font-size: 14px;
	}

	.nc-right .nc-right-header {
		padding: 16px 18px 10px;
	}

	.nc-featured {
		flex-direction: column;
		gap: 16px;
		padding: 16px;
	}

	.nc-featured__title {
		font-size: 16px;
	}

	.nc-small-grid {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.nc-small-item {
		padding: 12px 10px;
	}

	.nc-scroll {
		height: 400px;
	}

	.nc-scroll__item {
		padding: 14px 18px;
	}
}

@media (max-width: 520px) {
	.nc-header__title {
		font-size: 21px;
	}

	.nc-tab {
		height: 32px;
		padding: 0 12px;
		font-size: 12px;
		gap: 5px;
	}

	.nc-tab--no-icon {
		padding-left: 12px;
		padding-right: 12px;
	}

	.nc-tab__icon {
		width: 13px;
		height: 13px;
	}

	.nc-tab--case {
		height: 32px;
		padding: 0 14px;
		font-size: 13px;
	}

	.nc-scroll {
		height: 360px;
	}
}
