/* Erfolgsgeschichten Manager - Frontend Styles.
   Bewusst schlank: Container/Grid/Buttons kommen aus dem bereits geladenen
   Theme-Stylesheet (Bootstrap: .container, .row, .col-*, .btn-yellow-800,
   .btn-outline-gray-500 sowie globale h1-h3/p-Typografie). Farbtokens identisch
   zum Immobilien-Manager-Plugin (siehe theme.json: Schiefer/Basalt/Sand/Raps). */

:root {
	--esg-surface: #2C3435;
	--esg-surface-2: #202525;
	--esg-text: #E3DED5;
	--esg-muted: #718080;
	--esg-border: rgba(227, 222, 213, 0.16);
	--esg-accent: #D7A150;
	--esg-black: #161919;
}

.esgm-archive,
.esgm-single,
.esgm-filter,
.esgm-results {
	font-family: 'Space Grotesk', sans-serif;
}

/* Filter */
.esgm-filter {
	background: var(--esg-surface);
	border: 1px solid var(--esg-border);
	padding: 2.4rem;
	margin: 4rem 0;
}
.esgm-filter__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 2rem;
}
.esgm-filter__field {
	min-width: 22rem;
}
.esgm-filter__field label {
	display: block;
	font-size: 1.2rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	color: var(--esg-muted);
	margin-bottom: 0.8rem !important;
}
.esgm-filter__field select {
	display: block;
	width: 100%;
	padding: 0.9rem 1.2rem;
	font-size: 1.4rem;
	font-family: inherit;
	color: var(--esg-text);
	background-color: var(--esg-surface-2);
	border: 1px solid var(--esg-border);
	border-radius: 0;
	box-sizing: border-box;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23E3DED5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1.2rem center;
	padding-right: 3.2rem;
}
.esgm-filter__field select:focus {
	outline: 0;
	border-color: var(--esg-accent);
}
.esgm-filter__actions {
	display: flex;
	gap: 1.2rem;
}

/* Results */
.esgm-results__empty {
	padding: 6rem 0;
	text-align: center;
	color: var(--esg-muted) !important;
}

/* Card */
.esgm-card {
	background: var(--esg-surface);
	position: relative;
}
.esgm-card__media {
	display: block;
	position: relative;
	background: var(--esg-surface-2);
}
.esgm-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.esgm-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
}
.esgm-badge {
	/* width/height explizit auf auto: Bootstraps ".ratio > *" (fuer das Bild gedacht)
	   greift sonst auch hier und blaeht das Badge auf 100% Breite/Hoehe auf, da der
	   Badge ein direktes Kind von .esgm-card__media.ratio ist. */
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: auto;
	height: auto;
	padding: 0.4rem 1rem;
	font-size: 1.1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08rem;
	background: var(--esg-accent);
	color: var(--esg-black);
}
.esgm-badge--static {
	position: static;
	display: inline-block;
	margin-bottom: 1.2rem;
}
.esgm-card__body {
	padding: 2rem;
}
.esgm-card__title {
	margin: 0 0 0.8rem !important;
	font-size: 1.8rem !important;
	color: var(--esg-text);
}
.esgm-card__excerpt {
	color: var(--esg-muted) !important;
	font-size: 1.4rem !important;
	margin: 0 !important;
}

/* Pagination */
.esgm-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2.4rem;
	margin: 4rem 0;
}
.esgm-pagination__status {
	font-size: 1.2rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--esg-muted);
}

/* Single view */
.esgm-single__header {
	/* Das Theme stylt jedes <header>-Element sitesweit als sticky (position: sticky) -
	   dieses <header> ist aber nur unsere Titel-/Badge-Box, kein Navigations-Header. */
	position: static;
	top: auto;
	z-index: auto;
	margin: 4rem 0 2rem;
}
.esgm-single__media {
	background: var(--esg-surface-2);
	margin-bottom: 3.2rem;
}
.esgm-single__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.esgm-single__content {
	margin-bottom: 3.2rem;
}
.esgm-single__back {
	margin: 2rem 0 4rem;
}

/* Pfeil beim "Zurueck"-Button (siehe .btn-outline-gray-500 im Theme) nach links
   drehen und vor den Text ziehen statt danach. */
.esgm-btn-back::after {
	order: -1;
	transform: scaleX(-1);
}
