/**
 * Homepage Mutual Interest Advantage — presentation only.
 *
 * Loaded on the front page only, after the plugin's `em-mutual-interest`
 * stylesheet. Every rule is scoped to the homepage shortcode instance
 * (`body.home .elementor-shortcode > .em-mia`); markup, copy, the
 * illustration and the settings-driven colours stay with the plugin.
 *
 * Each card carries its settings as inline custom properties, so the card
 * rules below set the properties directly instead of redefining those
 * variables, where the inline values would always win.
 *
 * @package ExpertMatrimony
 */

body.home .elementor-shortcode > .em-mia {
	--emt-mia-ink: #1f1f1f;
	--emt-mia-body: #3d3a37;
	--emt-mia-muted: #5b5650;
	--emt-mia-line: rgba(212, 160, 23, 0.3);
	--emt-mia-surface: #fffdfa;
	--emt-mia-icon-bg: #fff7ee;
	--emt-mia-width: 900px;
}

/* ---------- Header ---------- */

body.home .elementor-shortcode > .em-mia .em-mia__badge {
	gap: 7px;
	padding: 8px 16px;
	border: 1px solid rgba(202, 28, 28, 0.22);
	border-radius: 999px;
	background: rgba(202, 28, 28, 0.06);
	color: var(--em-mia-brand);
	font-size: 12px;
	letter-spacing: 0.08em;
	margin-bottom: 18px;
}

