/* fx9_leistungen — 3 Karten als Links + Auf-Wunsch-Streifen.
   Typografie kommt aus project.css — hier keine Schriftangaben. */

section.fx9_leistungen .fx9_kopf {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: var(--fx-pad-block-gross);
}

section.fx9_leistungen .fx9_topline { margin: 0 0 18px; }
section.fx9_leistungen .fx9_untertitel { margin: 14px 0 0; }

section.fx9_leistungen .fx9_kopf_link {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--fx-azure);
	white-space: nowrap;
	transition: color .18s ease;
}

section.fx9_leistungen .fx9_kopf_link:hover,
section.fx9_leistungen .fx9_kopf_link:focus-visible { color: var(--fx-navy); }

/* ---------- Grid ---------- */

section.fx9_leistungen .fx9_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--fx-navy);
}

section.fx9_leistungen .fx9_eintrag {
	border-right: 1px solid var(--fx-line);
	border-bottom: 1px solid var(--fx-line);
}

section.fx9_leistungen .fx9_eintrag:nth-child(3n) { border-right: 0; }
section.fx9_leistungen .fx9_eintrag:last-child     { border-right: 0; }

section.fx9_leistungen .fx9_eintrag[id] {
	scroll-margin-top: calc(var(--fx-header-h) + var(--fx-motion-weg));
}

/* ---------- Karte (Link) ---------- */

section.fx9_leistungen .fx9_karte {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 32px 28px 38px;
	text-decoration: none;
	color: inherit;
	/* Navy-Wisch von links — wie fx10 */
	background: linear-gradient(90deg, var(--fx-navy) 50%, var(--fx-white) 50%);
	background-size: 201% 100%;
	background-position: 100% 0;
	transition:
		background-position .6s cubic-bezier(.2,.7,.2,1),
		color .4s ease;
}

section.fx9_leistungen .fx9_karte:hover,
section.fx9_leistungen .fx9_karte:focus-visible {
	background-position: 0 0;
	outline: none;
}

section.fx9_leistungen .fx9_karte:hover .fx9_eintrag_titel,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_eintrag_titel {
	color: var(--fx-white);
	transition: color .4s ease;
}

section.fx9_leistungen .fx9_karte:hover .fx9_eintrag_text,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_eintrag_text {
	color: var(--fx-mist);
	transition: color .4s ease;
}

section.fx9_leistungen .fx9_karte:hover .fx9_nummer,
section.fx9_leistungen .fx9_karte:hover .fx9_karte_fuss,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_nummer,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_karte_fuss {
	color: var(--fx-ice);
	transition: color .4s ease;
}

section.fx9_leistungen .fx9_karte:hover .fx9_karte_fuss svg,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_karte_fuss svg {
	transform: translateX(6px);
}

/* ---------- Karten-Inhalt ---------- */

section.fx9_leistungen .fx9_nummer {
	display: block;
	margin-bottom: 16px;
	color: var(--fx-azure);
	transition: color .4s ease;
}

section.fx9_leistungen .fx9_eintrag_titel { margin: 0 0 10px; hyphens: auto; }
section.fx9_leistungen .fx9_eintrag_text  { margin: 0; flex: 1; }

section.fx9_leistungen .fx9_karte_fuss {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
	color: var(--fx-azure);
	transition: color .4s ease;
}

section.fx9_leistungen .fx9_karte_fuss svg {
	flex-shrink: 0;
	transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Bild ---------- */

section.fx9_leistungen .fx9_bild {
	margin: 0 0 22px;
	overflow: hidden;
	background: var(--fx-tint);
	height: min( clamp(180px, 18vw, 280px), var(--fx-buehne-klein) );
}

section.fx9_leistungen .fx9_bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s ease;
}

section.fx9_leistungen .fx9_karte:hover .fx9_bild img,
section.fx9_leistungen .fx9_karte:focus-visible .fx9_bild img {
	transform: scale(1.05);
}

/* ---------- Auf-Wunsch-Streifen ---------- */

section.fx9_leistungen .fx9_auf_wunsch {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 36px;
	align-items: center;
	margin-top: 24px;
	padding: 14px 36px 14px 14px;
	background: var(--fx-tint);
	overflow: hidden;
}

section.fx9_leistungen .fx9_aw_bild {
	position: relative;
	width: 260px;
	height: 130px;
	overflow: hidden;
	flex-shrink: 0;
}

