.hero-wrapper {
	margin-block-start: 0;
}

.hero {
	position: relative;
	border-bottom-left-radius: 24px;
	padding: 0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
}

.hero::before {
	content: '';
	position: absolute;
	top: var(--header-height, 80px);
	left: 0;
	width: 24px;
	height: 24px;
	background: var(--page-background-color);
	clip-path: path('M 0 0 L 24 0 A 24 24 0 0 0 0 24 Z');
	z-index: 1;
}

.hero .wp-block-cover__inner-container {
	display: flex;
	justify-content: flex-end;
}

.hero__panel {
	position: relative;
	background: var(--page-background-color);
	border-top-left-radius: 24px;
	padding: 50px;
	color: var(--wp--preset--color--neutral-900);
	z-index: 1;
	width: fit-content;
}

.hero__panel::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: -24px;
	width: 24px;
	height: 24px;
	background: var(--page-background-color);
	clip-path: path('M 0 0 L 24 0 A 24 24 0 0 0 0 24 Z');
	transform: rotate(180deg);
}

.hero__panel h1,
.hero__text h1 {
	max-width: 480px;
}

.webinar-title {
	margin-block-start: 24px;
}

.hero__panel .wp-block-post-featured-image img {
	max-height: 220px;
	width: auto;
}

.hero__panel .wp-block-post-excerpt,
.hero__text .wp-block-post-excerpt {
	max-width: 480px;
	margin-block-start: 16px;
}

.hero__text--workshop h1,
.hero__text--workshop .wp-block-post-excerpt {
	max-width: none;
}

.hero--split {
	min-height: 400px;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
	padding: 0;
}

.hero--split .hero__text {
	color: var(--wp--preset--color--neutral-900);
	padding-top: 140px;
	padding-left: 140px;
}

.hero__text--workshop {
	flex: 1 1 auto;
	padding-bottom: 140px;
}

.hero--split .hero__panel {
	align-self: flex-end;
}

.hero__panel--workshop .wp-block-post-featured-image {
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
}

.hero--split .hero__panel .wp-block-post-featured-image {
	position: relative;
	z-index: 1;
}

/*
 * Diagonal notch cut into the panel's top-left corner (replacing its
 * border-top-left-radius there), matching the Figma "Product overview_
 * Desktop" reference where the coloured hero background diagonally cuts
 * across most of the white content area's height. It's a real clip-path
 * cutout (not a filled pseudo-element) so it reveals the hero's own
 * coloured background showing through. Coordinates are normalised to
 * objectBoundingBox (0-1) via an inline <clipPath> in hero-workshops.php,
 * so the shape scales with whatever size the panel actually renders at.
 *
 * To give the diagonal room to be as bold as the Figma reference without
 * biting into the featured photo, the panel is sized well beyond the
 * photo (rather than fit-content around it) and the photo is anchored to
 * its bottom-right corner, echoing how the Figma icon sits inside a much
 * larger white area rather than filling it.
 */
.hero__panel-clip-svg {
	position: absolute;
	width: 0;
	height: 0;
}

.hero__panel--workshop {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	width: 330px;
	height: 200px;
	padding: 24px;
	margin-left: auto;
	clip-path: url(#hero-panel-workshop-clip);
}

.hero__panel--workshop::before {
	display: none;
}

.hero__panel--workshop .wp-block-post-featured-image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

@media (max-width: 600px) {
	.hero--split {
		flex-direction: column;
		align-items: flex-start;
	}

	.hero--split .hero__text {
		padding-top: 32px;
		padding-left: 32px;
	}

	.hero--split .hero__panel {
		align-self: flex-start;
	}

	.hero__panel--workshop {
		width: 300px;
		height: 300px;
		padding: 32px;
	}

	.hero__panel--workshop .wp-block-post-featured-image img {
		max-height: 150px;
	}
}

.hero--no-overlay {
	min-height: 594px;
}

/*
 * WordPress core's cover block CSS gives .wp-block-cover__background a
 * blanket opacity: .5 (wp-includes/blocks/cover/style.css). Per-block core
 * CSS is enqueued as blocks are discovered during render and can end up
 * printed in wp_footer — after this theme's own stylesheet — so an
 * equal-specificity override here is a coin flip on source order alone.
 * !important guarantees this wins regardless of where core prints its
 * style, since we're deliberately overriding a core default, not fighting
 * our own cascade. Keyed off has-background-dim-0 itself (the cover
 * block's own "no dim" state) rather than a hero-specific class, so it
 * covers both hero.php variants — the overlay hero also uses dimRatio:0
 * now — without touching team-member-hero.php, where dimRatio isn't
 * dimming a photo but is the solid overlayColor's own visible opacity.
 */
.wp-block-cover__background.has-background-dim-0 {
	opacity: 0 !important;
}

@media (max-width: 600px) {
	.hero--no-overlay {
		min-height: 120px;
	}
}
