/*
 * Partner — the cards on the Partner page (inc/partner.php).
 *
 * Designed with the publications in mind (Mike and Doris, November 2026): the
 * photo is the card's cover, as a book's is on Publikationen, and the text
 * stands under it. Three across from 1000px, one under another on a phone.
 *
 * Every card is the same shape and the row stretches them to one height, so
 * Dr. Halmich's card, with one line of text, stands as tall as the two with a
 * CV behind them. Their extra length is behind "Mehr über …", which main.js
 * opens in the window Team uses (.kacheln-fenster, kacheln.css); the rules for
 * what is inside it are at the end of this file.
 *
 * Open Sans for the text, as on Team: these are sentences, not labels, and
 * the content card's 20px DIN Alternate Bold is tiring over a paragraph.
 */
.partner-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: clamp(18px, 2.4vw, 32px);
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	font-family: 'Open Sans', sans-serif;
}

@media (min-width: 1000px) {
	.partner-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.partner-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	background: #fff;
	border: 1px solid #e2e2dc;
	border-radius: 8px;
	overflow: hidden;
}

/* --- Photo --------------------------------------------------------------- */
/*
 * Square, whatever shape the file is: Barbara Friesenecker's is upright,
 * Astrid Steinwendtner-Kolator's square. 4:5 was tried first and made each
 * card over a screen tall at 1440px. Faces sit in the upper third of both
 * photos, so the crop keeps the top rather than the middle. The teal rule
 * under it is the one thing of the identity's colour on the card, as the
 * spine is on a book cover.
 *
 * The photo is laid over the box rather than in it: in the card's flex column
 * an upright photo's own height won against aspect-ratio, and Barbara
 * Friesenecker's card came out 20px taller than the others.
 */
.partner-bild {
	position: relative;
	flex: none;
	aspect-ratio: 1;
	overflow: hidden;
	background: color-mix(in srgb, var(--brand-teal) 9%, #fff);
	border-bottom: 4px solid var(--brand-teal);
}

/* Two classes: bar.css's `.bar img { height: auto }` would otherwise undo the
   fill. */
.partner-bild .partner-foto {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 25%;
}

/* No photo on file: the initials, large and quiet, in the photo's place. */
.partner-monogramm {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: 'DIN Alternate Bold', 'Open Sans', sans-serif;
	font-size: clamp(64px, 7vw, 96px);
	letter-spacing: 2px;
	/* The ink teal, at 4.6:1 on the tint — readable, though it is decoration
	   (aria-hidden; the name is the heading below). */
	color: var(--brand-teal-ink);
	user-select: none;
}

/* --- Text ---------------------------------------------------------------- */
.partner-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}

/* An h2 under the page's h1, so Bootstrap's 2rem and the content card's type
   are both restated. */
.p-bar-text .partner-name {
	margin: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: #1c1c1c;
	text-wrap: balance;
}

.partner-rolle {
	margin: 8px 0 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--brand-teal-ink);
}

.partner-rolle span {
	display: block;
}

.partner-rolle span + span {
	margin-top: 4px;
}

.partner-lead {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #2b2b2b;
	text-wrap: pretty;
}

/* Schwerpunkte, as the chips Doris's countries are on Team. */
.partner-themen {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.partner-themen li {
	margin: 0;
	padding: 2px 10px;
	border: 1.5px solid var(--brand-teal);
	border-radius: 999px;
	font-size: 13px;
	line-height: 1.5;
	color: #222;
}

/* --- Actions --------------------------------------------------------------
 * Pushed to the foot of the card, so "Mehr über …" and the website stand on
 * one line across the row however long the text above them runs. Drawn like
 * the "Mehr über …" button on Team. */
.partner-aktionen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin-top: auto;
	padding-top: 20px;
}

