/**
 * ExpertMatrimony.com — Home Hero (fluid responsive)
 * Shortcode: [em_home_hero]
 *
 * Preserves branding, colors, typography family, buttons, popups & content.
 * Uses Flexbox + clamp() + custom laptop breakpoints (1366 / 1440 / 1600 / 1920).
 */

.em-hero {
	--em-hero-brand: #b3232e;
	--em-hero-brand-hover: #8e1b24;
	--em-hero-text: #333333;
	--em-hero-title: #ca1c1c;
	--em-hero-muted: #666666;
	--em-hero-heading-dark: #222222;
	--em-hero-gold: #d4a017;
	--em-hero-divider: #e8d9c8;
	--em-hero-white: #ffffff;
	--em-hero-bg-color: #fdf4ea;
	--em-hero-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
	--em-hero-radius-btn: 8px;
	--em-hero-radius-card: 18px;
	--em-hero-font: "Poppins", system-ui, -apple-system, sans-serif;
	--em-hero-bg: url("https://expertmatrimony.com/wp-content/uploads/2026/06/expertmatrimony_homepage_with_leaf_light.png");

	/* Fluid tokens */
	--em-hero-max: 1400px;
	--em-hero-pad-x: clamp(1.25rem, 3vw, 2.5rem);
	--em-hero-pad-y: clamp(2rem, 4vh, 3.5rem);
	--em-hero-gap: clamp(1.5rem, 3.5vw, 3rem);
	--em-hero-title-size: clamp(2.25rem, 5vw, 4.25rem);
	--em-hero-title-lh: 1.25;
	--em-hero-desc-size: clamp(1rem, 1.2vw, 1.125rem);
	--em-hero-btn-size: clamp(0.95rem, 1.1vw, 1rem);

	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-family: var(--em-hero-font);
	color: var(--em-hero-text);
	background-color: var(--em-hero-bg-color);
	background-image: var(--em-hero-bg);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: scroll;
	min-height: 100vh;
	min-height: 100dvh;
	padding: var(--em-hero-pad-y) var(--em-hero-pad-x);
	overflow-x: clip;
	overflow-y: visible;
}

.em-hero *,
.em-hero *::before,
.em-hero *::after {
	box-sizing: border-box;
}

/* ---------- Centered fluid container ---------- */
.em-hero__inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 1 auto;
	width: 100%;
	max-width: var(--em-hero-max);
	margin-left: auto;
	margin-right: auto;
	position: relative;
	z-index: 1;
	min-height: 0;
	gap: clamp(1.25rem, 2.5vh, 1.75rem);
}

/* ---------- Main row (copy + visual spacer for BG couple) ---------- */
.em-hero__row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	gap: var(--em-hero-gap);
	width: 100%;
	flex: 1 1 auto;
	min-height: 0;
}

.em-hero__left {
	flex: 1 1 46%;
	max-width: min(34rem, 48%);
	width: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	text-align: left;
	padding-top: 0;
	min-width: 0;
}

/* Empty flex column reserves space so the BG couple stays visible & uncropped */
.em-hero__right {
	flex: 1 1 52%;
	max-width: 55%;
	width: auto;
	min-width: 0;
	min-height: clamp(16rem, 48vh, 34rem);
	align-self: stretch;
	pointer-events: none;
}

/* Decorative rules */
.em-hero__rule {
	display: block;
	width: clamp(4.5rem, 8vw, 6.875rem);
	height: 3px;
	background: var(--em-hero-title);
	border: 0;
	margin: 0 0 clamp(1.25rem, 2.5vh, 1.875rem);
	flex-shrink: 0;
}

.em-hero__rule--after {
	margin: clamp(1.25rem, 2.5vh, 1.875rem) 0;
}

/* Heading — fluid, same brand color/weight */
.em-hero__title {
	margin: 0;
	padding: 0;
	font-family: var(--em-hero-font);
	font-weight: 700;
	font-size: var(--em-hero-title-size);
	line-height: var(--em-hero-title-lh);
	letter-spacing: -0.02em;
	color: var(--em-hero-title);
	max-width: 100%;
}

.em-hero__title-line {
	display: block;
	font-weight: 600;
}

.em-hero__title-line--strong {
	font-weight: 700;
}

