/*!
 * LGnet Elementor Widget
 * ---------------------------------------------------------------------------
 * This file is the "pre-styled" layer. Every widget renders correctly the
 * moment it is dropped on a page, with no configuration.
 *
 * Colours and font families are read from the site's Elementor Global Kit
 * (elementor-kit-437) through its CSS custom properties, each with a hard
 * fallback. A brand change in Site Settings therefore propagates here on its
 * own, and the widgets still look right if the kit is ever missing.
 *
 * Elementor's own controls always win: a value set in the panel is emitted as
 * `.elementor-element-xxxx .lgw-...`, which outranks everything below.
 * Element resets use :where() so they carry zero specificity and never fight
 * the panel or the theme.
 */

/* ---------------------------------------------------------------------------
 * 1. Tokens
 * ------------------------------------------------------------------------ */

.lgw {
	/* Colours — mapped to the LGnet global kit. */
	--lgw-navy: var(--e-global-color-primary, #0A0E1A);
	--lgw-navy-hover: var(--e-global-color-c-ink-700, #1C2436);
	--lgw-yellow: var(--e-global-color-secondary, #F2C94C);
	--lgw-yellow-hover: var(--e-global-color-c-accent-hover, #E3B838);
	--lgw-text: var(--e-global-color-text, #4A5468);
	--lgw-link: var(--e-global-color-accent, #0057FF);
	--lgw-link-hover: var(--e-global-color-c-link-hover, #0043C7);
	--lgw-muted: var(--e-global-color-c-muted-2, #77839A);
	--lgw-label: var(--e-global-color-c-muted-3, #8D9AB4);
	--lgw-line: var(--e-global-color-c-border, #E4E8F0);
	--lgw-surface: var(--e-global-color-c-surface, #F6F8FC);
	--lgw-on-dark: var(--e-global-color-c-on-dark-1, #C9D3E6);
	--lgw-white: var(--e-global-color-c-white, #FFFFFF);
	--lgw-cta-text: #3D3A2C;

	/* Font families — from the kit, so a font swap in Site Settings carries. */
	--lgw-font-head: var(--e-global-typography-t-h2-section-font-family, "Archivo","Archivo Fallback"), system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--lgw-font-body: var(--e-global-typography-t-body-font-family, "Public Sans","Public Sans Fallback"), system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

	/* Shape */
	--lgw-radius-card: 22px;
	--lgw-radius-box: 20px;

	/* Layout defaults, overridden by the panel controls. */
	--lgw-hero-gap: 64px;
	--lgw-strip-cols: 4;
	--lgw-toc-cols: 3;
	--lgw-row-label: 260px;
	--lgw-row-gap: 40px;
	--lgw-anchor-offset: 120px;

	font-family: var(--lgw-font-body);
	color: var(--lgw-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.lgw,
.lgw *,
.lgw *::before,
.lgw *::after {
	box-sizing: border-box;
}

/* Zero-specificity resets: the theme loses, the Elementor panel wins. */
.lgw :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, blockquote) {
	margin: 0;
	padding: 0;
}

.lgw :where(h1, h2, h3, h4, h5, h6) {
	font-family: var(--lgw-font-head);
	color: var(--lgw-navy);
	line-height: 1.1;
	letter-spacing: -0.02em;
	/* Long German compounds ("Datenschutzerklärung") must not widen the page. */
	overflow-wrap: break-word;
}

.lgw :where(a) {
	color: inherit;
}

.lgw :where(ul, ol) {
	padding-inline-start: 20px;
}

.lgw-wrap {
	max-width: 1160px;
	margin-inline: auto;
	padding-inline: 20px;
}

/* Shared focus ring. */
.lgw a:focus-visible,
.lgw button:focus-visible {
	outline: 3px solid var(--lgw-yellow);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Opt-in smooth scrolling, only on pages that render a table of contents. */
@media (prefers-reduced-motion: no-preference) {
	html:has(.lgw-toc--smooth) {
		scroll-behavior: smooth;
	}
}

/* ---------------------------------------------------------------------------
 * 2. Hero
 * ------------------------------------------------------------------------ */

.lgw-hero {
	padding: 110px 0 90px;
}

.lgw-hero .lgw-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: var(--lgw-hero-gap);
	align-items: center;
}

.lgw-hero--single .lgw-wrap {
	grid-template-columns: minmax(0, 1fr);
}

.lgw-hero__title {
	/* Ramps roughly along the kit's t-h1-hero scale (30 / 47 / 60) while
	   staying within the design's 49.6px ceiling. */
	font-size: clamp(1.75rem, 3.4vw + 0.6rem, 3.1rem);
	font-weight: 700;
	margin-bottom: 22px;
}

.lgw-hero__text {
	font-size: 1.12rem;
	max-width: 34em;
}

.lgw-hero__actions {
	display: flex;
	align-items: center;
	gap: 30px;
	flex-wrap: wrap;
	margin-top: 34px;
}

.lgw-hero__actions:empty {
	display: none;
}

/* Hotline */
.lgw-hotline {
	text-decoration: none;
	display: inline-flex;
	flex-direction: column;
	line-height: 1.2;
}

.lgw-hotline__num {
	font-family: var(--lgw-font-head);
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--lgw-navy);
	display: flex;
	align-items: center;
	gap: 10px;
	letter-spacing: -0.01em;
}

.lgw-hotline__num::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--lgw-yellow);
}

.lgw-hotline--nodot .lgw-hotline__num::before {
	display: none;
}

.lgw-hotline__label {
	font-size: 0.8rem;
	color: var(--lgw-muted);
	padding-left: 17px;
	margin-top: 4px;
}

.lgw-hotline--nodot .lgw-hotline__label {
	padding-left: 0;
}

/* Button */
.lgw-btn {
	display: inline-block;
	background: var(--lgw-navy);
	color: var(--lgw-white);
	text-decoration: none;
	font-family: var(--lgw-font-body);
	font-weight: 600;
	font-size: 1rem;
	padding: 13px 24px;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease;
}

.lgw-btn:hover,
.lgw-btn:focus {
	background: var(--lgw-navy-hover);
	color: var(--lgw-white);
}

/* ---------------------------------------------------------------------------
 * 3. Business card with the offset yellow frame
 * ------------------------------------------------------------------------ */

.lgw-cardframe {
	position: relative;
	padding: 0 0 14px 14px;
	--lgw-frame-offset: 14px;
	--lgw-frame-width: 30%;
}

.lgw-cardframe::before {
	content: "";
	position: absolute;
	left: 0;
	top: var(--lgw-frame-offset);
	width: var(--lgw-frame-width);
	height: calc(100% - var(--lgw-frame-offset));
	background: var(--lgw-yellow);
	border-radius: var(--lgw-radius-card);
}

.lgw-cardframe--plain {
	padding: 0;
}

.lgw-cardframe--plain::before {
	display: none;
}

.lgw-card {
	position: relative;
	background: var(--lgw-navy);
	color: var(--lgw-on-dark);
	border-radius: var(--lgw-radius-card);
	padding: 42px 44px;
}

.lgw-card__title {
	color: var(--lgw-white);
	font-size: 1.9rem;
	margin-bottom: 28px;
}

.lgw-card__title--withintro {
	font-size: 1.5rem;
	margin-bottom: 8px;
}

.lgw-card__intro {
	font-size: 0.95rem;
	margin-bottom: 26px;
}

.lgw-card__list {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px 28px;
	font-size: 0.98rem;
}

.lgw-card__term {
	color: var(--lgw-label);
}

.lgw-card__desc {
	color: var(--lgw-white);
	margin-inline-start: 0;
	overflow-wrap: break-word;
}

.lgw-card__desc a {
	text-decoration: none;
}

.lgw-card__desc a:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------------------------
 * 4. Contact strip
 * ------------------------------------------------------------------------ */

.lgw-strip {
	border-top: 1px solid var(--lgw-line);
	padding: 44px 0;
}

.lgw-strip .lgw-wrap {
	display: grid;
	grid-template-columns: repeat(var(--lgw-strip-cols), minmax(0, 1fr));
	gap: 28px;
}

.lgw-strip__primary {
	display: block;
	color: var(--lgw-navy);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	overflow-wrap: break-word;
}

a.lgw-strip__primary:hover {
	color: var(--lgw-link-hover);
}

.lgw-strip__secondary {
	display: block;
	font-size: 0.85rem;
	color: var(--lgw-muted);
	margin-top: 2px;
	overflow-wrap: break-word;
}

/* ---------------------------------------------------------------------------
 * 5. Table of contents (generated from the section titles)
 * ------------------------------------------------------------------------ */

.lgw-toc {
	border-top: 1px solid var(--lgw-line);
	border-bottom: 1px solid var(--lgw-line);
	padding: 34px 0;
}

.lgw-toc__title {
	font-size: 1rem;
	margin-bottom: 14px;
}

.lgw-toc__list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(var(--lgw-toc-cols), minmax(0, 1fr));
	gap: 8px 28px;
	counter-reset: lgwtoc;
	padding-inline-start: 0;
}

.lgw-toc__item {
	counter-increment: lgwtoc;
	font-size: 0.92rem;
	display: flex;
	gap: 8px;
}

.lgw-toc--numbered .lgw-toc__item::before {
	content: counter(lgwtoc) ".";
	color: var(--lgw-muted);
	flex: none;
	font-variant-numeric: tabular-nums;
}

.lgw-toc__link {
	text-decoration: none;
	color: var(--lgw-navy);
	overflow-wrap: break-word;
}

.lgw-toc__link:hover {
	color: var(--lgw-navy);
	text-decoration: underline;
	text-decoration-color: var(--lgw-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * 6. Legal content rows
 * ------------------------------------------------------------------------ */

.lgw-legal {
	padding: 80px 0 110px;
}

.lgw-legal__head {
	max-width: 40em;
	margin-bottom: 44px;
}

.lgw-legal__title {
	font-size: clamp(2rem, 3.4vw, 2.6rem);
	margin-bottom: 14px;
}

.lgw-legal__sub {
	font-size: 1.02rem;
}

.lgw-box {
	background: var(--lgw-surface);
	border: 1px solid var(--lgw-line);
	border-radius: var(--lgw-radius-box);
	padding: 12px 40px;
}

.lgw-box--plain {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
}

.lgw-row {
	display: grid;
	grid-template-columns: var(--lgw-row-label) minmax(0, 1fr);
	gap: var(--lgw-row-gap);
	padding: 30px 0;
	border-bottom: 1px solid var(--lgw-line);
	scroll-margin-top: var(--lgw-anchor-offset);
}

.lgw-row:last-child {
	border-bottom: 0;
}

.lgw-row__title {
	font-size: 1.12rem;
	font-weight: 700;
}

.lgw-row__content > :where(p, ul, ol) {
	max-width: 64ch;
}

.lgw-row__content :where(p + p),
.lgw-row__content :where(p + ul),
.lgw-row__content :where(p + ol) {
	margin-top: 10px;
}

.lgw-row__content :where(h4, h5, h6) {
	font-size: 0.98rem;
	font-weight: 600;
	margin: 22px 0 6px;
}

.lgw-row__content :where(:first-child) {
	margin-top: 0;
}

.lgw-row__content :where(ul, ol) {
	padding-inline-start: 20px;
	margin-top: 8px;
}

.lgw-row__content :where(li + li) {
	margin-top: 4px;
}

.lgw-row__content a {
	color: var(--lgw-navy);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--lgw-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	overflow-wrap: break-word;
}

.lgw-row__content a:hover {
	text-decoration-color: currentColor;
}

.lgw-row__note {
	margin-top: 28px;
	font-size: 0.9rem;
	color: var(--lgw-muted);
}

/* ---------------------------------------------------------------------------
 * 7. CTA band
 * ------------------------------------------------------------------------ */

.lgw-cta {
	background: var(--lgw-yellow);
	padding: 110px 0;
}

.lgw-cta .lgw-wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
}

.lgw-cta__title {
	font-size: clamp(1.9rem, 3.4vw, 2.6rem);
	margin-bottom: 16px;
}

.lgw-cta__text {
	color: var(--lgw-cta-text);
	max-width: 38em;
	font-size: 0.98rem;
}

.lgw-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--lgw-navy);
	color: var(--lgw-white);
	text-decoration: none;
	font-family: var(--lgw-font-head);
	font-weight: 700;
	font-size: 1.1rem;
	padding: 12px 24px;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease;
}

.lgw-pill::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--lgw-yellow);
}

.lgw-pill--nodot::before {
	display: none;
}

.lgw-pill:hover,
.lgw-pill:focus {
	background: var(--lgw-navy-hover);
	color: var(--lgw-white);
}

/* ---------------------------------------------------------------------------
 * 8. Links
 *
 * A theme kit styles links as `.elementor-kit-### a` (0,1,1) and
 * `.elementor-kit-### a:hover` (0,2,1), which out-ranks a plain component
 * class. Every link colour therefore lives here, prefixed with .lgw so it
 * clears those selectors.
 *
 * The declarations read a custom property; the Elementor controls SET that
 * property rather than `color`. A panel value can then never lose a
 * specificity race against this file, whatever order the stylesheets load in.
 * ------------------------------------------------------------------------ */

.lgw a.lgw-hotline {
	color: inherit;
}

/* Business card — links follow the value colour unless given their own. */
.lgw .lgw-card__desc a {
	color: var(--lgw-card-link, inherit);
}

.lgw .lgw-card__desc a:hover,
.lgw .lgw-card__desc a:focus {
	color: var(--lgw-card-link-hover, var(--lgw-card-link, inherit));
}

/* Contact strip */
.lgw .lgw-strip__primary {
	color: var(--lgw-strip-primary, var(--lgw-navy));
}

.lgw a.lgw-strip__primary:hover,
.lgw a.lgw-strip__primary:focus {
	color: var(--lgw-strip-primary-hover, var(--lgw-link-hover));
}

/* Table of contents */
.lgw .lgw-toc__link {
	color: var(--lgw-toc-link, var(--lgw-navy));
}

.lgw .lgw-toc__link:hover,
.lgw .lgw-toc__link:focus {
	color: var(--lgw-toc-link-hover, var(--lgw-toc-link, var(--lgw-navy)));
}

/* Legal body copy */
.lgw .lgw-row__content a {
	color: var(--lgw-row-link, var(--lgw-navy));
}

/* Pill and button — only when rendered as a link; as a <span> the component
   rule above already applies. */
.lgw a.lgw-btn {
	color: var(--lgw-btn-color, var(--lgw-white));
}

.lgw a.lgw-btn:hover,
.lgw a.lgw-btn:focus {
	color: var(--lgw-btn-color-hover, var(--lgw-btn-color, var(--lgw-white)));
}

.lgw a.lgw-pill {
	color: var(--lgw-pill-color, var(--lgw-white));
}

.lgw a.lgw-pill:hover,
.lgw a.lgw-pill:focus {
	color: var(--lgw-pill-color-hover, var(--lgw-pill-color, var(--lgw-white)));
}

/* ---------------------------------------------------------------------------
 * 9. Responsive
 *
 * Breakpoints mirror the site's Elementor breakpoints (tablet 900, mobile 600),
 * so the fallback here and Elementor's generated rules agree. Controls that
 * need to change per device carry tablet_default / mobile_default, so Elementor
 * emits its own, higher-specificity rules and these stay a safety net.
 * ------------------------------------------------------------------------ */

@media (max-width: 900px) {
	.lgw {
		--lgw-strip-cols: 2;
		--lgw-toc-cols: 2;
	}

	.lgw-hero .lgw-wrap {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.lgw-hero {
		padding: 70px 0 60px;
	}

	.lgw-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}
}

@media (max-width: 600px) {
	.lgw {
		--lgw-strip-cols: 1;
		--lgw-toc-cols: 1;
	}

	.lgw-card {
		padding: 32px 26px;
	}

	.lgw-card__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}

	.lgw-card__desc {
		margin-bottom: 12px;
	}

	.lgw-card__desc:last-child {
		margin-bottom: 0;
	}

	.lgw-box {
		padding: 4px 22px;
	}

	.lgw-cta {
		padding: 70px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lgw * {
		transition: none !important;
	}
}