body.home .elementor-shortcode > .em-mia .em-mia__title {
	margin-bottom: 14px;
	font-size: clamp(1.556rem, 1.15rem + 1.5vw, 2.222rem);
	line-height: 1.2;
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-mia .em-mia__subtitle {
	max-width: 600px;
	font-size: 17px;
	line-height: 1.6;
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-mia .em-mia__subtitle-line:not(.em-mia__subtitle-line--accent) {
	color: var(--emt-mia-body);
}

/* ---------- Illustration ---------- */

/*
 * Full-column width made the picture ~770px tall at 1440px, taller than
 * the copy and cards together. Holding it to the step row's width keeps it
 * the signature of the section without it taking a whole screen.
 */
body.home .elementor-shortcode > .em-mia .em-mia__visual {
	width: 100%;
	max-width: var(--emt-mia-width);
	margin: 34px auto 0;
	padding: 10px;
	border-width: 1px;
	border-radius: 24px;
	box-shadow: 0 22px 44px -28px rgba(96, 40, 24, 0.35), 0 2px 8px rgba(96, 40, 24, 0.04);
}

body.home .elementor-shortcode > .em-mia .em-mia__visual-img {
	border-radius: 16px;
}

/* ---------- How it works ---------- */
body.home .elementor-shortcode > .em-mia .em-mia__how {
	max-width: var(--emt-mia-width);
	margin: 52px auto 0;
}

body.home .elementor-shortcode > .em-mia .em-mia__how-title {
	margin-bottom: 34px;
	font-size: clamp(1.333rem, 1.1rem + 0.6vw, 1.556rem);
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--emt-mia-ink);
	text-wrap: balance;
}

body.home .elementor-shortcode > .em-mia .em-mia__steps {
	position: relative;
	flex-wrap: nowrap;
	gap: 24px;
}
/* A hairline through the step numbers reads 1 → 2 → 3 across the gaps. */
body.home .elementor-shortcode > .em-mia .em-mia__steps::before {
	content: "";
	position: absolute;
	top: 0;
	right: 16%;
	left: 16%;
	height: 1px;
	background: var(--emt-mia-line);
	pointer-events: none;
}

body.home .elementor-shortcode > .em-mia .em-mia__card {
	flex: 1 1 0;
	max-width: none;
	padding: 38px 26px 30px;
	border: 1px solid var(--emt-mia-line);
	border-radius: 16px;
	background: var(--emt-mia-surface);
	box-shadow: none;
}

body.home .elementor-shortcode > .em-mia .em-mia__card:hover {
	background: #fff;
	box-shadow: 0 16px 32px -24px rgba(96, 40, 24, 0.3);
}

body.home .elementor-shortcode > .em-mia .em-mia__step-num {
	top: -14px;
	width: 28px;
	height: 28px;
	border: 1px solid var(--emt-mia-line);
	background: var(--emt-mia-surface);
	color: var(--em-mia-brand);
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 0 0 4px var(--em-mia-cream);
}

body.home .elementor-shortcode > .em-mia .em-mia__card-icon {
	width: 54px;
	height: 54px;
	margin-bottom: 16px;
	border-width: 1.5px;
	background: var(--emt-mia-icon-bg);
}

body.home .elementor-shortcode > .em-mia .em-mia__card-icon svg,
body.home .elementor-shortcode > .em-mia .em-mia__card-icon img {
	width: 24px;
	height: 24px;
}

body.home .elementor-shortcode > .em-mia .em-mia__card-title {
	margin-bottom: 10px;
	font-size: 18px;
	font-weight: 600;
	color: var(--emt-mia-ink);
}
body.home .elementor-shortcode > .em-mia .em-mia__card-ornament {
	margin-bottom: 12px;
}

body.home .elementor-shortcode > .em-mia .em-mia__card-desc {
	max-width: 250px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--emt-mia-muted);
	text-wrap: pretty;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	body.home .elementor-shortcode > .em-mia .em-mia__title {
		font-size: clamp(1.556rem, 1.15rem + 1.5vw, 2rem);
	}

	body.home .elementor-shortcode > .em-mia .em-mia__visual {
		margin-top: 30px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__how {
		margin-top: 44px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card {
		padding: 36px 18px 26px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-title {
		font-size: 17px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-desc {
		font-size: 14.5px;
	}
}
/*
 * Three columns get too narrow for the descriptions below ~900px, so each
 * step becomes one row: number and icon on the left, text on the right.
 */
@media (max-width: 900px) {
	body.home .elementor-shortcode > .em-mia {
		--emt-mia-width: 620px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__steps {
		flex-direction: column;
		align-items: stretch;
		gap: 22px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__steps::before {
		top: 14px;
		bottom: 14px;
		right: auto;
		left: 45px;
		width: 1px;
		height: auto;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card {
		display: grid;
		grid-template-columns: 52px minmax(0, 1fr);
		column-gap: 18px;
		align-items: start;
		width: 100%;
		padding: 24px 22px 22px 20px;
		text-align: left;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__step-num {
		top: -13px;
		left: 46px;
		width: 26px;
		height: 26px;
		font-size: 12.5px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-icon {
		grid-row: 1 / span 3;
		width: 52px;
		height: 52px;
		margin: 0;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-title {
		margin: 2px 0 8px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-ornament {
		justify-content: flex-start;
		margin-bottom: 8px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-ornament-line:first-child {
		display: none;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-ornament-line {
		max-width: 36px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-desc {
		max-width: none;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	body.home .elementor-shortcode > .em-mia {
		padding-right: 20px;
		padding-left: 20px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__badge {
		margin-bottom: 16px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__title {
		font-size: clamp(25px, 6.8vw, 28px);
		line-height: 1.22;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__subtitle {
		max-width: 340px;
		font-size: 15.5px;
	}

	/* A little wider than the text column so the picture stays legible. */
	body.home .elementor-shortcode > .em-mia .em-mia__visual {
		width: calc(100% + 16px);
		max-width: none;
		margin: 26px -8px 0;
		padding: 6px;
		border-radius: 18px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__visual-img {
		border-radius: 13px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__how {
		margin-top: 38px;
	}
	body.home .elementor-shortcode > .em-mia .em-mia__how-title {
		margin-bottom: 28px;
		padding: 0 8px;
		font-size: 20px;
		letter-spacing: -0.01em;
		white-space: normal;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__steps {
		gap: 22px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card {
		grid-template-columns: 46px minmax(0, 1fr);
		column-gap: 16px;
		padding: 22px 18px 20px 16px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__steps::before {
		left: 39px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__step-num {
		left: 39px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-icon {
		width: 46px;
		height: 46px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-icon svg,
	body.home .elementor-shortcode > .em-mia .em-mia__card-icon img {
		width: 21px;
		height: 21px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-title {
		font-size: 16.5px;
	}

	body.home .elementor-shortcode > .em-mia .em-mia__card-desc {
		font-size: 14.5px;
		line-height: 1.55;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .elementor-shortcode > .em-mia .em-mia__card {
		transition: none;
	}
}
