/**
 * Carousel variant (V1) — split-layout slides.
 *
 * @package Tobalt_Renginiai
 * @author  Tobalt — https://tobalt.lt
 */

/* ── Container ────────────────────────────────────────────── */

.tr-carousel {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	overflow: hidden;
}

/* ── Track ────────────────────────────────────────────────── */

.tr-carousel__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: 0;
}

.tr-carousel__track::-webkit-scrollbar {
	display: none;
}

/* ── Slide ────────────────────────────────────────────────── */

.tr-carousel__slide {
	display: flex;
	flex: 0 0 100%;
	min-width: 100%;
	scroll-snap-align: start;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ── Image ────────────────────────────────────────────────── */

.tr-carousel__image {
	flex: 0 0 50%;
	max-width: 50%;
	position: relative;
	overflow: hidden;
	min-height: 320px;
}

.tr-carousel__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tr-carousel__image--placeholder {
	background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tr-carousel__image--placeholder svg {
	width: 48px;
	height: 48px;
	color: #a5b4fc;
}

/* ── Content ──────────────────────────────────────────────── */

.tr-carousel__content {
	flex: 1;
	padding: 32px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
}

.tr-carousel__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #111827;
}

.tr-carousel__title a {
	color: inherit;
	text-decoration: none;
}

.tr-carousel__title a:hover {
	color: #2563eb;
}

/* ── Meta ─────────────────────────────────────────────────── */

.tr-carousel__meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ── Excerpt ──────────────────────────────────────────────── */

.tr-carousel__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: #4b5563;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Actions Row ──────────────────────────────────────────── */

.tr-carousel__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* ── Navigation ───────────────────────────────────────────── */

.tr-carousel__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

.tr-carousel__prev,
.tr-carousel__next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #d1d5db;
	border-radius: 50%;
	background: #fff;
	color: #374151;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tr-carousel__prev:hover,
.tr-carousel__next:hover {
	border-color: #2563eb;
	color: #2563eb;
}

.tr-carousel__prev:disabled,
.tr-carousel__next:disabled {
	opacity: 0.4;
	cursor: default;
}

.tr-carousel__dots {
	display: flex;
	gap: 8px;
}

.tr-carousel__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: #d1d5db;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease;
}

.tr-carousel__dot--active {
	background: #2563eb;
}

/* ── Responsive ───────────────────────────────────────────── */

@media ( max-width: 768px ) {
	.tr-carousel__slide {
		flex-direction: column;
	}

	.tr-carousel__image {
		flex: none;
		max-width: 100%;
		min-height: 200px;
	}

	.tr-carousel__content {
		padding: 20px;
	}

	.tr-carousel__title {
		font-size: 20px;
	}
}
