/* ============================================================
 * Materialien (single) — Figma "Editorial Content" 374:712 / 374:1374
 * Tokens (--ec-*) und .ec-btn kommen aus home.css.
 * ============================================================ */

.ec-mat {
	--ec-mat-gutter: clamp(24px, 6vw, 80px);
	display: flex;
	flex-direction: column;
	background: var(--ec-chalk, #f8f6f2);
	color: var(--ec-anthracite, #1c1c1a);
	font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ec-mat > * {
	width: 100%;
	box-sizing: border-box;
}

/* --- Breadcrumb --------------------------------------------- */
.ec-mat-breadcrumb {
	background: var(--ec-surface, #fdfcf9);
	padding: 12px var(--ec-mat-gutter);
	font-size: 12px;
	line-height: 1.6;
}

.ec-mat-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-mat-breadcrumb li + li::before {
	content: "→";
	margin-right: 8px;
	color: var(--ec-text-secondary, #6b665f);
}

.ec-mat-breadcrumb a {
	color: inherit;
}

.ec-mat-breadcrumb [aria-current="page"] span {
	text-decoration: underline;
}

/* --- Header ------------------------------------------------- */
.ec-mat-header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 32px var(--ec-mat-gutter);
}

.ec-mat-header__title {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 300;
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.2;
	color: var(--ec-anthracite, #1c1c1a);
	overflow-wrap: anywhere;
}

.ec-mat-header__subtitle {
	margin: 0;
	max-width: 720px;
	font-size: 12px;
	line-height: 1.6;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ec-text-secondary, #6b665f);
}

/* --- Hero --------------------------------------------------- */
.ec-mat-hero {
	margin: 0;
	height: 480px;
	background: var(--ec-sand, #c4ab8a);
	overflow: hidden;
}

.ec-mat-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* --- Rich text (bereinigtes ACF-WYSIWYG) --------------------- */
.ec-mat-richtext {
	font-size: 15px;
	line-height: 1.75;
	color: var(--ec-text-secondary, #6b665f);
}

.ec-mat-richtext > *:first-child { margin-top: 0; }
.ec-mat-richtext > *:last-child { margin-bottom: 0; }

.ec-mat-richtext p,
.ec-mat-richtext ul,
.ec-mat-richtext ol {
	margin: 0 0 1em;
}

.ec-mat-richtext ul,
.ec-mat-richtext ol {
	padding-left: 1.2em;
}

.ec-mat-richtext li {
	margin-bottom: .6em;
}

.ec-mat-richtext strong,
.ec-mat-richtext b {
	font-weight: 600;
	color: var(--ec-anthracite, #1c1c1a);
}

.ec-mat-richtext h2,
.ec-mat-richtext h3,
.ec-mat-richtext h4 {
	margin: 1.4em 0 .6em;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: 22px;
	line-height: 1.3;
	color: var(--ec-anthracite, #1c1c1a);
}

.ec-mat-richtext a {
	color: var(--ec-anthracite, #1c1c1a);
}

/* --- Lead --------------------------------------------------- */
.ec-mat-lead {
	padding: 64px var(--ec-mat-gutter);
}

.ec-mat-lead__text {
	max-width: 760px;
	font-size: 18px;
	line-height: 1.7;
}

/* --- Content-Blöcke (Text + Bild im Wechsel) ----------------- */
.ec-mat-block {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 400px;
	background: var(--ec-chalk, #f8f6f2);
}

.ec-mat-block--image-first {
	background: var(--ec-surface, #fdfcf9);
}

.ec-mat-block__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 64px var(--ec-mat-gutter);
}

.ec-mat-block__media {
	position: relative;
	min-height: 320px;
	background: var(--ec-sand, #c4ab8a);
	overflow: hidden;
}

.ec-mat-block__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-mat-block--image-first .ec-mat-block__media { order: 1; }
.ec-mat-block--image-first .ec-mat-block__text { order: 2; }

/* Ohne Bild: lesbare Textspalte */
.ec-mat-block--text-only {
	display: block;
	min-height: 0;
}

.ec-mat-block--text-only .ec-mat-block__text {
	max-width: calc(760px + 2 * var(--ec-mat-gutter));
	padding-top: 0;
	padding-bottom: 64px;
}

.ec-mat-block--image-only {
	grid-template-columns: 1fr;
}

.ec-mat-block--image-only .ec-mat-block__media {
	min-height: 400px;
}

/* --- Abschnittstitel ---------------------------------------- */
.ec-mat-section-title {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.3;
	color: var(--ec-anthracite, #1c1c1a);
}

/* --- Eigenschaften ------------------------------------------ */
.ec-mat-facts {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 64px var(--ec-mat-gutter);
	background: var(--ec-surface, #fdfcf9);
}

.ec-mat-facts__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 32px 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-mat-fact {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.ec-mat-fact__icon {
	flex: 0 0 56px;
	width: 56px;
}

.ec-mat-fact__icon img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: contain;
}

.ec-mat-fact__text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
}

/* --- Produkte ----------------------------------------------- */
.ec-mat-products {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 64px var(--ec-mat-gutter);
	background: var(--ec-chalk, #f8f6f2);
}

.ec-mat-products__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ec-mat-products__link {
	flex: 0 0 auto;
	font-size: 14px;
	color: var(--ec-anthracite, #1c1c1a);
	text-decoration: none;
}

.ec-mat-products__link:hover {
	text-decoration: underline;
}

.ec-mat-products__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.ec-mat-card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.ec-mat-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1707 / 2560;
	background: var(--ec-sand, #c4ab8a);
	overflow: hidden;
}

.ec-mat-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-mat-card__img--hover {
	opacity: 0;
	transition: opacity .35s ease;
}

.ec-mat-card:hover .ec-mat-card__img--hover,
.ec-mat-card:focus-visible .ec-mat-card__img--hover {
	opacity: 1;
}

.ec-mat-card__badge {
	position: absolute;
	z-index: 2;
	top: 8px;
	left: 8px;
	padding: 8px 16px;
	border-radius: 2px;
	background: var(--ec-anthracite, #1c1c1a);
	color: var(--ec-chalk, #f8f6f2);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 1.12px;
	text-transform: uppercase;
}

.ec-mat-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 0 24px;
}

.ec-mat-card__title {
	font-weight: 500;
	font-size: 16px;
	line-height: 1.4;
}

.ec-mat-card__meta {
	font-size: 12px;
	line-height: 1.5;
	color: var(--ec-text-secondary, #6b665f);
}

.ec-mat-card__price {
	font-weight: 500;
	font-size: 14px;
}

.ec-mat-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 1.12px;
	text-transform: uppercase;
}

/* --- Weitere Materialien ------------------------------------ */
.ec-mat-more {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	padding: 48px var(--ec-mat-gutter) 80px;
	background: var(--ec-surface, #fdfcf9);
}

.ec-mat-more__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2px;
	width: 100%;
}

/* Kacheln wie Werte-HiFi (374:2033): Bild, Verlauf, Titel + „Mehr erfahren →“. */
.ec-mat a.ec-mat-tile {
	position: relative;
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--ec-sand, #c4ab8a);
	color: var(--ec-chalk, #f8f6f2);
	text-decoration: none;
}

.ec-mat-tile__img,
.ec-mat-tile__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ec-mat-tile__img {
	object-fit: cover;
	transition: transform .5s ease;
}

.ec-mat-tile:hover .ec-mat-tile__img,
.ec-mat-tile:focus-visible .ec-mat-tile__img {
	transform: scale(1.04);
}

.ec-mat-tile__overlay {
	background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
	pointer-events: none;
}

.ec-mat-tile__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 40px;
}

.ec-mat-tile__title {
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: 28px;
	line-height: 1.25;
}

.ec-mat-tile__cta {
	font-size: 14px;
	line-height: 1.6;
}

.ec-mat-tile:hover .ec-mat-tile__cta {
	text-decoration: underline;
}

/* --- Mobile (Figma 374:1374) --------------------------------- */
@media (max-width: 880px) {
	.ec-mat-more__grid {
		grid-template-columns: 1fr;
	}
	.ec-mat-tile {
		aspect-ratio: 4 / 3;
	}
	.ec-mat-tile__body {
		padding: 24px;
	}
	.ec-mat-tile__title {
		font-size: 22px;
	}
	.ec-mat-header {
		padding-top: 24px;
		padding-bottom: 24px;
	}
	.ec-mat-hero {
		height: auto;
		aspect-ratio: 4 / 3;
	}
	.ec-mat-lead {
		padding-top: 40px;
		padding-bottom: 40px;
	}
	.ec-mat-lead__text {
		font-size: 16px;
	}
	.ec-mat-block {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.ec-mat-block__text {
		padding-top: 40px;
		padding-bottom: 40px;
	}
	.ec-mat-block__media {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}
	/* Bild immer vor dem Text */
	.ec-mat-block__media,
	.ec-mat-block--image-first .ec-mat-block__media { order: -1; }
	.ec-mat-block--image-first .ec-mat-block__text { order: 0; }
	.ec-mat-facts,
	.ec-mat-products {
		padding-top: 40px;
		padding-bottom: 40px;
	}
	.ec-mat-products__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.ec-mat-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 12px;
	}
}

@media (max-width: 480px) {
	.ec-mat-products__grid {
		grid-template-columns: 1fr;
	}
}
