/**
 * Footer – Sorbisch Erleben 2026
 *
 * Breakpoints (müssen zu inc/config.php passen):
 *   Handy  < 600px    eine Spalte, Gruppen aufklappbar
 *   Tablet ≥ 600px    zwei Spalten
 *   Desktop ≥ 1200px  vier Spalten
 *   Widescreen ≥ 1920px  nur andere Illustration
 *
 * Das alte CSS (Bootstrap, Tailwind) setzt Überschriften, Listen und Buttons global zurück.
 * Alle Werte im Footer sind deshalb ausdrücklich gesetzt.
 */

.site-footer {
	/* Verlauf exakt wie der Hügel in der Illustration, damit der Übergang nahtlos ist. */
	--sf-gradient: linear-gradient(90deg, #252c5d 0%, #395a61 36%, #4f8e66 79%, #58a268 100%);
	/* Leichte Abdunklung nach unten: sichert den Kontrast der weißen Schrift auch auf dem hellen Grün. */
	--sf-shade: linear-gradient(180deg, rgba(16, 20, 45, 0) 0, rgba(16, 20, 45, .06) 2rem, rgba(16, 20, 45, .18) 4rem, rgba(16, 20, 45, .3) 6.5rem, rgba(16, 20, 45, .36) 9rem);
	--sf-gutter: 2rem;
	--sf-line: rgba(255, 255, 255, .25);

	margin-top: 2rem;
	color: #fff;
	font-size: 15px;
	line-height: 1.6;
}

@media (min-width: 992px) {
	.site-footer {
		--sf-gutter: 10%; /* wie die Inhaltsbereiche der Seite */
	}
}

/* Illustration ------------------------------------------------------------ */

.site-footer__illustration {
	line-height: 0;
}

.site-footer__illustration img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
}

/* Fläche unter der Illustration --------------------------------------------- */

.site-footer__body {
	position: relative;
	/* Rückt in den unteren, schlichten Teil des Hügels hinein (dort ist die Grafik nur Verlauf). */
	margin-top: -4vw;
	padding: 0 var(--sf-gutter) 2rem;
	background-color: #395a61;
	background-image: var(--sf-shade), var(--sf-gradient);
}

/* Gemeinsame Rücksetzungen ------------------------------------------------- */

.site-footer h2,
.site-footer p,
.site-footer ul {
	margin: 0;
	padding: 0;
}

.site-footer ul {
	list-style: none;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: .2em;
}

.site-footer a:focus-visible,
.site-footer button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	border-radius: 2px;
}

/* Navigation -------------------------------------------------------------- */

.site-footer__nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.site-footer__group {
	border-bottom: 1px solid var(--sf-line);
}

.site-footer__heading {
	color: #fff;
	font-size: 19px; /* fett ab 18,7px = große Schrift (WCAG), Kontrast 3:1 genügt */
	font-weight: 700;
	line-height: 1.3;
}

.site-footer__toggle,
.site-footer__heading-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin: 0;
	padding: 1rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.site-footer__chevron {
	flex: none;
	width: 14px;
	height: 14px;
	transition: transform .2s ease;
}

.site-footer__toggle[aria-expanded="true"] .site-footer__chevron {
	transform: rotate(180deg);
}

.site-footer__links {
	padding-bottom: 1rem;
}

.site-footer__links li + li {
	margin-top: .4rem;
}

@media (min-width: 600px) {
	.site-footer__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem;
		padding: 2rem 0;
	}

	.site-footer__group {
		border-bottom: 0;
	}

	.site-footer__toggle,
	.site-footer__heading-link {
		padding: 0 0 .75rem;
	}

	.site-footer__toggle {
		cursor: default;
	}

	.site-footer__chevron {
		display: none;
	}

	.site-footer__links {
		padding-bottom: 0;
	}
}

@media (min-width: 1200px) {
	.site-footer__nav {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Partnerlogos und Social Media ------------------------------------------- */

.site-footer__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	padding: 1.5rem 0;
}

.site-footer__partners {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

/* Förderlogos sind meist für weißen Grund gestaltet: auf eine weiße Fläche setzen. */
.site-footer__partners a,
.site-footer__partners span {
	display: block;
	padding: .5rem .75rem;
	border-radius: 4px;
	background: #fff;
}

.site-footer__partners img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 72px;
}

.site-footer__social {
	display: flex;
	gap: .5rem;
}

.site-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}

.site-footer__social .icon {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

@media (min-width: 600px) {
	.site-footer__meta {
		justify-content: space-between;
		border-top: 1px solid var(--sf-line);
	}
}

/* Förderhinweis und Copyright ---------------------------------------------- */

.site-footer__legal {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--sf-line);
	color: rgba(255, 255, 255, .88);
	font-size: 13px;
	text-align: center;
}

@media (min-width: 600px) {
	.site-footer__legal {
		text-align: left;
	}
}

@media (min-width: 1200px) {
	.site-footer__legal {
		flex-direction: row;
		justify-content: space-between;
		gap: 2rem;
	}

	.site-footer__funding {
		max-width: 60ch;
	}

	.site-footer__copyright {
		text-align: right;
	}
}

/* Hinweis für Administratoren ohne zugewiesenes Menü ----------------------- */

.site-footer__hint {
	padding: 1.5rem 0;
}

.menu-hint {
	text-decoration: underline;
}

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