/* ==========================================================================
   SEB Förderfinder – Styles im SEB Corporate Design
   Farben: Teal #0091B4 (Hauptfarbe), Magenta #B4007D (Akzent),
   Dark Teal #004F63, Light Teal #E4F3F8, Light BG #F0F7FA,
   Text #1A2E35, Orange #F07D00 (sparsam)
   Schrift: Work Sans (erbt vom Theme, Fallback definiert)
   Mobile First.
   ========================================================================== */

.seb-ff {
	--ff-teal: #0091B4;
	--ff-teal-dark: #004F63;
	--ff-magenta: #B4007D;
	--ff-light-teal: #E4F3F8;
	--ff-light-pink: #F7E4F2;
	--ff-bg: #F0F7FA;
	--ff-text: #1A2E35;
	--ff-orange: #F07D00;
	--ff-radius: 12px;
	--ff-shadow: 0 2px 12px rgba(0, 79, 99, 0.10);

	font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ff-text);
	margin: 0 auto;
}

.seb-ff *,
.seb-ff *::before,
.seb-ff *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Filterleiste
   -------------------------------------------------------------------------- */

.seb-ff__filters {
	background: var(--ff-bg);
	border-radius: var(--ff-radius);
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.seb-ff__search {
	margin-bottom: 0.75rem;
}

.seb-ff__search-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
	color: var(--ff-teal-dark);
}

.seb-ff__search-input {
	width: 100%;
	padding: 0.65rem 0.9rem;
	font: inherit;
	font-size: 1rem;
	color: var(--ff-text);
	background: #fff;
	border: 2px solid var(--ff-light-teal);
	border-radius: 8px;
	transition: border-color 0.15s ease;
}

.seb-ff__search-input:focus {
	outline: none;
	border-color: var(--ff-teal);
	box-shadow: 0 0 0 3px rgba(0, 145, 180, 0.18);
}

.seb-ff__groups {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem;
}

.seb-ff__group {
	background: #fff;
	border: 1px solid var(--ff-light-teal);
	border-radius: 8px;
}

.seb-ff__group[open] {
	border-color: var(--ff-teal);
}

.seb-ff__group-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.9rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ff-teal-dark);
	cursor: pointer;
	list-style: none;
}

.seb-ff__group-title::-webkit-details-marker {
	display: none;
}

.seb-ff__group-title::after {
	content: "";
	margin-left: auto;
	width: 0.55em;
	height: 0.55em;
	border-right: 2px solid var(--ff-teal);
	border-bottom: 2px solid var(--ff-teal);
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}

.seb-ff__group[open] .seb-ff__group-title::after {
	transform: rotate(-135deg);
}

.seb-ff__group-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4em;
	height: 1.4em;
	padding: 0 0.35em;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	background: var(--ff-magenta);
	border-radius: 999px;
}

.seb-ff__group-options {
	border: 0;
	margin: 0;
	padding: 0.25rem 0.9rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.seb-ff__option {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.92rem;
	cursor: pointer;
}

.seb-ff__option input {
	accent-color: var(--ff-teal);
	width: 1.05rem;
	height: 1.05rem;
	flex: none;
	cursor: pointer;
}

.seb-ff__option small {
	color: #5b7280;
}

.seb-ff__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.85rem;
	flex-wrap: wrap;
}

.seb-ff__count {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ff-teal-dark);
}

.seb-ff__reset {
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--ff-magenta);
	background: none;
	border: none;
	padding: 0.25rem 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.seb-ff__reset:hover {
	color: var(--ff-teal-dark);
}

/* --------------------------------------------------------------------------
   Ergebniskarten
   -------------------------------------------------------------------------- */

.seb-ff__results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.seb-ff__card {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	background: #fff;
	border: 1px solid var(--ff-light-teal);
	border-radius: var(--ff-radius);
	padding: 1.25rem;
	box-shadow: var(--ff-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.seb-ff__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 79, 99, 0.16);
}

.seb-ff__card[hidden] {
	display: none;
}

.seb-ff__card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.seb-ff__badge {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ff-teal-dark);
	background: var(--ff-light-teal);
	border-radius: 999px;
	padding: 0.2rem 0.65rem;
}

.seb-ff__badge--region {
	color: var(--ff-magenta);
	background: var(--ff-light-pink);
}

.seb-ff__card-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.35;
}

.seb-ff__card-title a {
	color: var(--ff-teal-dark);
	text-decoration: none;
}

.seb-ff__card-title a:hover {
	color: var(--ff-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.seb-ff__card-meta {
	margin: 0;
	font-size: 0.88rem;
	color: #41586a;
}

.seb-ff__card-text {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
}

.seb-ff__card-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.1rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--ff-teal-dark);
}

.seb-ff__card-link {
	margin-top: auto;
	align-self: flex-start;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--ff-magenta);
	text-decoration: none;
}

.seb-ff__card-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.seb-ff__empty {
	background: var(--ff-light-pink);
	border-radius: var(--ff-radius);
	padding: 1.25rem;
	font-size: 0.98rem;
}

.seb-ff__empty a {
	color: var(--ff-magenta);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Detailseite: Steckbrief
   -------------------------------------------------------------------------- */

.seb-ff__steckbrief {
	background: #F0F7FA;
	border-left: 5px solid #0091B4;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.75rem;
}

.seb-ff__steckbrief-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.6rem;
	margin: 0 0 1rem;
}

.seb-ff__steckbrief-list dt {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #004F63;
}

.seb-ff__steckbrief-list dd {
	margin: 0;
	font-size: 0.98rem;
}

.seb-ff__button {
	display: inline-block;
	background: #B4007D;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	padding: 0.7rem 1.4rem;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.seb-ff__button:hover {
	background: #8d0062;
}

.seb-ff__back a {
	color: #0091B4;
	font-weight: 600;
	text-decoration: none;
}

.seb-ff__back a:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Ab Tablet: Filtergruppen nebeneinander, Karten zweispaltig
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
	.seb-ff__groups {
		grid-template-columns: repeat(2, 1fr);
	}
	.seb-ff__results {
		grid-template-columns: repeat(2, 1fr);
	}
	.seb-ff__steckbrief-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.seb-ff__filters {
		padding: 1.5rem;
	}
	.seb-ff__groups {
		grid-template-columns: repeat(4, 1fr);
	}
	.seb-ff__results {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Barrierefreiheit
   -------------------------------------------------------------------------- */

.seb-ff a:focus-visible,
.seb-ff button:focus-visible,
.seb-ff input:focus-visible,
.seb-ff summary:focus-visible {
	outline: 3px solid var(--ff-orange);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.seb-ff * {
		transition: none !important;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
