.hbm-banner {
	position: relative;
	width: 100%;
	margin: 0 auto;
	overflow: hidden;
	aspect-ratio: var( --hbm-aspect, 16 / 6 );
	background: #0b0b0b;
}

.hbm-track {
	position: absolute;
	inset: 0;
}

.hbm-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s ease;
	z-index: 1;
}

.hbm-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.hbm-link {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	text-decoration: none;
	color: inherit;
}

.hbm-media,
.hbm-media img {
	display: block;
	width: 100%;
	height: 100%;
}

.hbm-media img {
	object-fit: cover;
}

.hbm-content {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: clamp( 20px, 5vw, 80px );
	pointer-events: none;
	opacity: 1;
	transform: none;
	transition: transform 1.1s cubic-bezier( .16, .84, .44, 1 ), opacity .9s ease;
}

.hbm-text {
	max-width: 620px;
	color: #fff;
	font-size: clamp( 16px, 2.2vw, 22px );
	line-height: 1.5;
	text-shadow: 0 2px 12px rgba( 0, 0, 0, .45 );
	pointer-events: auto;
}

.hbm-text :where( h1, h2, h3 ) {
	margin: 0 0 .4em;
	line-height: 1.15;
	color: inherit;
}

.hbm-text p {
	margin: 0 0 .6em;
}

.hbm-text p:last-child {
	margin-bottom: 0;
}

/* 內容預設為「已進場」狀態（見上方），確保未啟用 JS 時文字仍可見。 */
/* 啟用 JS 後 root 會加上 .hbm-anim；該張在標記 .is-shown 之前，內容停在容器最外緣（位移量為容器寬／高的 100%）。 */
.hbm-anim .hbm-slide:not(.is-shown) .hbm-content { opacity: 0; }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="left"]   .hbm-content { transform: translateX( -100% ); }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="right"]  .hbm-content { transform: translateX( 100% ); }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="top"]    .hbm-content { transform: translateY( -100% ); }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="bottom"] .hbm-content { transform: translateY( 100% ); }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="fade"]   .hbm-content { transform: none; }
.hbm-anim .hbm-slide:not(.is-shown)[data-dir="zoom"]   .hbm-content { transform: scale( 1.14 ); }

/* 重設進場動畫時暫時關閉過場，避免出現反向動畫 */
.hbm-no-trans .hbm-content { transition: none !important; }

/* 左右箭頭 */
.hbm-arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 5;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba( 0, 0, 0, .35 );
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s;
}

.hbm-arrow:hover {
	background: rgba( 0, 0, 0, .6 );
}

.hbm-prev { left: 16px; }
.hbm-next { right: 16px; }

/* 分頁圓點 */
.hbm-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 5;
	display: flex;
	gap: 8px;
	justify-content: center;
}

.hbm-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, .5 );
	cursor: pointer;
	transition: background .2s, transform .2s;
}

.hbm-dot.is-active {
	background: #fff;
	transform: scale( 1.25 );
}

@media ( max-width: 768px ) {
	.hbm-banner {
		aspect-ratio: var( --hbm-aspect-m, 3 / 4 );
	}
	.hbm-content {
		justify-content: center;
		text-align: center;
		padding: 24px;
	}
	.hbm-arrow {
		width: 36px;
		height: 36px;
		font-size: 20px;
	}
	.hbm-prev { left: 8px; }
	.hbm-next { right: 8px; }
}

@media ( prefers-reduced-motion: reduce ) {
	.hbm-slide,
	.hbm-content {
		transition-duration: .01ms !important;
	}
}
