/**
 * Overlap Content — rounded color panel overlapping a photo
 */

.ew-overlap-content {
	--ew-oc-overlap: 30px;
	--ew-oc-panel-width: 46%;
	--ew-oc-radius: 48px;
	--ew-oc-v-inset: 28px;
	display: flex;
	align-items: stretch;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.ew-overlap-content *,
.ew-overlap-content *::before,
.ew-overlap-content *::after {
	box-sizing: border-box;
}

.ew-overlap-content--image-right {
	flex-direction: row;
}

.ew-overlap-content--image-left {
	flex-direction: row-reverse;
}

/* ─── Text panel ─── */
.ew-overlap-content__panel {
	position: relative;
	z-index: 2;
	width: var(--ew-oc-panel-width);
	flex: 0 0 var(--ew-oc-panel-width);
	background-color: #c27244;
	border-radius: var(--ew-oc-radius);
	padding: 52px 44px 52px 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 280px;
}

.ew-overlap-content__title {
	margin: 0 0 22px;
	padding: 0;
	color: #ffffff;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: 48px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.ew-overlap-content__text {
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.65;
}

.ew-overlap-content__text p {
	margin: 0 0 0.8em;
}

.ew-overlap-content__text p:last-child {
	margin-bottom: 0;
}

/* ─── Image ─── */
.ew-overlap-content__image {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-width: 0;
	align-self: stretch;
	overflow: hidden;
	margin-top: var(--ew-oc-v-inset);
	margin-bottom: var(--ew-oc-v-inset);
}

.ew-overlap-content--image-right .ew-overlap-content__image {
	margin-left: calc(var(--ew-oc-overlap) * -1);
}

.ew-overlap-content--image-left .ew-overlap-content__image {
	margin-right: calc(var(--ew-oc-overlap) * -1);
}

.ew-overlap-content__image img,
.ew-overlap-content__image video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
	.ew-overlap-content__title {
		font-size: 38px;
	}

	.ew-overlap-content__panel {
		padding: 40px 32px;
	}
}

@media (max-width: 767px) {
	.ew-overlap-content,
	.ew-overlap-content--image-right,
	.ew-overlap-content--image-left {
		flex-direction: column;
	}

	.ew-overlap-content__panel {
		width: 100%;
		flex: none;
		border-radius: 32px;
		padding: 36px 28px;
		min-height: 0;
	}

	.ew-overlap-content--image-right .ew-overlap-content__image,
	.ew-overlap-content--image-left .ew-overlap-content__image {
		margin: -24px 20px 0;
		width: auto;
		height: auto;
	}

	.ew-overlap-content__title {
		font-size: 32px;
		margin-bottom: 16px;
	}

	.ew-overlap-content__text {
		font-size: 15px;
	}
}
