/* PROM12 Team – Raster der Teamseite. Farben und Schriften aus dem Elementor-Kit, mit Ersatzwerten. */

.p12-team {
	--p12-cols: 3;
	--p12-min: 220px;
	--p12-gap-x: clamp(20px, 2.5vw, 40px);
	--p12-gap-y: clamp(40px, 4.5vw, 72px);
	/* Schnittecken wie bei den Gründerfotos auf „Über uns“ */
	--p12-cut: 16%;
	--p12-ink: var(--e-global-color-primary, #1A1A1D);
	--p12-dark: var(--e-global-color-primary, #1A1A1D);
	--p12-neon: var(--e-global-color-accent, #5DFE9C);
	/* Sat Green #41B287 abgedunkelt: 5,2:1 auf Weiß statt 2,6:1 */
	--p12-green: #2B7A5C;
	--p12-placeholder: #EDEDED;
	--p12-font-head: var(--e-global-typography-primary-font-family, "Rubik"), "Rubik", sans-serif;
	--p12-font-text: var(--e-global-typography-text-font-family, "Roboto"), "Roboto", sans-serif;

	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(max(var(--p12-min), calc((100% - (var(--p12-cols) - 1) * var(--p12-gap-x)) / var(--p12-cols))), 1fr)
	);
	gap: var(--p12-gap-y) var(--p12-gap-x);
}

.p12-team .p12-team__item {
	margin: 0;
	padding: 0;
	min-width: 0;
	container-type: inline-size;
	/* Sprungziel (#team-name) nicht unter dem fixierten Kopf verstecken */
	scroll-margin-top: 180px;
}

.p12-team .p12-team__item::before,
.p12-team .p12-team__item::marker {
	content: none;
}

/* Karte: Foto oben, Text darunter. Link und Hinweis liegen über dem Foto. */
.p12-team .p12-team__card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"media"
		"text";
	row-gap: 22px;
	margin: 0;
}

.p12-team .p12-team__media {
	grid-area: media;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--p12-placeholder);
	container-type: inline-size;
	clip-path: polygon(
		var(--p12-cut) 0,
		100% 0,
		100% calc(100% - var(--p12-cut)),
		calc(100% - var(--p12-cut)) 100%,
		0 100%,
		0 var(--p12-cut)
	);
}

.p12-team .p12-team__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 20%;
	filter: grayscale(1);
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Ohne Foto: Initialen ruhig auf Hellgrau, damit die Kachel neben Graustufenfotos nicht herausfällt. */
.p12-team .p12-team__monogram {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--p12-placeholder);
	color: var(--p12-ink);
	font-family: var(--p12-font-head);
	font-weight: 300;
	font-size: 48px;
	font-size: 20cqi;
	letter-spacing: 0.04em;
	line-height: 1;
	user-select: none;
}

.p12-team .p12-team__text {
	grid-area: text;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

/* Name zuerst im Quelltext (Überschrift), Position optisch darüber wie bei „Über uns“.
   Das Customizer-CSS setzt h1–h4 mit !important; die Größe folgt hier der Kartenbreite (22–28 px). */
.p12-team .p12-team__name {
	order: 2;
	margin: 0;
	padding: 0;
	font-family: var(--p12-font-head);
	font-weight: 300;
	font-size: clamp(22px, 2.083vw, 28px) !important;
	font-size: clamp(22px, 10cqi, 28px) !important;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--p12-ink);
	overflow-wrap: break-word;
}

.p12-team .p12-team__position {
	order: 1;
	margin: 0;
	padding: 0;
	font-family: var(--p12-font-head);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.45;
	color: var(--p12-green);
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.p12-team .p12-team__linkedin {
	grid-area: media;
	align-self: end;
	justify-self: start;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 0 10px 10px;
	padding: 0;
	position: relative;
	background: var(--p12-dark);
	color: var(--p12-neon);
	text-decoration: none;
	border: 0;
	border-radius: 0;
	transition: transform 0.3s ease;
	scroll-margin-top: 180px;
	scroll-margin-bottom: 40px;
}

.p12-team .p12-team__linkedin svg {
	display: block;
	width: 19px;
	height: 19px;
	fill: currentColor;
}

/* Füllt beim Anheben die Lücke darunter, damit der Hover nicht flackert. */
.p12-team .p12-team__linkedin::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 0;
}

/* Hover wie die LinkedIn-Symbole auf „Über uns“: leicht anheben. Nur bei echter Maus. */
@media (hover: hover) {
	.p12-team .p12-team__linkedin:hover {
		transform: translateY(-8px);
	}

	.p12-team .p12-team__linkedin:hover::after {
		height: 8px;
	}
}

.p12-team .p12-team__linkedin:focus {
	outline: none;
}

/* Fokus: Neon direkt am dunklen Knopf, außen Dunkel und Weiß, damit der Ring auf hellem und dunklem Grund sichtbar ist. */
.p12-team .p12-team__linkedin:focus-visible {
	outline: 2px solid var(--p12-neon);
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--p12-dark), 0 0 0 6px #FFFFFF;
}

.p12-team .p12-team__badge {
	grid-area: media;
	align-self: start;
	justify-self: end;
	z-index: 1;
	margin: 10px 10px 0 0;
	padding: 3px 10px;
	background: #FFF3C4;
	color: #4A3B00;
	font-family: var(--p12-font-text);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.5;
}

.p12-team .p12-team__item--preview .p12-team__badge {
	background: var(--p12-neon);
	color: var(--p12-dark);
}

/* Angesprungene Karte (Link aus dem Admin) und Vorschau hervorheben. */
.p12-team .p12-team__item:target .p12-team__card,
.p12-team .p12-team__item--preview .p12-team__card {
	outline: 2px solid var(--p12-green);
	outline-offset: 12px;
}

.p12-team .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.p12-team-empty {
	font-family: var(--e-global-typography-text-font-family, "Roboto"), "Roboto", sans-serif;
	color: var(--e-global-color-secondary, #54595F);
}

/* Smartphone und schmale Fenster: Foto links, Text rechts, LinkedIn unter dem Text. */
@media (max-width: 599px) {
	.p12-team {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 28px;
	}

	.p12-team .p12-team__card {
		grid-template-columns: 112px minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		grid-template-areas:
			"media text"
			"media link";
		column-gap: 18px;
		row-gap: 10px;
		align-items: start;
	}

	.p12-team .p12-team__media {
		grid-row: 1 / span 2;
		align-self: start;
	}

	.p12-team .p12-team__text {
		align-self: start;
	}

	.p12-team .p12-team__name {
		font-size: 22px !important;
	}

	.p12-team .p12-team__position {
		font-size: 15px;
	}

	.p12-team .p12-team__linkedin {
		grid-area: link;
		align-self: start;
		margin: 0;
	}

	.p12-team .p12-team__badge {
		grid-area: media;
		margin: 6px 6px 0 0;
		padding: 2px 6px;
		font-size: 12px;
	}
}

/* Sehr schmale Telefone (320–379 px): kleineres Foto, damit Nachnamen nicht im Wort umbrechen. */
@media (max-width: 379px) {
	.p12-team .p12-team__card {
		grid-template-columns: 88px minmax(0, 1fr);
		column-gap: 14px;
	}

	.p12-team .p12-team__name {
		font-size: 20px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.p12-team .p12-team__linkedin {
		transition: none;
	}

	.p12-team .p12-team__linkedin:hover {
		transform: none;
	}
}
