/*
 * VR Editorial System — shared tokens and non-negotiable primitives.
 * Loaded only for an explicitly enabled or administrator-previewed page group.
 */

:root {
	--vre-navy: #061b2c;
	--vre-navy-soft: #0c2c3e;
	--vre-ink: #10232e;
	--vre-body: #354651;
	--vre-paper: #faf8f3;
	--vre-paper-soft: #f3efe7;
	--vre-white: #ffffff;
	--vre-sage: #a9b86c;
	--vre-lime: #b6db00;
	--vre-border: rgba(16, 35, 46, 0.18);
	--vre-border-light: rgba(255, 255, 255, 0.2);
	--vre-display: Georgia, "Times New Roman", serif;
	--vre-body-font: Montserrat, Arial, Helvetica, sans-serif;
	--vre-shell: 1140px;
	--vre-section-y: clamp(48px, 8vw, 102.4px);
	--vre-h1-size: clamp(46.8px, 8vw, 79.2px);
	--vre-h2-size: 35.1px;
	--vre-shadow-soft: 0 8px 24px rgba(6, 27, 44, 0.08);
	--vre-shadow-portrait: 0 18px 44px rgba(6, 27, 44, 0.14);
}

/* 1.0.17 footer lock. Content adapters intentionally use an H2 scale, but
 * the shared journal footer is the same component as on the untouched
 * reference page and therefore keeps its own display typography. */
html body.vre-editorial-target #vr-global-footer
	.vrj-footer-card .vrj-footer-card__title {
	font-family: Montserrat, Arial, Helvetica, sans-serif !important;
	font-size: clamp(34px, 3vw, 44px) !important;
	font-weight: 600 !important;
	line-height: 0.98 !important;
	letter-spacing: -0.025em !important;
}

html body.vre-editorial-target #vr-global-footer
	.vrg-newsletter h2.vrj-weekly__masthead {
	font-family: Montserrat, Arial, sans-serif !important;
	font-size: 31cqi !important;
	font-weight: 900 !important;
	line-height: 0.76 !important;
	letter-spacing: -0.07em !important;
}

@media (max-width: 620px) {
	html body.vre-editorial-target #vr-global-footer
		.vrj-footer-card .vrj-footer-card__title {
		font-size: clamp(30px, 7.7vw, 38px) !important;
	}
}

body.vre-editorial-target {
	min-width: 0;
	overflow-x: clip;
	background: var(--vre-paper);
	color: var(--vre-body);
	font-family: var(--vre-body-font);
	font-size: 16px;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}

/* Historic Bootstrap shells reserve 74px for their removed fixed header.
 * The injected canonical header occupies normal flow, so that reservation
 * must be cancelled to keep the 73px header flush with the top edge just as
 * on the Sexualstrafrecht reference page. */
body.vre-editorial-target:has(.vre-sitehead) {
	padding-top: 0 !important;
}

body.vre-editorial-target,
body.vre-editorial-target *,
body.vre-editorial-target *::before,
body.vre-editorial-target *::after {
	box-sizing: border-box;
}

body.vre-editorial-target img {
	max-width: 100%;
	height: auto;
}

body.vre-editorial-target :where(h1, h2, h3, h4) {
	font-family: var(--vre-display) !important;
	font-weight: 400 !important;
	letter-spacing: -0.025em !important;
	overflow-wrap: anywhere;
}

body.vre-editorial-target :where(.e-con, .elementor-widget, .elementor-widget-container) {
	min-width: 0;
}

