/* =====================================================================
   官网 · 页面区块样式（后台「可视化区块」编辑器的前台输出）
   ---------------------------------------------------------------------
   命名统一 bk-*，颜色/圆角全部走站点令牌 --s-*，所以 tpl1/tpl2/tpl3
   三套模板共用一份，不需要各写一遍。
   ===================================================================== */

.bk { margin: 30px 0; }
.bk:first-child { margin-top: 4px; }
.bk:last-child { margin-bottom: 4px; }

/* ---------------- 头图横幅 ---------------- */
.bk-hero {
	position: relative;
	overflow: hidden;
	padding: 52px 44px;
	border-radius: var(--s-radius-lg);
	background: linear-gradient(125deg, var(--s-brand) 0%, var(--s-brand-2) 100%);
	background-size: cover;
	background-position: center;
	color: #fff;
}

.bk-hero.is-plain::after {
	/* 没有背景图时铺一层柔光，避免大面积纯色显得死板 */
	content: "";
	position: absolute;
	right: -80px;
	top: -110px;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 68%);
	pointer-events: none;
}

.bk-hero-in { position: relative; z-index: 1; max-width: 720px; }

.bk-hero h2 {
	margin: 0;
	font-size: 30px;
	line-height: 1.35;
	color: #fff;
	letter-spacing: -.4px;
}

.bk-hero p {
	margin: 12px 0 0;
	font-size: 15.5px;
	line-height: 1.85;
	color: rgba(255, 255, 255, .88);
}

.bk-hero .btn { margin-top: 22px; }

/* 头图里的按钮统一反色，避免和模板按钮色撞在一起 */
.bk-hero .btn {
	height: 46px;
	padding: 0 26px;
	border-radius: 999px;
	background: #fff;
	color: var(--s-brand-2);
	font-weight: 600;
	font-size: 14.5px;
	box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .6);
}

.bk-hero .btn:hover { color: var(--s-brand); }

/* 没填链接时按钮不可点，只作为视觉占位 */
.bk-hero .btn.is-ghost {
	border: 1px solid rgba(255, 255, 255, .5);
	background: transparent;
	color: #fff;
	box-shadow: none;
	cursor: default;
}

/* ---------------- 标题段落 ---------------- */
.bk-head { padding: 4px 0; }

.bk-head h2,
.bk-head h3 {
	margin: 0;
	font-size: 24px;
	letter-spacing: -.3px;
	position: relative;
	padding-left: 14px;
}

.bk-head h3 { font-size: 19px; }

.bk-head h2::before,
.bk-head h3::before {
	content: "";
	position: absolute;
	left: 0;
	top: .22em;
	bottom: .22em;
	width: 4px;
	border-radius: 3px;
	background: var(--s-brand);
}

.bk-head p {
	margin: 10px 0 0;
	font-size: 14.5px;
	line-height: 1.85;
	color: var(--s-muted);
}

.bk-head.is-center { text-align: center; }
.bk-head.is-center h2,
.bk-head.is-center h3 { padding-left: 0; }
.bk-head.is-center h2::before,
.bk-head.is-center h3::before { display: none; }
.bk-head.is-center p { max-width: 660px; margin-left: auto; margin-right: auto; }

/* ---------------- 富文本 ---------------- */
.bk-rich { font-size: 15.5px; line-height: 1.95; color: var(--s-ink-2); }
.bk-rich > * + * { margin-top: 16px; }
.bk-rich h2, .bk-rich h3, .bk-rich h4 { margin: 30px 0 0; font-size: 20px; }
.bk-rich h3 { font-size: 18px; }
.bk-rich p { margin: 0; }
.bk-rich img { border-radius: var(--s-radius-sm); margin: 18px auto; }
.bk-rich ul, .bk-rich ol { padding-left: 22px; list-style: disc; }
.bk-rich ol { list-style: decimal; }
.bk-rich a { color: var(--s-brand); text-decoration: underline; text-underline-offset: 3px; }
.bk-rich blockquote {
	margin: 18px 0;
	padding: 12px 18px;
	border-left: 3px solid var(--s-brand);
	background: var(--s-surface);
	border-radius: 0 var(--s-radius-sm) var(--s-radius-sm) 0;
	color: var(--s-ink-2);
}
.bk-rich table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bk-rich th, .bk-rich td { padding: 9px 12px; border: 1px solid var(--s-line); text-align: left; }
.bk-rich th { background: var(--s-surface); font-weight: 600; }

/* ---------------- 单张图片 ---------------- */
.bk-fig { margin: 26px 0; }
.bk-fig img { width: 100%; border-radius: var(--s-radius); box-shadow: var(--s-shadow-sm); }
.bk-fig.is-mid { max-width: 80%; margin-left: auto; margin-right: auto; }
.bk-fig.is-sm { max-width: 60%; margin-left: auto; margin-right: auto; }
.bk-fig figcaption {
	margin-top: 9px;
	font-size: 12.5px;
	color: var(--s-muted);
	text-align: center;
}

