.tc-carousel {
	position: relative;
	text-align: center;
	margin: 0 auto;
	cursor: grab;
	user-select: none;
}

.tc-carousel.tc-dragging {
	cursor: grabbing;
}

.tc-carousel img {
	-webkit-user-drag: none;
	user-drag: none;
	pointer-events: none;
}

/* Viewport: clips the sliding track; dots sit outside */
.tc-viewport {
	overflow: hidden;
	position: relative;
}

.tc-track {
	display: flex;
	transition: transform 0.5s ease;
	will-change: transform;
}

.tc-slide {
	min-width: 100%;
	padding: 16px;
	box-sizing: border-box;
}

.tc-slide img,
.tc-slide .tc-img {
	width: var(--tc-img-width, 100%);
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto 12px;
	object-fit: cover;
}

/* Hide content mode: remove bottom margin on image since there is no text */
.tc-carousel.tc-hide-content .tc-slide img,
.tc-carousel.tc-hide-content .tc-slide .tc-img {
	margin-bottom: 0;
}

.tc-slide h4 {
	margin: 0 0 4px;
	font-size: 16px;
}

.tc-slide p {
	margin: 0;
	font-size: 13px;
	color: #555;
}

.tc-slide-text {
	min-width: 0;
}

/* Image link wrapper */
.tc-img-link {
	display: block;
}

.tc-img-link img {
	pointer-events: auto;
}

/* Image position: side-by-side layouts (50/50 columns, 50px gap) */
.tc-carousel.tc-img-left .tc-slide,
.tc-carousel.tc-img-right .tc-slide {
	display: flex;
	align-items: center;
	gap: 50px;
	text-align: left;
}

.tc-carousel.tc-img-left .tc-slide {
	flex-direction: row;
}

.tc-carousel.tc-img-right .tc-slide {
	flex-direction: row-reverse;
}

.tc-carousel.tc-img-left .tc-slide .tc-img,
.tc-carousel.tc-img-right .tc-slide .tc-img,
.tc-carousel.tc-img-left .tc-slide .tc-img-link,
.tc-carousel.tc-img-right .tc-slide .tc-img-link {
	flex: 0 0 50%;
	max-width: 50%;
	margin: 0;
}

.tc-carousel.tc-img-left .tc-slide .tc-img-link .tc-img,
.tc-carousel.tc-img-right .tc-slide .tc-img-link .tc-img {
	flex: none;
	max-width: 100%;
	width: var(--tc-img-width, 100%);
}

.tc-carousel.tc-img-left .tc-slide-text,
.tc-carousel.tc-img-right .tc-slide-text {
	flex: 1 1 0%;
	min-width: 0;
}

/* Hide content mode: image takes full width in side-by-side */
.tc-carousel.tc-hide-content.tc-img-left .tc-slide .tc-img,
.tc-carousel.tc-hide-content.tc-img-right .tc-slide .tc-img,
.tc-carousel.tc-hide-content.tc-img-left .tc-slide .tc-img-link,
.tc-carousel.tc-hide-content.tc-img-right .tc-slide .tc-img-link {
	flex: 0 0 100%;
	max-width: 100%;
}

/* Dots — outside the viewport, 30px gap on desktop */
.tc-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 30px;
}

.tc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ccc;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.3s;
}

.tc-dot.is-active {
	background: #e63946;
}

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

/* Mobile: stack side-by-side layouts vertically */
@media (max-width: 768px) {
	.tc-carousel.tc-img-left .tc-slide,
	.tc-carousel.tc-img-right .tc-slide {
		flex-direction: column;
		gap: 24px;
	}

	.tc-carousel.tc-img-left .tc-slide .tc-img,
	.tc-carousel.tc-img-right .tc-slide .tc-img,
	.tc-carousel.tc-img-left .tc-slide .tc-img-link,
	.tc-carousel.tc-img-right .tc-slide .tc-img-link {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}

	.tc-carousel.tc-img-left .tc-slide-text,
	.tc-carousel.tc-img-right .tc-slide-text {
		flex: 0 0 auto;
		width: 100%;
	}

	.tc-dots {
		margin-top: 16px;
	}
}

/* Vertical orientation */
.tc-carousel.tc-vertical .tc-track {
	flex-direction: column;
}

.tc-carousel.tc-vertical .tc-slide {
	min-width: 100%;
	flex-shrink: 0;
}

.tc-carousel.tc-vertical .tc-dots {
	position: absolute;
	top: 50%;
	right: 12px;
	margin-top: 0;
	transform: translateY(-50%);
	flex-direction: column;
	padding: 8px 5px;
	background: rgba(0, 0, 0, 0.18);
	border-radius: 14px;
	z-index: 2;
}

.tc-carousel.tc-vertical .tc-dot {
	background: rgba(255, 255, 255, 0.55);
}

.tc-carousel.tc-vertical .tc-dot.is-active {
	background: #fff;
}

/* Shadow slides: stacked card layout with adjacent slides peeking behind the active one */
.tc-carousel.tc-shadow-slides .tc-viewport {
	overflow: visible;
}

.tc-carousel.tc-shadow-slides .tc-track {
	position: relative;
	display: block;
	transform: none !important;
	transition: none;
	min-height: 1px;
}

.tc-carousel.tc-shadow-slides .tc-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	min-width: 0;
	opacity: 0;
	pointer-events: none;
	transform: scale(0.85);
	transition: transform 0.5s ease, opacity 0.5s ease;
	z-index: 1;
}

.tc-carousel.tc-shadow-slides .tc-slide.tc-active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
	transform: scale(1);
	z-index: 3;
}

.tc-carousel.tc-shadow-slides .tc-slide.tc-prev,
.tc-carousel.tc-shadow-slides .tc-slide.tc-next {
	opacity: 0.55;
	pointer-events: none;
	z-index: 2;
}

/* In shadow mode, only the active slide shows its title/description.
   Prev/next slides act as visual ghosts (image only) so text doesn't overlap. */
.tc-carousel.tc-shadow-slides .tc-slide-text {
	transition: opacity 0.5s ease;
}

.tc-carousel.tc-shadow-slides .tc-slide:not(.tc-active) .tc-slide-text {
	opacity: 0;
	visibility: hidden;
}

/* Horizontal shadow: prev/next peek out to the sides */
.tc-carousel.tc-shadow-slides:not(.tc-vertical) .tc-slide.tc-prev {
	transform: translateX(-12%) scale(0.9);
}

.tc-carousel.tc-shadow-slides:not(.tc-vertical) .tc-slide.tc-next {
	transform: translateX(12%) scale(0.9);
}

/* Vertical shadow: prev/next peek out top/bottom */
.tc-carousel.tc-shadow-slides.tc-vertical .tc-slide.tc-prev {
	transform: translateY(-12%) scale(0.9);
}

.tc-carousel.tc-shadow-slides.tc-vertical .tc-slide.tc-next {
	transform: translateY(12%) scale(0.9);
}
