/*
Theme Name: Atelier 64 child
Theme URI: https://atelier64.eu
Author: Atelier 64
Author URI: https://atelier64.eu
Description: Child Theme for Atelier 64
Template: betheme
Version: 2.0.1
*/

/*
 * Keep WPBakery's stretched geometry and content grid untouched. Paint only
 * the visible background inside the viewport, with its original radius.
 */

:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
) {
	--wilfam-stretched-inset-left: 20px;
	--wilfam-stretched-inset-right: 20px;
	--wilfam-stretched-radius: 15px;
	position: relative;
	z-index: 0;
	isolation: isolate;
	/* The full-width source background must not leave an antialiased rim. */
	border-radius: 0 !important;
}

@media (max-width: 767px) {
	:is(
		.vc_row[data-vc-full-width="true"].vc_row-has-fill,
		.vc_section[data-vc-full-width="true"].vc_section-has-fill
	) {
		--wilfam-stretched-inset-left: 15px;
		--wilfam-stretched-inset-right: 15px;
	}
}

/* Optional WPBakery class: let this stretched background reach the edges. */
:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
).stretch-tot-rand {
	--wilfam-stretched-inset-left: 0px !important;
	--wilfam-stretched-inset-right: 0px !important;
}

:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
)::before,
:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
)::after {
	content: "";
	display: block !important;
	position: absolute;
	top: 0;
	bottom: 0;
	pointer-events: none;
}

/* Hide the element's original edge-to-edge background. */
:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
)::after {
	right: 0;
	left: 0;
	z-index: 1;
	background: #fff;
}

/* Repaint its colour or image as the inset, rounded background. */
:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
)::before {
	right: var(--wilfam-stretched-inset-right);
	left: var(--wilfam-stretched-inset-left);
	z-index: 2;
	border-radius: var(--wilfam-stretched-radius);
	background: inherit;
}

:is(
	.vc_row[data-vc-full-width="true"].vc_row-has-fill,
	.vc_section[data-vc-full-width="true"].vc_section-has-fill
) > * {
	position: relative;
	z-index: 3;
}

/* The homepage hero keeps WPBakery's editable photo beneath this layer. */
.vc_row.hero-home[data-vc-full-width="true"].vc_row-has-fill > .wilfam-home-hero-art {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--wilfam-stretched-inset-left);
	right: var(--wilfam-stretched-inset-right);
	z-index: 3;
	border-radius: var(--wilfam-stretched-radius);
	overflow: hidden;
	pointer-events: none;
	background: linear-gradient(90deg, rgba(0, 78, 97, 0.85), rgba(0, 52, 67, 0.48) 48%, rgba(0, 0, 0, 0.04));
}

.vc_row.hero-home > .wilfam-home-hero-art::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: min(38vw, 600px);
	aspect-ratio: 907.795 / 588.499;
	background-color: rgba(229, 143, 14, 0.8);
	-webkit-mask: url("../../uploads/2026/10/Home-hero-shape.svg") center right / contain no-repeat;
	mask: url("../../uploads/2026/10/Home-hero-shape.svg") center right / contain no-repeat;
}

@media (max-width: 767px) {
	.vc_row.hero-home > .wilfam-home-hero-art::after {
		right: -12%;
		bottom: -3%;
		width: min(70vw, 440px);
	}
}

/* Crop the SVG mask's antialiased top and bottom edges inside the photo column. */
.banner-uitgelicht .mask-test img {
	position: relative;
	top: -2px;
	height: calc(100% + 4px) !important;
}

@media (max-width: 959px) {
	.banner-uitgelicht .mask-test img {
		-webkit-mask-image: url("../../uploads/2026/09/banner-shape-mobile.svg") !important;
		mask-image: url("../../uploads/2026/09/banner-shape-mobile.svg") !important;
		object-position: center 20% !important;
	}
}

@media (min-width: 768px) and (max-width: 959px) {
	.banner-uitgelicht .mask-test img {
		object-position: center 25% !important;
	}
}
