/**
 * Feature Rows — Frame 25 (desktop zigzag), Frame 25 (1) (mobile stack)
 */

.elementor-column > .elementor-element-populated:has(.elementor-widget-agency-feature-rows) {
	padding: 0 !important;
}

.e-con:has(.elementor-widget-agency-feature-rows) {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
}

.aew-feature-rows {
	--aew-feature-rows-bp: 768;
	--aew-feature-rows-bg: transparent;
	position: relative;
	isolation: isolate;
	width: 100%;
	box-sizing: border-box;
}

.aew-feature-rows::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 100vw;
	max-width: 100vw;
	transform: translateX(-50%);
	background-color: var(--aew-feature-rows-bg);
	z-index: -1;
	pointer-events: none;
}

.aew-feature-rows__inner {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}

.aew-feature-rows__list {
	display: flex;
	flex-direction: column;
}

.aew-feature-rows__item {
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
}

.aew-feature-rows__media {
	flex: 1 1 50%;
	min-width: 0;
	line-height: 0;
	display: flex;
	align-self: stretch;
}

.aew-feature-rows__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	object-fit: cover;
}

.aew-feature-rows__body {
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch;
	box-sizing: border-box;
}

.aew-feature-rows h3.aew-feature-rows__title {
	margin: 0 0 1rem;
	font-family: var(--aew-font-heading, 'DM Serif Display', serif);
	/* font-size / font-weight / line-height owned by title_typography control */
}

.aew-feature-rows__text {
	margin: 0 0 32px;
}

/* No CTA below → don't keep the 32px gap the text reserves for one */
.aew-feature-rows__text:last-child {
	margin-bottom: 0;
}

.aew-feature-rows__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	font-family: var(--aew-font-body, Poppins, sans-serif);
	/* font-size / font-weight owned by cta_typography control */
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.aew-feature-rows__cta:hover {
	opacity: 0.92;
}

/* Desktop zigzag — image and copy block share row height */
.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item {
	flex-direction: row;
	align-items: stretch;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__media {
	position: relative;
	/* "Image height" control: when --aew-fr-img-h is set, the media takes that
	   exact height (a fixed cross-size overrides align-self:stretch); when unset
	   it stays auto and matches the copy height as before. */
	height: var(--aew-fr-img-h, auto);
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-right {
	flex-direction: row;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-right .aew-feature-rows__body {
	order: 1;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-right .aew-feature-rows__media {
	order: 2;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-left {
	flex-direction: row;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-left .aew-feature-rows__media {
	order: 1;
}

.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__item--image-left .aew-feature-rows__body {
	order: 2;
}

/* Image and copy block are always equal height: the text content drives the row
   height and the image (absolutely positioned, object-fit:cover) fills the same
   box — so the photo is always the same size as the text card, no flex gaps. */
.aew-feature-rows:not(.aew-feature-rows--compact) .aew-feature-rows__body {
	align-self: stretch;
}

/* Mobile / compact stack */
.aew-feature-rows--compact .aew-feature-rows__item {
	flex-direction: column;
	align-items: stretch;
}

.aew-feature-rows--compact .aew-feature-rows__media,
.aew-feature-rows--compact .aew-feature-rows__body {
	flex: none;
	width: 100%;
	order: unset;
}

.aew-feature-rows--compact .aew-feature-rows__media {
	display: block;
	/* "Image height" control (stacked): fixed height when set, else natural. */
	height: var(--aew-fr-img-h, auto);
}

.aew-feature-rows--compact .aew-feature-rows__media img {
	height: var(--aew-fr-img-h, auto);
	min-height: 0;
	object-fit: cover;
}

.aew-feature-rows--compact .aew-feature-rows__body {
	align-items: stretch;
}

.aew-feature-rows--compact .aew-feature-rows__title {
	margin-bottom: 0.75rem;
}

.aew-feature-rows--compact .aew-feature-rows__text {
	margin-bottom: 32px;
}

.aew-feature-rows--compact .aew-feature-rows__text:last-child {
	margin-bottom: 0;
}

.aew-feature-rows--compact.aew-feature-rows--cta-full-width .aew-feature-rows__cta {
	width: 100%;
	max-width: 100%;
	white-space: normal;
	text-align: center;
}

/* Elementor editor device preview */
body.elementor-device-mobile .aew-feature-rows .aew-feature-rows__item,
body[data-elementor-device-mode="mobile"] .aew-feature-rows .aew-feature-rows__item,
body[data-elementor-device-mode="mobile_extra"] .aew-feature-rows .aew-feature-rows__item {
	flex-direction: column;
	align-items: stretch;
}

body.elementor-device-mobile .aew-feature-rows .aew-feature-rows__media,
body[data-elementor-device-mode="mobile"] .aew-feature-rows .aew-feature-rows__media,
body[data-elementor-device-mode="mobile_extra"] .aew-feature-rows .aew-feature-rows__media,
body.elementor-device-mobile .aew-feature-rows .aew-feature-rows__body,
body[data-elementor-device-mode="mobile"] .aew-feature-rows .aew-feature-rows__body,
body[data-elementor-device-mode="mobile_extra"] .aew-feature-rows .aew-feature-rows__body {
	flex: none;
	width: 100%;
	order: unset;
}

body.elementor-device-mobile .aew-feature-rows .aew-feature-rows__body,
body[data-elementor-device-mode="mobile"] .aew-feature-rows .aew-feature-rows__body,
body[data-elementor-device-mode="mobile_extra"] .aew-feature-rows .aew-feature-rows__body {
	align-items: stretch;
}

.aew-feature-rows__footnote {
	margin: 0; /* margin-top owned by footnote_spacing control */
	font-family: var(--aew-font-body, Poppins, sans-serif);
	/* font-size / font-weight / line-height owned by footnote_typography control;
	   text-align owned by footnote_align control */
}
