/* ==========================================================================
 * HBC CTA Banner — 标题段落 + 醒目按钮
 *
 * 结构:
 *   .hbc-cta                 (Flex 容器)
 *     ├ .hbc-cta__text       (左:标题 + 正文)
 *     │   ├ .hbc-cta__heading
 *     │   └ .hbc-cta__body
 *     └ .hbc-cta__btn        (右:有链接 → <a>;无链接 → <span role="button">)
 *         ├ .hbc-cta__btn-label  (永远是 <span>)
 *         └ .hbc-cta__btn-icon   (永远是 <span>,内含 <i> 或 <svg>)
 *
 * Wrapper 修饰类(由 prefix_class 输出):
 *   - hbc-cta-dir-row / hbc-cta-dir-row-reverse  → 主方向
 *   - hbc-cta-icon-left / hbc-cta-icon-right     → 图标位置(供需要时进一步钩样式)
 *   - hbc-cta-stack-yes                          → 手机端堆叠开关
 * ========================================================================== */

.hbc-cta {
	display: flex;
	align-items: center;
	gap: 40px;
	width: 100%;
	box-sizing: border-box;
}

.hbc-cta * {
	box-sizing: border-box;
}

/* 主方向(由 prefix_class 控制) */
.hbc-cta-dir-row .hbc-cta         { flex-direction: row; }
.hbc-cta-dir-row-reverse .hbc-cta { flex-direction: row-reverse; }

/* ----- 文字栏 ----- */
.hbc-cta__text {
	flex: 1 1 auto;
	min-width: 0;          /* 允许长行折断,避免撑破 flex */
}

.hbc-cta__heading {
	margin: 0 0 12px;
	color: #3D1B6B;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	word-wrap: break-word;
}

.hbc-cta__body {
	margin: 0;
	color: #1D0F36;
	font-size: 14px;
	line-height: 1.6;
	word-wrap: break-word;
}

.hbc-cta__body p {
	margin: 0 0 1em;
	color: inherit;
}

.hbc-cta__body p:last-child {
	margin-bottom: 0;
}

/* ----- 按钮 ----- */
.hbc-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-shrink: 0;        /* 不被左侧文字挤压 */
	padding: 20px 40px;
	background-color: #DC1E1E;
	color: #FFFFFF;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	user-select: none;
	transition: background-color 250ms ease, color 250ms ease, transform 250ms ease, box-shadow 250ms ease;
	line-height: 1;
	will-change: transform;
}

a.hbc-cta__btn,
a.hbc-cta__btn:hover,
a.hbc-cta__btn:focus {
	text-decoration: none;
}

/* 无链接版本:用 span 模拟,但仍可键盘聚焦 */
span.hbc-cta__btn--no-link {
	cursor: default;
}

.hbc-cta__btn:focus-visible {
	outline: 3px solid #FFD400;
	outline-offset: 3px;
}

/* ----- 按钮内层(永远是 span) ----- */
.hbc-cta__btn-label {
	display: inline-block;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: inherit;
	white-space: nowrap;
}

.hbc-cta__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	font-size: 18px;
	color: inherit;
	flex-shrink: 0;
	line-height: 1;
}

.hbc-cta__btn-icon i,
.hbc-cta__btn-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

.hbc-cta__btn-icon svg {
	fill: currentColor;
}

/* ==========================================================================
 *  手机堆叠
 * ========================================================================== */
@media (max-width: 767px) {
	.hbc-cta-stack-yes .hbc-cta {
		flex-direction: column;
		align-items: flex-start;
	}

	/* 手机下默认让按钮自适应文字宽度;align-items 为 stretch 时按钮会满宽 */
	.hbc-cta-stack-yes .hbc-cta__btn {
		max-width: 100%;
	}
}

/* ==========================================================================
 *  减动效偏好
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.hbc-cta__btn {
		transition: none;
	}
	.hbc-cta__btn:hover {
		transform: none;
	}
}
