.tlew-carousel-section {
	width: 100%;
	max-width: 100%;
	margin: 0 auto 2rem;
}

/* Size presets control media height */
.tlew-carousel-section.size-small .tlew-carousel-track {
	height: 280px;
}
.tlew-carousel-section.size-medium .tlew-carousel-track {
	height: 750px;
}
.tlew-carousel-section.size-large .tlew-carousel-track {
	height: 800px;
}

@media (max-width: 600px) {
	.tlew-carousel-section.size-small .tlew-carousel-track,
	.tlew-carousel-section.size-medium .tlew-carousel-track,
	.tlew-carousel-section.size-large .tlew-carousel-track {
		height: 220px;
	}
}

/* Layouts */
.tlew-carousel-section.layout-left,
.tlew-carousel-section.layout-right {
	display: flex;
	align-items: stretch;
	gap: 0;
}

.tlew-carousel-section.layout-left .tlew-carousel,
.tlew-carousel-section.layout-right .tlew-carousel {
	flex: 3;
}

.tlew-carousel-section.layout-left .tlew-slide-texts,
.tlew-carousel-section.layout-right .tlew-slide-texts {
	flex: 1;
	display: flex;
	align-items: center;
	padding: 1.5rem;
	background: #f7f7f7;
	min-width: 200px;
}

.tlew-carousel-section.layout-right {
	flex-direction: row-reverse;
}

.tlew-carousel-section.layout-overlay .tlew-slide-texts {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.5rem;
	background: linear-gradient(transparent, rgba(0,0,0,0.75));
	color: #fff;
	z-index: 4;
}

.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0.6rem 1.5rem 0.4rem;
	background: var(--tlew-overlay-color, #000);
	opacity: var(--tlew-overlay-opacity, 0.7);
	color: #fff;
	z-index: 4;
	text-align: center;
}

.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-carousel-title,
.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-carousel-subtitle,
.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-carousel-desc {
	color: #fff;
	margin: 0 0 0.2rem;
	text-align: center;
	max-width: none;
	margin-left: auto;
	margin-right: auto;
}

.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-read-more {
	color: #fff;
	text-decoration: underline;
}

.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-dots {
	position: static;
	margin-top: 0.35rem;
	justify-content: center;
}

.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar .tlew-play-pause {
	position: absolute;
	bottom: 8px;
	right: 12px;
	z-index: 5;
	background: rgba(0, 0, 0, 0.4);
}

.tlew-carousel-section.layout-overlay .tlew-carousel-title,
.tlew-carousel-section.layout-overlay .tlew-carousel-desc {
	color: #fff;
}

.tlew-carousel-section.align-left .tlew-slide-text,
.tlew-carousel-section.align-left .tlew-carousel-title,
.tlew-carousel-section.align-left .tlew-carousel-desc {
	text-align: left;
}

.tlew-carousel-section.align-center .tlew-slide-text,
.tlew-carousel-section.align-center .tlew-carousel-title,
.tlew-carousel-section.align-center .tlew-carousel-desc {
	text-align: center;
}

/* Mobile: always stack */
@media (max-width: 768px) {
	.tlew-carousel-section.layout-left,
	.tlew-carousel-section.layout-right {
		display: block;
	}
	.tlew-carousel-section.layout-left .tlew-slide-texts,
	.tlew-carousel-section.layout-right .tlew-slide-texts {
		display: block;
		background: transparent;
		padding: 0.75rem 0 0;
	}
	.tlew-carousel-section.layout-overlay .tlew-slide-texts,
	.tlew-carousel-section.layout-overlay-bottom .tlew-overlay-bar {
		position: static;
		background: transparent;
		opacity: 1;
		color: inherit;
		padding: 0.75rem 0 0;
	}
	.tlew-carousel-section.layout-overlay .tlew-carousel-title,
	.tlew-carousel-section.layout-overlay .tlew-carousel-desc,
	.tlew-carousel-section.layout-overlay-bottom .tlew-carousel-title,
	.tlew-carousel-section.layout-overlay-bottom .tlew-carousel-subtitle,
	.tlew-carousel-section.layout-overlay-bottom .tlew-carousel-desc {
		color: inherit;
	}
	.tlew-carousel-section.layout-overlay-bottom .tlew-read-more {
		color: #1a4d8c;
	}
}

