/**
 * Overlay Banner — Frame 51 (centered panel over full-bleed image)
 */

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

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

.aew-overlay-banner {
	--aew-overlay-banner-image-height: 860px;
	--aew-overlay-banner-panel-width: 100%;
	--aew-overlay-banner-panel-min-height: auto;
	--aew-overlay-banner-wrap-padding: 40px;
	position: relative;
	width: 100%;
	overflow: visible;
	box-sizing: border-box;
}

.elementor-widget-agency-overlay-banner .elementor-widget-container {
	overflow: visible;
}

.aew-overlay-banner__inner {
	width: 100%;
	max-width: none;
	margin: 0 auto;
	/* Padding owned by the "Wrapper padding" control (default 0). It insets the
	   whole banner — including the image — because __stack (the media's
	   positioning context) lives inside this padded box. No !important so the
	   control can win. */
	padding: 0;
	box-sizing: border-box;
	overflow: visible;
}

.aew-overlay-banner__stack {
	position: relative;
	width: 100%;
	min-height: var(--aew-overlay-banner-image-height);
	box-sizing: border-box;
	overflow: visible;
}

.aew-overlay-banner__media {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	z-index: 0;
	width: 100vw;
	max-width: 100vw;
	height: 100%;
	transform: translateX(-50%);
	overflow: hidden;
	/* border-radius owned by the "Border radius" image control (image_radius) */
	line-height: 0;
	pointer-events: none;
}

.aew-overlay-banner__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Image width mode: "Contained" keeps the image inside the 1440 rail instead of
   spanning the full viewport (default is full-bleed, set above). */
.aew-ob-imgw--boxed .aew-overlay-banner__media {
	left: 50%;
	width: 100%;
	max-width: 1440px;
}

.aew-overlay-banner__panel-wrap {
	position: relative;
	z-index: 1;
	display: flex;
	/* Stretch so the panel fills the full wrap height; its actual height is
	   the wrap height minus this padding (both editable in the editor). */
	align-items: stretch;
	justify-content: center;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	min-height: var(--aew-overlay-banner-image-height);
	padding: var(--aew-overlay-banner-wrap-padding);
	box-sizing: border-box;
}

/* ── Auto height mode ────────────────────────────────────────────────────────
   The banner height follows the text box + its "Panel spacing" padding instead
   of a fixed image height. The absolute image just fills whatever height the
   padded panel produces, so no image height needs to be set. */
.aew-ob-h--auto .aew-overlay-banner__stack {
	min-height: 0;
}
.aew-ob-h--auto .aew-overlay-banner__panel-wrap {
	min-height: 0;
	align-items: center; /* panel sizes to its own content, centered in the padding */
}
.aew-ob-h--auto .aew-overlay-banner__panel {
	align-self: auto;    /* don't stretch — the box is only as tall as its content */
	min-height: 0;
}

.aew-overlay-banner__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	width: var(--aew-overlay-banner-panel-width);
	max-width: 100%;
	/* Full height of the wrap (limited by the wrap padding); min-height acts as
	   a floor so it never collapses below the set minimum. */
	align-self: stretch;
	min-height: var(--aew-overlay-banner-panel-min-height);
	margin: 0 auto;
	background-color: var(--aew-overlay-banner-panel-bg, #f8f5f1);
	border-radius: 20px;
	overflow: hidden;
	box-sizing: border-box;
	text-align: center;
}

.aew-overlay-banner__stars {
	display: flex;
	gap: 4px;
}

.aew-overlay-banner__stars svg {
	width: 20px;
	height: 20px;
	fill: #f3c400;
}

.aew-overlay-banner__eyebrow {
	margin: 0 0 16px;
	width: 100%;
	font-family: var(--aew-font-body, Poppins, sans-serif);
	/* font-size owned by the "Eyebrow" spacing/size control (sp_eyebrow_fontsize) */
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #305b83;
	text-align: center;
}

.aew-overlay-banner__title {
	margin: 0;
	width: 100%;
	font-family: var(--aew-font-heading, 'DM Serif Display', serif);
	/* font-size owned by the "Title" spacing/size control (sp_title_fontsize);
	   font-weight owned by the Title typography control (title_typography) */
	line-height: 1.15;
	color: var(--aew-overlay-banner-title-color, #252f37);
	text-align: center;
}

.aew-overlay-banner__lead {
	width: 100%;
	font-family: var(--aew-font-heading, 'DM Serif Display', serif);
	/* font-size owned by the "Lead" spacing/size control (sp_lead_fontsize);
	   font-weight owned by the Lead paragraph typography control (lead_typography) */
	line-height: 1.15;
	color: var(--aew-overlay-banner-lead-color, #252f37);
	text-align: center;
}

.aew-overlay-banner__lead.aew-rich-text,
.aew-overlay-banner__description.aew-rich-text {
	text-align: center;
}

.aew-overlay-banner__description {
	width: 100%;
	font-family: var(--aew-font-body, Poppins, sans-serif);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--aew-overlay-banner-description-color, #252f37);
	text-align: center;
}

.aew-overlay-banner__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	margin: 0 auto;
	padding: 16px 24px;
	border: 0;
	border-radius: 8px;
	background-color: var(--aew-color-yellow, #ebc543);
	color: var(--aew-color-blue-dark, #252f37);
	font-family: var(--aew-font-body, Poppins, sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.aew-overlay-banner__button:hover,
.aew-overlay-banner__button:focus-visible {
	opacity: 0.9;
	text-decoration: none;
}

/* Overlay banner keeps the desktop overlaid layout (text box on top of the
   full-bleed image) at ALL sizes — no tablet/mobile stacking. */

@media (min-width: 1024px) {
	.aew-overlay-banner {
		--aew-overlay-banner-image-height: 870px;
		--aew-overlay-banner-panel-width: 900px;
		--aew-overlay-banner-panel-min-height: 630px;
	}

	.aew-overlay-banner__panel {
		border-radius: 40px;
	}

	.aew-overlay-banner__description {
		font-size: 18px;
	}

	.aew-overlay-banner__button {
		font-size: 18px;
	}
}
