/* Structerra Projekte: Projektliste und Portfolios */
.stp {
	--stp-line: rgba(128, 128, 128, .35);
	--stp-accent: currentColor;
	--stp-cols: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr);
	margin: 0 0 2em;
	color: inherit;
	font-family: var(--e-global-typography-text-font-family, "Poppins"), sans-serif;
	font-weight: var(--e-global-typography-text-font-weight, 300);
	text-align: left;
}
.stp-c-title, .stp-k-title, .stp-group-title, .stp-untertitel { font-weight: 400; }
.stp-head { font-weight: 400; }
.stp--nr { --stp-cols: 4.5em minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr); }
.stp *, .stp *::before, .stp *::after { box-sizing: border-box; }

/* Filter: Theme-Buttonstile neutralisieren */
.stp-toolbar { display: flex; flex-wrap: wrap; gap: .6em 2.5em; margin: 0 0 1.4em; }
.stp-filter { display: flex; flex-wrap: wrap; gap: .4em 1.4em; }
.stp .stp-filter button,
.stp .stp-gal-btn {
	appearance: none;
	background: none !important;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none !important;
	color: inherit !important;
	cursor: pointer;
	font: inherit;
	line-height: inherit;
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: inherit;
}
.stp .stp-filter button { opacity: .6; border-bottom: 1px solid transparent !important; padding-bottom: .1em; }
.stp .stp-filter button:hover,
.stp .stp-filter button:focus-visible { opacity: 1; }
.stp .stp-filter button.is-active { opacity: 1; border-bottom-color: currentColor !important; }

/* Tabelle */
.stp-head,
.stp--tabelle .stp-row {
	display: grid;
	grid-template-columns: var(--stp-cols);
	gap: 0 1.5em;
	align-items: baseline;
}
.stp-head {
	font-size: .8em;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .65;
	padding: 0 2em .5em 0;
	border-bottom: 1px solid var(--stp-line);
}
.stp-item { border-bottom: 1px solid var(--stp-line); }
.stp-item[hidden] { display: none; }
.stp-item > summary {
	list-style: none;
	cursor: pointer;
	position: relative;
}
.stp-item > summary::-webkit-details-marker { display: none; }
.stp-item > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.stp--tabelle .stp-row { padding: .75em 2em .75em 0; }
.stp--tabelle .stp-row::after,
.stp--kompakt details.stp-item > summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	font-weight: 300;
	font-size: 1.2em;
	line-height: 1;
	opacity: .6;
}
.stp-item[open] > summary::after { content: "−"; }
.stp--tabelle .stp-row:hover .stp-c-title { text-decoration: underline; text-underline-offset: .2em; }
.stp--tabelle .stp-item[open] .stp-c-title { font-weight: 600; }
.stp-c-nr, .stp-c-jahr { font-variant-numeric: tabular-nums; }

.stp-detail { padding: .4em 0 2.2em; }
.stp--tabelle .stp-detail > :not(.stp-gal) { max-width: 60em; }

