/**
 * Tarsil Feature — front-end styles.
 */

.tarf-spotlight {
	--tarf-accent: #1d4ed8;
	--tarf-accent-soft: rgba(29, 78, 216, 0.08);
	--tarf-border: #e6e9ef;
	--tarf-surface: #ffffff;
	--tarf-text: #0f172a;
	--tarf-muted: #64748b;
	--tarf-radius: 16px;
	--tarf-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);

	box-sizing: border-box;
	width: 100%;
	color: var(--tarf-text);
	font-family: inherit;
}

.tarf-spotlight *,
.tarf-spotlight *::before,
.tarf-spotlight *::after {
	box-sizing: border-box;
}

.tarf-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
	gap: 28px;
	align-items: stretch;
}

/* ---------- Left list ---------- */
.tarf-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tarf-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	padding: 18px 20px;
	text-align: start;
	background: var(--tarf-surface);
	border: 1px solid var(--tarf-border);
	border-radius: var(--tarf-radius);
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
	font: inherit;
	color: inherit;
}

.tarf-item:hover {
	border-color: rgba(29, 78, 216, 0.35);
	background: var(--tarf-surface);
}
/* Defend against theme/Elementor injecting a hover background + dark text. */
.tarf-spotlight .tarf-item.tarf-item:hover {
	background-color: var(--tarf-surface);
	color: inherit;
}
.tarf-item:hover .tarf-item-title {
	color: var(--tarf-text);
}
.tarf-item.is-active:hover .tarf-item-title {
	color: var(--tarf-accent);
}
.tarf-item:hover .tarf-item-desc {
	color: var(--tarf-muted);
}

.tarf-item.is-active {
	border-color: var(--tarf-accent);
	background: var(--tarf-surface);
	box-shadow: var(--tarf-shadow);
}

.tarf-item.is-active .tarf-item-icon {
	background: var(--tarf-accent);
	color: #fff;
}

.tarf-item:focus-visible {
	outline: 2px solid var(--tarf-accent);
	outline-offset: 2px;
}

.tarf-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--tarf-accent-soft);
	color: var(--tarf-accent);
}

.tarf-item-icon .tarf-icon-svg {
	width: 22px;
	height: 22px;
}

.tarf-item-icon .tarf-icon-img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.tarf-item-icon .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.tarf-item-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tarf-item-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tarf-text);
}

.tarf-item.is-active .tarf-item-title {
	color: var(--tarf-accent);
}

.tarf-item-desc {
	font-size: 14px;
	line-height: 1.5;
	color: var(--tarf-muted);
}

/* Progress bar */
.tarf-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: transparent;
}

.tarf-progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--tarf-accent);
	transform-origin: left center;
}

.tarf-item.is-active .tarf-progress-bar.is-running {
	width: 100%;
	transition: width linear var(--tarf-duration, 5000ms);
}

/* ---------- Right stage ---------- */
.tarf-stage {
	position: relative;
	min-height: 360px;
	background: var(--tarf-surface);
	border: 1px solid var(--tarf-border);
	border-radius: calc(var(--tarf-radius) + 4px);
	box-shadow: var(--tarf-shadow);
	overflow: hidden;
}

