.af-projekte-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.af-projekt-card {
	margin: 0;
}

.af-projekt-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.af-projekt-card-image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2f2f2;
}

.af-projekt-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.af-projekt-card-content {
	padding-top: 14px;
}

.af-projekt-card-content h3 {
	margin: 0 0 6px;
}

.af-projekt-card-meta {
	margin-bottom: 8px;
	opacity: .75;
}

.af-projekt-card-content p {
	margin: 0;
}

.af-projekt-single {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

.af-projekt-single-header {
	margin-bottom: 30px;
}

.af-projekt-single-header h1 {
	margin-bottom: 10px;
}

.af-projekt-single-meta {
	margin-bottom: 20px;
	opacity: .75;
}

.af-projekt-single-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 30px;
}

.af-projekt-single-gallery img {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 900px) {
	.af-projekte-grid,
	.af-projekt-single-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.af-projekte-grid,
	.af-projekt-single-gallery {
		grid-template-columns: 1fr;
	}
}

/* Elementor: optionale Projektinformationen */
.af-projekt-info-label { font-weight: 600; }
.af-projekt-info-value { margin-top: 0.25em; }

/* Bezeichnung und Inhalt sind in Elementor getrennte Widgets. */




/* Elementor-Projektvorlage: Dieser Container erhält die Kategorie-Hintergrundwerte über dynamische Elementor-Tags. */
.af-projekt-hintergrund {
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

/* Elementor: Projekt-Navigation */
.af-projekt-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	width: 100%;
	gap: 24px;
}

.af-projekt-navigation-item {
	min-width: 0;
}

.af-projekt-navigation-item a {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	font-style: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	color: inherit;
	text-decoration: none;
}

.af-projekt-navigation-item a:hover,
.af-projekt-navigation-item a:focus {
	color: inherit;
	text-decoration: none;
}

.af-projekt-navigation-prev { text-align: left; }
.af-projekt-navigation-overview { text-align: center; }
.af-projekt-navigation-next { text-align: right; }


/* Elementor: Projektübersicht */
.af-projekt-uebersicht-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.af-projekt-uebersicht-item {
	margin: 0;
	min-width: 0;
}

.af-projekt-uebersicht-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.af-projekt-uebersicht-image-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.20);
}


.af-projekt-uebersicht-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/*
 * Bei festen Kachelformaten wird das Bild absolut über die gesamte
 * Bildfläche gelegt. Dadurch funktioniert object-fit: cover zuverlässig
 * auch bei Bildern mit unterschiedlichen Originalformaten.
 */
.af-projekt-uebersicht-grid:not(.af-projekt-uebersicht-ratio-original) .af-projekt-uebersicht-image-wrap {
	position: relative;
}

.af-projekt-uebersicht-grid:not(.af-projekt-uebersicht-ratio-original) .af-projekt-uebersicht-image-wrap > .af-projekt-uebersicht-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center center;
}

.af-projekt-uebersicht-grid.af-projekt-uebersicht-ratio-original .af-projekt-uebersicht-image {
	position: static;
	width: 100%;
	height: auto;
	max-width: 100%;
}


/*
 * Der Projekttitel liegt als Overlay innerhalb der Bildfläche.
 * Er nimmt im Normalzustand keinen sichtbaren Platz ein und wird erst
 * bei Hover bzw. Tastaturfokus eingeblendet. Dadurch entsteht unterhalb
 * des Vorschaubildes kein zusätzlicher bzw. leerer Caption-Bereich.
 */
.af-projekt-uebersicht-title-overlay {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: inline-block;
	max-width: 100%;
	box-sizing: border-box;
	background-color: #ffffff;
	color: #333333;
	line-height: 1.25;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	pointer-events: none;
}

.af-projekt-uebersicht-link:hover .af-projekt-uebersicht-title-overlay,
.af-projekt-uebersicht-link:focus .af-projekt-uebersicht-title-overlay,
.af-projekt-uebersicht-link:focus-visible .af-projekt-uebersicht-title-overlay {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0s;
}

.af-projekt-uebersicht-ratio-4-3 .af-projekt-uebersicht-image-wrap { aspect-ratio: 4 / 3; }
.af-projekt-uebersicht-ratio-3-2 .af-projekt-uebersicht-image-wrap { aspect-ratio: 3 / 2; }
.af-projekt-uebersicht-ratio-1-1 .af-projekt-uebersicht-image-wrap { aspect-ratio: 1 / 1; }
.af-projekt-uebersicht-ratio-16-9 .af-projekt-uebersicht-image-wrap { aspect-ratio: 16 / 9; }
.af-projekt-uebersicht-ratio-original .af-projekt-uebersicht-image-wrap { aspect-ratio: auto; }
.af-projekt-uebersicht-ratio-original .af-projekt-uebersicht-image { height: auto; }
.af-projekt-uebersicht-fit-contain .af-projekt-uebersicht-image { object-fit: contain; }
.af-projekt-uebersicht-fit-cover .af-projekt-uebersicht-image { object-fit: cover; }

.af-projekt-uebersicht-title {
	padding-top: 10px;
}

.af-projekte-uebersicht-hinweis {
	padding: 12px 14px;
	border: 1px dashed #b8b8b8;
}

@media (max-width: 1024px) {
	.af-projekt-uebersicht-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.af-projekt-uebersicht-grid {
		grid-template-columns: 1fr;
	}
}

/* Elementor: Dynamisches Projekt-Mosaik */
.af-projekt-mosaik-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
}

.af-projekt-mosaik-item {
	position: relative;
	height: 300px;
	min-width: 0;
	overflow: hidden;
	background: #f2f2f2;
}

.af-projekt-mosaik-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;	
	min-width: 0;
	min-height: 0;
	max-width: none !important;
	max-height: none;
	margin: 0 !important;
	padding: 0;
	object-fit: cover;
	object-position: center center;
	will-change: opacity, transform;
}

.af-projekt-mosaik-image.af-mosaik-fade-out,
.af-projekt-mosaik-image.af-mosaik-fade-in {
	transition: opacity var(--af-mosaik-transition, 0.8s) ease;
}

.af-projekt-mosaik-image.af-mosaik-fade-out {
	opacity: 0;
}

.af-projekt-mosaik-image.af-mosaik-fade-in {
	opacity: 1;
}

.af-projekt-mosaik-image.af-mosaik-out,
.af-projekt-mosaik-image.af-mosaik-in {
	transition: opacity var(--af-mosaik-transition, 0.8s) ease, transform var(--af-mosaik-transition, 0.8s) ease;
}

.af-projekt-mosaik-image.af-mosaik-out {
	opacity: 0;
	transform: translateX(-8%);
}

.af-projekt-mosaik-image.af-mosaik-in {
	opacity: 1;
	transform: translateX(0);
}

@media (max-width: 767px) {
	.af-projekt-mosaik-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.af-projekt-mosaik-item {
		height: 220px;
	}
}
