/**
 * Aktionspartner
 *
 * Farben über Custom Properties anpassbar, z. B. im Child-Theme:
 *   .aktionspartner { --aktionspartner-akzent: #96AA4D; }
 *
 * Breakpoints wie im Neckarline-Child-Theme / Salient:
 *   Mobil        bis 720px                       1 Spalte
 *   Tablet hoch  721–1120px                      2 Spalten
 *   Tablet quer  1121–1440px, Querformat         3 Spalten
 *   Desktop      sonst                           4 Spalten
 * Die gleichen Werte stehen in assets/js/aktionspartner.js.
 */

.aktionspartner,
.aktionspartner-single,
.aktionspartner-single__header {
	--aktionspartner-akzent: #96AA4D;
	--aktionspartner-akzent-dunkel: #707455;
	--aktionspartner-text: inherit;
	--aktionspartner-kachel-bg: #efefef;
	--aktionspartner-bild-bg: #dbd8d8;
	--aktionspartner-platzhalter-dunkel: #bfbbbb;
	--aktionspartner-platzhalter-hell: #e6e4e3;
	--aktionspartner-rahmen: #cfcfcf;
	--aktionspartner-gap: 16px;
}

/*
 * Typografie wie im Theme: Fließtext 18/26 Light (200), Eyebrow wie h4
 * (Versalien, Light), Buttons 18/24 Regular (400), Überschriften Bold.
 * In den Kacheln etwas kleiner, damit 4 Spalten gut lesbar bleiben.
 */

/* Filter */

.aktionspartner__filter {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 0 auto 60px;
}

.aktionspartner__filter-label {
	font-weight: 700;
	font-size: 18px;
	line-height: 26px;
}

.aktionspartner__dropdown {
	position: relative;
	width: 300px;
	max-width: 100%;
	z-index: 20;
}

.aktionspartner__dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 14px 20px;
	background: #fff !important;
	border: 2px solid var(--aktionspartner-akzent) !important;
	border-radius: 0;
	box-shadow: none !important;
	color: var(--aktionspartner-akzent) !important;
	font: inherit;
	font-size: 18px;
	font-weight: 400;
	line-height: 24px;
	text-align: left;
	cursor: pointer;
	transition: all linear 0.3s;
}

/* Wie die Theme-Buttons: weiß mit Rand, bei Hover Vollton. */
.aktionspartner__dropdown-toggle:hover {
	background: var(--aktionspartner-akzent) !important;
	color: #fff !important;
}

.aktionspartner__dropdown-toggle::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin-left: 12px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.2s;
}

.aktionspartner__dropdown-toggle[aria-expanded="true"]::after {
	transform: translateY(2px) rotate(-135deg);
}

.aktionspartner__dropdown-toggle:focus-visible {
	outline: 2px solid var(--aktionspartner-akzent);
	outline-offset: 2px;
}

.aktionspartner__dropdown-list li:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

/* !important gegen globale Listen-Styles des Themes (#ajax-content-wrap … ul). */
.aktionspartner .aktionspartner__dropdown-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	background: #fff;
	border: 2px solid var(--aktionspartner-akzent);
	border-top: 0;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.aktionspartner__dropdown-list[hidden] {
	display: none;
}

.aktionspartner .aktionspartner__dropdown-list li {
	margin: 0 !important;
	padding: 10px 20px !important;
	list-style: none;
	color: var(--aktionspartner-akzent);
	font-size: 18px;
	font-weight: 400 !important;
	line-height: 24px;
	cursor: pointer;
	transition: all linear 0.3s;
}

.aktionspartner .aktionspartner__dropdown-list li::before,
.aktionspartner .aktionspartner__dropdown-list li::marker {
	content: none !important;
	display: none !important;
}

/* Die aktuelle Auswahl steht schon im Feld und wird in der Liste ausgeblendet. */
.aktionspartner .aktionspartner__dropdown-list li[aria-selected="true"] {
	display: none !important;
}

.aktionspartner .aktionspartner__dropdown-list li:hover,
.aktionspartner .aktionspartner__dropdown-list li:focus-visible {
	background: var(--aktionspartner-akzent);
	color: #fff;
}

/* Grid */

.aktionspartner__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-content: start; /* Zeilen nicht strecken, wenn JS die Höhe während der Animation fixiert. */
	gap: var(--aktionspartner-gap);
}