/* Description */
.em-hero__desc {
	margin: 0 0 clamp(1.25rem, 2.5vh, 1.75rem);
	max-width: min(29.375rem, 100%);
	font-family: var(--em-hero-font);
	font-size: var(--em-hero-desc-size);
	font-weight: 400;
	line-height: 1.7;
	color: var(--em-hero-text);
}

/* Buttons — existing styles; wrap on small screens */
.em-hero__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(0.75rem, 1.5vw, 1.25rem);
	width: 100%;
}

.em-hero__btn,
.em-hero__btn:link,
.em-hero__btn:visited,
.em-hero__btn:hover,
.em-hero__btn:focus,
.em-hero__btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--em-hero-font);
	font-size: var(--em-hero-btn-size);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	border-radius: var(--em-hero-radius-btn);
	padding: clamp(0.9rem, 1.4vh, 1.125rem) clamp(1.5rem, 2.5vw, 2.25rem);
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
}

.em-hero__btn--primary,
.em-hero__btn--primary:link,
.em-hero__btn--primary:visited {
	background: var(--em-hero-brand);
	color: var(--em-hero-white) !important;
	border: 2px solid var(--em-hero-brand);
}

.em-hero__btn--primary:hover,
.em-hero__btn--primary:focus {
	background: var(--em-hero-brand-hover);
	border-color: var(--em-hero-brand-hover);
	color: var(--em-hero-white) !important;
	text-decoration: none !important;
}

.em-hero__btn--outline,
.em-hero__btn--outline:link,
.em-hero__btn--outline:visited {
	background: var(--em-hero-white);
	color: var(--em-hero-brand) !important;
	border: 2px solid var(--em-hero-brand);
}

.em-hero__btn--outline:hover,
.em-hero__btn--outline:focus {
	background: var(--em-hero-brand);
	color: var(--em-hero-white) !important;
	text-decoration: none !important;
}

.em-hero__btn:focus-visible {
	outline: 3px solid var(--em-hero-brand);
	outline-offset: 3px;
}

/* Feature / trust badges card */
.em-hero__features {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: space-between;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: clamp(1.25rem, 2.5vh, 2rem) clamp(0.75rem, 1.5vw, 1.25rem);
	background: var(--em-hero-white);
	border-radius: var(--em-hero-radius-card);
	box-shadow: var(--em-hero-shadow);
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	gap: 0;
}

.em-hero__feature {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	padding: 0 clamp(0.5rem, 1vw, 0.875rem);
	position: relative;
	min-width: 0;
	width: auto;
}

.em-hero__feature:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 8%;
	right: 0;
	bottom: 8%;
	width: 1px;
	background: var(--em-hero-gold);
}

.em-hero__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(2.75rem, 4vw, 3.4375rem);
	height: clamp(2.75rem, 4vw, 3.4375rem);
	border: 2px solid var(--em-hero-brand);
	border-radius: 50%;
	color: var(--em-hero-brand);
	margin: 0 auto clamp(0.65rem, 1.2vh, 0.875rem);
	flex-shrink: 0;
}

.em-hero__icon svg {
	width: clamp(1.25rem, 2vw, 1.625rem);
	height: clamp(1.25rem, 2vw, 1.625rem);
	display: block;
}

.em-hero__feature-title {
	margin: 0 0 0.5rem;
	padding: 0;
	width: 100%;
	font-family: var(--em-hero-font);
	font-size: clamp(1rem, 1.3vw, 1.25rem);
	font-weight: 600;
	line-height: 1.3;
	color: var(--em-hero-heading-dark);
	text-align: center;
}

.em-hero__feature-desc {
	margin: 0;
	padding: 0;
	width: 100%;
	font-family: var(--em-hero-font);
	font-size: clamp(0.8125rem, 1vw, 0.9375rem);
	font-weight: 400;
	line-height: 1.5;
	color: var(--em-hero-muted);
	text-align: center;
}

/* ==========================================================================
   LARGE / QHD / 4K — content capped, BG fills screen
   ========================================================================== */
@media (min-width: 1920px) {
	.em-hero {
		--em-hero-max: 1400px;
		min-height: 100vh;
		min-height: 100dvh;
		background-position: center center;
	}
}

/* ==========================================================================
   LAPTOP / DESKTOP band (1366–1919) — default tokens for this band
   ========================================================================== */
