/* =============================================================
   Leistungen-Grid (jundo/leistungen-grid Pattern)
   Innerer Bereich (Überschrift, Text, Grid) nutzt 80% der echten
   Bildschirmbreite (100vw) statt der üblichen 800/1200px-Textspalte
   — bewusste Ausnahme für diesen bildlastigen Abschnitt.
   ============================================================= */
.jundo-leistungen-inner {
	width: 80vw;
	max-width: 80vw;
	margin-left: auto;
	margin-right: auto;
}

/* Mobile First — Basis: 1 Spalte
   sm (640px+): 2 Spalten (Tablet)
   lg (1025px+): 4 Spalten (Desktop)
   ============================================================= */
.jundo-leistungen-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

/* WordPress hängt jedem Flow-Kind außer dem ersten automatisch
   margin-block-start an (Standardabstand zwischen Blöcken). Das
   verschiebt alle Karten außer der ersten nach unten, sobald ein
   Beitragsbild vorhanden ist. Höhere Spezifität überschreibt das,
   der Grid-"gap" übernimmt den Abstand stattdessen vollständig. */
ul.jundo-leistungen-grid > li {
	margin-block-start: 0;
	margin-block-end: 0;
}

@media (min-width: 640px) {
	.jundo-leistungen-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1025px) {
	.jundo-leistungen-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 40px;
	}
}

/* Karte: rundet + schneidet das beim Hover heranzoomende Bild sauber ab */
.jundo-leistung-card {
	border-radius: 8px;
	overflow: hidden;
}

.jundo-leistung-card-cover {
	margin: 0;
}

.jundo-leistung-card-cover .wp-block-cover__image-background {
	transition: transform 0.4s ease;
}

.jundo-leistung-card:hover .wp-block-cover__image-background,
.jundo-leistung-card:focus-within .wp-block-cover__image-background {
	transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
	.jundo-leistung-card-cover .wp-block-cover__image-background {
		transition: none;
	}
	.jundo-leistung-card:hover .wp-block-cover__image-background,
	.jundo-leistung-card:focus-within .wp-block-cover__image-background {
		transform: none;
	}
}

/* Titel/Text sitzen über dem Bild, Verlinkung übernimmt das gesamte Post-Title.
   color:inherit nötig, da die globale Link-Farbregel (a{color:secondary})
   sonst spezifischer greift als die weiße Textfarbe des Post-Title-Blocks.
   text-wrap:balance gegen unruhige Zeilenumbrüche bei schmalen Karten. */
.jundo-leistung-card-cover .wp-block-post-title {
	text-wrap: balance;
}
.jundo-leistung-card-cover .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.jundo-leistung-card-cover .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* "Mehr Informationen"-Link: einziges sichtbares Klick-Signal in der
   Karte (post-title ist zwar auch verlinkt, aber ohne jede optische
   Erkennbarkeit als Link). Pfeil per CSS gezeichnet, kein Icon-Font. */
.jundo-leistung-card-more.wp-block-read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	color: var(--wp--preset--color--white);
	font-size: 0.9em;
	font-weight: 700;
	text-decoration: none;
}

.jundo-leistung-card-more.wp-block-read-more:hover,
.jundo-leistung-card-more.wp-block-read-more:focus-visible {
	font-weight: 400;
	text-decoration: none;
}

.jundo-leistung-card-more.wp-block-read-more::after {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.jundo-leistung-card:hover .jundo-leistung-card-more.wp-block-read-more::after,
.jundo-leistung-card:focus-within .jundo-leistung-card-more.wp-block-read-more::after {
	transform: rotate(45deg) translate(2px, -2px);
}
