/* ============================================================
 * Materialien-Archiv (archive-materialien.php)
 * Editorial-Header + Kachelraster nach Figma (374:712 / 374:2033).
 * Tokens und .ec-btn kommen aus home.css.
 * ============================================================ */

.ec-mat {
	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;
}

/* --- Header ------------------------------------------------- */
.ec-mat__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 48px clamp(24px, 6vw, 80px) 40px;
}

.ec-mat__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ec-text-secondary, #6b665f);
}

.ec-mat__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.ec-mat__breadcrumb a:hover {
	text-decoration: underline;
}

.ec-mat__sep {
	font-size: 12px;
	opacity: .85;
}

.ec-mat__current {
	color: var(--ec-anthracite, #1c1c1a);
	text-decoration: underline;
}

.ec-mat__title {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: clamp(36px, 5vw, 60px);
	line-height: 1.2;
	letter-spacing: 1.2px;
	color: var(--ec-anthracite, #1c1c1a);
}

.ec-mat__subtitle {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ec-text-secondary, #6b665f);
}

/* --- Intro -------------------------------------------------- */
.ec-mat__intro {
	padding: 0 clamp(24px, 6vw, 80px) 56px;
}

.ec-mat__lead {
	max-width: 760px;
	margin: 0;
	font-size: 16px;
	line-height: 1.7;
	color: var(--ec-anthracite, #1c1c1a);
}

/* --- Kachelraster ------------------------------------------- */
.ec-mat__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
	padding: 0 clamp(24px, 6vw, 80px) 60px;
	background: var(--ec-surface, #fdfcf9);
	padding-top: 40px;
}

.ec-mat-card {
	margin: 0;
}

.ec-mat a.ec-mat-card__link {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	color: var(--ec-chalk, #f8f6f2);
	text-decoration: none;
	background: var(--ec-sand, #c4ab8a);
}

.ec-mat-card__media,
.ec-mat-card__overlay {
	position: absolute;
	inset: 0;
	display: block;
}

.ec-mat-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

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

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

.ec-mat-card__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 32px;
}

.ec-mat-card__title {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: 26px;
	line-height: 1.25;
	color: var(--ec-chalk, #f8f6f2);
}

.ec-mat-card__teaser {
	font-size: 14px;
	line-height: 1.6;
	color: var(--ec-chalk, #f8f6f2);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ec-mat-card__cta {
	font-size: 14px;
	line-height: 1.6;
	font-weight: 500;
	color: var(--ec-chalk, #f8f6f2);
}

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

.ec-mat__empty {
	margin: 0;
	padding: 0 clamp(24px, 6vw, 80px) 60px;
}

/* --- Pagination --------------------------------------------- */
.ec-mat .pagination {
	padding: 0 clamp(24px, 6vw, 80px) 48px;
	background: var(--ec-surface, #fdfcf9);
}

.ec-mat .pagination .nav-links {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.ec-mat .pagination a,
.ec-mat .pagination .current {
	color: var(--ec-anthracite, #1c1c1a);
	text-decoration: none;
	padding: 4px 8px;
}

.ec-mat .pagination .current {
	text-decoration: underline;
}

/* --- CTA ---------------------------------------------------- */
.ec-mat-cta {
	background: var(--ec-chalk, #f8f6f2);
	padding: 80px clamp(24px, 8vw, 120px);
}

.ec-mat-cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.ec-mat-cta__title {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Figtree", sans-serif;
	font-weight: 500;
	font-size: 30px;
	line-height: 1.25;
	color: var(--ec-anthracite, #1c1c1a);
}

.ec-mat-cta__text {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ec-text-secondary, #6b665f);
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 1100px) {
	.ec-mat__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 680px) {
	.ec-mat__head {
		padding-top: 32px;
		padding-bottom: 28px;
	}
	.ec-mat__intro {
		padding-bottom: 40px;
	}
	.ec-mat__grid {
		grid-template-columns: 1fr;
	}
	.ec-mat a.ec-mat-card__link {
		aspect-ratio: 4 / 3;
	}
	.ec-mat-card__body {
		padding: 24px;
	}
	.ec-mat-cta {
		padding: 56px 24px;
	}
}