section.fx9_leistungen .fx9_aw_bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s ease;
}

section.fx9_leistungen .fx9_auf_wunsch:hover .fx9_aw_bild img {
	transform: scale(1.06);
}

/* Glanz */
section.fx9_leistungen .fx9_aw_bild::after {
	content: '';
	position: absolute;
	inset: 0;
	width: 60%;
	background: linear-gradient(105deg, transparent 20%, var(--fx-glare-60) 50%, transparent 80%);
	transform: translateX(-110%);
	pointer-events: none;
}

section.fx9_leistungen .fx9_auf_wunsch:hover .fx9_aw_bild::after {
	animation: fx9-glanz 1s cubic-bezier(.3,.6,.2,1) forwards;
}

@keyframes fx9-glanz {
	to { transform: translateX(280%); }
}

section.fx9_leistungen .fx9_aw_label { margin: 0 0 10px; }
section.fx9_leistungen .fx9_aw_titel { margin: 0 0 8px; }
section.fx9_leistungen .fx9_aw_text  { margin: 0; color: var(--fx-text); }

section.fx9_leistungen .fx9_fusszeile { margin: var(--fx-gap-block-klein) 0 0; }

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

@media (max-width: 1199px) {
	section.fx9_leistungen .fx9_karte { padding: 28px 20px 32px; }
}

@media (max-width: 991px) {
	section.fx9_leistungen .fx9_kopf { margin-bottom: 34px; }
	section.fx9_leistungen .fx9_topline { margin: 0 0 14px; }
	section.fx9_leistungen .fx9_grid { grid-template-columns: repeat(2, 1fr); }
	/* 3-Spalten-Regeln zuruecksetzen */
	section.fx9_leistungen .fx9_eintrag:nth-child(3n)   { border-right: 1px solid var(--fx-line); }
	/* 2-Spalten-Regeln */
	section.fx9_leistungen .fx9_eintrag:nth-child(2n)   { border-right: 0; }
	section.fx9_leistungen .fx9_eintrag:last-child       { border-right: 0; }
	section.fx9_leistungen .fx9_bild { margin-bottom: 16px; height: clamp(160px, 42vw, 240px); }
	section.fx9_leistungen .fx9_auf_wunsch { grid-template-columns: 200px 1fr; gap: 24px; }
	section.fx9_leistungen .fx9_aw_bild { width: 200px; height: 110px; }
}

@media (max-width: 767px) {
	section.fx9_leistungen .fx9_kopf { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
	section.fx9_leistungen .fx9_kopf_link { order: 3; }
	section.fx9_leistungen .fx9_grid { grid-template-columns: minmax(0, 1fr); }
	section.fx9_leistungen .fx9_eintrag { border-right: 0; }
	section.fx9_leistungen .fx9_eintrag:nth-child(3n) { border-right: 0; }
	section.fx9_leistungen .fx9_karte { padding: 22px 0; }
	section.fx9_leistungen .fx9_nummer { margin-bottom: 10px; }
	section.fx9_leistungen .fx9_eintrag_titel { margin: 0 0 7px; }
	section.fx9_leistungen .fx9_karte_fuss { margin-top: 18px; }
	section.fx9_leistungen .fx9_auf_wunsch { grid-template-columns: 1fr; gap: 0; padding: 12px 12px 18px; }
	section.fx9_leistungen .fx9_aw_bild { width: 100%; height: auto; aspect-ratio: 16/9; margin-bottom: 16px; }
	section.fx9_leistungen .fx9_fusszeile { margin: 18px 0 0; }
}

@media (max-width: 359px) {
	section.fx9_leistungen .fx9_eintrag_titel { overflow-wrap: anywhere; }
	section.fx9_leistungen .fx9_kopf_link { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	section.fx9_leistungen .fx9_karte,
	section.fx9_leistungen .fx9_karte:hover .fx9_eintrag_titel,
	section.fx9_leistungen .fx9_karte:hover .fx9_eintrag_text,
	section.fx9_leistungen .fx9_karte:hover .fx9_nummer,
	section.fx9_leistungen .fx9_karte:hover .fx9_karte_fuss,
	section.fx9_leistungen .fx9_bild img,
	section.fx9_leistungen .fx9_aw_bild img,
	section.fx9_leistungen .fx9_karte_fuss svg { transition: none; }
	section.fx9_leistungen .fx9_auf_wunsch:hover .fx9_aw_bild::after { animation: none; }
}