@media only screen and (min-width: 1121px) and (max-width: 1440px) and (orientation: landscape) {
	.aktionspartner__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 1120px) {
	.aktionspartner__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 720px) {
	.aktionspartner__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.aktionspartner__leer {
	text-align: center;
}

.aktionspartner__mehr {
	margin-top: 32px;
	text-align: center;
}

.aktionspartner [hidden] {
	display: none !important;
}

/* Kachel */

.aktionspartner-kachel {
	display: flex;
	flex-direction: column;
	background: var(--aktionspartner-kachel-bg);
	text-align: left;
}

/*
 * Featured: Banderole „Premium Partner“ diagonal über der rechten oberen
 * Bildecke, hellgrün, bei Hover der Kachel dunkelgrün. Mittelpunkt 65px vom
 * Eck, abgeschnitten durch overflow: hidden des Bildbereichs; Klicks gehen
 * an den Bild-Link darunter.
 */
.aktionspartner-badge {
	position: absolute;
	top: 65px;
	right: 65px;
	z-index: 2;
	width: 280px;
	padding: 6px 0;
	background: var(--aktionspartner-akzent);
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	letter-spacing: 1.5px;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(50%, -50%) rotate(45deg);
	transition: background-color 0.3s ease;
}

.aktionspartner-kachel--featured:hover .aktionspartner-badge,
.aktionspartner-kachel--featured:focus-within .aktionspartner-badge {
	background: var(--aktionspartner-akzent-dunkel);
}

.aktionspartner-kachel__bild {
	position: relative;
	aspect-ratio: 4 / 3; /* Bilder im Format 800 × 600 px anliefern. */
	background: var(--aktionspartner-bild-bg);
	overflow: hidden;
}

.aktionspartner-kachel__bild a {
	display: block;
	position: absolute;
	inset: 0;
}

/* Bild immer absolut zentriert, vollständig sichtbar. */
.aktionspartner-kachel__bild img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	transform: translate(-50%, -50%);
}

/* Platzhalter-Logo (SVG aus dem Theme) für Kacheln ohne Bild. */
.aktionspartner-platzhalter {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56%;
	transform: translate(-50%, -50%);
	line-height: 0;
}

.aktionspartner-platzhalter svg {
	display: block;
	width: 100%;
	height: auto;
	fill: var(--aktionspartner-platzhalter-dunkel);
}

.aktionspartner-platzhalter .ton-dunkel {
	fill: var(--aktionspartner-platzhalter-dunkel);
}

.aktionspartner-platzhalter .ton-hell {
	fill: var(--aktionspartner-platzhalter-hell);
}

.aktionspartner-kachel__inhalt {
	padding: 20px 16px 0;
}

/* text-align: das Theme zentriert h3/p auf Mobil, in der Kachel bleibt alles linksbündig. */
.aktionspartner-kachel__unternehmen {
	margin: 0 0 12px;
	padding: 0;
	font-size: 16px;
	line-height: 22px;
	font-weight: 200;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-align: left;
}

/* Spezifisch genug gegen Salients „.row .col h3“ (34px). */
.aktionspartner .aktionspartner-kachel h3.aktionspartner-kachel__headline {
	margin: 0 0 16px;
	padding: 0;
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
	letter-spacing: 0;
	text-align: left;
}

@media only screen and (max-width: 1300px) {
	.aktionspartner .aktionspartner-kachel h3.aktionspartner-kachel__headline {
		font-size: 22px;
		line-height: 28px;
	}
}

/* Verlinkte Headline (Featured) grün wie die Theme-Links, Hover dunkelgrün; ohne Unterstreichung. */
.aktionspartner .aktionspartner-kachel__headline a {
	color: var(--aktionspartner-akzent);
	font-weight: inherit;
	text-decoration: none;
	transition: color linear 0.2s;
}

.aktionspartner .aktionspartner-kachel__headline a:hover {
	color: var(--aktionspartner-akzent-dunkel);
}

.aktionspartner-kachel__teaser {
	font-size: 16px;
	line-height: 24px;
	font-weight: 200;
}

.aktionspartner-kachel__teaser p {
	padding-bottom: 10px;
	text-align: left;
}

.aktionspartner-kachel__teaser p:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

.aktionspartner-kachel__buttons,
.aktionspartner-single__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.aktionspartner-kachel__buttons {
	margin-top: auto;
	padding: 35px 16px 20px;
}

/* Theme-Buttons in der Kachel kompakter darstellen. */
.aktionspartner-kachel__buttons .aktionspartner-button.nectar-button,
.aktionspartner-kachel__buttons .aktionspartner-button.nectar-button.large {
	margin: 0 !important;
	padding: 10px 18px !important;
}

.aktionspartner-kachel__buttons .aktionspartner-button.nectar-button span {
	font-size: 16px !important;
	line-height: 22px !important;
}

/*
 * Featured-Kachel: „mehr Info“ gefüllt hellgrün, Hover/Fokus weiß mit
 * hellgrünem Rahmen (Umkehrung der übrigen Buttons, wie .content-ticket im Theme).
 * Hohe Spezifität nötig: Child-Theme setzt `.button-wildline.nectar-button.large`
 * background transparent !important bzw. :hover Gold !important und lädt später.
 */
html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button {
	background-color: var(--aktionspartner-akzent) !important;
	border-color: var(--aktionspartner-akzent) !important;
	color: #fff !important;
	transition: all linear 0.3s;
}

html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button span {
	color: #fff !important;
}

html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button:hover,
html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button:focus-visible {
	background-color: #fff !important;
	border-color: var(--aktionspartner-akzent) !important;
	color: var(--aktionspartner-akzent) !important;
}

