/* Webux Section-Heading - frontend and editor. */
.webux-section-heading {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.webux-section-heading.has-text-align-center {
	text-align: center;
	align-items: center;
}

.webux-section-heading.has-text-align-right {
	text-align: right;
	align-items: flex-end;
}

.webux-section-heading__overline {
	margin: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #2563eb);
}

.webux-section-heading__title {
	margin: 0;
	line-height: 1.15;
}

.webux-section-heading__lead {
	margin: 0;
	max-width: 46rem;
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	color: var(--wp--preset--color--muted, #6b7280);
}

/* Inside a dark section (.has-light-text): lighten the lead text. */
.has-light-text .webux-section-heading__lead {
	color: rgba(255, 255, 255, 0.8);
}

/* Hero size (big title, e.g. home hero) - ported from .lv-hero-title. */
.webux-section-heading--hero .webux-section-heading__title {
	font-size: 64px;
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -1.28px;
}
.webux-section-heading--hero .webux-section-heading__lead {
	font-size: 18px;
	line-height: 1.65;
	max-width: 480px;
}

/* Optional buttons row. */
.webux-section-heading__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 0.5rem;
}
.webux-section-heading.has-text-align-center .webux-section-heading__buttons { justify-content: center; }

@media (max-width: 782px) {
	.webux-section-heading--hero .webux-section-heading__title { font-size: 40px; letter-spacing: -0.8px; }
}

/* Signal-coloured overline. Two-class selector on purpose: site.css pins the
   plain __overline (0,1,0) for both sites, a single class would not win. */
.webux-section-heading--overline-signal .webux-section-heading__overline {
	color: var(--wp--preset--color--signal, var(--wp--preset--color--primary, #2563eb));
}

/* Large section title (Figma H2, 44-46px). Same reason for the two-class
   selectors: site.css hard-sets __title to 36px/600 and __overline to 13px/500. */
.webux-section-heading--large .webux-section-heading__title {
	font-size: clamp(32px, 3.2vw, 46px);
	font-weight: 700;
	letter-spacing: -0.9px;
	line-height: 1.07;
}
.webux-section-heading--large .webux-section-heading__overline {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.12px;
}

/* Optional head link ("Alle Leistungen ansehen →"). No align-self: the wrapper's
   align-items (stretch / center / flex-end) keeps it with the chosen text align. */
.webux-section-heading__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	/* WCAG 2.5.5 (AAA): the text box alone is ~21px. This is a standalone
	   call to action, not a link inside a sentence, so the inline exception
	   does not apply and it gets the full 44px target. */
	min-height: 44px;
	color: var(--wp--preset--color--primary-dark, var(--wp--preset--color--primary, #2563eb));
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}
.webux-section-heading__link:hover {
	text-decoration: underline;
}
.webux-section-heading__link-icon {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}
.webux-section-heading__link:hover .webux-section-heading__link-icon {
	transform: translateX(3px);
}

/* Same guard as the teaser text link / fullscreen-hero: no hover travel when
   the visitor asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.webux-section-heading__link-icon {
		transition: none;
	}
	.webux-section-heading__link:hover .webux-section-heading__link-icon {
		transform: none;
	}
}

/* Inside a dark section (.has-light-text), like the lead above. */
.has-light-text .webux-section-heading__link {
	color: var(--wp--preset--color--base, #fff);
}

/* Link on the same base line as the title block. Two classes so the column-gap
   is not reset by the shorthand `gap` in site.css; row-gap stays inherited. */
.webux-section-heading.webux-section-heading--link-right {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	column-gap: 32px;
}
.webux-section-heading--link-right .webux-section-heading__main {
	display: flex;
	flex-direction: column;
	row-gap: inherit;
	min-width: 0;
}
.webux-section-heading--link-right .webux-section-heading__link {
	flex: 0 0 auto;
	padding-bottom: 4px;
}

/* Below the breakpoint the two columns stack again; the align-items of the
   text-align variants has to be restored explicitly (same specificity). */
@media (max-width: 782px) {
	.webux-section-heading.webux-section-heading--link-right {
		flex-direction: column;
		align-items: stretch;
	}
	.webux-section-heading--link-right.has-text-align-center {
		align-items: center;
	}
	.webux-section-heading--link-right.has-text-align-right {
		align-items: flex-end;
	}
	.webux-section-heading--link-right .webux-section-heading__link {
		padding-bottom: 0;
	}
}

/* Phones: CTAs stack full-width so they read as one equal-width pair
   (e.g. "Bewertung anfordern" / "Angebote ansehen" on the home hero). */
@media (max-width: 600px) {
	.webux-section-heading__buttons {
		gap: 12px;
	}
	.webux-section-heading__buttons .wp-block-button {
		flex: 1 1 100%;
	}
	.webux-section-heading__buttons .wp-block-button__link {
		display: block;
		width: 100%;
		text-align: center;
	}
}
