/**
 * CMS Tour Manager — Hero Slider Styles
 * 5 templates: fade · slide · split · cinematic · reveal
 */

/* ═══════════════════════════════════════════════════
   BASE SLIDER SHELL
═══════════════════════════════════════════════════ */
.ctm-slider {
	position: relative;
	width: 100%;
	height: var(--ctm-slider-h, 680px);
	overflow: hidden;
	background: #111;
	--ctm-slider-dur: 700ms;
	/* Respect reduced-motion globally */
}

@media (prefers-reduced-motion: reduce) {
	.ctm-slider { --ctm-slider-dur: 0ms; }
}

/* ── Slide base ── */
.ctm-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: stretch;
	opacity: 0;
	pointer-events: none;
	z-index: 0;
	will-change: opacity, transform;
}

.ctm-slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

/* ── Background image ── */
.ctm-slide__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
}

/* ── Overlay ── */
.ctm-slide__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ── Content wrapper ── */
.ctm-slide__content {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 0 5%;
}

/* ── Inner content block ── */
.ctm-slide__inner {
	max-width: 680px;
	width: 100%;
}

.ctm-slide__inner--left   { margin-right: auto; text-align: left; }
.ctm-slide__inner--center { margin: 0 auto;      text-align: center; }
.ctm-slide__inner--right  { margin-left: auto;   text-align: right; }

/* ── Label badge ── */
.ctm-slide__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ctm-accent, #1a252c);
	background: rgba(255,255,255,.92);
	padding: 5px 14px;
	border-radius: 20px;
	margin-bottom: 14px;
	backdrop-filter: blur(6px);
}

/* ── Title ── */
.ctm-slide__title {
	font-size: var(--ctm-slide-title-size, clamp(1.8rem, 4.5vw, 3.4rem));
	font-weight: 800;
	line-height: 1.1;
	color: #fff;
	margin: 0 0 14px;
	text-shadow: 0 2px 20px rgba(0,0,0,.4);
	letter-spacing: -.02em;
}

/* ── Subtitle ── */
.ctm-slide__subtitle {
	font-size: clamp(.88rem, 1.5vw, 1.05rem);
	color: rgba(255,255,255,.88);
	margin: 0 0 22px;
	line-height: 1.6;
	text-shadow: 0 1px 8px rgba(0,0,0,.35);
	max-width: 520px;
}

.ctm-slide__inner--center .ctm-slide__subtitle { margin-left: auto; margin-right: auto; }

/* ── Tour info pill ── */
.ctm-slide__tour-pill {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
	font-size: .8rem;
	font-weight: 600;
	padding: 6px 16px;
	border-radius: 30px;
	margin-bottom: 20px;
}

