/*
 * Hero of the internal pages: texture on the right fading into the
 * background, plus the CECyber mark.
 */
.cecyber-page-hero {
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
	overflow: hidden;
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--70);
	background-image:
		linear-gradient(to left, rgb(11 49 58 / 0%), var(--wp--preset--color--primary-darker) 75%),
		url(../images/hero-texture.webp);
	background-repeat: no-repeat, repeat;
	background-size: auto, 20.8369rem;

	&::after {
		content: "";
		position: absolute;
		z-index: -1;
		top: -1.4563rem;
		right: -3.9625rem;
		width: 16.1406rem;
		aspect-ratio: 1033 / 1464;
		background: url(../images/hero-mark.webp) no-repeat center / contain;
		opacity: 0.35;
		pointer-events: none;
		mix-blend-mode: screen;
	}

	> * {
		width: 100%;
		margin-block: 0;
	}
}

/*
 * Full-width sections sit edge to edge, as in the Figma. The content blockGap
 * would leave a 24px white strip between them (and below the home hero).
 */
.cecyber-page__content > .alignfull + .alignfull {
	margin-block-start: 0;
}

.cecyber-breadcrumb {
	padding: 0.375rem var(--wp--preset--spacing--40) 0.375rem var(--wp--preset--spacing--30);
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 9999px;
	background: rgb(255 255 255 / 8%);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.5;
}

.cecyber-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cecyber-breadcrumb__item {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	align-items: center;
}

.cecyber-breadcrumb__link {
	display: inline-flex;
	gap: 0.375rem;
	align-items: center;
	color: rgb(255 255 255 / 70%);
	text-decoration: none;

	.cecyber-icon {
		width: 1rem;
		height: 1rem;
		color: var(--wp--preset--color--primary-lighter);
	}
}

a.cecyber-breadcrumb__link:hover {
	color: var(--wp--preset--color--white);
}

.cecyber-breadcrumb__separator {
	width: 0.875rem;
	height: 0.875rem;
	color: rgb(255 255 255 / 40%);
}

.cecyber-breadcrumb__current {
	max-width: 16rem;
	overflow: hidden;
	color: var(--wp--preset--color--white);
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}

@media (min-width: 64em) {

	.cecyber-page-hero {
		justify-content: center;
		min-height: 25rem;
		padding-block: var(--wp--preset--spacing--60);

		&::after {
			top: -10.4063rem;
			right: calc((100% - var(--wp--style--global--wide-size)) / 2 - 1.7969rem);
			width: 32.2813rem;
			opacity: 1;
		}
	}

	/* Out of the flow, so the title stays centered in the hero as in the Figma. */
	.cecyber-breadcrumb {
		position: absolute;
		top: var(--wp--preset--spacing--60);
		left: max(var(--wp--style--root--padding-left), (100% - var(--wp--style--global--wide-size)) / 2);
		width: fit-content;
	}
}

/*
 * "Página com hero próprio" (templates/page-hero.html): the hero is the first
 * section of the content, and the breadcrumb sits over it. The hero leaves room
 * for the breadcrumb with `.cecyber-hero`.
 */
.cecyber-page--own-hero {
	position: relative;
}

.wp-block-group.cecyber-page__breadcrumb {
	position: absolute;
	z-index: 1;
	top: var(--wp--preset--spacing--50);
	right: 0;
	left: 0;
	margin: 0;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);

	.cecyber-breadcrumb {
		position: static;
		width: fit-content;
		max-width: 100%;
		margin-left: max(0px, (100% - var(--wp--style--global--wide-size)) / 2);
	}
}

@media (min-width: 64em) {

	.wp-block-group.cecyber-page__breadcrumb {
		top: var(--wp--preset--spacing--60);
	}
}
