/* -------------------------------------------------- */
/* Plattform (App-Raster)                               */
/* -------------------------------------------------- */

/* Used to run the same "written for the gradient, corrected for white" split
   .leistung-card and .zahl-card used to have — see 25-blocks.css section 3.
   Those two are an opaque white card unconditionally; .plattform-card now
   follows the same recipe (its own correction lives there too, pulling the
   card's text back to ink on the gradient, the same exception
   .leistung-card has). */

.section--plattform h2 {
	color: #fff;
}

.plattform__intro {
	max-width: 640px;
	margin-top: 0.5rem;
}

.plattform-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: 2rem;
	margin-top: 2.5rem;
}

.plattform-card {
	--radius-child: var(--radius-nested);
	--card-ink: var(--color-ink);
	--card-body: var(--color-body);

	background: #fff;
	border: var(--border-hairline);
	box-shadow: var(--shadow-card);
	border-radius: var(--radius);
	padding: 2.5rem;
}

.plattform-card h3 {
	margin: 0 0 1rem;
}

.plattform-card__apps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
	font-size: var(--text-md);
}

.plattform-card__apps a,
.plattform-card__apps span {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	color: inherit;
	text-decoration: none;
}

.plattform-card__apps a {
	border-radius: var(--radius-child);
	margin: -0.5rem -0.75rem;
	padding: 0.5rem 1rem;
	transition: background var(--transition);
}

/* One fill: the card is white regardless of the section behind it now, same
   as .leistung-card / .zahl-card (25-blocks.css section 3). */
.plattform-card__apps a:hover {
	background: var(--color-bg-alt);
}

.plattform-card__apps img {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}

/* Same pattern as .leistung-card__more (07-leistungen.css) and
   .blog-card__more (21-blog-listing.css): gradient text on hover is a
   second, always-clipped layer faded in via opacity rather than the base
   label's own colour toggling — background-clip:text is a discrete
   property a `transition: color` can't ease, so switching it directly
   would snap back the instant the pointer leaves instead of fading out.
   Scoped to `a` only, not the plain `span` apps render for entries with no
   url — those aren't links and get no hover treatment at all. */
.plattform-card__app-label {
	position: relative;
}

.plattform-card__app-label::before {
	content: attr(data-label);
	position: absolute;
	inset: 0;
	white-space: nowrap;
	background: linear-gradient(var(--gradient-angle), var(--color-gradient-start), var(--color-gradient-end));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	opacity: 0;
	transition: opacity var(--transition);
	pointer-events: none;
}

.plattform-card__apps a:hover .plattform-card__app-label::before {
	opacity: 1;
}

.plattform-card__app-external {
	display: inline-flex;
	margin-left: auto;
	font-size: var(--text-sm);
	opacity: 0;
	transform: translate(-2px, 2px);
	transition: opacity var(--transition), transform var(--transition);
}

/* Font Awesome renders the glyph as `content` on the <i>'s own ::before
   (not as the <i>'s direct text), and background/background-clip aren't
   inherited properties — setting them on the <i> itself wouldn't reach the
   pseudo-element that actually paints the icon, so this targets ::before
   directly. No two-layer opacity-crossfade trick needed here unlike the
   label text: the icon is already invisible at rest (opacity: 0 above) and
   only ever fades via that same opacity, so there's no abrupt on/off
   toggle of background-clip to smooth over — it's gradient-clipped the
   whole time, just invisible until the parent fades it in. */
.plattform-card__app-external i::before {
	background: linear-gradient(var(--gradient-angle), var(--color-gradient-start), var(--color-gradient-end));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.plattform-card__apps a:hover .plattform-card__app-external {
	opacity: 1;
	transform: translate(0, 0);
}

/* -------------------------------------------------- */
/* Optional CTA card                                    */
/* -------------------------------------------------- */

/* The grid's optional last card, rendered when the block's "Zusatzkarte:
   Titel" field is filled in. Always the brand gradient — same recipe as
   .cta-banner (19-angebote-cta.css) — regardless of which way the block's
   own "Farbverlauf-Hintergrund" switch is set for the section behind it. */
.plattform-card--cta {
	background: linear-gradient(var(--gradient-angle), var(--color-gradient-start), var(--color-gradient-end)) !important;
	border: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* The extra ancestor classes aren't decorative — they're what gives this
   enough specificity to beat 25-blocks.css's .ld-block-section :is(h2, h3,
   h4, p, ...) rules, which repaint headings/text to match the section's own
   blend switch and would otherwise override this card's white text back to
   ink whenever that switch is off. */
.ld-block-section .section__content .plattform-card--cta :is(h3, p) {
	color: #fff;
}

.plattform-card--cta p {
	margin: 0 0 1.5rem;
	opacity: 0.92;
}

.plattform-card--cta .btn {
	margin-top: auto;
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.7);
	box-shadow: none;
}

.plattform-card--cta .btn:hover {
	background: rgba(255, 255, 255, 0.15);
	box-shadow: none;
}
