/* ==========================================================================
   解决方案页面样式 - 根据UI设计实现
   ========================================================================== */

/* === Hero Banner ===
   容器高度 / 内容块几何 / 标题字号全站统一，由 main.css .nyocor-page-hero 控制
   （section-solution-hero.php 已挂全局类）；本文件仅保留渐变遮罩与白字配色差异 */
.solution-hero {
	/* 高度/布局由 .nyocor-page-hero 提供 */
}

.hero-banner {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	/* 背景图改为绝对定位铺满：容器高度由 .nyocor-page-hero 分档控制，
	   img 若留在文档流会把容器撑高（1920 下曾撑到 729px），高度就不再全站一致 */
}

.hero-content {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
	color: #fff;
}

.hero-title,
.hero-subtitle {
	color: #fff;
}

.hero-subtitle {
	opacity: 0.95;
	max-width: 868px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* === 行业分类筛选区域 === */
.solution-categories-section {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	position: -webkit-sticky; /* Safari<13 */
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-tabs {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 32px 0;
}

.category-tab {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 32px;
	border-radius: 50px;
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
	color: #4b5563;
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.3s ease;
	border: 2px solid transparent;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.category-tab:hover {
	background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
	color: #1f2937;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
	border-color: #3b82f6;
}

.tab-icon {
	font-size: 20px;
	line-height: 1;
}

.tab-text {
	font-size: 16px;
	font-weight: 600;
}

/* === 案例网格区域 === */
.solution-grid-section {
	padding: 80px 0;
	background: #ffffff;
}

.section-header {
	text-align: center;
	margin-bottom: 60px;
}

.section-title {
	font-size: 36px;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 16px;
}

.section-subtitle {
	font-size: 18px;
	color: #6b7280;
	max-width: 700px;
	margin: 0 auto;
}

.solution-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin-bottom: 60px;
}

/* === 卡片样式 - 根据设计图 === */
.solution-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid #e5e7eb;
}

.solution-card:hover {
	transform: translateY(-12px);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
	border-color: #3b82f6;
}

.card-link-wrapper {
	display: block;
	text-decoration: none;
	color: inherit;
}

.card-image {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card:hover .card-image img {
	transform: scale(1.12);
}

.card-overlay {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 60%);
	opacity: 0.6;
	transition: opacity 0.4s ease;
}

.solution-card:hover .card-overlay {
	opacity: 0.8;
}

.card-content {
	padding: 32px 28px;
}

.card-title {
	font-size: 22px;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 20px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 62px;
}

.card-meta {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	padding-bottom: 20px;
	border-bottom: 1px solid #f3f4f6;
}

.meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: #6b7280;
}

.meta-item-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}

.card-excerpt {
	color: #6b7280;
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 24px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 72px;
}

.card-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #3b82f6;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 24px;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border-radius: 8px;
	transition: all 0.3s ease;
}

.solution-card:hover .card-more {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	gap: 12px;
	transform: translateX(4px);
}

.arrow-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.3s ease;
}

.solution-card:hover .arrow-icon {
	transform: translateX(6px);
}

/* === 分页样式 === */
.solution-pagination {
	display: flex;
	justify-content: center;
	margin-top: 60px;
}

.solution-pagination .page-numbers {
	display: flex;
	gap: 12px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.solution-pagination .page-numbers li {
	display: flex;
}

.solution-pagination .page-numbers a,
.solution-pagination .page-numbers span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 0 16px;
	border-radius: 10px;
	background: #fff;
	color: #4b5563;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border: 2px solid #e5e7eb;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.solution-pagination .page-numbers a:hover,
.solution-pagination .page-numbers span:hover {
	border-color: #3b82f6;
	color: #3b82f6;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.solution-pagination .page-numbers .current {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	border-color: #3b82f6;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* === 无结果状态 === */
.no-results {
	text-align: center;
	padding: 80px 20px;
	background: #f9fafb;
	border-radius: 16px;
}

.no-results p {
	font-size: 18px;
	color: #6b7280;
	margin-bottom: 20px;
}

/* === 响应式 === */
@media (max-width: 1200px) {
	.solution-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px;
	}
}

@media (max-width: 768px) {
	/* Hero 字号由 main.css .nyocor-page-hero 统一控制 */
	.section-title { font-size: 28px; }
	.solution-grid { grid-template-columns: 1fr; gap: 24px; }
	.solution-grid-section { padding: 60px 0; }
	.card-content { padding: 24px; }
}

@media (max-width: 480px) {
	.card-content { padding: 20px; }
	.card-title { font-size: 18px; min-height: 50px; }
	.meta-item { font-size: 14px; }
	.card-more { padding: 10px 20px; font-size: 14px; }
}

/* === 解决方案页面页脚样式修复 === */
body.page-template-solution .site-footer,
body.page-template-default.solution .site-footer {
	margin: 40px auto 0 !important; /* 解决方案页面使用正常的页脚下边距 */
	position: relative;
	z-index: 1;
}

/* 确保解决方案页面的主要内容容器有足够的底部空间 */
body.page-template-solution .solution-page-template,
body.page-template-default.solution .solution-page-template {
	padding-bottom: 40px;
}

/* === 解决方案归档页面（archive-solution.php）页脚悬浮样式 === */
body.post-type-archive-solution .site-footer,
body.tax-solution_category .site-footer {
	margin: -420px auto 0; /* 页脚向上偏移进入典型案例区域底部 */
	position: relative;
	z-index: 10;
}

/* 响应式调整 */
@media (max-width: 1200px) {
	body.post-type-archive-solution .site-footer,
	body.tax-solution_category .site-footer {
		margin: -80px auto 0; /* 中等屏幕偏移量 */
	}

	body.post-type-archive-solution .typical-cases-section,
	body.tax-solution_category .typical-cases-section {
		padding-bottom: 140px;
	}
}

@media (max-width: 768px) {
	body.post-type-archive-solution .site-footer,
	body.tax-solution_category .site-footer {
		margin: -60px auto 0; /* 移动端偏移量 */
	}

	body.post-type-archive-solution .typical-cases-section,
	body.tax-solution_category .typical-cases-section {
		padding-bottom: 120px;
	}
}

/* ==========================================================================
   老内核兜底：不支持 aspect-ratio（Chromium 79–87 档 / Safari 12.1–14）。
   padding-top 等比占位 + 图片绝对定位铺满，与 aspect-ratio 渲染一致。
   ========================================================================== */
@supports not (aspect-ratio: 1 / 1) {
	.card-image { height: 0; padding-top: 75%; /* 3 / 4 */ }
	.card-image img { position: absolute; top: 0; left: 0; height: 100%; }
}