@media (min-width: 1366px) and (max-width: 1919px) {
	.em-hero {
		--em-hero-max: 1200px;
		min-height: 95vh;
		min-height: 95dvh;
		background-position: 72% center;
	}

	.em-hero__left {
		max-width: min(32rem, 46%);
	}

	.em-hero__right {
		min-height: clamp(14rem, 42vh, 28rem);
	}
}

/* ---------- 1600×900 ---------- */
@media (min-width: 1600px) and (max-width: 1919px) {
	.em-hero {
		--em-hero-max: 1240px;
		--em-hero-title-size: clamp(2.5rem, 3.4vw, 3.6rem);
		background-position: 74% center;
	}
}

/* ---------- 1536×864 / 1440×900 ---------- */
@media (min-width: 1440px) and (max-width: 1599px) {
	.em-hero {
		--em-hero-max: 1180px;
		--em-hero-title-size: clamp(2.35rem, 3.2vw, 3.35rem);
		--em-hero-pad-y: clamp(1.5rem, 3.5vh, 2.5rem);
		min-height: 95vh;
		min-height: 95dvh;
		background-position: 70% center;
	}

	.em-hero__right {
		min-height: clamp(13rem, 40vh, 26rem);
	}

	.em-hero__features {
		padding: clamp(1rem, 2vh, 1.5rem) clamp(0.5rem, 1vw, 1rem);
	}
}

/* ---------- 1366×768 ---------- */
@media (min-width: 1366px) and (max-width: 1439px) {
	.em-hero {
		--em-hero-max: 1120px;
		--em-hero-title-size: clamp(2.15rem, 3vw, 3rem);
		--em-hero-desc-size: clamp(0.95rem, 1.1vw, 1.05rem);
		--em-hero-pad-y: clamp(1.25rem, 3vh, 2rem);
		--em-hero-gap: clamp(1.25rem, 2.5vw, 2rem);
		min-height: 95vh;
		min-height: 95dvh;
		background-position: 68% center;
	}

	.em-hero__left {
		max-width: min(30rem, 48%);
	}

	.em-hero__right {
		min-height: clamp(12rem, 38vh, 22rem);
	}

	.em-hero__features {
		padding: 1rem 0.65rem;
	}

	.em-hero__feature-title {
		font-size: clamp(0.95rem, 1.15vw, 1.1rem);
	}

	.em-hero__feature-desc {
		font-size: clamp(0.78rem, 0.95vw, 0.875rem);
	}
}

/* Short-height laptops (e.g. 768–900px tall) — tighten vertical rhythm */
@media (min-width: 1025px) and (max-height: 900px) {
	.em-hero {
		--em-hero-pad-y: clamp(1rem, 2.5vh, 1.75rem);
		--em-hero-title-lh: 1.2;
	}

	.em-hero__rule {
		margin-bottom: clamp(0.75rem, 1.5vh, 1.25rem);
	}

	.em-hero__rule--after {
		margin: clamp(0.75rem, 1.5vh, 1.25rem) 0;
	}

	.em-hero__desc {
		margin-bottom: clamp(0.85rem, 1.8vh, 1.25rem);
		line-height: 1.55;
	}

	.em-hero__right {
		min-height: clamp(11rem, 36vh, 20rem);
	}
}

/* ==========================================================================
   BETWEEN LAPTOP & TABLET (1025–1365)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1365px) {
	.em-hero {
		--em-hero-max: 960px;
		--em-hero-title-size: clamp(2rem, 3.4vw, 2.85rem);
		min-height: 95vh;
		min-height: 95dvh;
		background-position: 65% center;
	}

	.em-hero__left {
		max-width: min(28rem, 50%);
	}

	.em-hero__right {
		min-height: clamp(12rem, 40vh, 22rem);
	}
}

/* ==========================================================================
   TABLET
   ========================================================================== */