.tarf-panel {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tarf-panel[hidden] {
	display: none;
}

.tarf-media {
	width: 100%;
	height: 100%;
	margin: 0;
}

.tarf-media .tarf-img,
.tarf-media .tarf-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tarf-embed {
	position: relative;
	width: 100%;
	height: 100%;
}

.tarf-embed iframe,
.tarf-embed .tarf-embed-target iframe {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.tarf-embed-target {
	position: absolute;
	inset: 0;
}

.tarf-media-empty {
	background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

/* Secondary media stacked below primary when more than one */
.tarf-panel .tarf-media:not(.is-primary) {
	display: none;
}

/* ---------- Transitions ---------- */
.tarf-transition-fade .tarf-panel {
	opacity: 0;
	transition: opacity 0.5s ease;
}
.tarf-transition-fade .tarf-panel.is-active {
	opacity: 1;
}

.tarf-transition-slide .tarf-panel {
	opacity: 0;
	transform: translateX(24px);
	transition: opacity 0.45s ease, transform 0.45s ease;
}
.tarf-transition-slide .tarf-panel.is-active {
	opacity: 1;
	transform: translateX(0);
}

.tarf-transition-zoom .tarf-panel {
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 0.45s ease, transform 0.45s ease;
}
.tarf-transition-zoom .tarf-panel.is-active {
	opacity: 1;
	transform: scale(1);
}

.tarf-transition-none .tarf-panel.is-active {
	opacity: 1;
}

/* ---------- Button ---------- */
.tarf-button-wrap {
	display: flex;
	margin-top: 32px;
}
.tarf-align-left { justify-content: flex-start; }
.tarf-align-center { justify-content: center; }
.tarf-align-right { justify-content: flex-end; }

.tarf-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tarf-button:hover {
	color: var(--tarf-btn-hover-color, inherit);
	background: var(--tarf-btn-hover-bg, transparent);
	border-color: var(--tarf-btn-hover-bg, currentColor);
	transform: translateY(-1px);
}

/* ---------- Empty state ---------- */
.tarf-empty {
	padding: 24px;
	border: 1px dashed var(--tarf-border);
	border-radius: 12px;
	color: #64748b;
	text-align: center;
	font-size: 14px;
}

/* ---------- Responsive ---------- */
/* Mobile prev/next nav (hidden on desktop) */
.tarf-mobile-nav {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 14px;
}
.tarf-mnav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--tarf-border);
	background: var(--tarf-surface);
	color: var(--tarf-text);
	cursor: pointer;
	padding: 0;
	flex: 0 0 auto;
	transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.tarf-mnav svg {
	width: 20px;
	height: 20px;
	display: block;
	stroke: currentColor;
	fill: none;
	color: var(--tarf-accent);
}
.tarf-mnav:hover {
	border-color: var(--tarf-accent);
	background: var(--tarf-accent);
}
.tarf-mnav:hover svg {
	color: #fff;
}
.tarf-mnav-count {
	font-size: 15px;
	font-weight: 600;
	color: var(--tarf-text);
	min-width: 54px;
	text-align: center;
}

@media (max-width: 860px) {
	.tarf-mobile-nav {
		display: flex;
	}
}

@media (max-width: 860px) {
	.tarf-grid {
		grid-template-columns: 1fr !important;
		gap: 16px;
	}

	/* Single active feature card below the media (matches what's playing). */
	.tarf-list {
		flex-direction: column;
		flex-wrap: nowrap;
		overflow: visible;
		gap: 0;
		padding-bottom: 0;
	}

	.tarf-item {
		display: none;
		width: 100%;
		flex: 0 0 auto;
	}
	.tarf-item.is-active {
		display: flex;
	}

	/* Full-bleed keeps all dots visible (pager), not single-card. */
	.tarf-layout-fullbleed .tarf-item,
	.tarf-layout-fullbleed .tarf-item.is-active {
		display: block;
		width: 12px;
	}

	.tarf-stage {
		min-height: 240px;
		order: -1;
	}
}

@media (max-width: 480px) {
	.tarf-item {
		padding: 14px 16px;
	}
	.tarf-item-title { font-size: 16px; }
}

/* ---------- RTL ---------- */
.rtl .tarf-transition-slide .tarf-panel {
	transform: translateX(-24px);
}
.rtl .tarf-transition-slide .tarf-panel.is-active {
	transform: translateX(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.tarf-panel,
	.tarf-item,
	.tarf-button,
	.tarf-progress-bar {
		transition: none !important;
	}
	.tarf-panel {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ============================================================
 * Layout variations
 * ========================================================== */

/* Per-feature button (reuses .tarf-button-* base via these wrappers) */
.tarf-panel-cta {
	position: absolute;
	left: 16px;
	bottom: 16px;
	z-index: 3;
}
.tarf-feature-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	padding: 9px 18px;
	border-radius: 8px;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.tarf-feature-btn.tarf-button-filled {
	color: #fff;
	background: var(--tarf-accent);
	border: 2px solid var(--tarf-accent);
}
.tarf-feature-btn.tarf-button-outline {
	color: var(--tarf-accent);
	background: transparent;
	border: 2px solid var(--tarf-accent);
}
.tarf-feature-btn.tarf-button-ghost {
	color: var(--tarf-accent);
	background: transparent;
	border: 2px solid transparent;
}
.tarf-feature-btn:hover {
	transform: translateY(-1px);
}

/* ---- List right ---- */
.tarf-layout-right .tarf-grid {
	direction: ltr;
}
/* Source order already places stage first for "right"; nothing else needed. */

/* ---- List top (horizontal tabs) ---- */
.tarf-layout-top .tarf-grid {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.tarf-layout-top .tarf-list {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
}
.tarf-layout-top .tarf-item {
	flex: 1 1 0;
	min-width: 160px;
}
.tarf-layout-top .tarf-stage {
	width: 100%;
}

/* ---- Overlap card ---- */
.tarf-layout-overlap .tarf-grid {
	display: block;
	position: relative;
}
.tarf-layout-overlap .tarf-stage {
	width: 100%;
}
.tarf-layout-overlap .tarf-list {
	position: absolute;
	top: 24px;
	left: 24px;
	bottom: 24px;
	width: 34%;
	min-width: 240px;
	max-width: 380px;
	z-index: 2;
	overflow-y: auto;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(6px);
	border-radius: var(--tarf-radius);
	padding: 12px;
	box-shadow: var(--tarf-shadow);
}

/* ---- Icon rail ---- */
.tarf-layout-rail .tarf-grid {
	grid-template-columns: 64px 1fr;
}
.tarf-layout-rail .tarf-panel {
	display: block;
}
.tarf-layout-rail .tarf-media,
.tarf-layout-rail .tarf-media figure,
.tarf-layout-rail .tarf-embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}
.tarf-layout-rail .tarf-img,
.tarf-layout-rail .tarf-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tarf-layout-rail .tarf-item {
	position: relative;
	justify-content: center;
	padding: 0;
	width: 52px;
	height: 52px;
	margin: 0 auto;
	border: none;
	background: transparent;
	box-shadow: none;
}
.tarf-layout-rail .tarf-item-icon {
	margin: 0;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	transition: background-color .2s ease, color .2s ease;
}
.tarf-layout-rail .tarf-item:hover .tarf-item-icon {
	background: var(--tarf-accent-soft);
}
.tarf-layout-rail .tarf-item.is-active .tarf-item-icon {
	background: var(--tarf-accent);
	color: #fff;
}
.tarf-layout-rail .tarf-item:hover,
.tarf-layout-rail .tarf-item.is-active {
	background: transparent;
	box-shadow: none;
	border: none;
}
.tarf-layout-rail .tarf-list {
	gap: 10px;
}

/* Icon rail: active feature info overlaid at the bottom of the media. */
.tarf-rail-info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 60px 24px 24px;
	color: #fff;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.55) 45%, rgba(15, 23, 42, 0.88) 100%);
}
.tarf-rail-info-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}
.tarf-rail-info-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #fff;
	opacity: 0.92;
}
.tarf-rail-info .tarf-feature-btn {
	align-self: flex-start;
	margin-top: 4px;
}
.tarf-rail-info .tarf-feature-btn.tarf-button-outline,
.tarf-rail-info .tarf-feature-btn.tarf-button-ghost {
	color: #fff;
	border-color: #fff;
}

/* ---- Full-bleed + caption ---- */
.tarf-layout-fullbleed .tarf-grid {
	display: block;
	position: relative;
}
.tarf-layout-fullbleed .tarf-list {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 3;
	flex-direction: row;
	gap: 8px;
	width: auto;
}
.tarf-layout-fullbleed .tarf-item {
	width: 12px;
	height: 12px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	border: none;
	overflow: hidden;
	text-indent: -9999px;
}
.tarf-layout-fullbleed .tarf-item.is-active {
	background: #fff;
	box-shadow: none;
}
.tarf-layout-fullbleed .tarf-item-icon,
.tarf-layout-fullbleed .tarf-item-body,
.tarf-layout-fullbleed .tarf-progress {
	display: none;
}
.tarf-layout-fullbleed .tarf-stage {
	min-height: 420px;
	width: 100%;
	border: none;
	border-radius: 0;
	box-shadow: none;
}
.tarf-layout-fullbleed .tarf-grid {
	margin: 0;
	padding: 0;
}
.tarf-layout-fullbleed {
	padding: 0;
}
.tarf-layout-fullbleed .tarf-stage,
.tarf-layout-fullbleed .tarf-panel,
.tarf-layout-fullbleed .tarf-media,
.tarf-layout-fullbleed .tarf-media figure {
	border-radius: 0;
	padding: 0;
}
.tarf-layout-fullbleed .tarf-panel {
	display: block;
}
.tarf-layout-fullbleed .tarf-media,
.tarf-layout-fullbleed .tarf-media figure,
.tarf-layout-fullbleed .tarf-embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}
.tarf-layout-fullbleed .tarf-img,
.tarf-layout-fullbleed .tarf-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tarf-caption {
	position: absolute;
	left: 20px;
	bottom: 20px;
	z-index: 2;
	max-width: 60%;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.72));
	border-radius: var(--tarf-radius);
}
.tarf-caption-title {
	font-size: 22px;
	font-weight: 700;
}
.tarf-caption-desc {
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.92;
}
.tarf-layout-fullbleed .tarf-caption .tarf-feature-btn.tarf-button-outline,
.tarf-layout-fullbleed .tarf-caption .tarf-feature-btn.tarf-button-ghost {
	color: #fff;
	border-color: #fff;
}

