/**
 * 典型案例展示（解决方案归档 archive-solution.php 的 .typical-cases-section）
 *
 * 缩放方案（参照 page-careers.css 画布等比）：PC 段所有承重尺寸 = calc(N × var(--u))，
 * --u = 100vw/1920（本文件挂在 .solution-archive 上——该页模板用 div.solution-archive 包裹、
 * 无 main 元素，复用不了 main.css 的 .nyocor-u-page，故在此自行声明）；
 * 浏览器 Ctrl+滚轮缩放（视口变化）时整页等比缩放，版式不变形。
 * 仅装饰性细节（发丝线/圆角/阴影/加载圈/悬浮提示）保留 px；
 * 窄屏 ≤768/≤480 断点接管为原固定值（旧 1400/1024 中间断点已并入）。
 * 模块无 JS 尺寸依赖（case-showcase.js 只操作不存在的 #case-data-container，不读本区块几何）。
 */

/* === 容器：全宽 + 承载 --u 缩放单位 === */
.solution-archive {
	--u: calc(100vw / 1920);
}

/* 解决方案页面 - 容器左右顶满 */
.solution-archive .container {
	max-width: 100%;
	padding: 0;
	margin: 0;
	width: 100%;
}

.typical-cases-section {
	padding: 0;
	background: #fff;
}

/* 案例展示容器（全宽，无 1920 封顶） */
.case-showcase-container {
	max-width: 100%;
	margin: 0 auto;
}

