/* KAIROS-Projekte – Liste nach AMD-Entwurf /ideenpool/, Detailseite angelehnt an /kairos26/ */

.kairos-projekte,
.kairos-projekt {
	--kairos-blue: #284198;
	--kairos-link: var(--awb-color4, #0100f3);
	--kairos-pink: #ef4db8;
	--kairos-green: #20ad31;
	--kairos-yellow: #ffd43b;
	--kairos-gold: #efbf04;
	--kairos-cyan: #009ee3;
	--kairos-text: var(--awb-color8, #141617);
	--kairos-muted: #5b6270;
	--kairos-bg-soft: var(--awb-color3, #f2f3f5);
	--kairos-shadow: 0 0 20px 6px rgba(20, 22, 23, 0.08);
	--kairos-shadow-hover: 0 0 24px 10px rgba(20, 22, 23, 0.14);
	--kairos-bold: "Walsheim-Bold", "Walsheim-Regular", sans-serif;
	--kairos-medium: "Walsheim-Medium", "Walsheim-Regular", sans-serif;
	color: var(--kairos-text);
}

.kairos-projekte *,
.kairos-projekt * {
	box-sizing: border-box;
}

/* ---------- Filter ---------- */

/* --kairos-sticky-top: height of the Avada sticky header, set by filter.js */
.kairos-projekte {
	scroll-margin-top: var(--kairos-sticky-top, 0px);
}

.kairos-filter {
	position: sticky;
	top: var(--kairos-sticky-top, 0px);
	z-index: 10;
	margin: 0 0 28px;
	padding: 12px 0;
	background: var(--awb-color1, #fff);
}

.kairos-projekte [hidden] {
	display: none !important;
}

/* Search: centred above the (sticky) category filter, just a line */
.kairos-search {
	--kairos-search-indent: 4px;
	position: relative;
	max-width: 480px;
	margin: 0 auto 16px;
}

.kairos-projekte .kairos-search__input {
	width: 100%;
	height: auto;
	padding: 8px var(--kairos-search-indent);
	border: 0;
	border-bottom: 2px solid var(--kairos-link);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--kairos-text);
	font-family: var(--kairos-medium);
	font-size: 22px;
	line-height: 1.3;
}

.kairos-projekte .kairos-search__input::placeholder {
	color: var(--kairos-muted);
	opacity: 1;
}

.kairos-projekte .kairos-search__input:focus {
	border-bottom-color: var(--kairos-pink);
	outline: none;
}

/* Fake blinking caret while the field is empty and not focused (no autofocus: keyboard on mobile, screen readers).
   Sits where the real caret appears, at the start of the placeholder. */
.kairos-search:not(:focus-within):has(.kairos-search__input:placeholder-shown)::before {
	content: "";
	position: absolute;
	top: 50%;
	left: calc(var(--kairos-search-indent) - 1px);
	width: 2px;
	height: 1.3em;
	background: var(--kairos-text);
	font-size: 22px;
	transform: translateY(-50%);
	animation: kairos-caret 1.06s steps(1) infinite;
	pointer-events: none;
}

@keyframes kairos-caret {
	50% {
		opacity: 0;
	}
}

.kairos-search__status {
	margin: -12px 0 20px;
	color: var(--kairos-muted);
	text-align: center;
}

.kairos-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kairos-filter__list li {
	margin: 0;
}

/* Same look as the category tags on the cards (.kairos-cats), active one pink */
.kairos-filter__item {
	display: inline-block;
	padding: 9px 20px;
	border-radius: 5px;
	background: var(--kairos-link);
	color: #fff !important;
	font-family: var(--kairos-bold);
	font-size: 12px;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s;
}

.kairos-filter__item:hover,
.kairos-filter__item:focus-visible {
	background: var(--kairos-blue);
}

.kairos-filter__item.is-active {
	background: var(--kairos-pink);
}

/* ---------- Grid & Karten (Entwurf /ideenpool/, „erste Karte“) ---------- */

.kairos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kairos-card {
	--kairos-card-accent: var(--kairos-link);
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--kairos-card-accent);
	border-radius: 15px;
	background: #fff;
	transition: transform 0.3s;
}

.kairos-card:hover,
.kairos-card:focus-within {
	transform: translateY(-10px);
}

.kairos-card--preistraeger {
	--kairos-card-accent: var(--kairos-gold);
}

.kairos-card__image {
	aspect-ratio: 2 / 1;
	background: var(--kairos-bg-soft);
	overflow: hidden;
}

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

.kairos-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 15px 15px;
}

.kairos-card .kairos-badge + .kairos-card__body {
	padding-top: 10px;
}

.kairos-card__title {
	margin: 0 0 20px !important;
	font-family: "NEUE MACHINA PLAIN BOLD", var(--kairos-bold) !important;
	font-size: 28px !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	/* Automatic hyphenation (lang="de"); only longer words, at least 4 letters on each side. */
	-webkit-hyphens: auto;
	hyphens: auto;
	hyphenate-limit-chars: 10 4 4;
	overflow-wrap: break-word;
}

.kairos-card__link {
	color: var(--kairos-text) !important;
	text-decoration: none;
}

/* Whole card clickable without nesting the category links inside the card link. */
.kairos-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.kairos-card__link:focus-visible {
	outline: none;
}

.kairos-card:has(.kairos-card__link:focus-visible) {
	outline: 3px solid var(--kairos-link);
	outline-offset: 3px;
}

.kairos-card__traeger {
	margin: 0 0 20px !important;
	font-family: var(--kairos-bold);
	font-size: 17px;
	line-height: 1.2;
}

.kairos-card__excerpt {
	display: -webkit-box;
	margin: 0 0 25px !important;
	overflow: hidden;
	font-family: "Walsheim-Regular", sans-serif;
	font-size: 15px;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	hyphens: auto;
}

.kairos-cats {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.kairos-cats li {
	margin: 0;
}

.kairos-cats a,
.kairos-cats span {
	display: inline-block;
	padding: 9px 20px;
	border-radius: 5px;
	background: var(--kairos-link);
	color: #fff !important;
	font-family: var(--kairos-bold);
	font-size: 12px;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s;
}

.kairos-cats a:hover,
.kairos-cats a:focus-visible {
	background: var(--kairos-blue);
}

/* Preisträger & Sonderpreis: Eck-Badge links bündig unter dem Bild */

.kairos-badge {
	display: inline-block;
	align-self: flex-start;
	padding: 10px;
	border-bottom-right-radius: 8px;
	background: var(--kairos-gold);
	color: #fff;
	font-family: var(--kairos-bold);
	font-size: 16px;
	line-height: 1.2;
}

.kairos-badge--sonderpreis {
	background: var(--kairos-cyan);
}

.kairos-draft {
	align-self: flex-start;
	display: inline-block;
	margin-bottom: 8px;
	padding: 2px 8px;
	background: var(--kairos-yellow);
	font-size: 12px;
	font-family: var(--kairos-bold);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kairos-empty {
	color: var(--kairos-muted);
}

/* ---------- Detailseite ---------- */

.kairos-projekt {
	--kairos-aside-bg: #e5f5ff;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 0 80px;
}

.kairos-back {
	margin: 0 0 24px;
}

.kairos-back a {
	color: var(--kairos-link);
	text-decoration: none;
}

.kairos-projekt__header {
	margin-bottom: 32px;
}

.kairos-projekt__header .kairos-badge {
	margin-bottom: 16px;
}

.kairos-projekt__title {
	margin: 0 0 8px !important;
	color: var(--kairos-blue) !important;
	font-family: var(--kairos-bold) !important;
	font-size: clamp(32px, 4.5vw, 52px) !important;
	line-height: 1.1 !important;
	hyphens: auto;
}

.kairos-projekt__traeger {
	margin: 0;
	color: var(--kairos-muted);
	font-size: 20px;
}

.kairos-projekt__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 64px;
	align-items: start;
}

.kairos-projekt__lead {
	margin: 0 0 32px;
	color: var(--kairos-blue);
	font-size: 22px;
	line-height: 1.5;
}

.kairos-projekt__content h2 {
	margin: 1.6em 0 0.5em !important;
	color: var(--kairos-blue) !important;
	font-family: var(--kairos-bold) !important;
	font-size: 24px !important;
	line-height: 1.3 !important;
}

.kairos-projekt__content p {
	font-size: 18px;
	line-height: 1.6;
}

/* Würdigung: light blue box as in the draft (Avada alert, rgba(204,236,255,.3)) */
.kairos-wuerdigung {
	margin: 0 0 48px;
	padding: 28px 32px;
	border: 1px solid var(--awb-color5, #009ee3);
	border-radius: 5px;
	background: rgba(204, 236, 255, 0.3);
}

.kairos-wuerdigung__title {
	margin: 0 0 16px !important;
	color: var(--kairos-text) !important;
	font-family: var(--kairos-bold) !important;
	font-size: 24px !important;
	line-height: 1.3 !important;
}

.kairos-wuerdigung__body {
	--kairos-wuerdigung-line: 1.6em;
	font-size: 18px;
	line-height: var(--kairos-wuerdigung-line);
}

.kairos-wuerdigung__body p {
	font-size: inherit;
	line-height: inherit;
}

.kairos-wuerdigung__body > :last-child {
	margin-bottom: 0;
}

.kairos-wuerdigung__body:focus {
	outline: none;
}

/* Set by single.js when the text is longer than this; without JS the full text shows */
.kairos-wuerdigung__body.is-collapsed {
	max-height: calc(5 * var(--kairos-wuerdigung-line));
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 60%, transparent);
	mask-image: linear-gradient(#000 60%, transparent);
}

.kairos-wuerdigung__foto {
	float: right;
	width: 120px;
	height: 120px;
	margin: 4px 0 12px 24px;
	border-radius: 50%;
	object-fit: cover;
}

/* Whole jury: group image(s) above the heading, never cropped. Two parts sit side by side like one
   image (flex-grow ∝ pixel width) and wrap below each other in narrow boxes at the same scale. */
.kairos-wuerdigung__gruppe {
	container-type: inline-size;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 0 20px;
}

.kairos-wuerdigung__gruppe img {
	flex: var(--w) 1 0;
	min-width: 0;
	height: auto;
}

@container (max-width: 540px) {
	.kairos-wuerdigung__gruppe img {
		flex: none;
		width: calc(var(--w) / var(--max) * 100%);
	}
}

.kairos-wuerdigung__jury {
	clear: both;
	font-family: var(--kairos-bold);
}

.kairos-projekt .kairos-wuerdigung__more {
	margin: 12px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--kairos-link);
	font-family: var(--kairos-bold);
	font-size: 16px;
	text-decoration: underline;
	cursor: pointer;
}

.kairos-projekt__aside {
	position: sticky;
	top: 120px;
	padding: 28px;
	background: var(--kairos-aside-bg);
}

.kairos-aside__title {
	margin: 28px 0 12px !important;
	color: var(--kairos-blue) !important;
	font-family: var(--kairos-bold) !important;
	font-size: 18px !important;
	line-height: 1.3 !important;
}

.kairos-aside__title:first-child {
	margin-top: 0 !important;
}

.kairos-galerie {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Last in the sidebar, separated by a line instead of a heading */
.kairos-galerie:not(:first-child) {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--kairos-link);
}

.kairos-galerie li {
	margin: 0;
}

.kairos-galerie a {
	display: block;
}

.kairos-galerie a:focus-visible {
	outline: 3px solid var(--kairos-link);
	outline-offset: 2px;
}

.kairos-galerie img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	transition: opacity 0.15s;
}

.kairos-galerie a:hover img {
	opacity: 0.85;
}

.kairos-fakten {
	margin: 0;
}

.kairos-fakten dt {
	color: var(--kairos-muted);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.kairos-fakten dd {
	margin: 2px 0 16px;
	font-size: 17px;
	line-height: 1.4;
}

.kairos-fakten dd:last-child {
	margin-bottom: 0;
}

.kairos-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kairos-links li {
	margin: 0 0 8px;
}

.kairos-links a {
	color: var(--kairos-link);
	word-break: break-word;
}

.kairos-links a::after {
	content: " ↗";
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	/* 24 pills would cover the whole screen when sticky: one row, swipeable */
	.kairos-filter__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.kairos-filter__list::-webkit-scrollbar {
		display: none;
	}

	.kairos-filter__list li {
		flex: none;
	}

	.kairos-projekt {
		padding: 24px 0 56px;
	}

	.kairos-projekt__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.kairos-projekt__aside {
		position: static;
	}

	.kairos-wuerdigung {
		padding: 22px 20px;
	}

	.kairos-wuerdigung__foto {
		width: 88px;
		height: 88px;
		margin-left: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kairos-card,
	.kairos-cats a,
	.kairos-filter__item {
		transition: none;
	}

	.kairos-search::before {
		animation: none !important;
	}

	.kairos-card:hover,
	.kairos-card:focus-within {
		transform: none;
	}
}