/* ---- Timeline ---- */
.tarf-layout-timeline .tarf-list {
	position: relative;
	padding-left: 26px;
}
.tarf-layout-timeline .tarf-timeline-track {
	position: absolute;
	left: 9px;
	top: 12px;
	bottom: 12px;
	width: 2px;
	background: var(--tarf-border);
	overflow: hidden;
	z-index: 0;
}
.tarf-layout-timeline .tarf-timeline-fill {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 0;
	background: var(--tarf-accent);
	transition: height 0.45s ease;
}
.tarf-layout-timeline .tarf-item {
	position: relative;
	z-index: 1;
	border-left: none;
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 12px 12px 12px 0;
}
.tarf-layout-timeline .tarf-item::before {
	content: "";
	position: absolute;
	left: -22px;
	top: 18px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--tarf-surface);
	border: 2px solid var(--tarf-border);
	transition: background .25s ease, border-color .25s ease;
	z-index: 2;
}
/* Passed + active dots are filled (snap-fill spine). */
.tarf-layout-timeline .tarf-item.is-active::before,
.tarf-layout-timeline .tarf-item.is-passed::before {
	background: var(--tarf-accent);
	border-color: var(--tarf-accent);
}
.tarf-layout-timeline .tarf-item.is-active {
	background: transparent;
}

