/* mod_my_hero - หน้าปกสไลด์ */

.my-hero {
	position: relative;
	overflow: hidden;
	--hero-h: 460px;
	--hero-hm: 260px;
	--hero-ov: .45;
}

.my-hero.is-rounded { border-radius: var(--my-radius, 14px); }

.my-hero__track { position: relative; height: var(--hero-h); }

.my-hero__slide {
	position: absolute; inset: 0;
	background-size: cover; background-position: center;
	display: flex; align-items: center;
	opacity: 0; visibility: hidden;
	transition: opacity .6s ease;
}
.my-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

/*
 * Where the text block sits vertically. Top and bottom keep a margin off the
 * edge so the words never touch the frame, and clear the dots at the bottom.
 */
.my-hero__slide.vpos-top    { align-items: flex-start; padding-block-start: clamp(24px, 7%, 64px); }
.my-hero__slide.vpos-middle { align-items: center; }
.my-hero__slide.vpos-bottom { align-items: flex-end; padding-block-end: clamp(34px, 9%, 76px); }

/*
 * The veil is darkest where the words are, so it follows the chosen position
 * instead of always weighting the left edge.
 */
.my-hero__veil {
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(9, 32, 62, calc(var(--hero-ov) + .2)), rgba(9, 32, 62, var(--hero-ov)) 55%, rgba(9, 32, 62, .12));
}

.my-hero__slide.align-end .my-hero__veil {
	background: linear-gradient(270deg, rgba(9, 32, 62, calc(var(--hero-ov) + .2)), rgba(9, 32, 62, var(--hero-ov)) 55%, rgba(9, 32, 62, .12));
}

.my-hero__slide.align-center .my-hero__veil {
	background: rgba(9, 32, 62, var(--hero-ov));
}

/* Text pushed to an edge also gets a little extra shade on that edge. */
.my-hero__slide.vpos-top.align-center .my-hero__veil {
	background: linear-gradient(180deg, rgba(9, 32, 62, calc(var(--hero-ov) + .15)), rgba(9, 32, 62, var(--hero-ov)) 60%);
}
.my-hero__slide.vpos-bottom.align-center .my-hero__veil {
	background: linear-gradient(0deg, rgba(9, 32, 62, calc(var(--hero-ov) + .15)), rgba(9, 32, 62, var(--hero-ov)) 60%);
}

.my-hero__inner {
	position: relative; z-index: 2; color: #fff;
	display: flex; flex-direction: column; gap: 6px;
}
.my-hero__inner.is-center { align-items: center; text-align: center; }
.my-hero__inner.is-end { align-items: flex-end; text-align: end; }

/*
 * Text sizes come from the module options as the UPPER bound of a clamp, so
 * a large setting still shrinks gracefully on a narrow screen instead of
 * overflowing the slide.
 */
.my-hero__caption {
	display: inline-block; align-self: flex-start;
	background: rgba(255, 255, 255, .2); backdrop-filter: blur(4px);
	border-radius: 999px; padding: 4px 14px; font-weight: 600;
	font-size: clamp(11px, 1.1vw, var(--hero-caption, 14px));
}
.my-hero__inner.is-center .my-hero__caption { align-self: center; }
.my-hero__inner.is-end .my-hero__caption { align-self: flex-end; }

.my-hero__title {
	color: #fff; margin: 0;
	font-size: clamp(26px, 3.6vw, var(--hero-title, 48px));
	text-shadow: 0 3px 16px rgba(0, 0, 0, .35); line-height: 1.25;
}
.my-hero__sub {
	color: rgba(255, 255, 255, .95); margin: 0;
	font-size: clamp(15px, 1.5vw, var(--hero-sub, 20px));
	text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.my-hero__btn { margin-top: 12px; }

.my-hero__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
	width: 42px; height: 42px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .82); color: #13203a; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	transition: background .15s ease;
}
.my-hero__nav:hover { background: #fff; }
.my-hero__nav--prev { inset-inline-start: 16px; }
.my-hero__nav--next { inset-inline-end: 16px; }

.my-hero__dots {
	position: absolute; bottom: 16px; inset-inline: 0; z-index: 6;
	display: flex; gap: 8px; justify-content: center;
}
.my-hero__dot {
	width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
	background: rgba(255, 255, 255, .55);
}
.my-hero__dot.is-active { background: #fff; width: 26px; border-radius: 999px; }

@media (max-width: 767px) {
	.my-hero__track { height: var(--hero-hm); }
	.my-hero__nav { width: 34px; height: 34px; }
	.my-hero__inner { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.my-hero__slide { transition: none; }
}