/* 案例展示区域：PC 高度 = 设计稿 1200px 等比（背景图 cover 铺满） */
.case-display {
	position: relative;
	width: 100%;
	height: calc(1200 * var(--u));
	margin: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* 典型案例标题 - 悬浮在背景图上方 */
.case-display-title {
	position: absolute;
	top: calc(60 * var(--u));
	left: calc(128 * var(--u));
	font-family: var(--font);
	font-size: max(22px, calc(47.5 * var(--u)));
	font-weight: 500;
	line-height: calc(57 * var(--u));
	letter-spacing: 0;
	color: rgba(255, 255, 255, 1);
	text-align: left;
	font-style: normal;
	z-index: 10;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 案例图片隐藏（因为用作背景） */
.case-image-wrapper {
	display: none;
}

/* ===== 案例信息元素定位系统 ===== */

/* PC 段公共定位：绝对定位钉在背景图上，left 128px @1920 等比；
   ≤768 交给手机断点的文档流布局（保留原静态堆叠表现） */
@media (min-width: 769px) {
	.case-display .case-title,
	.case-display .metric-item,
	.case-display .case-description,
	.case-display .case-detail-link {
		position: absolute;
		left: calc(128 * var(--u));
		z-index: 12;
		color: #fff;
	}
}

/* 项目标题 - 在背景图上 */
.case-display .case-title {
	top: calc(170 * var(--u)); /* 向上调整50px (原230px) */
	height: auto;
	font-family: var(--font);
	font-size: max(22px, calc(47.5 * var(--u)));
	font-weight: 500;
	line-height: calc(57 * var(--u));
	letter-spacing: 0;
	color: rgba(255, 255, 255, 1);
	text-align: left;
	font-style: normal;
	margin: 0 0 calc(30 * var(--u)) 0;  /* 移除左侧margin，使用统一的 left 定位 */
	width: 100%;
	max-width: none;
}

/* 案例指标 */
.case-display .metric-item {
	top: calc(270 * var(--u)); /* 向上调整50px (原330px) */
	display: flex;
	flex-direction: column;  /* 纵向排列，两行显示 */
	align-items: flex-start;
	gap: calc(8 * var(--u));
	justify-content: flex-start;
	margin-bottom: calc(30 * var(--u));
}

.metric-label {
	/* 占地面积共计 - Figma设计规范 */
	font-family: var(--font);
	font-style: normal;
	font-size: max(18px, calc(30.4 * var(--u)));
	font-weight: 500;
	line-height: calc(37 * var(--u));
	letter-spacing: 0;
	color: rgba(255, 255, 255, 1);
	text-align: left;
	width: calc(234.65 * var(--u));
	height: calc(37 * var(--u));
	display: inline-block;
	flex-shrink: 0;
}

.metric-value {
	/* 5000亩 - Figma设计规范 */
	font-family: var(--font);
	font-style: normal;
	font-size: max(18px, calc(30.4 * var(--u)));
	font-weight: 600;
	line-height: calc(37 * var(--u));
	letter-spacing: 0;
	color: rgba(255, 255, 255, 1);
	text-align: left;
	width: calc(298 * var(--u));
	height: calc(70 * var(--u));  /* 调整高度为70px */
	display: inline-block;
	flex-shrink: 0;
}

/* 案例描述 */
.case-display .case-description {
	top: calc(400 * var(--u)); /* 向上调整50px (原460px) */
	font-family: var(--font);
	font-style: normal;
	font-size: max(15px, calc(24.7 * var(--u)));
	font-weight: 400;           /* Regular */
	line-height: calc(40.85 * var(--u));
	letter-spacing: 0;
	color: rgba(255, 255, 255, 1);
	text-align: left;
	width: calc(670.7 * var(--u));
	height: calc(205 * var(--u));
	max-width: calc(670.7 * var(--u));
	flex: 0 0 auto;
	display: block;
}

.case-description p {
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

/* 查看详情链接 - 隐藏 */
.case-display .case-detail-link {
	display: none; /* 隐藏查看详情按钮 */
}

.case-detail-link:hover {
	background: #1D5494;  /* 深绿色hover效果 */
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 131, 61, 0.5);  /* 绿色阴影 */
}

/* 案例导航 - 悬浮在图片上 - Figma设计规范 */
.case-navigation {
	position: absolute;
	bottom: calc(510 * var(--u));
	left: 50%;
	transform: translateX(-50%);
	width: calc(1637 * var(--u)); /* Figma设计: Rectangle 9 */
	height: calc(88 * var(--u));
	max-width: 90%;
	z-index: 15;
	padding: 0 calc(40 * var(--u));
	background: rgba(254, 254, 254, 1); /* Figma设计 */
	border-radius: 94.05px; /* Figma设计: 完全圆角 */
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: calc(20 * var(--u));
}

/* 左右箭头按钮 */
.case-nav-arrow {
	width: calc(50 * var(--u));
	height: calc(50 * var(--u));
	border-radius: 50%;
	background: rgba(0, 131, 61, 0.1);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: max(15px, calc(24 * var(--u)));
	color: #2A6BB5;
	transition: all 0.3s;
	flex-shrink: 0;
}

.case-nav-arrow:hover {
	background: rgba(0, 131, 61, 0.2);
	transform: scale(1.1);
}

.case-nav-arrow:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.case-nav-arrow.hidden {
	display: none;
}

.nav-container {
	display: flex;
	gap: 0;
	align-items: center;
	width: calc(1327 * var(--u)); /* 匹配nav-buttons-wrapper宽度 */
	margin: 0 auto;
	padding: 0;
	position: relative;
	justify-content: center;
}

/* 按钮包裹盒子 - Frame 4 */
.nav-buttons-wrapper {
	width: calc(1327 * var(--u));
	height: calc(27 * var(--u));
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	gap: calc(68 * var(--u));
	position: relative;
}

/* 每列容器 */
.nav-buttons-wrapper .case-nav-btn {
	position: relative;
	flex-shrink: 0;
}

/* 列之间的分隔线 - 使用68px间距，竖线居中于间距 */
.nav-buttons-wrapper .case-nav-btn:not(:last-child)::after {
	content: '';
	position: absolute;
	right: calc(-34 * var(--u)); /* 68px间距的一半 */
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: calc(28 * var(--u));
	background: rgba(116, 116, 116, 0.6);
}

.case-nav-btn {
	/* Figma设计: Rectangle 10 */
	width: calc(176 * var(--u));
	height: calc(63 * var(--u));
	padding: 0 calc(12 * var(--u));
	border: none;
	background: transparent;
	cursor: pointer;
	transition: all 0.3s;

	/* Figma字体规范 */
	font-family: var(--font);
	font-style: normal;
	font-size: max(15px, calc(22.8 * var(--u)));
	font-weight: 700; /* Bold */
	line-height: calc(28 * var(--u));
	letter-spacing: 0;
	text-align: center;
	color: rgba(116, 116, 116, 1); /* 默认灰色 */

	border-radius: 189.05px; /* 圆角 */
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	overflow: visible; /* 改为visible让tooltip可见 */
	text-overflow: ellipsis;
	flex-shrink: 0;
	position: relative;
}

/* 鼠标悬浮显示完整内容的提示（浮层装饰，保持 px） */
.case-nav-btn:hover::before {
	content: attr(data-title);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.9);
	color: #fff;
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
	border-radius: 4px;
	z-index: 9999;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	min-width: 50px;
	text-align: center;
}

.case-nav-btn:hover {
	background: rgba(0, 131, 61, 0.1);
	color: rgba(0, 131, 61, 1);
}

.case-nav-btn.active {
	/* 选中状态样式 */
	background: rgba(50, 195, 108, 1); /* 绿色背景 */
	color: rgba(255, 255, 255, 1); /* 白色字体 */
	font-weight: 700;
}

/* ===== 移动设备（≤768：原手机断点固定值接管，含旧 1400/1024 断点的布局职责） ===== */
@media (max-width: 768px) {
	.case-display {
		height: 600px;
	}

	.case-display-title {
		top: 20px;
		left: 20px;
		font-size: 24px;
		line-height: 29px;
	}

	.case-display .case-title {
		top: 70px; /* 移动标题位置调整 */
		left: 20px;
		right: 20px;
		font-size: 24px;
		line-height: 29px;
	}

	.case-display .metric-item {
		top: 140px; /* 移动指标位置调整 */
		left: 20px;
		right: 20px;
	}

	.case-display .case-description {
		top: 230px; /* 移动描述位置调整 */
		left: 20px;
		right: 20px;
		font-size: 16px;
		line-height: 1.5;
		width: auto;
		max-width: none;
		height: auto;
	}

	.case-navigation {
		bottom: 220px;
		padding: 12px 16px;
		width: calc(100% - 40px);
		left: 20px;
		transform: none;
	}

	/* 调整指标样式 */
	.metric-label,
	.metric-value {
		font-size: 18px;
		line-height: 24px;
	}

	.metric-label {
		width: auto;
		height: auto;
	}

	.metric-value {
		width: auto;
		height: auto;
	}

	.nav-container {
		gap: 0;
		max-width: 700px; /* 7列 × 100px */
	}

	/* 等比画布下 1327px 设计宽在窄屏会塌缩，放开为随容器自适应 */
	.nav-buttons-wrapper {
		width: auto;
		height: auto;
		gap: 12px;
	}

	.nav-buttons-wrapper .case-nav-btn:not(:last-child)::after {
		right: -6px;
		height: 20px;
	}

	.case-navigation {
		bottom: 220px;
		padding: 0 16px;
		width: calc(100% - 32px);
		height: 70px;
	}

	.case-nav-btn {
		font-size: 16px;
		width: 100px;
		height: 45px;
		line-height: 20px;
	}

	.case-nav-arrow {
		width: 35px;
		height: 35px;
		font-size: 18px;
	}
}

/* 小屏移动设备 */
@media (max-width: 480px) {
	.case-display {
		height: 500px;
	}

	.case-display .case-title {
		top: 60px; /* 小屏标题位置调整 */
	}

	.case-display .metric-item {
		top: 130px; /* 小屏指标位置调整 */
	}

	.case-display .case-description {
		top: 220px; /* 小屏描述位置调整 */
	}

	.case-display .case-detail-link {
		top: 440px;
	}

	.case-navigation {
		bottom: 210px;
		padding: 10px 12px;
		width: calc(100% - 32px);
		left: 16px;
	}

	.case-nav-btn {
		padding: 8px 16px;
		font-size: 13px;
	}
}

/* ===== 加载状态样式（转圈浮层装饰，保持 px） ===== */
.case-display.loading {
	opacity: 0.7;
	pointer-events: none;
	position: relative;
}

.case-display.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50px;
	height: 50px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	animation: case-loading-spin 1s linear infinite;
	z-index: 1000;
}

@keyframes case-loading-spin {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* 加载时禁用导航按钮 */
.case-display.loading .case-navigation {
	pointer-events: none;
}

.case-display.loading .case-nav-arrow {
	opacity: 0.5;
	cursor: not-allowed;
}
