.ref_page {
	max-width: 1100px;
	margin: 0 auto;
	padding: 60px 20px 120px;
}

.ref_page_header {
	display: flex;
	align-items: baseline;
	gap: 14px;
	border-bottom: 1px solid #e2e2e2;
	padding-bottom: 24px;
	margin-bottom: 50px;
}

.ref_page_header h1 {
	font-size: var(--mh-t1);
	font-weight: 700;
	margin: 0;
	line-height: 1;
}

.ref_page_header .ref_count {
	font-size: var(--mh-t4);
	color: #68696d;
	font-weight: 400;
}

.ref_list {
	display: flex;
	flex-direction: column;
	gap: 70px;
}

.ref_card {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ref_card_media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f1f1f1;
	margin-bottom: 20px;
}

.ref_card_media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Der Abstand sass frueher unter den Pillen, weil der Name darunter stand.
   Seit der Name direkt unter dem Bild steht, traegt ihn der Name. */
.ref_card_tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 0;
}

.ref_tag {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid #d8d8d8;
	border-radius: 999px;
	font-size: var(--mh-t7);
	color: #666;
}

.ref_card_title {
	font-size: var(--mh-t3);
	font-weight: 700;
	margin: 0 0 12px;
}

@media (max-width: 640px) {
	.ref_list {
		gap: 46px;
	}
}

/* ---------------------------------------------------------------------------
   Portfolio-Übersicht: gleiches Kartenraster wie die Referenzen auf der
   Startseite (2 gleiche Spalten, Medien 4:3 ohne Eckenrundung, Tags über dem
   Titel). Vorher war .ref_list eine einspaltige Liste mit gestapelten Karten.
   --------------------------------------------------------------------------- */
.ref_page {
	max-width: 1290px;
	padding: 60px 75px 120px;
}

.ref_list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 34px 24px;
}

.ref_list .ref_card {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ref_list .ref_card_media {
	aspect-ratio: 4 / 3;
	margin-bottom: 0;
}

.ref_list .ref_card_tags {
	margin-bottom: 0;
	gap: 8px;
}

.ref_list .ref_card_title {
	font-size: var(--mh-t3);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin-top: -2px;
}

/* Für conkosa und DATEXT liegt nur Video vor, kein Poster — dunkler Grund,
   damit vor dem ersten Frame kein leeres helles Feld steht. */
.ref_list .ref_card_media--kein-poster {
	background: #16171a;
}

.ref_list .ref_card_video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media (max-width: 900px) {
	.ref_page {
		padding: 40px 24px 80px;
	}
	.ref_list {
		grid-template-columns: 1fr;
		gap: 30px;
	}
}

/* Hochformat in einer 4:3-Karte: object-fit:cover schneidet standardmäßig
   mittig, wodurch bei stehenden Fotos der Kopfbereich verloren geht.
   object-position:top behält den oberen Ausschnitt. */
.ref_list .ref_card_media--oben img {
	object-position: top;
}

/* Abschluss unter der Referenzliste
   ================================
   Statt die Seite nach der letzten Karte einfach enden zu lassen, steht hier
   ein Hinweis plus Einladung. Bewusst keine leere Platzhalterkachel im Raster:
   die haette wie ein Ladefehler ausgesehen. */
.ref_ausblick {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px 40px;
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid #ececec;
}

.ref_ausblick_text {
	margin: 0;
	font-size: var(--mh-t4);
	line-height: 1.4;
	color: #68696d;
}

.ref_ausblick_link {
	display: inline-flex;
	font-size: var(--mh-t5);
	color: #16171a;
	text-decoration: none !important;
	padding-bottom: 5px;
}

@media (max-width: 620px) {
	.ref_ausblick {
		margin-top: 44px;
		padding-top: 30px;
	}
}


/* Blogliste
   =========
   Eine Liste, keine Kacheln: Die Beitraege haben kein Bild, das eine Kachel
   tragen koennte, und eine Kachel mit leerer Bildflaeche sieht nach Fehler
   aus. Stattdessen dieselbe Machart wie die Referenzliste: Haarlinie oben,
   darunter Datum, Titel und ein kurzer Anriss. Der Titel bekommt beim
   Ueberfahren die Farbe der uebrigen Verweise. */
.blog_liste {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #e2e2e2;
}

.blog_eintrag + .blog_eintrag {
	border-top: 1px solid #e2e2e2;
}

.blog_eintrag_link {
	display: block;
	padding: 34px 0 38px;
	text-decoration: none !important;
	color: inherit;
	max-width: 760px;
}

.blog_datum {
	display: block;
	font-size: var(--mh-t7);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #68696d;
	margin-bottom: 14px;
}

.blog_titel {
	font-size: var(--mh-t3);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 12px;
	color: #16171a;
	transition: color 260ms ease;
}

.blog_eintrag_link:hover .blog_titel,
.blog_eintrag_link:focus-visible .blog_titel {
	color: var(--mh-gruen, #70af69);
}

.blog_teaser {
	margin: 0;
	font-size: var(--mh-t5);
	line-height: 1.6;
	color: #6f7075;
}

@media (max-width: 640px) {
	.blog_eintrag_link {
		padding: 26px 0 30px;
	}
}