.ctm-slide__tour-pill svg { flex-shrink: 0; opacity: .8; }
.ctm-slide__tour-pill__price { color: var(--ctm-accent-light, #b0bec5); }

/* ── Buttons ── */
.ctm-slide__btns {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.ctm-slide__inner--center .ctm-slide__btns { justify-content: center; }
.ctm-slide__inner--right  .ctm-slide__btns { justify-content: flex-end; }

.ctm-slide__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 13px 28px;
	border-radius: var(--ctm-btn-radius, 6px);
	font-size: .9rem;
	font-weight: 700;
	letter-spacing: .03em;
	text-decoration: none !important;
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, background .2s;
	white-space: nowrap;
}

.ctm-slide__btn:hover { transform: translateY(-2px); }

.ctm-slide__btn--primary {
	background: var(--ctm-btn-bg, var(--ctm-accent, #1a252c));
	color: var(--ctm-btn-text, #fff) !important;
	box-shadow: 0 4px 18px rgba(0,0,0,.3);
}

.ctm-slide__btn--primary:hover {
	background: var(--ctm-accent2, var(--ctm-accent-dark, #151e24));
	box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.ctm-slide__btn--secondary {
	background: rgba(255,255,255,.12);
	color: #fff !important;
	border: 2px solid rgba(255,255,255,.7);
	backdrop-filter: blur(6px);
}

.ctm-slide__btn--secondary:hover {
	background: rgba(255,255,255,.25);
	border-color: #fff;
}

/* ═══════════════════════════════════════════════════
   CAPTION ANIMATIONS
   Applied as classes on .ctm-slide__inner via PHP.
   JS applies .is-active/.is-entering to the slide,
   CSS handles the content animation.
═══════════════════════════════════════════════════ */

/* fade-up (default) */
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-up .ctm-slide__label,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-up .ctm-slide__title,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-up .ctm-slide__subtitle,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-up .ctm-slide__tour-pill,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-up .ctm-slide__btns {
	animation: ctmCapFadeUp var(--ctm-slider-dur, 700ms) ease both;
}

/* fade only */
.ctm-slide.is-entering .ctm-slide__inner--anim-fade .ctm-slide__label,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade .ctm-slide__title,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade .ctm-slide__subtitle,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade .ctm-slide__tour-pill,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade .ctm-slide__btns {
	animation: ctmCapFade var(--ctm-slider-dur, 700ms) ease both;
}

/* fade-left */
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-left .ctm-slide__label,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-left .ctm-slide__title,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-left .ctm-slide__subtitle,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-left .ctm-slide__tour-pill,
.ctm-slide.is-entering .ctm-slide__inner--anim-fade-left .ctm-slide__btns {
	animation: ctmCapFadeLeft var(--ctm-slider-dur, 700ms) ease both;
}

/* zoom */
.ctm-slide.is-entering .ctm-slide__inner--anim-zoom .ctm-slide__label,
.ctm-slide.is-entering .ctm-slide__inner--anim-zoom .ctm-slide__title,
.ctm-slide.is-entering .ctm-slide__inner--anim-zoom .ctm-slide__subtitle,
.ctm-slide.is-entering .ctm-slide__inner--anim-zoom .ctm-slide__tour-pill,
.ctm-slide.is-entering .ctm-slide__inner--anim-zoom .ctm-slide__btns {
	animation: ctmCapZoom var(--ctm-slider-dur, 700ms) ease both;
}

/* Stagger delays — each content element enters slightly after the previous */
.ctm-slide__title       { animation-delay: .06s !important; }
.ctm-slide__subtitle    { animation-delay: .14s !important; }
.ctm-slide__tour-pill   { animation-delay: .20s !important; }
.ctm-slide__btns        { animation-delay: .26s !important; }

@keyframes ctmCapFadeUp   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes ctmCapFade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes ctmCapFadeLeft { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes ctmCapZoom     { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* ── Mobile hide ── */
@media (max-width: 640px) {
	.ctm-hide-mobile { display: none !important; }
}

/* ═══════════════════════════════════════════════════
   CONTROLS
═══════════════════════════════════════════════════ */

/* ── Arrows — structural base ── */
.ctm-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 48px;
	height: 48px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, transform .2s, box-shadow .2s, border-color .2s;
	padding: 0;
	/* visual defaults — overridden per style class */
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
}
.ctm-slider-arrow:hover {
	background: rgba(0,0,0,.72);
	transform: translateY(-50%) scale(1.08);
}
.ctm-slider-arrow--prev { left: 18px; }
.ctm-slider-arrow--next { right: 18px; }

/* ── Arrow Style: circle (default — dark glass) ── */
.ctm-slider--arrows-circle .ctm-slider-arrow {
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
}
.ctm-slider--arrows-circle .ctm-slider-arrow:hover {
	background: rgba(0,0,0,.72);
	transform: translateY(-50%) scale(1.08);
}

/* ── Arrow Style: light (white circle, shadow) ── */
.ctm-slider--arrows-light .ctm-slider-arrow {
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(6px);
	border: none;
	box-shadow: 0 2px 14px rgba(0,0,0,.22);
	color: #1a252c;
}
.ctm-slider--arrows-light .ctm-slider-arrow:hover {
	background: #fff;
	box-shadow: 0 4px 20px rgba(0,0,0,.32);
	transform: translateY(-50%) scale(1.1);
}

/* ── Arrow Style: accent (filled with theme accent) ── */
.ctm-slider--arrows-accent .ctm-slider-arrow {
	border-radius: 50%;
	background: var(--ctm-accent, #1a6e42);
	border: none;
	color: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.ctm-slider--arrows-accent .ctm-slider-arrow:hover {
	background: var(--ctm-accent-dark, #14532d);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 4px 18px rgba(0,0,0,.32);
}

/* ── Arrow Style: square (sharp-corner, dark) ── */
.ctm-slider--arrows-square .ctm-slider-arrow {
	border-radius: 6px;
	background: rgba(0,0,0,.55);
	border: 1px solid rgba(255,255,255,.15);
	color: #fff;
	backdrop-filter: blur(4px);
}
.ctm-slider--arrows-square .ctm-slider-arrow:hover {
	background: rgba(0,0,0,.80);
	transform: translateY(-50%) scale(1.06);
}

/* ── Arrow Style: minimal (borderless, icon only) ── */
.ctm-slider--arrows-minimal .ctm-slider-arrow {
	border-radius: 50%;
	background: transparent;
	border: none;
	color: #fff;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.55));
	width: 44px;
	height: 44px;
}
.ctm-slider--arrows-minimal .ctm-slider-arrow:hover {
	transform: translateY(-50%) scale(1.18);
	filter: drop-shadow(0 3px 10px rgba(0,0,0,.7));
}
.ctm-slider--arrows-minimal .ctm-slider-arrow--prev { left: 12px; }
.ctm-slider--arrows-minimal .ctm-slider-arrow--next { right: 12px; }

/* ── Dots — structural base ── */
.ctm-slider-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Default dot appearance (when no style class) */
.ctm-slider-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.45);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background .25s, width .25s, height .25s, border-radius .25s, border-color .25s;
	flex-shrink: 0;
}
.ctm-slider-dot.is-active {
	background: #fff;
	width: 24px;
	border-radius: 4px;
}

/* ── Dot Style: dot (default — pill on active) ── */
.ctm-slider--dots-dot .ctm-slider-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.45);
	border: none;
}
.ctm-slider--dots-dot .ctm-slider-dot.is-active {
	background: #fff;
	width: 24px;
	border-radius: 4px;
}

/* ── Dot Style: bar (equal bars, accent active) ── */
.ctm-slider--dots-bar .ctm-slider-dots { gap: 5px; bottom: 18px; }
.ctm-slider--dots-bar .ctm-slider-dot {
	width: 28px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255,255,255,.35);
	border: none;
}
.ctm-slider--dots-bar .ctm-slider-dot.is-active {
	background: var(--ctm-accent, #fff);
	width: 28px;
	height: 4px;
}

/* ── Dot Style: ring (outlined circles, filled active) ── */
.ctm-slider--dots-ring .ctm-slider-dots { gap: 10px; }
.ctm-slider--dots-ring .ctm-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: transparent;
	border: 2px solid rgba(255,255,255,.65);
}
.ctm-slider--dots-ring .ctm-slider-dot.is-active {
	background: #fff;
	border-color: #fff;
	width: 10px;
}

/* ── Dot Style: line (thin short dashes, active longer) ── */
.ctm-slider--dots-line .ctm-slider-dots { gap: 4px; bottom: 14px; }
.ctm-slider--dots-line .ctm-slider-dot {
	width: 18px;
	height: 2px;
	border-radius: 1px;
	background: rgba(255,255,255,.38);
	border: none;
}
.ctm-slider--dots-line .ctm-slider-dot.is-active {
	background: #fff;
	width: 36px;
	height: 2px;
}

/* ── Dot Style: square (small squares, accent fill active) ── */
.ctm-slider--dots-square .ctm-slider-dots { gap: 6px; }
.ctm-slider--dots-square .ctm-slider-dot {
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: rgba(255,255,255,.38);
	border: none;
}
.ctm-slider--dots-square .ctm-slider-dot.is-active {
	background: var(--ctm-accent, #fff);
	width: 8px;
	border-radius: 2px;
	box-shadow: 0 0 0 2px rgba(255,255,255,.45);
}

/* ═══════════════════════════════════════════════════
   ARROW POSITIONS
   Class applied to .ctm-slider wrapper:
   ctm-slider--arrows-pos-{sides|top-left|top-right|bottom-left|bottom-right|bottom-center}
   Default (sides) = base styles already handle it.
   Corner/edge positions group both arrows together.
═══════════════════════════════════════════════════ */

/* Shared corner/edge reset — flatten the vertical-center transform */
.ctm-slider--arrows-pos-top-left .ctm-slider-arrow,
.ctm-slider--arrows-pos-top-right .ctm-slider-arrow,
.ctm-slider--arrows-pos-bottom-left .ctm-slider-arrow,
.ctm-slider--arrows-pos-bottom-right .ctm-slider-arrow,
.ctm-slider--arrows-pos-bottom-center .ctm-slider-arrow {
	top: auto;
	transform: none;
}
/* Override hover for all style classes in corner/edge positions */
.ctm-slider--arrows-pos-top-left .ctm-slider-arrow:hover,
.ctm-slider--arrows-pos-top-right .ctm-slider-arrow:hover,
.ctm-slider--arrows-pos-bottom-left .ctm-slider-arrow:hover,
.ctm-slider--arrows-pos-bottom-right .ctm-slider-arrow:hover,
.ctm-slider--arrows-pos-bottom-center .ctm-slider-arrow:hover {
	transform: scale(1.1) !important;
}

/* ── top-left — both arrows at top-left ── */
.ctm-slider--arrows-pos-top-left .ctm-slider-arrow { top: 20px; bottom: auto; }
.ctm-slider--arrows-pos-top-left .ctm-slider-arrow--prev { left: 18px; right: auto; }
.ctm-slider--arrows-pos-top-left .ctm-slider-arrow--next { left: 74px; right: auto; }

/* ── top-right — both arrows at top-right ── */
.ctm-slider--arrows-pos-top-right .ctm-slider-arrow { top: 20px; bottom: auto; }
.ctm-slider--arrows-pos-top-right .ctm-slider-arrow--prev { right: 74px; left: auto; }
.ctm-slider--arrows-pos-top-right .ctm-slider-arrow--next { right: 18px; left: auto; }

/* ── bottom-left — both arrows at bottom-left ── */
.ctm-slider--arrows-pos-bottom-left .ctm-slider-arrow { bottom: 22px; }
.ctm-slider--arrows-pos-bottom-left .ctm-slider-arrow--prev { left: 18px; right: auto; }
.ctm-slider--arrows-pos-bottom-left .ctm-slider-arrow--next { left: 74px; right: auto; }

/* ── bottom-right — both arrows at bottom-right ── */
.ctm-slider--arrows-pos-bottom-right .ctm-slider-arrow { bottom: 22px; }
.ctm-slider--arrows-pos-bottom-right .ctm-slider-arrow--prev { right: 74px; left: auto; }
.ctm-slider--arrows-pos-bottom-right .ctm-slider-arrow--next { right: 18px; left: auto; }

/* ── bottom-center — both arrows grouped bottom-center ── */
.ctm-slider--arrows-pos-bottom-center .ctm-slider-arrow { bottom: 22px; }
.ctm-slider--arrows-pos-bottom-center .ctm-slider-arrow--prev { left: calc(50% - 56px); right: auto; }
.ctm-slider--arrows-pos-bottom-center .ctm-slider-arrow--next { left: calc(50% + 8px); right: auto; }

/* ═══════════════════════════════════════════════════
   DOT POSITIONS
   Class applied to .ctm-slider wrapper:
   ctm-slider--dots-pos-{bottom-center|bottom-left|bottom-right|
                          top-center|top-left|top-right|
                          left-center|right-center}
   Vertical positions (left/right-center) flip flex-direction to column.
═══════════════════════════════════════════════════ */

/* ── bottom-center (default — base already handles) ── */
/* no override needed */

/* ── bottom-left ── */
.ctm-slider--dots-pos-bottom-left .ctm-slider-dots {
	left: 20px; right: auto;
	bottom: 20px; top: auto;
	transform: none;
	flex-direction: row;
}

/* ── bottom-right ── */
.ctm-slider--dots-pos-bottom-right .ctm-slider-dots {
	left: auto; right: 20px;
	bottom: 20px; top: auto;
	transform: none;
	flex-direction: row;
}

/* ── top-center ── */
.ctm-slider--dots-pos-top-center .ctm-slider-dots {
	bottom: auto; top: 20px;
	left: 50%; right: auto;
	transform: translateX(-50%);
	flex-direction: row;
}

/* ── top-left ── */
.ctm-slider--dots-pos-top-left .ctm-slider-dots {
	bottom: auto; top: 20px;
	left: 20px; right: auto;
	transform: none;
	flex-direction: row;
}

/* ── top-right ── */
.ctm-slider--dots-pos-top-right .ctm-slider-dots {
	bottom: auto; top: 20px;
	left: auto; right: 20px;
	transform: none;
	flex-direction: row;
}

/* ── left-center (vertical column) ── */
.ctm-slider--dots-pos-left-center .ctm-slider-dots {
	bottom: auto; top: 50%;
	left: 16px; right: auto;
	transform: translateY(-50%);
	flex-direction: column;
}

/* ── right-center (vertical column) ── */
.ctm-slider--dots-pos-right-center .ctm-slider-dots {
	bottom: auto; top: 50%;
	left: auto; right: 16px;
	transform: translateY(-50%);
	flex-direction: column;
}

/* ── Vertical positions: fix pill direction for dot style ── */
.ctm-slider--dots-pos-left-center.ctm-slider--dots-dot .ctm-slider-dot.is-active,
.ctm-slider--dots-pos-right-center.ctm-slider--dots-dot .ctm-slider-dot.is-active {
	width: 8px !important;
	height: 24px !important;
	border-radius: 4px !important;
}

/* ── Vertical positions: fix line style dimensions ── */
.ctm-slider--dots-pos-left-center.ctm-slider--dots-line .ctm-slider-dot,
.ctm-slider--dots-pos-right-center.ctm-slider--dots-line .ctm-slider-dot {
	width: 2px !important;
	height: 18px !important;
}
.ctm-slider--dots-pos-left-center.ctm-slider--dots-line .ctm-slider-dot.is-active,
.ctm-slider--dots-pos-right-center.ctm-slider--dots-line .ctm-slider-dot.is-active {
	width: 2px !important;
	height: 36px !important;
}

/* ── Vertical positions: fix bar style dimensions ── */
.ctm-slider--dots-pos-left-center.ctm-slider--dots-bar .ctm-slider-dot,
.ctm-slider--dots-pos-right-center.ctm-slider--dots-bar .ctm-slider-dot {
	width: 4px !important;
	height: 28px !important;
}
.ctm-slider--dots-pos-left-center.ctm-slider--dots-bar .ctm-slider-dot.is-active,
.ctm-slider--dots-pos-right-center.ctm-slider--dots-bar .ctm-slider-dot.is-active {
	width: 4px !important;
	height: 28px !important;
}

/* ── Progress bar ── */
.ctm-slider-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	width: 0;
	background: var(--ctm-accent, #1a252c);
	z-index: 10;
	border-radius: 0 2px 2px 0;
}

/* ═══════════════════════════════════════════════════
   TEMPLATE 1 — FADE (default)
   Smooth crossfade between full-bleed slides.
═══════════════════════════════════════════════════ */
.ctm-slider--fade .ctm-slide {
	transition: opacity var(--ctm-slider-dur) ease;
}

.ctm-slider--fade .ctm-slide.is-entering {
	animation: ctmFadeIn var(--ctm-slider-dur) ease forwards;
}

.ctm-slider--fade .ctm-slide.is-leaving {
	animation: ctmFadeOut var(--ctm-slider-dur) ease forwards;
	z-index: 2; /* leave on top so crossfade looks right */
}

@keyframes ctmFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ctmFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ═══════════════════════════════════════════════════
   TEMPLATE 2 — SLIDE PUSH
   Horizontal push — entering slides in from the side.
═══════════════════════════════════════════════════ */
.ctm-slider--slide .ctm-slide {
	opacity: 1; /* no fade — all about position */
}

.ctm-slider--slide .ctm-slide.is-active {
	opacity: 1;
}

/* Forward direction (default) */
.ctm-slider--slide[data-dir="forward"] .ctm-slide.is-entering {
	animation: ctmSlideInRight var(--ctm-slider-dur) cubic-bezier(.4,0,.2,1) forwards;
}
.ctm-slider--slide[data-dir="forward"] .ctm-slide.is-leaving {
	animation: ctmSlideOutLeft var(--ctm-slider-dur) cubic-bezier(.4,0,.2,1) forwards;
	z-index: 2;
}

/* Backward direction */
.ctm-slider--slide[data-dir="backward"] .ctm-slide.is-entering {
	animation: ctmSlideInLeft var(--ctm-slider-dur) cubic-bezier(.4,0,.2,1) forwards;
}
.ctm-slider--slide[data-dir="backward"] .ctm-slide.is-leaving {
	animation: ctmSlideOutRight var(--ctm-slider-dur) cubic-bezier(.4,0,.2,1) forwards;
	z-index: 2;
}

@keyframes ctmSlideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ctmSlideOutLeft  { from { transform: translateX(0); }   to { transform: translateX(-100%); } }
@keyframes ctmSlideInLeft   { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes ctmSlideOutRight { from { transform: translateX(0); }   to { transform: translateX(100%); } }

/* ═══════════════════════════════════════════════════
   TEMPLATE 3 — SPLIT PANEL
   Left: dark branded panel with content.
   Right: full-bleed photo.
   Fade transition, content slides up.
═══════════════════════════════════════════════════ */
.ctm-slider--split .ctm-slide {
	transition: opacity var(--ctm-slider-dur) ease;
	flex-direction: row;
	align-items: stretch;
}

/* Left content panel */
.ctm-slide__panel {
	position: relative;
	z-index: 2;
	width: 45%;
	flex-shrink: 0;
	background: linear-gradient(135deg, #0f2027 0%, #203a43 55%, #1a3a2e 100%);
	display: flex;
	align-items: center;
	padding: 40px 40px 40px 5%;
	box-sizing: border-box;
}

.ctm-slide__panel .ctm-slide__inner {
	max-width: 420px;
}

.ctm-slide__panel .ctm-slide__title {
	font-size: clamp(1.6rem, 3vw, 2.6rem);
	color: #fff;
}

.ctm-slide__panel .ctm-slide__label {
	background: rgba(255,255,255,.1);
	color: var(--ctm-accent-light, #b0bec5);
}

.ctm-slide__panel .ctm-slide__subtitle {
	color: rgba(255,255,255,.75);
}

/* Right image panel */
.ctm-slide__bg-split {
	position: absolute;
	top: 0;
	right: 0;
	width: 58%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1;
}

.ctm-slide__bg-split::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, #0f2027 0%, transparent 20%);
}

/* Split slide content enter animation */
.ctm-slider--split .ctm-slide.is-entering .ctm-slide__inner {
	animation: ctmSplitContentIn calc(var(--ctm-slider-dur) * 1.3) ease forwards;
}

.ctm-slider--split .ctm-slide.is-entering {
	animation: ctmFadeIn var(--ctm-slider-dur) ease forwards;
}
.ctm-slider--split .ctm-slide.is-leaving {
	animation: ctmFadeOut var(--ctm-slider-dur) ease forwards;
	z-index: 2;
}

@keyframes ctmSplitContentIn {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   TEMPLATE 4 — CINEMATIC (Ken Burns)
   Full bleed, dramatic overlay, zoom animation,
   content bottom-left.
═══════════════════════════════════════════════════ */
.ctm-slider--cinematic .ctm-slide {
	transition: opacity var(--ctm-slider-dur) ease;
	align-items: flex-end;
}

.ctm-slider--cinematic .ctm-slide__content {
	align-items: flex-end;
	padding-bottom: 60px;
}

.ctm-slider--cinematic .ctm-slide.is-entering {
	animation: ctmFadeIn var(--ctm-slider-dur) ease forwards;
}
.ctm-slider--cinematic .ctm-slide.is-leaving {
	animation: ctmFadeOut var(--ctm-slider-dur) ease forwards;
	z-index: 2;
}

/* Ken Burns image zoom */
.ctm-slider--cinematic .ctm-slide.is-active .ctm-slide__bg {
	animation: ctmKenBurns 8s ease forwards;
}

@keyframes ctmKenBurns {
	from { transform: scale(1.0); }
	to   { transform: scale(1.08); }
}

/* Cinematic inner — always left-aligned, wider title */
.ctm-slider--cinematic .ctm-slide__inner {
	max-width: 700px;
}

.ctm-slider--cinematic .ctm-slide__title {
	font-size: clamp(2rem, 5vw, 4rem);
	font-style: italic;
	letter-spacing: -.03em;
	text-shadow: 0 4px 30px rgba(0,0,0,.6);
}

.ctm-slider--cinematic .ctm-slide__label {
	background: var(--ctm-accent, #1a252c);
	color: #fff;
}

/* Content enters from below */
.ctm-slider--cinematic .ctm-slide.is-entering .ctm-slide__content {
	animation: ctmCinContentIn calc(var(--ctm-slider-dur) + 200ms) ease forwards;
}

@keyframes ctmCinContentIn {
	from { opacity: 0; transform: translateY(32px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Extra-dark bottom gradient */
.ctm-slider--cinematic .ctm-slide__overlay {
	background: linear-gradient(
		to bottom,
		rgba(0,0,0,.1) 0%,
		rgba(0,0,0,.2) 40%,
		rgba(0,0,0,.7) 80%,
		rgba(0,0,0,.85) 100%
	) !important;
}

/* ═══════════════════════════════════════════════════
   TEMPLATE 5 — CONTENT REVEAL
   Image stays, headline/buttons rise up on transition.
   Modern, editorial feel.
═══════════════════════════════════════════════════ */
.ctm-slider--reveal .ctm-slide {
	transition: opacity var(--ctm-slider-dur) ease;
}

.ctm-slider--reveal .ctm-slide.is-entering {
	animation: ctmFadeIn var(--ctm-slider-dur) ease forwards;
}
.ctm-slider--reveal .ctm-slide.is-leaving {
	animation: ctmFadeOut var(--ctm-slider-dur) ease forwards;
	z-index: 2;
}

.ctm-slider--reveal .ctm-slide.is-entering .ctm-slide__label {
	animation: ctmRevealUp calc(var(--ctm-slider-dur) + 100ms) .05s ease both;
}
.ctm-slider--reveal .ctm-slide.is-entering .ctm-slide__title {
	animation: ctmRevealUp calc(var(--ctm-slider-dur) + 150ms) .1s ease both;
}
.ctm-slider--reveal .ctm-slide.is-entering .ctm-slide__subtitle {
	animation: ctmRevealUp calc(var(--ctm-slider-dur) + 150ms) .18s ease both;
}
.ctm-slider--reveal .ctm-slide.is-entering .ctm-slide__tour-pill {
	animation: ctmRevealUp calc(var(--ctm-slider-dur) + 100ms) .22s ease both;
}
.ctm-slider--reveal .ctm-slide.is-entering .ctm-slide__btns {
	animation: ctmRevealUp calc(var(--ctm-slider-dur) + 100ms) .28s ease both;
}

@keyframes ctmRevealUp {
	from { opacity: 0; transform: translateY(36px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Thin line accent at bottom of reveal template */
.ctm-slider--reveal .ctm-slider-progress {
	height: 4px;
	background: linear-gradient(to right, var(--ctm-accent, #1a252c), var(--ctm-accent-light, #b0bec5));
}

/* ═══════════════════════════════════════════════════
   SLIDE COUNTER
═══════════════════════════════════════════════════ */
.ctm-slider-counter {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 20px;
	letter-spacing: .06em;
	pointer-events: none;
}

.ctm-slider-counter__cur  { color: #fff; }
.ctm-slider-counter__sep  { opacity: .5; margin: 0 1px; }
.ctm-slider-counter__total { opacity: .65; }

/* ── Arrow disabled state (non-looping mode) ── */
.ctm-slider-arrow.is-disabled {
	opacity: .3;
	pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.ctm-slider {
		/* Use explicit mobile height var if set, otherwise cap at 80svh */
		height: var(--ctm-slider-mobile-h, min(var(--ctm-slider-h, 680px), 80svh));
	}

	/* Split becomes stacked on mobile */
	.ctm-slider--split .ctm-slide {
		flex-direction: column;
	}

	.ctm-slide__panel {
		width: 100%;
		padding: 28px 24px 24px;
		min-height: auto;
	}

	.ctm-slide__bg-split {
		position: relative;
		width: 100%;
		height: 220px;
		order: -1; /* image on top */
	}

	.ctm-slide__bg-split::after {
		background: linear-gradient(to bottom, transparent 60%, #0f2027 100%);
	}

	/* Arrows: show on tablet, hide on phone */
	.ctm-slider-arrow {
		width: 42px;
		height: 42px;
	}

	/* Bigger tap targets for dots */
	.ctm-slider-dot {
		width: 10px;
		height: 10px;
		min-width: 44px; /* invisible hit area expansion via padding */
		min-height: 44px;
		background-clip: padding-box;
		padding: 17px 17px;
		background: rgba(255,255,255,.45);
		background-clip: content-box;
		margin: -17px -13px; /* collapse the spacing so dots don't spread apart */
		border-radius: 50%;
	}

	.ctm-slider-dot.is-active {
		background: #fff;
		background-clip: content-box;
		width: 10px;
		padding: 17px 22px;
		border-radius: 5px;
	}

	.ctm-slide__content { padding: 0 20px; }
	.ctm-slide__btns { gap: 8px; }
	.ctm-slide__btn  { padding: 11px 20px; font-size: .82rem; }

	/* Counter repositioned on mobile so it doesn't clash with arrows */
	.ctm-slider-counter { top: auto; bottom: 56px; right: 16px; font-size: 11px; padding: 4px 10px; }
}

@media (max-width: 480px) {
	.ctm-slider-arrow { display: none; } /* too cramped on phones */
	.ctm-slider-counter { bottom: 48px; }

	.ctm-slide__title { font-size: var(--ctm-slide-title-size-mobile, var(--ctm-slide-title-size, clamp(1.4rem, 7vw, 1.9rem))); }
	.ctm-slide__subtitle { font-size: .82rem; }
	.ctm-slide__btns  { flex-direction: column; align-items: flex-start; }
	.ctm-slide__inner--center .ctm-slide__btns { align-items: center; }
	.ctm-slide__btn { width: 100%; max-width: 320px; justify-content: center; }

	/* Slide counter back to top-right at very small screens */
	.ctm-slider-counter { top: 14px; bottom: auto; right: 14px; }

	/* Ensure slider uses safe area for phones with home indicator */
	.ctm-slider {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