.tlew-slide-texts {
	position: relative;
	min-height: 4em;
	margin-top: 0.75rem;
}

.tlew-slide-text {
	display: none;
	text-align: center;
}

.tlew-slide-text.active {
	display: block;
}

.tlew-carousel-title {
	font-family: var(--tlew-header-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: var(--tlew-header-size, 28px);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.75rem;
	text-align: center;
	color: #1a1a1a;
}

@media (max-width: 600px) {
	.tlew-carousel-title {
		font-size: calc(var(--tlew-header-size, 28px) * 0.8);
	}
}

.tlew-carousel-desc {
	font-family: var(--tlew-desc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-size: var(--tlew-desc-size, 16px);
	line-height: 1.5;
	margin: 0.75rem 0 0;
	text-align: center;
	color: #333;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.tlew-read-more {
	display: inline-block;
	margin-left: 0.5em;
	font-weight: 600;
	color: #1a4d8c;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tlew-read-more:hover {
	color: #0d2f5c;
}

@media (max-width: 600px) {
	.tlew-carousel-desc {
		font-size: calc(var(--tlew-desc-size, 16px) * 0.95);
		padding: 0 12px;
	}
	.tlew-read-more {
		display: block;
		margin: 0.5em 0 0;
	}
}

.tlew-carousel {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: #111;
	border-radius: 8px;
}

.tlew-carousel-track {
	position: relative;
	width: 100%;
	min-height: 200px;
	/* height is set by size-* classes */
}

@media (max-width: 600px) {
	.tlew-carousel-track {
		min-height: 180px;
	}
}

.tlew-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.tlew-slide.active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.tlew-media {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--pos-x, 50%) var(--pos-y, 50%);
	display: block;
	transform: scale(var(--zoom, 1));
	transform-origin: center center;
}

.tlew-slide.fit-contain .tlew-media {
	object-fit: contain;
	transform: none;
	width: 100%;
	height: auto;
	max-height: none;
}

/* When the active slide is contain, let the track size to the image */
.tlew-carousel-track:has(.tlew-slide.fit-contain.active) {
	height: auto !important;
	min-height: 0;
}

.tlew-slide.fit-contain.active {
	position: relative;
	inset: auto;
	height: auto;
}

.tlew-slide video.tlew-media {
	background: #000;
}

.tlew-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px 16px;
	background: linear-gradient(transparent, rgba(0,0,0,0.75));
	color: #fff;
	font-size: 16px;
	line-height: 1.4;
	text-align: center;
	z-index: 2;
}

@media (max-width: 600px) {
	.tlew-caption {
		font-size: 14px;
		padding: 10px 12px;
	}
}

.tlew-prev,
.tlew-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 28px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.tlew-prev:hover,
.tlew-next:hover {
	background: rgba(0, 0, 0, 0.75);
}

.tlew-prev {
	left: 12px;
}

.tlew-next {
	right: 12px;
}

@media (max-width: 600px) {
	.tlew-prev,
	.tlew-next {
		width: 36px;
		height: 36px;
		font-size: 22px;
	}
	.tlew-prev { left: 8px; }
	.tlew-next { right: 8px; }
}

.tlew-play-pause {
	position: absolute;
	bottom: 12px;
	right: 12px;
	z-index: 4;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.tlew-carousel-subtitle {
	font-family: var(--tlew-desc-font, sans-serif);
	font-size: calc(var(--tlew-header-size, 28px) * 0.65);
	margin: -0.4rem 0 0.75rem;
	opacity: 0.85;
}

.tlew-dots {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 3;
	pointer-events: none;
}

.tlew-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, transform 0.2s;
	pointer-events: auto;
	outline: none;
	box-shadow: none;
}

.tlew-dot:focus,
.tlew-dot:focus-visible,
.tlew-prev:focus,
.tlew-next:focus,
.tlew-play-pause:focus {
	outline: none;
	box-shadow: none;
}

.tlew-dot.active {
	background: #fff;
	transform: scale(1.2);
}

.tlew-dot:hover {
	background: rgba(255, 255, 255, 0.8);
}

/* Pause animation on hover for desktop */
@media (hover: hover) {
	.tlew-carousel:hover .tlew-slide {
		/* JS handles pause */
	}
}
