/*
 * 全站统一页脚：首页与所有内页共用。
 * 背景色可在 .compt-footer 的 --compt-footer-bg 变量中统一调整。
 */

.compt-footer {
	--compt-footer-bg: var(--compt-color-surface-footer);
	--compt-footer-accent: var(--compt-color-accent);
	--compt-footer-text: #ffffff;
	--compt-footer-muted: rgba(255, 255, 255, 0.64);
	--compt-footer-line: rgba(255, 255, 255, 0.12);

	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	background: var(--compt-footer-bg);
	color: var(--compt-footer-text);
}

.compt-footer *,
.compt-footer *::before,
.compt-footer *::after {
	box-sizing: border-box;
}

.compt-footer__inner {
	width: var(--compt-content-width);
	margin-inline: auto;
	padding: 56px 24px 0;
}

/* 顶部品牌标识行 */
.compt-footer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.compt-footer__brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.compt-footer__logo {
	display: block;
	width: auto;
	height: 40px;
	max-width: 220px;
}

.compt-footer__divider {
	height: 1px;
	margin: 26px 0 44px;
	background: var(--compt-footer-line);
}

/* 主体四列 */
.compt-footer__grid {
	display: grid;
	grid-template-columns: 1.5fr 0.95fr 0.95fr 1.35fr;
	gap: 48px;
	align-items: start;
}

.compt-footer__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-size: var(--compt-fs-sm);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: var(--compt-footer-text);
}

.compt-footer__mark {
	display: inline-block;
	flex: 0 0 auto;
	width: 3px;
	height: 14px;
	background: var(--compt-footer-accent);
}

.compt-footer__desc {
	max-width: 390px;
	margin: 0;
	font-size: var(--compt-fs-sm);
	line-height: 1.85;
	color: var(--compt-footer-muted);
}

.compt-footer__facts {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.compt-footer__facts li {
	position: relative;
	padding-left: 15px;
	font-size: 13.5px;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.5);
}

.compt-footer__facts li + li {
	margin-top: 6px;
}

.compt-footer__facts li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 0;
	width: 4px;
	height: 4px;
	background: rgba(255, 255, 255, 0.35);
}

/* 链接列 */
.compt-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.compt-footer__links li + li {
	margin-top: 10px;
}

.compt-footer__links a {
	display: inline-block;
	font-size: var(--compt-fs-sm);
	line-height: 1.5;
	color: var(--compt-footer-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.compt-footer__links a:hover,
.compt-footer__links a:focus-visible {
	color: var(--compt-footer-accent);
}

.compt-footer__links a:focus-visible {
	outline: 2px solid var(--compt-footer-accent);
	outline-offset: 3px;
}

/* 联系信息列 */
.compt-footer__contacts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.compt-footer__contact {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
}

.compt-footer__contact + .compt-footer__contact {
	margin-top: 18px;
}

.compt-footer__contact-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.78);
}

.compt-footer__contact-icon svg {
	width: 20px;
	height: 20px;
}

/* 微信：实心品牌蓝圆形，二维码在右侧 */
.compt-footer__contact--wechat .compt-footer__contact-icon {
	border-color: var(--compt-footer-accent);
	background: var(--compt-footer-accent);
	color: #fff;
}

.compt-footer__label {
	display: block;
	margin: 0;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.08em;
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.4);
}

.compt-footer__value {
	display: block;
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: var(--compt-fs-sm);
	font-weight: 600;
	line-height: 1.6;
	color: var(--compt-footer-text);
	text-align: right;
	text-decoration: none;
	transition: color 0.2s ease;
}

.compt-footer__qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	justify-self: end;
}

.compt-footer__qr img {
	display: block;
	width: 72px;
	height: 72px;
	padding: 4px;
	border-radius: 4px;
	background: #fff;
	object-fit: contain;
}

.compt-footer__qr-tip {
	color: var(--compt-footer-muted);
	font-size: 10.5px;
	line-height: 1.4;
	white-space: nowrap;
}

a.compt-footer__value:hover,
a.compt-footer__value:focus-visible {
	color: var(--compt-footer-accent);
}

a.compt-footer__value:focus-visible {
	outline: 2px solid var(--compt-footer-accent);
	outline-offset: 3px;
}

/* 社交 / 快捷圆形按钮 */
.compt-footer__socials {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}

.compt-footer__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, 0.72);
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.compt-footer__social svg {
	width: 18px;
	height: 18px;
}

.compt-footer__social:hover,
.compt-footer__social:focus-visible {
	border-color: var(--compt-footer-accent);
	background: rgba(var(--compt-color-accent-rgb), 0.1);
	color: var(--compt-footer-accent);
}

.compt-footer__social:focus-visible {
	outline: 2px solid var(--compt-footer-accent);
	outline-offset: 3px;
}

/* 抖音链接未配置时的静态图标 */
.compt-footer__social--static,
.compt-footer__social--static:hover {
	border-color: rgba(255, 255, 255, 0.18);
	background: transparent;
	color: rgba(255, 255, 255, 0.72);
	cursor: default;
}

/* 底部版权与辅助链接 */
.compt-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 52px;
	padding: 24px 0 28px;
	border-top: 1px solid var(--compt-footer-line);
	font-size: 13px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.45);
}

.compt-footer__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
}

.compt-footer__meta a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.compt-footer__meta a:hover,
.compt-footer__meta a:focus-visible {
	color: var(--compt-footer-accent);
}

.compt-footer__legal {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 22px;
}

.compt-footer__legal a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	transition: color 0.2s ease;
}

.compt-footer__legal a:hover,
.compt-footer__legal a:focus-visible {
	color: var(--compt-footer-accent);
}

/* 回到顶部 */
.compt-footer__totop {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--compt-footer-accent);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.compt-footer__totop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.compt-footer__totop:hover {
	background: var(--compt-color-accent-hover);
}

.compt-footer__totop:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.compt-footer__totop svg {
	width: 17px;
	height: 17px;
}

@media (max-width: 1024px) {
	.compt-footer__inner {
		width: calc(100% - 24px);
		padding: 44px 14px 0;
	}

	.compt-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 36px 28px;
	}

	.compt-footer__col--brand,
	.compt-footer__col--contact {
		grid-column: 1 / -1;
	}

	.compt-footer__desc {
		max-width: none;
	}

	.compt-footer__divider {
		margin: 24px 0 36px;
	}

	.compt-footer__bottom {
		margin-top: 40px;
	}

	.compt-footer__totop {
		right: 18px;
		bottom: 18px;
	}
}

@media (max-width: 767px) {
	.compt-footer__inner {
		padding-top: 36px;
	}

	.compt-footer__logo {
		height: 32px;
	}

	.compt-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 20px;
	}

	.compt-footer__col--brand {
		grid-column: 1 / -1;
	}

	/* 移动端不展示「联系我们」区域 */
	.compt-footer__col--contact {
		display: none;
	}

	.compt-footer__divider {
		margin: 20px 0 30px;
	}

	.compt-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		margin-top: 36px;
		padding: 20px 0 26px;
	}

	.compt-footer__legal {
		gap: 18px;
	}

	.compt-footer__totop {
		width: 40px;
		height: 40px;
	}
}

@media (max-width: 520px) {
	.compt-footer__desc,
	.compt-footer__links a {
		font-size: 13.5px;
	}

	.compt-footer__facts li {
		font-size: 13px;
	}

	.compt-footer__heading {
		margin-bottom: 16px;
	}
}