html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button:hover span,
html body .aktionspartner-kachel.aktionspartner-kachel--featured a.aktionspartner-button.aktionspartner-button--detail.nectar-button:focus-visible span {
	color: var(--aktionspartner-akzent) !important;
}

.aktionspartner__mehr .aktionspartner-button.nectar-button,
.aktionspartner-single__buttons .aktionspartner-button.nectar-button {
	margin-top: 0 !important;
}

/* Icon vor dem Button-Text (Route = Pin, Webseite = Globus). */
.aktionspartner-button .aktionspartner-icon {
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	margin: 0 0.45em 0 0;
	vertical-align: -0.2em;
	overflow: visible;
}

/* In der Kachel etwas größer (21px statt ~17,6px), mittig zur Schrift. */
.aktionspartner-kachel__buttons .aktionspartner-button .aktionspartner-icon {
	width: 21px;
	height: 21px;
	vertical-align: -5px;
}

button.aktionspartner-button {
	cursor: pointer;
	font: inherit;
}

/* Detailseite (Grundgerüst) */

/* Header-Bild wie „.intro-img“ im Neckarline-Child-Theme (Fallback für Themes ohne diese Klasse). */
.aktionspartner-single__header img {
	display: block;
	width: 100%;
	height: 650px;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

/* Platzhalter ohne Beitragsbild: gleiche Höhe, Logo nach Höhe skaliert. */
.aktionspartner-single__header--platzhalter {
	position: relative;
	height: 650px;
	background: var(--aktionspartner-bild-bg);
}

.aktionspartner-single__header--platzhalter .aktionspartner-platzhalter {
	width: auto;
	height: 40%;
}

.aktionspartner-single__header--platzhalter .aktionspartner-platzhalter svg {
	width: auto;
	height: 100%;
}

@media only screen and (max-width: 999px) {
	.aktionspartner-single__header img,
	.aktionspartner-single__header--platzhalter {
		height: 40vh;
	}
}

@media only screen and (max-width: 690px) {
	.aktionspartner-single__header img,
	.aktionspartner-single__header--platzhalter {
		height: 30vh;
	}
}

/* Salient setzt auf normalen Seiten das obere Padding von .container-wrap (40px)
   per Inline-CSS auf 0, auf Einzelbeiträgen nicht – hier angleichen. */
html body .container-wrap.aktionspartner-single__wrap {
	padding-top: 0;
}

/* Abstand oben/unten wie „.padding-top120“ im Neckarline-Child-Theme. */
.aktionspartner-single {
	max-width: 900px;
	margin: 120px auto;
}

@media only screen and (max-width: 1024px) {
	.aktionspartner-single {
		margin: 100px auto;
	}
}

@media only screen and (max-width: 690px) {
	.aktionspartner-single {
		margin: 80px auto;
	}
}

.aktionspartner-single__bild {
	margin-bottom: 32px;
	background: var(--aktionspartner-bild-bg);
	text-align: center;
}

/* Eyebrow ist ein h4 – Typografie kommt vollständig vom Theme. */
.aktionspartner-single h4.aktionspartner-single__unternehmen {
	text-align: center;
}

.aktionspartner-single__buttons {
	margin-top: 32px;
	justify-content: center;
}

/* Social-Media-Icons (nur hinterlegte Kanäle), 45 × 45 px, negativ:
   weißes Icon auf grüner Fläche → Hover dunkelgrün. */
.aktionspartner-single__social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 40px;
}

.aktionspartner-single__social + .aktionspartner-single__buttons {
	margin-top: 60px;
}

.aktionspartner-single .aktionspartner-social {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	color: #fff;
	background: var(--aktionspartner-akzent);
	text-decoration: none;
	border: 0;
	transition: background-color 0.3s ease;
}

.aktionspartner-single .aktionspartner-social:hover,
.aktionspartner-single .aktionspartner-social:focus-visible {
	color: #fff;
	background: var(--aktionspartner-akzent-dunkel);
}

.aktionspartner-single .aktionspartner-social:focus-visible {
	outline: 2px solid var(--aktionspartner-akzent-dunkel);
	outline-offset: 3px;
}

.aktionspartner-social svg {
	display: block;
	width: 27px;
	height: 27px;
}

/* Tooltip (per JS, aktionspartner-single.js) mit dem Namen des Zielkanals. */
.aktionspartner-tooltip {
	position: absolute;
	z-index: 10000;
	padding: 5px 10px;
	background: #707455;
	color: #fff;
	font-size: 14px;
	line-height: 20px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, 4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.aktionspartner-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -6px;
	border: 6px solid transparent;
	border-top-color: #707455;
}

.aktionspartner-tooltip.is-sichtbar {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.aktionspartner-tooltip {
		transition: none;
	}
}

/* Texte zentriert (Fallback für Themes ohne „.centered-text“). */
.aktionspartner-single,
.aktionspartner-single h1,
.aktionspartner-single p {
	text-align: center;
}
