/* wp-content/plugins/ceca-widgets/widgets/page-hero/page-hero.css */
/* Page Hero (Figma 257:3111 / 214:2586): full-bleed 400px colour band,
   title 50/60 Bold + intro 25/30 (max 738) vertically centred on the site
   grid, and an image on the right clipped to the angular brand shape via
   mask.svg — any ordinary photo takes the shape. */

.ceca-ph {
	--ceca-ph-h: 400px;
	--ceca-ph-img-w: 455px;
	--ceca-ph-bleed: 0px;

	position: relative;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
	background: #f0b43c;
	overflow: hidden;
}

.ceca-ph__inner {
	display: flex;
	align-items: center;
	min-height: var(--ceca-ph-h);
	max-width: var(--ceca-site-width, 1440px);
	margin: 0 auto;
	padding: 40px var(--ceca-gutter, 72px);
}

.ceca-ph__content {
	max-width: 738px;
	position: relative;
	z-index: 1;
}

.ceca-ph .ceca-ph__title {
	margin: 0;
	font-size: 50px;
	line-height: 60px;
	font-weight: 700;
	color: #000;
}

.ceca-ph .ceca-ph__intro {
	margin: 10px 0 0;
	font-size: 25px;
	line-height: 35px; /* user, 2026-09-29 — was 30px */
	color: #000;
}

/* The uploaded photo, clipped to the brand silhouette. mask-size 100% 100%
   is exact because mask.svg shares the shape's aspect ratio — the whole
   outline always shows regardless of the photo's own proportions. */
.ceca-ph__media {
	position: absolute;
	top: 0;
	/* Anchored to the 1440 site-width box, not the viewport: on wider
	   screens the shape stays on the content grid (design: flush at the
	   canvas edge); below 1440 the two edges coincide. Bleed pushes past
	   that grid edge. */
	right: calc(50vw - min(50vw, var(--ceca-site-width, 1440px) / 2) - var(--ceca-ph-bleed));
	width: var(--ceca-ph-img-w);
	height: 100%;
	-webkit-mask-image: url('mask.svg');
	mask-image: url('mask.svg');
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	background: rgba(255, 255, 255, 0.35);
}

.ceca-ph__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* "Logo / small image — show whole": a small or very wide image (a logo, a
   banner strip) can't fill the shape without being blown up and cropped, so
   it sits centred on white inside the silhouette, never above its real
   size. The inset keeps it clear of the shape's angled edges. */
.ceca-ph--contain .ceca-ph__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 56px;
	background: #FFFFFF;
}

.ceca-ph--contain .ceca-ph__media img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 70%;
	object-fit: contain;
}

@media (max-width: 1024px) {
	.ceca-ph {
		--ceca-ph-img-w: 360px;
	}

	.ceca-ph .ceca-ph__title {
		font-size: 40px;
		line-height: 48px;
	}

	.ceca-ph .ceca-ph__intro {
		font-size: 20px;
		line-height: 28px;
	}
}

/* Mobile (Figma 2372:12026 / 2372:12651, 440 frame): the shaped image
   comes FIRST, hanging from the header — 449.7 wide from x62, so it runs
   past the right edge and the band clips it — then the title 18px below
   (30/35) and the intro (18/26), band padding 41px under the text
   (user, 2026-10-02). */
@media (max-width: 767px) {
	.ceca-ph {
		--ceca-ph-h: auto;

		display: flex;
		flex-direction: column;
	}

	.ceca-ph__media {
		order: -1;
		position: relative;
		top: auto;
		right: auto;
		flex: none;
		width: 102.2%;
		height: auto;
		margin-left: 14.09%;
		aspect-ratio: 455 / 400;
	}

	.ceca-ph__inner {
		min-height: 0;
		width: 100%;
		padding: 18px var(--ceca-gutter, 20px) 41px;
	}

	.ceca-ph--no-image .ceca-ph__inner {
		padding-top: 41px;
	}

	.ceca-ph .ceca-ph__title {
		font-size: 30px;
		line-height: 35px;
	}

	.ceca-ph .ceca-ph__intro {
		font-size: 18px;
		line-height: 26px;
	}
}
