/**
 * Zaban Steps Widget
 * Each card: top half = image (overflow:hidden + scale on hover), bottom half = text.
 */

/* ── Grid ───────────────────────────────────────────────────────────────── */
.zsteps-wrapper {
	width: 100%;
}

.zsteps-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr); /* overridable via Elementor */
	gap: 16px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.zsteps-item {
	display: flex;
	flex-direction: column;
	gap: 16px;             /* white gap between image and content box */
	background-color: transparent; /* gap must show page background (white) */
	overflow: visible;     /* don't clip outside the card boundary */
}

/* ── Image ──────────────────────────────────────────────────────────────── */
.zsteps-image {
	flex-shrink: 0;        /* never compress the image area */
	height: 220px;         /* default; overridable via Elementor control */
	overflow: hidden;      /* clip the scaled image */
}

.zsteps-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

/* Hover: scale image */
.zsteps-item:hover .zsteps-image img {
	transform: scale(1.08);
}

/* ── Content area ───────────────────────────────────────────────────────── */
.zsteps-content {
	flex: 1;               /* fill remaining card height below image */
	background-color: #f6f5f5; /* background lives here, so the gap above is white */
	padding: 30px;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	transition: background-color var(--transition-std);
}

.zsteps-item:hover .zsteps-content {
	background-color: #eef0f4;
}

/* ── Step number ────────────────────────────────────────────────────────── */
.zsteps-number {
	display: block;
	font-size: 2.2em;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 4px;
	transition: color var(--transition-std);
}

.zsteps-item:hover .zsteps-number {
	color: #152940;
}

/* ── Title ──────────────────────────────────────────────────────────────── */
.zsteps-title {
	font-weight: 700;
	margin: 0 0 10px;
	padding: 0;
	font-size: 1em;
	line-height: 1.3;
	transition: color var(--transition-std);
}

.zsteps-item:hover .zsteps-title {
	color: #152940;
}

/* ── Body text ──────────────────────────────────────────────────────────── */
.zsteps-text {
	margin: 0;
	padding: 0;
	line-height: 1.6;
	font-size: 0.9em;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.zsteps-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.zsteps-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Entrance animation — per-item, observed individually ────────────────── */

.js .zsteps-item {
	opacity: 0;
	transform: translateY(30px);
	transition:
		opacity   0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transition-delay: var(--zsi-delay, 0s);
}

.js .zsteps-item.zsi-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.zsteps-image img,
	.zsteps-content,
	.zsteps-number,
	.zsteps-title {
		transition: none !important;
	}
	.js .zsteps-item {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
