/* ==========================================================================
   Home page sections managed from the dashboard
   (hero slider, before / after, testimonials, partner logos)
   ========================================================================== */

/* ---------- hero slider ---------- */
.zd-hslide {
	overflow: hidden;
}

.zd-hslide__item {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1s var(--ease, ease);
}

.zd-hslide__item.is-active {
	opacity: 1;
}

.zd-hslide__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 42%;
}

.zd-hslide__dots {
	position: absolute;
	bottom: 22px;
	inset-inline-end: clamp(18px, 4vw, 46px);
	display: flex;
	align-items: center;
	gap: 8px;
	z-index: 2;
}

.zd-hslide__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	transition: width 0.3s var(--ease, ease), background 0.25s;
}

.zd-hslide__dot.is-active {
	width: 28px;
	background: #fff;
}

/* ---------- before / after comparison ---------- */
.ba-grid--custom {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 24px);
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	place-items: stretch;
}

.ba-card {
	margin: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line, #dce9ee);
	border-radius: var(--radius-lg, 20px);
	box-shadow: var(--shadow-xs, 0 2px 10px rgba(11, 43, 61, 0.05));
}

.ba-card figcaption {
	padding: 13px 18px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--navy, #0b2b3d);
	border-top: 1px solid var(--line, #dce9ee);
}

.ba {
	position: relative;
	direction: ltr;
	--pos: 50%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	touch-action: pan-y;
	background: #eef7fa;
}

.ba__img,
.ba__before img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ba__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba__range {
	position: absolute;
	inset: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.ba__handle {
	position: absolute;
	top: 50%;
	left: var(--pos);
	z-index: 3;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	color: var(--teal, #0e7f9e);
	box-shadow: 0 8px 22px rgba(11, 43, 61, 0.3);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.ba__handle svg {
	width: 22px;
	height: 22px;
}

.ba__handle::before {
	content: '';
	position: absolute;
	top: -100vh;
	bottom: -100vh;
	width: 2px;
	background: #fff;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
	z-index: -1;
}

.ba__tag {
	position: absolute;
	top: 12px;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(11, 43, 61, 0.66);
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	z-index: 2;
	backdrop-filter: blur(6px);
}

.ba__tag--before {
	left: 12px;
}

.ba__tag--after {
	right: 12px;
}

/* ---------- testimonials slider ---------- */
.testi-slider {
	position: relative;
}

.testi-slider__track {
	display: flex;
	gap: clamp(14px, 1.8vw, 22px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	scrollbar-width: none;
}

.testi-slider__track::-webkit-scrollbar {
	display: none;
}

.testi-card {
	display: flex;
	flex: 0 0 clamp(276px, 32%, 420px);
	flex-direction: column;
	gap: 14px;
	scroll-snap-align: start;
	padding: clamp(22px, 2.4vw, 30px);
	background: #fff;
	border: 1px solid var(--line, #dce9ee);
	border-radius: var(--radius-lg, 20px);
	box-shadow: var(--shadow-xs, 0 2px 10px rgba(11, 43, 61, 0.05));
}

.testi-card__stars {
	color: #f0a020;
	font-size: 15px;
	letter-spacing: 3px;
	line-height: 1;
}

.testi-card__text {
	flex: 1;
	margin: 0;
	font-size: 15px;
	line-height: 1.95;
	color: var(--body, #46606d);
}

.testi-card__who {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 14px;
	border-top: 1px solid var(--line, #dce9ee);
}

.testi-card__who img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.testi-card__ini {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--teal-l, #e7f4f8);
	color: var(--teal, #0e7f9e);
	font-size: 18px;
	font-weight: 800;
}

.testi-card__who strong {
	display: block;
	font-size: 14.5px;
	color: var(--navy, #0b2b3d);
}

.testi-card__who span {
	font-size: 12.5px;
	color: var(--muted, #6b8593);
}

.testi-slider__nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
}

.testi-slider__btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line, #dce9ee);
	border-radius: 50%;
	background: #fff;
	color: var(--navy, #0b2b3d);
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.testi-slider__btn:hover {
	background: var(--teal, #0e7f9e);
	border-color: transparent;
	color: #fff;
}

.testi-slider__btn svg {
	width: 18px;
	height: 18px;
}

.testi-slider__btn[data-testi-prev] svg {
	transform: rotate(180deg);
}

/* Right to left: "previous" is to the right, so the arrows swap. */
[dir="rtl"] .testi-slider__btn[data-testi-prev] svg {
	transform: rotate(0deg);
}

[dir="rtl"] .testi-slider__btn[data-testi-next] svg {
	transform: rotate(180deg);
}

/* Cards added from the dashboard fill the row instead of leaving a gap. */
.cards--custom {
	grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

/* ---------- partner logos ---------- */
.logos {
	background: #fff;
}

.logos__marquee {
	overflow: hidden;
	margin-top: 26px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logos__track {
	display: flex;
	align-items: center;
	gap: clamp(28px, 4vw, 56px);
	width: max-content;
	animation: zdMarquee 34s linear infinite;
}

.logos__marquee:hover .logos__track {
	animation-play-state: paused;
}

.logos__item {
	display: grid;
	place-items: center;
	height: 76px;
	opacity: 0.72;
	filter: grayscale(1);
	transition: opacity 0.25s, filter 0.25s;
}

.logos__item:hover {
	opacity: 1;
	filter: none;
}

.logos__item img {
	display: block;
	width: auto;
	max-width: 180px;
	height: auto;
	max-height: 64px;
	object-fit: contain;
}

@keyframes zdMarquee {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.logos__track {
		flex-wrap: wrap;
		justify-content: center;
		animation: none;
	}

	.zd-hslide__item {
		transition: none;
	}
}

@media (max-width: 900px) {
	.ba-grid--custom {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 620px) {
	.testi-card {
		flex-basis: 86%;
	}

	.zd-hslide__dots {
		bottom: 14px;
	}
}
