/*
 * Home slider (2026-10-29, task #175): full-width slides, text on the left
 * over a dark gradient, the slides' tabs with a progress line on the right
 * (along the bottom below 1024px). The site header lies over the top of the
 * slider, so the text starts below it. See includes/class-slider.php.
 */
/* Its own stacking context: the slides' z-indexes stay inside, so page
   content that reaches up over the slider (the Home truck) stays on top. */
.kls-slider {
	--kls-ink: #061322;
	--kls-accent: var(--kz-accent, #00aeef);
	--kls-export: #f39200;
	--kls-row: min(1280px, 95cqw);
	--kls-header: 170px; /* the header lying over the slider */
	container-type: inline-size;
	position: relative;
	isolation: isolate;
	width: 100%;
}
.kls-frame {
	position: relative;
	/* Desktop: the window minus room for the truck under the slider, so the
	   whole truck and the start of the next section show on the first
	   screen (Mongi 2026-10-29). */
	height: clamp(560px, calc(100svh - 260px), 820px);
	overflow: hidden;
	background: var(--kls-ink);
	font-family: Exo, sans-serif;
	color: #fff;
}
@container (max-width: 1023.98px) {
	.kls-slider {
		--kls-row: 90cqw;
		--kls-header: 120px;
	}
	.kls-frame {
		height: clamp(560px, 86svh, 760px);
	}
}
@container (max-width: 599.98px) {
	.kls-slider {
		--kls-row: calc(100cqw - 32px);
		--kls-header: 96px;
	}
}

/* Slides: stacked. The incoming slide fades in on top of the previous one,
   which stays visible underneath (.is-prev) until the fade is done. */
.kls-slide {
	position: absolute;
	inset: 0;
	visibility: hidden;
}
.kls-slide.is-prev {
	z-index: 1;
	visibility: visible;
}
.kls-slide.is-active {
	z-index: 2;
	visibility: visible;
}
.kls-bg-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
}
.kls-bg,
.kls-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 50%;
}
/* The video stays invisible until it really plays; the image is its still. */
.kls-video {
	opacity: 0;
	transition: opacity 0.8s ease;
}
.kls-video.is-playing {
	opacity: 1;
}
.kls-slide.is-active .kls-bg-wrap {
	animation: kls-fade 1s ease both;
}
/* A slow push-in on the photo while the slide shows. */
.kls-slide.is-active .kls-bg {
	animation: kls-zoom 12s linear both;
}
@keyframes kls-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes kls-zoom {
	from { transform: scale(1); }
	to { transform: scale(1.08); }
}
/* Dark on the text side, clear on the other; darker at the top for the header. */
.kls-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to bottom, rgba(6, 19, 34, 0.55), rgba(6, 19, 34, 0) 260px),
		linear-gradient(to left, rgba(6, 19, 34, 0.86) 0%, rgba(6, 19, 34, 0.62) 38%, rgba(6, 19, 34, 0.12) 72%, rgba(6, 19, 34, 0) 100%);
}

