/**
 * 服务案例页样式
 * Gallery/Portfolio风格设计
 */

/* ==================== Hero区域 ==================== */
.fwal-hero {
	position: relative;
	height: 40vh;
	min-height: 320px;
	overflow: hidden;
	background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1929 100%);
}

.fwal-hero-bg {
	position: absolute;
	inset: 0;
	opacity: 0.4;
	mix-blend-mode: luminosity;
}

.fwal-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fwal-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(10, 22, 40, 0.9) 0%,
		rgba(26, 45, 74, 0.7) 60%,
		rgba(10, 22, 40, 0.85) 100%
	);
}

/* 对角装饰 */
.fwal-hero::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 50%;
	height: 100%;
	background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	z-index: 1;
}

.fwal-hero::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--base-color) 0%, var(--accent-color) 50%, transparent 100%);
	z-index: 1;
}

.fwal-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 0 var(--cbasta);
	max-width: 1400px;
	margin: 0 auto;
}

.fwal-hero-title {
	font-family: "Noto Sans SC", sans-serif;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 0.75rem;
}

.fwal-hero-title-line {
	display: inline-block;
	width: 60px;
	height: 4px;
	background: var(--base-color);
	margin-bottom: 1rem;
}

.fwal-hero-subtitle {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.7);
	max-width: 500px;
	line-height: 1.6;
}

/* 分类标签 - 斜角四边形 */
.fwal-hero-tabs {
	display: flex;
	gap: 0.75rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.fwal-hero-tab {
	display: flex;
	align-items: center;
	padding: 0.875rem 1.75rem;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
	text-decoration: none;
}

.fwal-hero-tab::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--base-color);
	opacity: 0;
	transition: opacity 0.4s;
}

.fwal-hero-tab:hover::before,
.fwal-hero-tab.active::before {
	opacity: 1;
}

.fwal-hero-tab:hover,
.fwal-hero-tab.active {
	color: #fff;
	border-color: var(--base-color);
}

.fwal-hero-tab span {
	position: relative;
	z-index: 1;
}

/* ==================== Logo墙区域 ==================== */
.fwal-partners {
	background: #f8f9fa;
	padding: 3.5rem var(--cbasta);
	overflow: hidden;
}

.fwal-partners-inner {
	max-width: 1400px;
	margin: 0 auto;
}

.fwal-partners-header {
	text-align: center;
	margin-bottom: 2rem;
}

.fwal-partners-title {
	font-family: "Noto Sans SC", sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1a1a1a;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}

.fwal-partners-title::before,
.fwal-partners-title::after {
	content: '';
	width: 40px;
	height: 1px;
	background: linear-gradient(90deg, transparent, #ccc);
}

.fwal-partners-title::after {
	background: linear-gradient(90deg, #ccc, transparent);
}

/* 三行Logo墙 */
.fwal-logo-wall {
	display: flex;
	gap: 1rem;
}

.fwal-logo-wall-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fwal-logo-item {
	background: #fff;
	border-radius: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: all 0.3s ease;
	aspect-ratio: 216 / 36;
}

.fwal-logo-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.fwal-logo-item img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: grayscale(30%);
	opacity: 0.8;
	transition: all 0.3s;
}

.fwal-logo-item:hover img {
	filter: grayscale(0);
	opacity: 1;
}

/* ==================== 案例展示区域 ==================== */
.fwal-cases {
	padding: 5rem var(--cbasta) 6rem;
	max-width: 1400px;
	margin: 0 auto;
}

.fwal-cases-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 3rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.fwal-cases-title-wrap {
	flex: 1;
}

.fwal-cases-title {
	font-family: "Noto Sans SC", sans-serif;
	font-size: 2rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}

.fwal-cases-subtitle {
	font-size: 0.9375rem;
	color: #888;
}

.fwal-cases-count {
	font-size: 0.875rem;
	color: #666;
	background: rgba(0, 0, 0, 0.04);
	padding: 0.5rem 1rem;
	border-radius: 2rem;
}

/* 瀑布流网格 */
.fwal-cases-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: minmax(200px, auto);
	gap: 1.5rem;
}

/* 案例卡片 */
.fwal-case-card {
	position: relative;
	background: #fff;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
}

.fwal-case-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* 不同尺寸的卡片 */
.fwal-case-card:nth-child(4n+1) {
	grid-row: span 2;
}

.fwal-case-card:nth-child(4n+3) {
	grid-row: span 1;
}

.fwal-case-card-img {
	position: relative;
	overflow: hidden;
}

.fwal-case-card:nth-child(4n+1) .fwal-case-card-img {
	aspect-ratio: 4/5;
}

