/* ========================================
   用户案例页 - 独立样式
   ======================================== */

/* ---------- 页面顶部 Hero ---------- */
.cases-page-hero {
	background: linear-gradient(135deg, #1e3a8a 0%, #10b981 70%, #3b82f6 100%);
	color: white;
	text-align: center;
	padding: 140px 0 60px;
	position: relative;
	overflow: hidden;
}

.cases-page-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
	opacity: 0.5;
}

.cases-page-hero h1 {
	font-size: 2.8rem;
	font-weight: 800;
	margin-bottom: 15px;
	position: relative;
}

.cases-page-hero p {
	font-size: 1.2rem;
	opacity: 0.9;
	margin-bottom: 25px;
	position: relative;
}

.cases-page-hero .back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: white;
	opacity: 0.8;
	font-size: 14px;
	position: relative;
	transition: opacity 0.3s;
}

.cases-page-hero .back-link:hover {
	opacity: 1;
}

/* ---------- 分类筛选 ---------- */
.cases-filter {
	background: white;
	padding: 20px 0;
	position: sticky;
	top: 72px;
	z-index: 100;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.filter-tabs {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.filter-btn {
	background: #f1f5f9;
	border: 2px solid transparent;
	padding: 10px 22px;
	border-radius: 25px;
	font-size: 15px;
	font-weight: 500;
	color: #64748b;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.filter-btn i {
	font-size: 13px;
}

.filter-btn:hover {
	border-color: #10b981;
	color: #10b981;
	background: rgba(16, 185, 129, 0.05);
}

.filter-btn.active {
	background: #10b981;
	color: white;
	border-color: #10b981;
}

.filter-btn.active i {
	color: white;
}

/* ---------- 案例图库 ---------- */
.cases-gallery {
	background: #f8fafc;
	padding: 50px 0 80px;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.gallery-item {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
	transition: all 0.4s ease;
	cursor: pointer;
}

.gallery-item:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.gallery-item.hidden {
	display: none;
}

.gallery-img {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e2e8f0;
	position: relative;
}

.gallery-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img img {
	transform: scale(1.08);
}

/* 图片点击放大遮罩 */
.gallery-img::after {
	content: '\f00e';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 28px;
	color: white;
	opacity: 0;
	transition: opacity 0.3s;
	background: rgba(0, 0, 0, 0.4);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-item:hover .gallery-img::after {
	opacity: 1;
}

.gallery-info {
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.gallery-category {
	font-weight: 600;
	color: #1e3a8a;
	font-size: 14px;
}

.gallery-tag {
	background: linear-gradient(135deg, #10b981, #3b82f6);
	color: white;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
}

.gallery-desc {
	color: #94a3b8;
	font-size: 13px;
}

/* 无结果提示 */
.gallery-empty {
	text-align: center;
	padding: 80px 20px;
	color: #94a3b8;
}

.gallery-empty i {
	font-size: 48px;
	margin-bottom: 15px;
	display: block;
}

.gallery-empty p {
	font-size: 16px;
}

/* ---------- 底部 CTA ---------- */
.cases-cta {
	background: linear-gradient(135deg, #1e3a8a, #10b981);
	padding: 70px 0;
	text-align: center;
	color: white;
}

.cases-cta h2 {
	color: white;
	font-size: 2rem;
	margin-bottom: 10px;
}

.cases-cta p {
	opacity: 0.85;
	font-size: 16px;
	margin-bottom: 30px;
}

.cta-buttons {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 32px;
	border-radius: 30px;
	font-weight: 700;
	font-size: 16px;
	transition: all 0.3s ease;
}

.cta-btn.primary {
	background: linear-gradient(135deg, #ff6b6b, #ffd93d);
	color: white;
	box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.cta-btn.primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.cta-btn.secondary {
	background: transparent;
	color: white;
	border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-btn.secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: white;
	transform: translateY(-3px);
}

/* ---------- 图片灯箱 ---------- */
.lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
}

.lightbox.active {
	display: flex;
}

.lightbox-img {
	max-width: 90%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 25px;
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	border-radius: 50%;
	color: white;
	font-size: 22px;
	cursor: pointer;
	transition: background 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.lightbox-caption {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.8);
	font-size: 15px;
	text-align: center;
	background: rgba(0, 0, 0, 0.4);
	padding: 8px 20px;
	border-radius: 20px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.cases-page-hero {
		padding: 120px 0 50px;
	}

	.cases-page-hero h1 {
		font-size: 2rem;
	}

	.cases-page-hero p {
		font-size: 1rem;
	}

	.filter-tabs {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		gap: 8px;
		padding-bottom: 8px;
	}

	.filter-btn {
		white-space: nowrap;
		padding: 8px 16px;
		font-size: 13px;
	}

	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.cta-buttons {
		flex-direction: column;
		align-items: center;
	}

	.cta-btn {
		width: 80%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.gallery-grid {
		grid-template-columns: 1fr;
	}
}