/* ---------------- 图文分栏 ---------------- */
.bk-it {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 34px;
	align-items: center;
}

.bk-it-media img {
	width: 100%;
	border-radius: var(--s-radius);
	box-shadow: var(--s-shadow);
	object-fit: cover;
}

.bk-it-body h3 { margin: 0; font-size: 21px; letter-spacing: -.2px; }

.bk-it-body p {
	margin: 12px 0 0;
	font-size: 14.5px;
	line-height: 1.9;
	color: var(--s-ink-2);
}

.bk-it-body .btn { margin-top: 18px; }

/* 图片在右侧：靠 order 翻转，DOM 顺序保持图文在前，利于阅读与 SEO */
.bk-it.is-rev .bk-it-media { order: 2; }

/* ---------------- 图标栅格 ---------------- */
.bk-feats {
	display: grid;
	gap: 16px;
}

.bk-feats.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-feats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-feats.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bk-feat {
	padding: 22px 20px;
	border: 1px solid var(--s-line);
	border-radius: var(--s-radius);
	background: var(--s-bg);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.bk-feat:hover {
	border-color: color-mix(in srgb, var(--s-brand) 35%, var(--s-line));
	box-shadow: var(--s-shadow-sm);
	transform: translateY(-2px);
}

.bk-feat-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-bottom: 12px;
	border-radius: 11px;
	background: var(--s-brand-soft);
	color: var(--s-brand);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
}

.bk-feat h4 { margin: 0; font-size: 15px; font-weight: 600; }

.bk-feat p {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--s-muted);
}

/* ---------------- 数据展示 ---------------- */
.bk-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	padding: 26px 24px;
	border-radius: var(--s-radius);
	background: var(--s-surface);
}

.bk-stat { text-align: center; padding: 4px 8px; }

.bk-stat b {
	display: block;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--s-brand);
	letter-spacing: -.6px;
	font-variant-numeric: tabular-nums;
}

.bk-stat b i {
	margin-left: 3px;
	font-style: normal;
	font-size: 14px;
	font-weight: 500;
	color: var(--s-ink-2);
}

.bk-stat span {
	display: block;
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--s-muted);
}

/* ---------------- 图片相册 ---------------- */
.bk-gal { display: grid; gap: 12px; }
.bk-gal.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-gal.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-gal.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bk-gal figure { margin: 0; }

.bk-gal img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--s-radius-sm);
	transition: transform .3s ease, box-shadow .3s ease;
}

.bk-gal figure:hover img { transform: scale(1.015); box-shadow: var(--s-shadow); }

.bk-gal figcaption {
	margin-top: 7px;
	font-size: 12px;
	color: var(--s-muted);
	text-align: center;
}

/* ---------------- 行动号召 ---------------- */
.bk-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 26px;
	padding: 30px 34px;
	border: 1px solid color-mix(in srgb, var(--s-brand) 18%, var(--s-line));
	border-radius: var(--s-radius);
	background: var(--s-brand-soft);
}

.bk-cta-body h3 { margin: 0; font-size: 20px; letter-spacing: -.2px; }

.bk-cta-body p {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--s-ink-2);
}

.bk-cta .btn { flex: none; }

.bk-cta.is-dark {
	border-color: transparent;
	background: linear-gradient(120deg, var(--s-dark) 0%, #16233c 100%);
}

.bk-cta.is-dark h3 { color: #fff; }
.bk-cta.is-dark p { color: rgba(255, 255, 255, .78); }
.bk-cta.is-dark .btn { background: var(--s-brand); color: #fff; }
.bk-cta.is-dark .btn:hover { background: var(--s-brand-2); }

/* ---------------- 自定义 HTML ---------------- */
.bk-html > * + * { margin-top: 14px; }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 820px) {
	.bk { margin: 24px 0; }

	.bk-hero { padding: 38px 24px; border-radius: var(--s-radius); }
	.bk-hero h2 { font-size: 23px; }
	.bk-hero p { font-size: 14.5px; }

	.bk-head h2 { font-size: 20px; }
	.bk-head h3 { font-size: 17px; }

	.bk-it { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.bk-it.is-rev .bk-it-media { order: 0; }
	.bk-it-body h3 { font-size: 18px; }

	.bk-feats.cols-3,
	.bk-feats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bk-gal.cols-3,
	.bk-gal.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.bk-stats { padding: 20px 16px; }
	.bk-stat b { font-size: 25px; }

	.bk-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
	.bk-fig.is-mid,
	.bk-fig.is-sm { max-width: 100%; }
}

@media (max-width: 520px) {
	.bk-feats.cols-2,
	.bk-feats.cols-3,
	.bk-feats.cols-4 { grid-template-columns: minmax(0, 1fr); }
	.bk-gal.cols-2,
	.bk-gal.cols-3,
	.bk-gal.cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- 首页自定义区块外壳 ---------------- */
/* 追加在模板版块之后、联系/页脚之前，单独给一段上下留白 */
.bk-home { padding: 10px 0 58px; }
.bk-home .bk:first-child { margin-top: 0; }