body.vre-editorial-target .elementor-heading-title {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

body.vre-editorial-target :where(h1) {
	font-size: var(--vre-h1-size) !important;
	line-height: 0.98 !important;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: auto;
}

body.vre-editorial-target :where(h1) :where(strong, b, small, em) {
	color: inherit !important;
	font: inherit !important;
	letter-spacing: inherit !important;
}

body.vre-editorial-target :where(h2) {
	font-size: var(--vre-h2-size) !important;
	line-height: 1.04 !important;
}

@media (min-width: 768px) and (max-width: 1023px) {
	:root {
		--vre-h2-size: calc(30px + 2.34375vw);
	}
}

@media (min-width: 1024px) and (max-width: 1279px) {
	:root {
		--vre-h1-size: 79.2px;
		--vre-h2-size: calc(42px + 1.171875vw);
	}
}

@media (min-width: 1280px) {
	:root {
		--vre-h1-size: 79.36px;
		--vre-h2-size: 57px;
	}
}

body.vre-editorial-target :where(h3) {
	font-size: clamp(21.45px, 2.32vw, 29.64px) !important;
	line-height: 1.18 !important;
}

body.vre-editorial-target :where(a, button, input, textarea, select, summary):focus-visible,
.vre-mobile-contact a:focus-visible {
	outline: 3px solid var(--vre-lime);
	outline-offset: 3px;
}

body.vre-editorial-target :where(button, .btn, .button, .elementor-button, input[type="submit"]) {
	border-radius: 0 !important;
}

body.vre-editorial-target :where(.card, [class*="card"], input, textarea, select) {
	border-radius: 0 !important;
}

.vre-mobile-contact {
	display: none;
}

/* Canonical 73px header injected only where a historic host shell was removed. */
.vre-sitehead {
	position: relative;
	z-index: 100;
	width: 100%;
	height: 73px;
	min-height: 73px;
	border-bottom: 1px solid var(--vre-border-light);
	background: var(--vre-navy);
	color: var(--vre-white);
}

.vre-sitehead__inner {
	display: flex;
	width: min(calc(100% - 24px), var(--vre-shell));
	height: 73px;
	margin-inline: auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.vre-sitehead__brand,
.vre-sitehead__actions {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 12px;
}

.vre-sitehead .vre-sitehead__brand img {
	display: block;
	width: clamp(150px, 40vw, 184px) !important;
	height: auto !important;
	max-width: 184px !important;
}

.vre-sitehead :where(.vre-sitehead__phone, .vre-sitehead__contact) {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	font-family: var(--vre-body-font);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.vre-sitehead__phone {
	color: var(--vre-white);
}

.vre-sitehead__contact {
	padding: 9px 12px;
	border: 2px solid var(--vre-lime);
	background: var(--vre-lime);
	color: var(--vre-navy);
}

.vre-whatsapp-label {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 9px 12px;
	border: 2px solid var(--vre-navy);
	background: transparent;
	color: var(--vre-navy);
	font: 800 14px/1.2 var(--vre-body-font);
}

.vre-field-label {
	display: block;
	margin-bottom: 8px;
	color: var(--vre-ink);
	font: 700 16px/1.35 var(--vre-body-font);
}

body.vre-editorial-target :where(
	a.brand,
	a.site-title,
	a.vr-sitehead__brand,
	a.vre-sitehead__brand,
	.header-phone,
	.vr-sitehead__phone,
	.header-actions a,
	.header-actions button,
	.navbar-toggler
) {
	min-width: 44px !important;
	min-height: 44px !important;
	align-items: center;
	justify-content: center;
}

/* Enforce the two-font, square-component system inside editorial content only.
 * The shared global footer remains untouched because it is part of the current
 * Sexualstrafrecht reference baseline rather than this page adapter. */
body.vre-editorial-target :where(
	.elementor:not(.elementor-location-header),
	#mainTemplate,
	.consumer-landing,
	.team-page,
	main.vrj,
	#vr-rid-page,
	#vr-kpcg-page,
	#vr-arbeitsrecht-page
) :where(p, li, a, label, input, textarea, select, button, summary, small, span) {
	font-family: var(--vre-body-font) !important;
}

body.vre-editorial-target :where(
	.elementor:not(.elementor-location-header),
	#mainTemplate,
	.consumer-landing,
	.team-page,
	main.vrj,
	#vr-rid-page,
	#vr-kpcg-page,
	#vr-arbeitsrecht-page
) :where(div, section, article, aside, details, summary, a, img, form, fieldset, input, textarea, select, button, span) {
	border-radius: 0 !important;
}

body.vre-editorial-target :where(
	.elementor:not(.elementor-location-header),
	#mainTemplate,
	.consumer-landing,
	.team-page,
	main.vrj,
	#vr-rid-page,
	#vr-kpcg-page,
	#vr-arbeitsrecht-page
) i[class*="fa-"] {
	display: none !important;
}

@media (max-width: 767px) {
	.vre-sitehead,
	.vre-sitehead__inner {
		height: 58px;
		min-height: 58px;
	}

	.vre-sitehead .vre-sitehead__brand img {
		width: 120px !important;
		max-width: 120px !important;
	}

	.vre-sitehead__phone {
		display: inline-flex !important;
		min-height: 44px !important;
		font-size: 11.04px !important;
	}

	.vre-sitehead__contact {
		display: none !important;
	}

	body.vre-has-mobile-contact,
	body:has(.vre-mobile-contact),
	body.vre-editorial-target:has(.mobile-contact-bar),
	body.vre-editorial-target:has(.vr-mobile-contact),
	body.vre-editorial-target:has(.vrk-mobile-contact-bar) {
		padding-bottom: 49px !important;
	}

	.vre-mobile-contact {
		position: fixed;
		z-index: 1000;
		right: 0;
		bottom: 0;
		left: 0;
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		height: 49px;
		background: var(--vre-navy);
		box-shadow: 0 -8px 22px rgba(6, 27, 44, 0.2);
	}

	.vre-mobile-contact a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 0;
		padding: 6px;
		border-right: 1px solid rgba(255, 255, 255, 0.18);
		color: var(--vre-white);
		font: 800 11px/1.2 var(--vre-body-font);
		text-align: center;
		text-decoration: none;
	}

	.vre-mobile-contact a:first-child {
		background: var(--vre-lime);
		color: var(--vre-navy);
	}

	/* Keep Borlabs reachable without allowing its 72px launcher to cover the
	 * first, most urgent action in the 49px contact bar. */
	body.vre-has-mobile-contact .brlbs-cmpnt-widget.brlbs-bottom-0 {
		bottom: calc(57px + env(safe-area-inset-bottom)) !important;
	}
}

/* The reference footer is shared and intentionally not visually restyled.
 * Only enlarge the interactive boxes of its standalone controls. */
body.vre-editorial-target #vr-global-footer :where(button, .vrg-cookie-settings) {
	min-height: 44px;
}

body.vre-editorial-target #vr-global-footer .ginput_container_consent label {
	display: flex;
	min-height: 44px;
	align-items: flex-start;
}

/* Radio and checkbox inputs may remain visually compact; their labels carry
 * the accessible target size on the historic forms. */
body.vre-editorial-target :where(
	.elementor-field-type-radio .elementor-field-option,
	.elementor-field-type-checkbox .elementor-field-option,
	.elementor-field-type-acceptance .elementor-field-option
) label {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
}

@media (prefers-reduced-motion: reduce) {
	body.vre-editorial-target *,
	body.vre-editorial-target *::before,
	body.vre-editorial-target *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