/* ---- Zigzag (scrolling sections) ---- */
.tarf-layout-zigzag .tarf-zigzag {
	display: flex;
	flex-direction: column;
	gap: 48px;
}
.tarf-zz-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: center;
}
.tarf-zz-row.is-reversed .tarf-zz-media {
	order: 2;
}
.tarf-zz-row.is-reversed .tarf-zz-body {
	order: 1;
}
.tarf-zz-media {
	border-radius: var(--tarf-radius);
	overflow: hidden;
	min-height: 280px;
	background: var(--tarf-surface);
	box-shadow: var(--tarf-shadow);
}
.tarf-zz-media .tarf-media {
	width: 100%;
	height: 100%;
}
.tarf-zz-media .tarf-img,
.tarf-zz-media .tarf-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.tarf-zz-media .tarf-embed {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 280px;
}
.tarf-zz-media .tarf-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.tarf-zz-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--tarf-accent-soft);
	color: var(--tarf-accent);
	margin-bottom: 14px;
}
.tarf-zz-icon .tarf-icon-svg {
	width: 24px;
	height: 24px;
}
.tarf-zz-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--tarf-text);
}
.tarf-zz-desc {
	font-size: 15px;
	line-height: 1.6;
	color: var(--tarf-muted);
	margin-bottom: 16px;
}

