/**
 * 全站页脚：桌面 5 列导航 + 底部品牌区；窄屏手风琴（checkbox + label，无 JS）
 */
.footer-mega {
	margin-top: auto;
	background: #f8f1eb;
	color: #2a221c;
	font-size: 14px;
	line-height: 1.55;
}

.footer-mega a {
	color: #3d3229;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-mega a:hover {
	color: #c62828;
}

.footer-mega__top {
	border-top: 1px solid rgba(74, 54, 42, 0.12);
	padding: 36px 0 28px;
}

.footer-mega__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0;
	align-items: stretch;
}

.footer-mega__col {
	position: relative;
	padding: 0 22px;
	box-sizing: border-box;
	min-width: 0;
}

.footer-mega__col:not(:first-child)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(74, 54, 42, 0.14);
}

.footer-mega__state {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* 桌面为栏目标题，移动端为手风琴开关（同一 label） */
.footer-mega__heading {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #1a1410;
	display: block;
	cursor: default;
	user-select: none;
}

.footer-mega__panel {
	overflow: hidden;
}

.footer-mega__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-mega__links li {
	margin: 0 0 10px;
}

.footer-mega__links li:last-child {
	margin-bottom: 0;
}

.footer-mega__links a {
	display: inline-block;
	border-bottom: 1px solid transparent;
	font-weight: 500;
}

.footer-mega__links a:hover {
	border-bottom-color: rgba(198, 40, 40, 0.35);
}

/* —— 底部品牌与法律 —— */
.footer-mega__bottom {
	border-top: 1px solid rgba(74, 54, 42, 0.14);
	background: rgba(255, 255, 255, 0.45);
	padding: 26px 0 32px;
	text-align: center;
}

.footer-mega__brand-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 28px;
	margin-bottom: 14px;
	font-size: 14px;
	color: #4a3c33;
}

.footer-mega__logo {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: #1a1410;
	margin-right: 4px;
}

.footer-mega__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 6px;
	margin: 0 0 12px;
	font-size: 13px;
	color: #5c4f45;
}

.footer-mega__legal a {
	color: #5c4f45;
	border-bottom: 1px solid rgba(74, 54, 42, 0.25);
	padding-bottom: 1px;
}

.footer-mega__legal a:hover {
	color: #c62828;
	border-bottom-color: rgba(198, 40, 40, 0.4);
}

.footer-mega__legal-sep {
	color: rgba(74, 54, 42, 0.35);
	user-select: none;
	padding: 0 2px;
}

.footer-mega__copy {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.06em;
	color: #7a6e66;
}

.footer-mega__line {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	padding: 10px 22px;
	border-radius: 999px;
	background: #06c755;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 2px 10px rgba(6, 199, 85, 0.35);
	transition: filter 0.2s, transform 0.15s;
}

.footer-mega__line:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
	color: #fff !important;
}

.footer-mega__line-ico {
	flex-shrink: 0;
	color: #fff;
}

.footer-mega__line-sub {
	font-size: 12px;
	font-weight: 600;
	opacity: 0.95;
	margin-left: 2px;
}

/* —— 移动端手风琴 —— */
@media screen and (max-width: 900px) {
	.footer-mega__grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.footer-mega__col {
		padding: 0;
		border-bottom: 1px solid rgba(74, 54, 42, 0.12);
	}

	.footer-mega__col:not(:first-child)::before {
		display: none;
	}

	.footer-mega__heading {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 0;
		padding: 16px 6px 16px 4px;
		cursor: pointer;
		box-sizing: border-box;
		width: 100%;
		font-family: inherit;
	}

	.footer-mega__heading::after {
		content: "";
		flex-shrink: 0;
		width: 10px;
		height: 10px;
		border-right: 2px solid #6b5d52;
		border-bottom: 2px solid #6b5d52;
		transform: rotate(45deg);
		margin-top: -4px;
		transition: transform 0.2s ease;
	}

	.footer-mega__state:checked + .footer-mega__heading::after {
		transform: rotate(225deg);
		margin-top: 2px;
	}

	.footer-mega__panel {
		max-height: 0;
		transition: max-height 0.35s ease;
	}

	.footer-mega__state:checked ~ .footer-mega__panel {
		max-height: 1200px;
	}

	.footer-mega__panel .footer-mega__links {
		padding: 0 4px 16px 4px;
	}

	.footer-mega__panel .footer-mega__links li:last-child {
		margin-bottom: 4px;
	}

	.footer-mega__top {
		padding: 8px 0 0px;
	}
}

