/**
 * Homepage How It Works + Why Choose — presentation only.
 *
 * Loaded on the front page only, after the plugin's `em-how-it-works`
 * stylesheet. Markup and copy stay with `[em_how_it_works]`.
 *
 * @package ExpertMatrimony
 */

body.home .elementor-shortcode > .em-hiw {
	--emt-hiw-ink: #1f1f1f;
	--emt-hiw-body: #3d3a37;
	--emt-hiw-muted: #5b5650;
	--emt-hiw-gold: #c9a227;
	--emt-hiw-line: rgba(201, 162, 39, 0.55);
	--emt-hiw-cream: #fdf4ea;
	--emt-hiw-icon: 56px;
	--emt-hiw-num-block: 28px;
	padding: 56px 40px 64px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__header {
	margin-bottom: 40px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__title {
	font-size: clamp(1.556rem, 1.15rem + 1.5vw, 2.222rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__subtitle {
	max-width: 620px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--emt-hiw-body);
	text-wrap: pretty;
}

/* 620px orphans “steps.” at 17px; widen only from laptop up. */
@media (min-width: 1024px) {
	body.home .elementor-shortcode > .em-hiw .em-hiw__subtitle {
		max-width: 720px;
	}
}

/* ---------- Journey timeline ---------- */

body.home .elementor-shortcode > .em-hiw .em-hiw__steps {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: start;
	gap: 0 12px;
	width: 100%;
	padding-top: 0;
	margin-bottom: 52px;
	flex-wrap: nowrap;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__steps-line {
	display: block;
	top: calc(var(--emt-hiw-num-block) + (var(--emt-hiw-icon) / 2));
	left: 10%;
	right: 10%;
	height: 1px;
	background: var(--emt-hiw-line);
	opacity: 1;
	z-index: 0;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__card {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	width: auto;
	max-width: none;
	min-width: 0;
	padding: 0 6px;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__num {
	position: static;
	top: auto;
	left: auto;
	transform: none;
	width: auto;
	height: var(--emt-hiw-num-block);
	margin: 0 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--emt-hiw-gold);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: var(--emt-hiw-num-block);
}

body.home .elementor-shortcode > .em-hiw .em-hiw__num::before {
	content: "0";
}

body.home .elementor-shortcode > .em-hiw .em-hiw__icon {
	position: relative;
	z-index: 1;
	width: var(--emt-hiw-icon);
	height: var(--emt-hiw-icon);
	margin-bottom: 16px;
	border: 1.5px solid var(--emt-hiw-gold);
	background: var(--emt-hiw-cream);
	color: var(--em-hiw-brand, #ca1c1c);
}

body.home .elementor-shortcode > .em-hiw .em-hiw__icon svg {
	width: 24px;
	height: 24px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__card-title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--em-hiw-brand, #ca1c1c);
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__card-divider {
	display: none;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__card-desc {
	max-width: 200px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--emt-hiw-muted);
	text-wrap: pretty;
}

/* ---------- Why Choose — editorial 42 / 58 ---------- */

body.home .elementor-shortcode > .em-hiw .em-hiw__why {
	display: grid;
	grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
	gap: 36px 48px;
	align-items: start;
	margin-top: 8px;
	padding: 40px 0 0;
	border: 0;
	border-top: 1px solid var(--emt-hiw-line);
	border-radius: 0;
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none;
	color: var(--emt-hiw-ink);
	text-align: left;
}

/* Core 270 fallback: old header still readable with Theme 0.2.10 */
body.home .elementor-shortcode > .em-hiw .em-hiw__why-header {
	margin: 0;
	text-align: left;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-ornament {
	justify-content: flex-start;
	margin-bottom: 14px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-title {
	margin: 0;
	color: var(--em-hiw-brand, #ca1c1c);
	font-size: clamp(1.333rem, 1.1rem + 0.6vw, 1.778rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-intro {
	min-width: 0;
	padding-right: 8px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-eyebrow {
	margin: 0 0 14px;
	color: var(--emt-hiw-gold);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-heading {
	margin: 0 0 14px;
	color: var(--em-hiw-brand, #ca1c1c);
	font-size: clamp(1.333rem, 1.1rem + 0.6vw, 1.778rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.25;
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-lede {
	margin: 0;
	max-width: 28em;
	color: var(--emt-hiw-body);
	font-size: 16px;
	line-height: 1.65;
	text-wrap: pretty;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-grid {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	min-width: 0;
	justify-content: stretch;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	grid-template-rows: auto auto;
	column-gap: 16px;
	row-gap: 4px;
	flex: none;
	max-width: none;
	width: 100%;
	padding: 16px 0;
	text-align: left;
	align-items: start;
	border-bottom: 1px solid var(--emt-hiw-line);
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item:first-child {
	padding-top: 0;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item:not(:last-child)::after {
	display: none;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-icon {
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 48px;
	height: 48px;
	margin: 0;
	border: 1.5px solid var(--emt-hiw-gold);
	border-radius: 50%;
	background: #fffdfa;
	color: var(--em-hiw-brand, #ca1c1c);
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-icon svg {
	width: 22px;
	height: 22px;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item-title {
	grid-column: 2;
	margin: 2px 0 0;
	color: var(--em-hiw-brand, #ca1c1c);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

body.home .elementor-shortcode > .em-hiw .em-hiw__why-item-desc {
	grid-column: 2;
	margin: 0;
	color: var(--emt-hiw-muted);
	font-size: 14.5px;
	line-height: 1.6;
}

/* ---------- Laptop / tablet: keep five milestones in one row ---------- */

@media (max-width: 1024px) {
	body.home .elementor-shortcode > .em-hiw {
		padding: 48px 24px 56px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__steps {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		flex-wrap: nowrap;
		justify-content: stretch;
		gap: 0 8px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__steps-line {
		display: block;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card {
		flex: none;
		max-width: none;
		padding: 0 4px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card-title {
		font-size: 14px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card-desc {
		font-size: 12.5px;
		max-width: none;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why {
		gap: 28px 32px;
	}
}

/* ---------- Vertical journey ---------- */

@media (max-width: 900px) {
	body.home .elementor-shortcode > .em-hiw {
		--emt-hiw-icon: 48px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__steps {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
		padding: 4px 0 4px 0;
		margin-bottom: 40px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__steps-line {
		display: block;
		top: 24px;
		bottom: 24px;
		left: 24px;
		right: auto;
		width: 1px;
		height: auto;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card {
		display: grid;
		grid-template-columns: 48px minmax(0, 1fr);
		column-gap: 18px;
		align-items: start;
		width: 100%;
		max-width: none;
		padding: 0;
		text-align: left;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__icon {
		grid-column: 1;
		grid-row: 1 / span 3;
		margin: 0;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__num {
		grid-column: 2;
		justify-content: flex-start;
		height: auto;
		line-height: 1.2;
		margin-bottom: 4px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card-title {
		grid-column: 2;
		margin: 0 0 6px;
		font-size: 16.5px;
		text-align: left;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__card-desc {
		grid-column: 2;
		max-width: none;
		font-size: 14.5px;
		text-align: left;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-intro {
		padding-right: 0;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	body.home .elementor-shortcode > .em-hiw {
		padding: 40px 20px 48px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__title {
		font-size: clamp(23px, 6.2vw, 28px);
		line-height: 1.22;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__subtitle {
		font-size: 15.5px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why {
		padding-top: 28px;
		gap: 22px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-heading,
	body.home .elementor-shortcode > .em-hiw .em-hiw__why-title {
		font-size: clamp(22px, 5.8vw, 26px);
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-lede {
		font-size: 15.5px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-item {
		grid-template-columns: 44px minmax(0, 1fr);
		column-gap: 14px;
		max-width: none;
		width: 100%;
		padding: 14px 0;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-icon {
		width: 44px;
		height: 44px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-item-title {
		font-size: 16px;
	}

	body.home .elementor-shortcode > .em-hiw .em-hiw__why-item-desc {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .elementor-shortcode > .em-hiw * {
		transition: none;
	}
}