/* Responsive: collapse complex layouts */
@media (max-width: 860px) {
	/* Icon rail + timeline collapse to the standard switcher pattern:
	   media on top, horizontal scroll tabs below (fully synced). */
	.tarf-layout-rail .tarf-grid,
	.tarf-layout-timeline .tarf-grid {
		grid-template-columns: 1fr !important;
	}

	/* Icon rail on mobile: media + info overlay on top, single active icon below. */
	.tarf-layout-rail .tarf-item {
		width: 52px;
		height: 52px;
		padding: 0;
		justify-content: center;
		align-items: center;
		margin: 0 auto;
		border: none;
		border-radius: 12px;
		background: transparent;
	}
	.tarf-layout-rail .tarf-rail-info {
		padding: 18px 18px 20px;
	}
	.tarf-layout-rail .tarf-rail-info-title {
		font-size: 19px;
	}

	/* Timeline: hide the vertical spine and dots on mobile, behave as tabs. */
	.tarf-layout-timeline .tarf-list {
		padding-left: 0;
	}
	.tarf-layout-timeline .tarf-timeline-track {
		display: none;
	}
	.tarf-layout-timeline .tarf-item {
		background: var(--tarf-surface);
		border: 1px solid var(--tarf-border);
		border-radius: var(--tarf-radius);
		padding: 14px 16px;
	}
	.tarf-layout-timeline .tarf-item::before {
		display: none;
	}
	.tarf-layout-timeline .tarf-item.is-active {
		border-color: var(--tarf-accent);
	}

	/* Overlap: list drops below the media as horizontal tabs. */
	.tarf-layout-overlap .tarf-list {
		position: static;
		width: auto;
		max-width: none;
		min-width: 0;
		background: transparent;
		backdrop-filter: none;
		box-shadow: none;
		padding: 0;
		flex-direction: row;
		overflow-x: auto;
	}
	.tarf-layout-overlap .tarf-grid {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	/* Full-bleed on mobile: image with title/description overlaid,
	   dot pager centered at the very bottom below the caption. */
	.tarf-layout-fullbleed .tarf-stage {
		min-height: 460px;
	}
	.tarf-layout-fullbleed .tarf-list {
		left: 0;
		right: 0;
		bottom: 14px;
		justify-content: center;
		gap: 10px;
	}
	.tarf-layout-fullbleed .tarf-item {
		width: 10px;
		height: 10px;
	}
	.tarf-caption {
		left: 18px;
		right: 18px;
		bottom: 40px;
		max-width: none;
	}

	/* Zigzag: vertical stack of cards (image on top, body below). */
	.tarf-zz-row,
	.tarf-zz-row.is-reversed {
		grid-template-columns: 1fr;
		gap: 0;
		background: var(--tarf-surface);
		border: 1px solid var(--tarf-border);
		border-radius: var(--tarf-radius);
		overflow: hidden;
		box-shadow: var(--tarf-shadow);
	}
	.tarf-zz-row.is-reversed .tarf-zz-media,
	.tarf-zz-row.is-reversed .tarf-zz-body {
		order: 0;
	}
	.tarf-zz-media {
		border-radius: 0;
		box-shadow: none;
		min-height: 200px;
	}
	.tarf-zz-body {
		padding: 18px 18px 22px;
	}
	.tarf-layout-zigzag .tarf-zigzag {
		gap: 20px;
	}
}

/* Per-feature button wrappers (zigzag/caption inline) */
.tarf-feature-btn-wrap {
	margin-top: 4px;
}
.tarf-zz-body .tarf-feature-btn-wrap {
	margin-top: 0;
}