@media screen and (min-width: 901px) {
	.footer-mega__heading {
		pointer-events: none;
		cursor: default;
	}

	.footer-mega__heading::after {
		display: none !important;
	}

	.footer-mega__panel {
		max-height: none !important;
	}
}

/* ========== Footer v4 ========== */
.footer-mega--v4 {
	background: #f5f2ee;
}

.footer-mega__services {
	background: #fff;
	border-top: 1px solid #ece8e3;
	border-bottom: 1px solid #ece8e3;
	padding: 20px 0;
}

.footer-mega__services-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: space-around;
	flex-wrap: wrap;
	gap: 12px 24px;
}

.footer-mega__services-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #444;
}

.footer-mega__service-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f0ebe4;
	color: #303c42;
	flex-shrink: 0;
}
.footer-mega__service-svg {
	display: block;
	width: 16px;
	height: 16px;
}

.footer-mega__about-text {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.65;
	color: #555;
}

.footer-mega__social {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.footer-mega__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	background: #ebe6df;
	color: #333 !important;
	text-decoration: none !important;
}

.footer-mega__social-svg {
	display: block;
	width: 18px;
	height: 18px;
}

.footer-mega__links--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.footer-mega--v4 .footer-mega__bottom {
	padding: 20px 0 28px;
	text-align: center;
}

.footer-mega--v4 .footer-mega__copy {
	margin: 0 0 10px;
	font-size: 12px;
	color: #888;
}

.footer-mega--v4 .footer-mega__legal {
	justify-content: center;
}

/* ========== 右侧浮动操作 FAB（掘金式白底圆形） ========== */
.site-fab-stack {
	--fab-size: 44px;
	--fab-gap: 10px;
	position: fixed;
	right: max(20px, env(safe-area-inset-right, 0px));
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 9997;
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	gap: var(--fab-gap);
	pointer-events: none;
}

.site-fab {
	--fab-icon-color: #86909c;
	pointer-events: auto;
	flex-shrink: 0;
	width: var(--fab-size);
	height: var(--fab-size);
	border-radius: 50%;
	border: none;
	padding: 0;
	margin: 0;
	background: #fff;
	color: var(--fab-icon-color);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow:
		0 2px 10px rgba(0, 0, 0, 0.08),
		0 0 0 1px rgba(0, 0, 0, 0.04);
	transition:
		transform 0.22s ease,
		box-shadow 0.22s ease,
		color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.site-fab:hover {
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.12),
		0 0 0 1px rgba(0, 0, 0, 0.05);
	transform: translateY(-2px);
}

.site-fab:active {
	transform: translateY(0) scale(0.96);
	box-shadow:
		0 1px 6px rgba(0, 0, 0, 0.08),
		0 0 0 1px rgba(0, 0, 0, 0.04);
	transition-duration: 0.08s;
}

.site-fab:focus-visible {
	outline: 2px solid var(--fab-icon-color);
	outline-offset: 2px;
}

.site-fab__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.site-fab__svg {
	width: 20px;
	height: 20px;
	display: block;
}

.site-fab__svg--line {
	width: 22px;
	height: 20px;
}

.site-fab--line {
	--fab-icon-color: #00c300;
}

.site-fab--line:hover {
	color: #05b34c;
}

.site-fab--top.back-to-top {
	--fab-icon-color: #333;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px) scale(0.92);
	transition:
		opacity 0.25s ease,
		visibility 0.25s,
		transform 0.25s ease,
		box-shadow 0.22s ease,
		color 0.2s ease;
}

.site-fab--top.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.site-fab--top.back-to-top.is-visible:hover {
	transform: translateY(-2px);
}

@media screen and (max-width: 480px) {
	.site-fab-stack {
		--fab-size: 40px;
		right: max(12px, env(safe-area-inset-right, 0px));
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.site-fab__svg {
		width: 20px;
		height: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-fab,
	.site-fab--top.back-to-top,
	.site-fab--top.back-to-top.is-visible {
		transition-duration: 0.01ms;
		transform: none;
	}
}

@media screen and (max-width: 900px) {
	.footer-mega__services {
		padding: 22px 0 8px;
	}
	.footer-mega__services-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: stretch;
		gap: 12px;
		padding: 0 4px 14px;
	}
	.footer-mega__services-list li {
		gap: 10px;
		padding: 12px 12px;
		font-size: 13px;
		line-height: 1.4;
		background: #faf8f5;
		border-radius: 12px;
		box-sizing: border-box;
		min-width: 0;
	}
	.footer-mega__service-icon {
		width: 36px;
		height: 36px;
	}
	.footer-mega__service-svg {
		width: 18px;
		height: 18px;
	}
	.footer-mega__heading {
		padding: 18px 8px 18px 6px;
	}
}