.fwal-case-card:not(:nth-child(4n+1)) .fwal-case-card-img {
	aspect-ratio: 16/10;
}

.fwal-case-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fwal-case-card:hover .fwal-case-card-img img {
	transform: scale(1.08);
}

/* 悬浮信息层 */
.fwal-case-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		transparent 40%,
		rgba(10, 22, 40, 0.9) 100%
	);
	opacity: 0;
	transition: opacity 0.4s ease;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.5rem;
}

.fwal-case-card:hover .fwal-case-card-overlay {
	opacity: 1;
}

.fwal-case-card-name {
	font-size: 1.125rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 0.25rem;
}

.fwal-case-card-desc {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 底部信息 */
.fwal-case-card-info {
	padding: 1rem 1.25rem;
	background: #fff;
}

.fwal-case-card-title {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #333;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.3s;
}

.fwal-case-card:hover .fwal-case-card-title {
	color: var(--base-color);
}

.fwal-case-card-brief {
	font-size: 0.8125rem;
	color: #888;
	margin-top: 0.375rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==================== 分页 ==================== */
.fwal-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 1200px) {
	.fwal-cases-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.fwal-case-card:nth-child(4n+1) {
		grid-row: span 1;
	}

	.fwal-case-card:nth-child(3n+1) {
		grid-row: span 2;
	}
}

@media screen and (max-width: 960px) {
	.fwal-hero {
		height: 35vh;
		min-height: 280px;
	}

	.fwal-hero-tabs {
		gap: 0.5rem;
	}

	.fwal-hero-tab {
		padding: 0.625rem 1rem;
		font-size: 0.875rem;
		clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
	}

	.fwal-partners {
		padding: 2.5rem var(--cbasta);
	}

	.fwal-logo-wall {
		flex-direction: column;
		gap: 0.75rem;
	}

	.fwal-logo-wall-col {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.fwal-logo-item {
		flex: 1;
		min-width: calc(33.333% - 0.5rem);
		aspect-ratio: auto;
		height: 60px;
		padding: 0.75rem;
	}

	.fwal-cases {
		padding: 3rem var(--cbasta) 4rem;
	}

	.fwal-cases-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	.fwal-case-card:nth-child(3n+1) {
		grid-row: span 1;
	}

	.fwal-case-card:nth-child(2n+1) {
		grid-row: span 2;
	}

	.fwal-cases-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}
}

@media screen and (max-width: 640px) {
	.fwal-hero {
		height: 30vh;
		min-height: 220px;
	}

	.fwal-hero-title {
		font-size: 1.75rem;
	}

	.fwal-hero-subtitle {
		font-size: 0.9375rem;
	}

	.fwal-partners {
		padding: 2rem var(--cbasta);
	}

	.fwal-logo-item {
		min-width: calc(50% - 0.5rem);
		height: 50px;
		padding: 0.5rem;
	}

	.fwal-cases {
		padding: 2rem var(--cbasta) 3rem;
	}

	.fwal-cases-title {
		font-size: 1.5rem;
	}

	.fwal-cases-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.fwal-case-card:nth-child(2n+1) {
		grid-row: span 1;
	}

	.fwal-case-card-img {
		aspect-ratio: 16/10 !important;
	}

	.fwal-case-card-info {
		padding: 0.875rem 1rem;
	}

	.fwal-case-card-title {
		font-size: 0.875rem;
	}

	.fwal-case-card-brief {
		font-size: 0.75rem;
	}
}

.fwal-logo-wall {
	padding: 1rem 0;

	.fwal-logo-wall-b {
		overflow: hidden;
	}

	.js-marquee-wrapper {
		display: flex;
	}

	.js-marquee {
		display: flex;
		gap: 1rem;
	}

	.fwal-logo-wall-col {
		width: 239px;
		box-sizing: border-box;

		a {
			display: block;
			font-size: 0;
			box-shadow: rgba(0, 0, 0, 0.05) 0 0 0.625rem 0;
			object-fit: scale-down;
			border-radius: 1.25rem;
			background: rgb(255, 255, 255);
			margin-top: 1rem;
			padding: 1.625rem 1rem;
			overflow: hidden;

			img {
				aspect-ratio: 216 / 36;
			}

			& + a {
				margin-top: 1rem;
			}
		}
	}
}

@media (max-width: 768px) {
	.fwal-logo-wall {
		padding: 2rem var(--cbasta);

		.fwal-logo-wall-col {
			width: 140px;

			a {
				padding: 0.7rem;

				img {
					aspect-ratio: 180 / 64;
				}
			}
		}
	}
}