.partner-mehr > summary,
.partner-mehr-knopf {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: var(--tap);
	margin: 0;
	padding: 8px 18px;
	border: 1.5px solid var(--brand-teal);
	border-radius: 24px;
	background: #fff;
	color: #057e65;
	font-family: 'Open Sans', sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	text-align: left;
	list-style: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.partner-mehr > summary::-webkit-details-marker {
	display: none;
}

.partner-mehr-knopf::after {
	content: '\f065';
	content: '\f065' / '';
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	font-size: 0.8em;
}

.partner-mehr > summary:hover,
.partner-mehr > summary:focus-visible,
.partner-mehr-knopf:hover,
.partner-mehr-knopf:focus-visible {
	background: var(--brand-teal);
	color: #1c1c1c;
}

.partner-mehr > summary:focus-visible,
.partner-mehr-knopf:focus-visible {
	outline: 3px solid #1c1c1c;
	outline-offset: 3px;
}

/* Without the script, the Details block opens in the card. */
.partner-mehr[open] {
	flex-basis: 100%;
}

.partner-mehr[open] > .partner-mehr-text {
	margin-top: 14px;
}

.partner-website {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--tap);
	font-size: 15px;
	font-weight: 700;
	color: #057e65;
	text-decoration: underline;
	text-decoration-color: var(--brand-teal);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
}

.partner-website:hover,
.partner-website:focus-visible {
	color: #1c1c1c;
	text-decoration-color: #1c1c1c;
}

.partner-website .fa-external-link-alt {
	font-size: 11px;
}

/* --- Inside the window, and the opened Details ----------------------------
 * The window is Team's (.kacheln-fenster), whose rules for headings and
 * paragraphs inside it come later in the cascade; .partner-fenster in front
 * of each rule here is what lets these win. */
.kacheln-fenster.partner-fenster {
	width: min(860px, calc(100vw - 32px));
	font-family: 'Open Sans', sans-serif;
}

@media (max-width: 600px) {
	.kacheln-fenster.partner-fenster {
		width: calc(100vw - 16px);
	}
}

/* The head of the window: the photo small, the name, the function. */
.partner-fenster .partner-fenster-kopf {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 8px;
	padding: 0 40px 22px 0;
	border-bottom: 1px solid #e2e2dc;
}

.partner-fenster .partner-fenster-kopf img,
.partner-fenster .partner-fenster-kopf .partner-monogramm {
	position: static;
	flex: none;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 22%;
	background: color-mix(in srgb, var(--brand-teal) 9%, #fff);
	font-size: 30px;
}

.partner-fenster .partner-fenster-kopf h2 {
	margin: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: clamp(20px, 2.4vw, 24px);
	font-weight: 700;
	line-height: 1.3;
	color: #1c1c1c;
}

.partner-fenster .partner-fenster-kopf .partner-rolle {
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--brand-teal-ink);
}

@media (max-width: 520px) {
	.partner-fenster .partner-fenster-kopf {
		align-items: flex-start;
	}

	.partner-fenster .partner-fenster-kopf img,
	.partner-fenster .partner-fenster-kopf .partner-monogramm {
		width: 60px;
		height: 60px;
	}
}

.partner-mehr-text {
	max-width: 70ch;
	font-family: 'Open Sans', sans-serif;
}

.partner-mehr-text h3,
.partner-fenster .partner-mehr-text h3 {
	margin: 28px 0 10px;
	font-family: 'Open Sans', sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #057e65;
}

.partner-mehr-text p,
.partner-mehr-text li,
.partner-fenster .partner-mehr-text p,
.partner-fenster .partner-mehr-text li {
	font-family: 'Open Sans', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	color: #222;
}

.partner-mehr-text p {
	margin: 0 0 10px;
}

.partner-mehr-text ul {
	margin: 0;
	padding-left: 20px;
}

.partner-mehr-text li {
	margin: 0 0 7px;
}

.partner-mehr-text li::marker {
	color: var(--brand-teal);
}

.partner-mehr-text a {
	color: #057e65;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.partner-mehr-text a:hover,
.partner-mehr-text a:focus-visible {
	color: #1c1c1c;
}

@media (prefers-reduced-motion: reduce) {
	.partner-mehr > summary,
	.partner-mehr-knopf {
		transition: none;
	}
}