/* Galerie */
/* Galerie: Bildstreifen mit gleicher Höhe, wischbar (Touch, Trackpad, Maus) */
.stp-gal { margin: 1.6em 0 0; }
.stp-gal-fenster { position: relative; }
.stp-gal-track {
	position: relative;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	/* Höhe: höchstens ein Drittel der Listenbreite und gut ein Drittel der
	   Bildschirmhöhe, mindestens 170px, höchstens 340px. */
	--stp-gal-h: clamp(170px, min(32cqi, 36vh), 340px);
}
.stp-gal-track::-webkit-scrollbar { display: none; }
.stp-gal-track:focus-visible { outline: 2px solid var(--e-global-color-accent, #004437); outline-offset: 3px; }
.stp-gal--mehrere .stp-gal-track { cursor: grab; }
.stp-gal-track.is-ziehen { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.stp .stp-gal-bild {
	position: relative;
	flex: none;
	max-width: 100%;
	height: var(--stp-gal-h);
	margin: 0;
	scroll-snap-align: start;
	background: rgba(128, 128, 128, .08);
}
.stp-gal--mehrere .stp-gal-bild { max-width: 88%; }
.stp .stp-gal-bild img {
	display: block;
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}
.stp-gal-bild figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.6em .9em .6em;
	font-size: .8em;
	color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.stp .stp-gal-btn {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .92) !important;
	color: var(--e-global-color-accent, #004437) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18) !important;
	transition: opacity .2s ease, transform .2s ease;
}
.stp .stp-gal-btn:hover { transform: scale(1.06); }
.stp .stp-gal-btn:focus-visible { outline: 2px solid var(--e-global-color-accent, #004437); outline-offset: 2px; }
.stp-gal-zurueck { left: 10px; }
.stp-gal-zurueck svg { transform: rotate(180deg); }
.stp-gal-weiter { right: 10px; }
.stp-gal.is-start .stp-gal-zurueck,
.stp-gal.is-ende .stp-gal-weiter { opacity: 0; pointer-events: none; }
.stp-gal-count { margin: .5em 0 0; font-size: .85em; font-variant-numeric: tabular-nums; opacity: .65; }
.stp-gal.is-passt .stp-gal-count,
.stp-gal.is-passt .stp-gal-btn { display: none; }
.stp-gal.is-passt .stp-gal-track { cursor: auto; }
@media (hover: none) {
	.stp .stp-gal-btn { width: 36px; height: 36px; margin-top: -18px; }
}

/* Daten */
.stp-untertitel { font-weight: 600; margin: 0 0 .8em; }
.stp-dl {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: .3em 1.5em;
	margin: 0 0 1em;
}
.stp-dl dt { opacity: .65; margin: 0; }
.stp-dl dd { margin: 0; }
.stp-dl .stp-mobil { display: none; }
.stp-text > :last-child { margin-bottom: 0; }

/* Kompakt (Portfolio im Popup) */
.stp--kompakt .stp-group + .stp-group { margin-top: 1.4em; }
.stp-group-title { margin: 0 0 .6em; font-weight: 600; }
.stp--kompakt .stp-item { border-bottom: 0; }
.stp--kompakt .stp-k-row { display: block; padding: .3em 0; }
.stp--kompakt details.stp-item > summary { padding-right: 1.6em; }
.stp--kompakt details.stp-item > summary:hover .stp-k-title { text-decoration: underline; text-underline-offset: .2em; }
.stp-k-title { font-style: italic; }
.stp-k-sub { display: block; }
.stp--kompakt .stp-detail { padding: .6em 0 1em; }

.stp-leer { opacity: .7; margin-top: 1em; }

/* Getrennte Tabellen auf der Referenzen-Seite (Projekte, Wettbewerbe) */
.stp-sektion[hidden] { display: none; }
.stp-sektion + .stp-sektion { margin-top: 3.5em; }
.stp-abschnitt { margin: 0 0 1em; font-size: 1.3em; font-weight: 400; line-height: 1.3; }

/* Ort unter dem Titel: nur in der schmalen Darstellung */
.stp-c-zusatz { display: none; }
.stp-gruppe { margin: 1.6em 0 .2em; font-weight: 400; font-size: .85em; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
.stp-gruppe:first-child { margin-top: .6em; }
.stp-links a { color: var(--e-global-color-accent, #004437); text-decoration: underline; text-underline-offset: .2em; }
.stp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Schmale Darstellung: richtet sich nach der Breite der Liste selbst,
   damit sie auch im Porträt-Popup funktioniert. */
.stp--tabelle { container-type: inline-size; container-name: stp; }
@container stp (max-width: 620px) {
	.stp-head,
	.stp--tabelle .stp-row { display: flex; gap: 0 1em; }
	.stp-head .stp-c-title,
	.stp-row .stp-c-title { flex: 1 1 auto; min-width: 0; }
	.stp-c-jahr { flex: none; text-align: right; }
	.stp-c-nr, .stp-c-ort, .stp-c-status { display: none; }
	.stp-c-zusatz { display: block; font-size: .85em; opacity: .65; font-weight: 300; }
	.stp-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.stp-dl dt { margin-top: .6em; font-size: .85em; }
	.stp-toolbar { gap: .6em 1.5em; }
}
@media (max-width: 760px) {
	.stp-toolbar { gap: .6em 1.5em; }
}

/* ------------------------------------------------------------------
 * Aufklappbare Projektauswahl (Porträt-Popup)
 * ------------------------------------------------------------------ */
.stp { --stp-gruen: var(--e-global-color-accent, #004437); }
.stp-portfolio {
	border-top: 1px solid var(--stp-line);
	border-bottom: 1px solid var(--stp-line);
}
.stp-portfolio > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2em;
	padding: 1em 0;
	cursor: pointer;
	list-style: none;
}
.stp-portfolio > summary::-webkit-details-marker { display: none; }
.stp-portfolio > summary:focus-visible { outline: 2px solid var(--stp-gruen); outline-offset: 4px; }
.stp-portfolio-titel { display: block; font-weight: 400; color: #000; }
.stp-portfolio-anzahl { display: block; font-size: .85em; color: var(--stp-gruen); margin-top: .15em; }
.stp-portfolio-icon {
	position: relative;
	flex: none;
	width: 40px;
	height: 40px;
	border: 1px solid var(--stp-gruen);
	border-radius: 50%;
	transition: background-color .2s ease;
}
.stp-portfolio-icon::before,
.stp-portfolio-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 1.5px;
	margin: -.75px 0 0 -7px;
	background: var(--stp-gruen);
	transition: transform .25s ease, background-color .2s ease;
}
.stp-portfolio-icon::after { transform: rotate(90deg); }
.stp-portfolio[open] .stp-portfolio-icon::after { transform: rotate(0deg); }
.stp-portfolio > summary:hover .stp-portfolio-icon { background: var(--stp-gruen); }
.stp-portfolio > summary:hover .stp-portfolio-icon::before,
.stp-portfolio > summary:hover .stp-portfolio-icon::after { background: #fff; }
.stp-portfolio-inhalt { padding: .2em 0 1.4em; }
.stp-portfolio-inhalt .stp-group + .stp-group { margin-top: 1.4em; }
.stp--aufklappbar .stp-k-row { padding: .45em 0; }

/* ------------------------------------------------------------------
 * Link-Karte zu den Porträts
 * ------------------------------------------------------------------ */
.stp-teamlink,
.stp-teamlink:hover,
.stp-teamlink:focus {
	display: flex;
	align-items: center;
	gap: 28px;
	max-width: 900px;
	margin: 3.5em auto 6em;
	padding: 28px 32px;
	font-family: var(--e-global-typography-text-font-family, "Poppins"), sans-serif;
	border: 1px solid rgba(0, 68, 55, .2);
	background: #f4f6f5;
	color: #000;
	text-decoration: none;
	text-align: left;
	transition: border-color .2s ease, background-color .2s ease;
}
.stp-teamlink:hover { border-color: var(--e-global-color-accent, #004437); background: #edf1ef; }
.stp-teamlink:focus-visible { outline: 2px solid var(--e-global-color-accent, #004437); outline-offset: 3px; }
.stp-teamlink-bilder { display: flex; flex: none; }
.stp-teamlink-bilder img.stp-teamlink-bild {
	width: 60px;
	height: 60px;
	max-width: none;
	border-radius: 50%;
	border: 3px solid #f4f6f5;
	object-fit: cover;
	object-position: center 25%;
	margin-left: -16px;
	transition: border-color .2s ease;
}
.stp-teamlink-bilder img.stp-teamlink-bild:first-child { margin-left: 0; }
.stp-teamlink:hover .stp-teamlink-bilder img.stp-teamlink-bild { border-color: #edf1ef; }
.stp-teamlink-text { flex: 1 1 auto; min-width: 0; }
.stp-teamlink-titel { display: block; font-size: 1.2em; font-weight: 400; line-height: 1.3; margin-bottom: .3em; color: #000; }
.stp-teamlink-beschrieb { display: block; font-weight: 300; color: #333; line-height: 1.6; }
.stp-teamlink-cta {
	flex: none;
	white-space: nowrap;
	color: var(--e-global-color-accent, #004437);
	font-weight: 400;
}
.stp-teamlink .stp-pfeil { display: inline-block; transition: transform .2s ease; }
.stp-teamlink:hover .stp-pfeil { transform: translateX(4px); }
@media (max-width: 760px) {
	.stp-teamlink, .stp-teamlink:hover, .stp-teamlink:focus { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 20px; }
}

/* ------------------------------------------------------------------
 * Porträt-Popup (Fremd-Widget «cew-team-member-id»):
 * Inhalt war vertikal zentriert ohne Scrollen, längere Texte wurden
 * oben und unten abgeschnitten. Jetzt zentriert, solange er Platz hat,
 * sonst scrollbar.
 * ------------------------------------------------------------------ */
body .cew_teamMember_popup > div:not(.cursor).content {
	overflow-y: auto;
	overscroll-behavior: contain;
	justify-content: flex-start;
}
body .cew_teamMember_popup > div:not(.cursor).content > div {
	margin-top: auto;
	margin-bottom: auto;
	padding-top: clamp(24px, 6vh, 72px);
	padding-bottom: clamp(24px, 6vh, 72px);
}
.cew_teamMember_popup .stp { cursor: auto; }
html.stp-cursor-aus .cew-cursor { opacity: 0 !important; transition: opacity .15s ease; }
.stp-teamlink, .stp-teamlink * { text-decoration: none !important; }

/* Kleine Link-Karte am Ende der persönlichen Projektliste */
.stp-teamlink--klein,
.stp-teamlink--klein:hover,
.stp-teamlink--klein:focus { max-width: none; margin: 1.6em 0 .4em; padding: 18px 22px; gap: 20px; font-size: .95em; flex-direction: row; align-items: center; }
.stp-teamlink--klein .stp-teamlink-titel { font-size: 1.05em; }
@container stp (max-width: 420px) {
	.stp-teamlink, .stp-teamlink:hover, .stp-teamlink:focus,
	.stp-teamlink--klein, .stp-teamlink--klein:hover, .stp-teamlink--klein:focus { flex-direction: column; align-items: flex-start; gap: 10px; }
}