/* Text: on the site's row, below the header, centred in the space left. */
.kls-content {
	position: absolute;
	inset: var(--kls-header) 0 0;
	display: flex;
	align-items: center;
	width: var(--kls-row);
	margin: 0 auto;
	padding-bottom: 40px;
}
.kls-text {
	display: grid;
	gap: 18px;
	max-width: min(640px, 62%);
}
.kls-text > * {
	margin: 0;
}
.kls-label {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--kls-accent);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}
.kls-label::before {
	content: "";
	width: 36px;
	height: 2px;
	background: currentColor;
}
.kls-slide .kls-title {
	color: #fff;
	font-family: inherit;
	font-size: clamp(34px, 3.8cqw, 56px);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.08;
	text-transform: none;
	text-wrap: balance;
}
.kls-title a {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
	transition: background-size 0.3s ease;
}
.kls-title a:is(:hover, :focus-visible) {
	color: inherit;
	background-size: 100% 3px;
}
.kls-title a:focus-visible {
	outline: 2px solid var(--kls-accent);
	outline-offset: 4px;
}
.kls-sub {
	color: rgba(255, 255, 255, 0.88);
	font-size: clamp(17px, 1.5cqw, 21px);
	line-height: 1.45;
}
.kls-flows {
	display: grid;
	gap: 10px;
	margin-top: 6px !important;
	padding: 0;
	list-style: none;
}
.kls-flow {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0;
	color: #fff;
	font-size: 16px;
	line-height: 1.4;
}
.kls-flow-dir {
	flex: none;
	min-width: 92px;
	padding: 3px 10px;
	border-radius: 3px;
	background: var(--kls-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
}
.kls-flow--out .kls-flow-dir {
	background: var(--kls-export);
}

/* Entrance: the text rises in, line after line. */
.kls-slide.is-active .kls-text > * {
	animation: kls-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.kls-slide.is-active .kls-text > :nth-child(2) { animation-delay: 0.1s; }
.kls-slide.is-active .kls-text > :nth-child(3) { animation-delay: 0.2s; }
.kls-slide.is-active .kls-text > :nth-child(4) { animation-delay: 0.3s; }
.kls-slide.is-leaving .kls-text {
	opacity: 0;
	transition: opacity 0.2s ease;
}
@keyframes kls-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

/* Tabs: a list on the right, each with its number, name and progress line. */
.kls-tabs {
	position: absolute;
	z-index: 3;
	top: calc(var(--kls-header) + (100% - var(--kls-header) - 40px) / 2);
	left: calc((100cqw - var(--kls-row)) / 2);
	display: grid;
	width: 270px;
	padding: 10px 20px;
	border-radius: 6px;
	background: rgba(6, 19, 34, 0.5);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transform: translateY(-50%);
}
.kls-tab {
	all: unset;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 30px 1fr;
	align-items: baseline;
	gap: 4px 10px;
	padding: 9px 0;
	color: rgba(255, 255, 255, 0.62);
	font-family: Exo, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	cursor: pointer;
	transition: color 0.2s ease;
}
.kls-tab:is(:hover, .is-active) {
	color: #fff;
}
.kls-tab:focus-visible {
	outline: 2px solid var(--kls-accent);
	outline-offset: 2px;
}
.kls-tab-no {
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.06em;
}
.kls-tab.is-active .kls-tab-no {
	color: var(--kls-accent);
}
.kls-tab-bar {
	grid-column: 1 / -1;
	position: relative;
	height: 2px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.22);
}
.kls-tab-bar > span {
	position: absolute;
	inset: 0;
	background: var(--kls-accent);
	transform: scaleX(0);
	transform-origin: right center;
}
.kls-tab.is-done .kls-tab-bar > span {
	transform: none;
	opacity: 0.45;
}
.kls-tab.is-active .kls-tab-bar > span {
	animation: kls-progress var(--kls-dur, 7s) linear both;
}
/* Press and hold (slider.js): the photo and the progress line wait too. */
.kls-slider.is-held :is(.kls-bg, .kls-tab-bar > span) {
	animation-play-state: paused;
}
@keyframes kls-progress {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

/* Below 1024px: the tabs become numbered progress lines along the bottom,
   with only the current slide's name. */
@container (max-width: 1023.98px) {
	.kls-content {
		align-items: flex-end;
		padding-bottom: 96px;
	}
	.kls-text {
		max-width: 680px;
	}
	.kls-shade {
		background:
			linear-gradient(to bottom, rgba(6, 19, 34, 0.6), rgba(6, 19, 34, 0) 200px),
			linear-gradient(to top, rgba(6, 19, 34, 0.92) 0%, rgba(6, 19, 34, 0.7) 45%, rgba(6, 19, 34, 0.15) 80%);
	}
	.kls-tabs {
		top: auto;
		bottom: 34px;
		right: calc((100cqw - var(--kls-row)) / 2);
		left: auto;
		display: flex;
		gap: 6px;
		width: var(--kls-row);
		padding: 0;
		background: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		transform: none;
	}
	.kls-tab {
		flex: 1 1 0;
		grid-template-columns: auto;
		min-width: 0;
		padding: 10px 0;
	}
	.kls-tab-name {
		display: none;
	}
}
@container (max-width: 599.98px) {
	.kls-text {
		gap: 12px;
	}
	.kls-label {
		font-size: 13px;
	}
	.kls-slide .kls-title {
		font-size: clamp(27px, 7.6cqw, 36px);
	}
	.kls-sub {
		font-size: 16px;
	}
	.kls-flow {
		flex-direction: column;
		gap: 4px;
		font-size: 15px;
	}
	.kls-flow-dir {
		min-width: 0;
		font-size: 12px;
	}
	.kls-tab-no {
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kls-slide.is-active :is(.kls-bg-wrap, .kls-bg, .kls-text > *) {
		animation: none;
	}
	.kls-tab.is-active .kls-tab-bar > span {
		animation: none;
		transform: none;
	}
}

/* The Home truck under the slider becomes the current slide's vehicle
   (task #176): the old one leaves to the side, the new one comes in from
   the other; each then moves a little on its own (a ship rocks, the plane
   flies on slowly, the logo floats, a truck idles; the forklift stays
   still). Every picture crosses the hero's lower edge, like the truck. Markup: Kyranis_Slider::vehicle_stack(). */
.kls-vehicles {
	display: grid;
}
/* The image widget clips its picture; a vehicle may reach past the box. */
:is(.kz-image-in, .kz-image-main):has(.kls-vehicles) {
	overflow: visible;
}
.kls-vehicle {
	display: block;
	grid-area: 1 / 1;
	width: 100%;
	max-width: 100%;
	opacity: 0;
	transform: translateX(45%);
	transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease;
}
.kls-vehicle[data-kind="plane"] {
	transform: translate(45%, 30%);
}
/* A plane is long and thin: larger than its box, to weigh like the truck. */
.kls-vehicle:is([data-kind="plane"], [data-kind="rig"]) {
	scale: 1.3;
}
.kls-vehicle.is-shown {
	opacity: 1;
	transform: none;
}
.kls-vehicle.is-gone {
	opacity: 0;
	transform: translateX(-55%);
	transition-timing-function: cubic-bezier(0.6, 0, 0.8, 0.3), ease;
}
.kls-vehicle.is-gone[data-kind="plane"] {
	transform: translate(-55%, -35%);
}
.kls-vehicle.is-shown[data-kind="ship"] {
	animation: kls-rock 5s ease-in-out 1s infinite;
}
/* The plane flies on slowly, rising and sinking a little. */
.kls-vehicle.is-shown[data-kind="plane"] {
	animation: kls-fly 9s ease-in-out 1s infinite alternate;
}
.kls-vehicle.is-shown[data-kind="logo"] {
	animation: kls-float 6s ease-in-out 1s infinite;
}
/* Picture and lamps move together in the rig. */
.kls-rig {
	position: relative;
	display: block;
	transition: transform 1.4s ease-in-out;
}
.kls-rig img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 490 / 411;
	object-fit: contain;
}
/* The truck drives: its suspension works over the road, it sways a
   little, and the road streams under it. */
.kls-vehicle.is-shown:is([data-kind="truck"], [data-kind="rig"]) .kls-rig {
	animation: kls-drive 1.8s ease-in-out infinite, kls-sway 7s ease-in-out infinite;
}
/* Now and then (slider.js) it signals and steers a little to one side, or
   flashes its headlights. Lamp positions are on the picture, so they are
   not mirrored in Arabic. */
.kls-vehicle.is-left .kls-rig {
	transform: translateX(-2.5%) rotate(-1.2deg);
}
.kls-vehicle.is-right .kls-rig {
	transform: translateX(2.5%) rotate(1.2deg);
}
/* The Tunisian plate (Kyranis_Slider::PLATE), on the picture's own coordinates. */
.kls-plate {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.kls-lamp,
.kls-beam {
	position: absolute;
	aspect-ratio: 1;
	border-radius: 50%;
	opacity: 0;
	translate: -50% -50%;
	pointer-events: none;
}
.kls-lamp {
	width: 10%;
	background: radial-gradient(circle, #fff6d0 0 10%, #ffb21a 20%, rgba(255, 150, 0, 0.6) 36%, rgba(255, 140, 0, 0.18) 56%, transparent 72%);
}
.kls-beam {
	width: 24%;
	background: radial-gradient(circle, #fff 0 9%, rgba(255, 255, 240, 0.9) 18%, rgba(235, 245, 255, 0.45) 36%, rgba(220, 235, 255, 0.12) 56%, transparent 72%);
}
.kls-lamp--l { left: 11.2%; top: 63.9%; }
.kls-lamp--r { left: 48.2%; top: 65.7%; }
.kls-beam--l { left: 13.3%; top: 64.1%; }
.kls-beam--r { left: 45.4%; top: 65.7%; }
/* The wheels turn: spokes of light spin over each wheel, flattened to the
   wheel's angle on the picture (seen almost edge-on). Positions and sizes
   are on the picture (980 x 822). */
.kls-wheel {
	position: absolute;
	aspect-ratio: 1;
	pointer-events: none;
	transform: translate(50%, -50%) rotate(var(--tilt, 0deg)) scaleX(var(--flat, 0.3));
}
.kls-wheel::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background:
		radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 7%, transparent 9%),
		conic-gradient(transparent 0 2deg, rgba(255, 255, 255, 0.6) 5deg 15deg, transparent 18deg 360deg),
		repeating-conic-gradient(transparent 0 26deg, rgba(255, 255, 255, 0.34) 30deg 38deg, transparent 42deg 72deg);
	-webkit-mask-image: radial-gradient(circle, #000 0 52%, rgba(0, 0, 0, 0.55) 60% 84%, transparent 90%);
	mask-image: radial-gradient(circle, #000 0 52%, rgba(0, 0, 0, 0.55) 60% 84%, transparent 90%);
	filter: blur(0.4px);
}
.kls-vehicle.is-shown .kls-wheel::before {
	/* One turn in 0.65 s: slow enough to follow the spokes; one brighter
	   spoke shows the turning (task #240). */
	animation: kls-spin 0.65s linear infinite;
}
.kls-wheel--front { left: 57.6%; top: 67.4%; width: 13.4%; --flat: 0.32; --tilt: -3deg; }
.kls-wheel--drive { left: 70.9%; top: 61.8%; width: 12.4%; --flat: 0.27; --tilt: -4deg; }
.kls-wheel--t1 { left: 81.6%; top: 59.3%; width: 4.6%; --flat: 0.36; }
.kls-wheel--t2 { left: 83.2%; top: 58.6%; width: 4.4%; --flat: 0.36; }
.kls-wheel--t3 { left: 84.7%; top: 57.8%; width: 4.2%; --flat: 0.36; }
@keyframes kls-spin {
	to { rotate: -360deg; }
}
.kls-vehicle.is-left .kls-lamp--l,
.kls-vehicle.is-right .kls-lamp--r {
	animation: kls-blink 0.75s steps(1, end) 4;
}
.kls-vehicle.is-flash :is(.kls-beam, .kls-lamp) {
	animation: kls-flash 0.45s ease-out 3;
}
@keyframes kls-blink {
	0% { opacity: 1; }
	50% { opacity: 0; }
}
@keyframes kls-flash {
	0% { opacity: 0; }
	15% { opacity: 1; }
	100% { opacity: 0; }
}
.kls-vehicles {
	position: relative;
	isolation: isolate; /* the road stays under the truck, above the section */
}
/* The road under the truck (task #241): a two-lane anthracite road drawn
   in the picture's perspective (Kyranis_Slider::ROAD), behind the truck;
   the dashed centre line streams away as the truck drives. */
.kls-road {
	position: absolute;
	z-index: -1;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}
/* The road reaches into the band under the hero ("Your freight forwarder in
   Tunisia"): its last sentence ran under the asphalt on wide screens (task
   #591, Mongi 2026-11-22: "road" half covered). The sentence breaks before
   the road; in Arabic the road comes from the other side, closer. */
@media (min-width: 1025px) {
	.elementor-element-25297cf .kz-title-text p {
		max-width: 640px;
	}
	[dir="rtl"] .elementor-element-25297cf .kz-title-text p {
		max-width: 540px;
	}
}
.kls-road-asphalt {
	fill: #36393d;
}
.kls-road-edge,
.kls-road-dash {
	fill: none;
	stroke: #fff;
	stroke-width: 7;
}
.kls-road-dash {
	stroke-width: 6;
	stroke-dasharray: 70 50;
	animation: kls-dash 0.27s linear infinite;
}
/* slider.js draws the dashes in perspective instead. */
.kls-road.is-drawn .kls-road-dash {
	display: none;
}
.kls-road-dashes line {
	stroke: #fff;
	stroke-linecap: butt;
}
@keyframes kls-dash {
	to { stroke-dashoffset: -120; }
}
@keyframes kls-drive {
	0%, 100% { translate: 0 0; rotate: 0deg; }
	30% { translate: 0 -2px; rotate: -0.25deg; }
	55% { translate: 0 1px; rotate: 0.15deg; }
	75% { translate: 0 -1px; rotate: 0deg; }
}
/* Sways with a position offset, not a margin: a margin made the picture
   1.5% wider and taller, so the whole page under the hero moved up and
   down with it. */
@keyframes kls-sway {
	0%, 100% { inset-inline-start: 0; }
	50% { inset-inline-start: -1.5%; }
}
@keyframes kls-rock {
	50% { translate: 0 -5px; rotate: -0.8deg; }
}
@keyframes kls-float {
	50% { translate: 0 -12px; }
}
@keyframes kls-fly {
	from { translate: -5% 3%; }
	to { translate: 7% -4%; }
}
@keyframes kls-idle {
	50% { translate: 0 -1px; }
}
@media (prefers-reduced-motion: reduce) {
	.kls-vehicle {
		transition: none;
		animation: none !important;
	}
	.kls-road-dash {
		animation: none;
	}
	.kls-rig,
	.kls-wheel::before {
		transition: none;
		animation: none !important;
	}
}
