/*
 * en2x Beitrag Hero – module styles.
 *
 * Full-bleed background image (cascade: module image > featured image > colour),
 * with a left, semi-transparent white box (dark bar on top, like the card).
 * Headline h2 (#250F51, uppercase), reading time above, and a placeholder
 * "Vorlesen" button. Font inherited (Rubik). A light breadcrumb strip sits below.
 */

.en2x-beitrag-hero {
	position: relative;
	display: flex;
	align-items: stretch;
	font-family: inherit;
}

/* Full-bleed background via a pseudo-element. The hero element itself stays in
 * normal flow, so its content (box + side gutter) lines up with the article
 * body below, which sits in the same content container — at ANY zoom level. The
 * image/colour come from the inline custom properties. */
.en2x-beitrag-hero::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 50vw);
	width: 100vw;
	z-index: 0;
	background-color: var(--en2x-bhero-bg, transparent);
	background-image: var(--en2x-bhero-image, none);
	background-position: var(--en2x-bhero-pos, center center);
	background-size: cover;
	background-repeat: no-repeat;
}

/* Height steps. */
.en2x-beitrag-hero--gering {
	min-height: 350px;
}

.en2x-beitrag-hero--mittel {
	min-height: 550px;
}

.en2x-beitrag-hero--hoch {
	min-height: 800px;
}

/* Content-width container. */
.en2x-beitrag-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	width: 100%;
	/* --en2x-bhero-gutter is measured at runtime (beitrag-hero.js) from the real
	 * Salient content container, so the box lines up with the article text at any
	 * width/zoom. Falls back to the static side gutter before JS runs / if it
	 * cannot measure. */
	padding: 40px var(--en2x-bhero-gutter, var(--en2x-side-gutter));
}

/* Left semi-transparent white box (not full width). */
.en2x-beitrag-hero__box {
	display: flex;
	flex-direction: column;
	width: 60%;
	background: rgba(255, 255, 255, 0.8);
	box-shadow: 0 4px 18px rgba(37, 15, 81, 0.12);
}

/* Dark bar on top, like the content card. */
.en2x-beitrag-hero__bar {
	padding: 9px 28px;
	background: var(--en2x-color-headline, #250F51);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.en2x-beitrag-hero__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: center;
	padding: 36px 28px;
}

.en2x-beitrag-hero__lesezeit {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	color: var(--en2x-color-headline, #250F51);
}

.en2x-beitrag-hero__headline {
	margin: 0 0 28px;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--en2x-color-headline, #250F51);
}

/* Placeholder read-aloud button (disabled; activated by the a11y plugin). */
.en2x-beitrag-hero__vorlesen-wrap {
	padding-top: 16px;
	border-top: 1px solid rgba(37, 15, 81, 0.2);
}

.en2x-beitrag-hero__vorlesen {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	background: none;
	border: none;
	color: var(--en2x-color-headline, #250F51);
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: default;
}

/* Disabled but kept visually active (it is a prepared placeholder). */
.en2x-beitrag-hero__vorlesen[disabled] {
	opacity: 1;
}

/* Once the a11y plugin enables the button, it becomes interactive. */
.en2x-beitrag-hero__vorlesen:not([disabled]) {
	cursor: pointer;
}

.en2x-beitrag-hero__vorlesen-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(37, 15, 81, 0.35);
	border-radius: 4px;
	color: var(--en2x-color-headline, #250F51);
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Filled icon on hover (interactive) and while reading aloud. */
.en2x-beitrag-hero__vorlesen:not([disabled]):hover .en2x-beitrag-hero__vorlesen-icon,
.en2x-beitrag-hero__vorlesen:not([disabled]):focus-visible .en2x-beitrag-hero__vorlesen-icon,
.en2x-beitrag-hero__vorlesen.is-speaking .en2x-beitrag-hero__vorlesen-icon {
	background: var(--en2x-color-headline, #250F51);
	border-color: var(--en2x-color-headline, #250F51);
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * Breadcrumb strip below the hero (transparent, tight gap).
 * ------------------------------------------------------------------------- */

.en2x-beitrag-hero__breadcrumb {
	background: transparent;
}

.en2x-beitrag-hero__breadcrumb-inner {
	padding: 12px var(--en2x-bhero-gutter, var(--en2x-side-gutter)) 16px;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
}

.en2x-beitrag-hero__crumb {
	color: #50575e;
	text-decoration: none;
}

.en2x-beitrag-hero__crumb:hover,
.en2x-beitrag-hero__crumb:focus {
	color: var(--en2x-color-headline, #250F51);
}

.en2x-beitrag-hero__crumb-sep {
	margin: 0 6px;
	color: #a7a7b0;
}

/* Current page highlighted in the en2x cyan-blue (#34c7d6). */
.en2x-beitrag-hero__crumb--current {
	color: #34c7d6;
}

/* ---------------------------------------------------------------------------
 * Responsive: box full width, cap heights, tighten spacing.
 * ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.en2x-beitrag-hero__box {
		width: 78%;
	}
}

@media (max-width: 768px) {
	.en2x-beitrag-hero {
		display: block;
	}

	.en2x-beitrag-hero--gering,
	.en2x-beitrag-hero--mittel,
	.en2x-beitrag-hero--hoch {
		min-height: 0;
	}

	.en2x-beitrag-hero__inner {
		display: block;
		padding: 0;
	}

	.en2x-beitrag-hero__box {
		width: auto;
	}

	.en2x-beitrag-hero__headline {
		font-size: 28px;
	}

	.en2x-beitrag-hero__body {
		padding: 28px 22px;
	}

	.en2x-beitrag-hero__breadcrumb-inner {
		padding: 10px var(--en2x-side-gutter, 20px) 14px;
	}
}
