/* ── FAQ Widget ──────────────────────────────────────────────── */

.hbc-faq-wrap {
	padding: 40px 24px;
	box-sizing: border-box;
	max-width: 100%;
	overflow: hidden;
}

/* ── Header (heading + tabs) ─────────────────────────────────── */

.hbc-faq-header {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}

.hbc-faq-heading {
	margin: 0;
	color: #111;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	flex-shrink: 0;
}

.hbc-faq-tabs-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	justify-content: center;
}

.hbc-faq-tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.hbc-faq-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	background-color: #f1f1f1;
	color: #333;
	border: none;
	border-radius: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.hbc-faq-tab:hover {
	background-color: #e0e0e0;
	color: #111;
}

.hbc-faq-tab.hbc-active {
	background-color: #1f2a36;
	color: #ffffff;
}

/* ── Panels ──────────────────────────────────────────────────── */

.hbc-faq-panel {
	display: none;
}

.hbc-faq-panel.hbc-active {
	display: block;
}

.hbc-faq-list {
	display: flex;
	flex-direction: column;
	gap: -1px; /* fallback */
}

.hbc-faq-item {
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-style: solid;
	transition: border-color 0.2s ease;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

/* When gap = -1, items collapse borders by adjacent siblings overlap */
.hbc-faq-item + .hbc-faq-item {
	margin-top: -1px;
}

/* ── Question button ─────────────────────────────────────────── */

.hbc-faq-q {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 14px 20px;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	color: #111;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	text-align: left;
	white-space: normal;
	min-width: 0;
	transition: color 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.hbc-faq-q:hover,
.hbc-faq-q:focus,
.hbc-faq-q:active,
.hbc-faq-q:focus-visible {
	background: transparent;
	color: inherit;
	box-shadow: none;
	outline: none;
}

.hbc-faq-q-text {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* ── +/- icon (made of two crossing bars) ─────────────────────── */

.hbc-faq-icon {
	position: relative;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	display: inline-block;
	color: #111;
}

.hbc-faq-icon-h,
.hbc-faq-icon-v {
	position: absolute;
	left: 50%;
	top: 50%;
	background-color: currentColor;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.hbc-faq-icon-h {
	width: 100%;
	height: 1.5px;
	transform: translate(-50%, -50%);
}

.hbc-faq-icon-v {
	width: 1.5px;
	height: 100%;
	transform: translate(-50%, -50%);
}

/* Open state: hide vertical bar → becomes minus */
.hbc-faq-item.hbc-open .hbc-faq-icon-v {
	transform: translate(-50%, -50%) scaleY(0);
	opacity: 0;
}

/* ── Answer (smooth height via max-height) ───────────────────── */

.hbc-faq-a {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.hbc-faq-item.hbc-open .hbc-faq-a {
	max-height: 2000px;
	transition: max-height 0.5s ease;
}

.hbc-faq-a-inner {
	padding: 4px 20px 20px 48px;
	color: #555;
	font-size: 13.5px;
	line-height: 1.7;
}

.hbc-faq-a-inner :first-child { margin-top: 0; }
.hbc-faq-a-inner :last-child  { margin-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
	.hbc-faq-wrap {
		padding: 28px 16px;
	}

	.hbc-faq-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.hbc-faq-heading {
		font-size: 24px !important;
	}

	.hbc-faq-tabs-wrap {
		width: 100%;
		justify-content: stretch;
	}

	/* tab 改为 2 列等宽网格，布局齐齐整整 */
	.hbc-faq-tabs {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		width: 100%;
		gap: 8px;
	}

	.hbc-faq-tab {
		width: 100%;
		padding: 10px 8px !important;
		font-size: 11.5px !important;
		white-space: normal;
		text-align: center;
		letter-spacing: 0.04em;
		line-height: 1.3;
	}

	.hbc-faq-q {
		padding: 12px 14px !important;
		font-size: 13px !important;
		line-height: 1.45 !important;
	}

	.hbc-faq-a-inner {
		padding: 4px 14px 16px 38px !important;
		font-size: 12.5px !important;
	}
}

@media (max-width: 480px) {
	.hbc-faq-wrap {
		padding: 20px 12px;
	}

	.hbc-faq-heading {
		font-size: 20px !important;
	}

	/* 超小屏：标签单列一行一个 */
	.hbc-faq-tabs {
		grid-template-columns: 1fr;
	}

	.hbc-faq-q {
		padding: 11px 12px !important;
		gap: 10px !important;
	}

	.hbc-faq-a-inner {
		padding-left: 34px !important;
	}
}