@media (max-width: 1024px) {
	.em-hero {
		--em-hero-max: 90%;
		--em-hero-pad-x: clamp(1.25rem, 4vw, 2rem);
		--em-hero-pad-y: clamp(1.75rem, 4vh, 2.75rem);
		--em-hero-title-size: clamp(2rem, 4.5vw, 2.75rem);
		--em-hero-desc-size: clamp(1rem, 1.8vw, 1.125rem);
		min-height: 80vh;
		min-height: 80dvh;
		background-position: 62% center;
	}

	.em-hero__row {
		align-items: center;
		gap: clamp(1.25rem, 3vw, 2rem);
	}

	.em-hero__left {
		flex: 1 1 50%;
		max-width: min(26rem, 52%);
	}

	.em-hero__right {
		flex: 1 1 45%;
		max-width: 48%;
		min-height: clamp(12rem, 36vh, 22rem);
	}

	.em-hero__features {
		flex-wrap: wrap;
		padding: clamp(1rem, 2vh, 1.5rem) clamp(0.5rem, 1.5vw, 1rem);
	}

	.em-hero__feature {
		flex: 0 0 33.333%;
		max-width: 33.333%;
		width: 33.333%;
		padding: clamp(0.75rem, 1.5vh, 1.125rem) clamp(0.5rem, 1vw, 0.75rem);
	}

	.em-hero__feature:nth-child(3)::after,
	.em-hero__feature:nth-child(5)::after {
		display: none;
	}

	.em-hero__feature:nth-child(4),
	.em-hero__feature:nth-child(5) {
		flex: 0 0 50%;
		max-width: 50%;
		width: 50%;
	}

	.em-hero__feature:nth-child(n + 4) {
		border-top: 1px solid var(--em-hero-divider);
		margin-top: 0.25rem;
	}
}

/* Narrow tablet — stack when side-by-side would crush copy */
@media (max-width: 900px) and (min-width: 768px) {
	.em-hero {
		background-position: 55% center;
	}

	.em-hero__row {
		flex-direction: column;
		align-items: stretch;
		flex: 0 0 auto;
	}

	.em-hero__left {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
		align-items: flex-start;
		text-align: left;
	}

	.em-hero__right {
		display: none;
	}
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 767px) {
	.em-hero {
		--em-hero-max: 100%;
		--em-hero-pad-x: 20px;
		--em-hero-pad-y: clamp(2rem, 5vh, 2.5rem);
		--em-hero-title-size: clamp(1.85rem, 7.5vw, 2.25rem);
		--em-hero-desc-size: 1rem;
		min-height: auto;
		justify-content: flex-start;
		/* Couple photo hurts contrast on small screens — brand gradient instead */
		background-image: linear-gradient(
			180deg,
			#fffaf4 0%,
			#fdf4ea 42%,
			#f6e8d8 78%,
			#f0dfcc 100%
		);
		background-color: #fdf4ea;
		background-size: auto;
		background-position: center top;
		background-repeat: no-repeat;
	}

	.em-hero__inner {
		max-width: 100%;
		width: 100%;
		gap: 1.5rem;
		justify-content: flex-start;
	}

	.em-hero__row {
		flex-direction: column;
		align-items: stretch;
		gap: 1.5rem;
		min-height: 0;
		flex: 0 0 auto;
	}

	.em-hero__left {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
		align-items: center;
		text-align: center;
		padding-top: 0;
	}

	.em-hero__right {
		display: none;
	}

	.em-hero__rule {
		margin-left: auto;
		margin-right: auto;
	}

	.em-hero__title {
		width: 100%;
		text-align: center;
		color: #ca1c1c;
		text-shadow: none;
	}

	.em-hero__desc {
		max-width: 100%;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
		color: #333333;
	}

	.em-hero__actions {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		width: 100%;
		gap: 0.875rem;
	}

	.em-hero__btn,
	.em-hero__btn:link,
	.em-hero__btn:visited {
		width: 100%;
		white-space: normal;
		padding: 1rem 1.5rem;
	}

	.em-hero__features {
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0.75rem 1.25rem 1.5rem;
		gap: 0;
	}

	.em-hero__feature {
		flex: 0 0 auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		max-width: 100%;
		padding: 1.5rem 0.5rem;
		margin: 0;
		border: 0;
		border-top: none;
		text-align: center;
	}

	.em-hero__feature:not(:last-child)::after {
		display: none;
	}

	.em-hero__feature:not(:last-child) {
		border-bottom: 1px solid var(--em-hero-divider);
	}

	.em-hero__feature:nth-child(n + 4) {
		border-top: none;
		margin-top: 0;
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}

	.em-hero__icon {
		margin-left: auto;
		margin-right: auto;
	}

	.em-hero__feature-title,
	.em-hero__feature-desc {
		width: 100%;
		max-width: 100%;
		text-align: center;
	}
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	.em-hero__btn {
		transition: none;
	}
}
