/**
 * WESMOVE Theme Styles
 *
 * Bewusst schlank gehalten. Farben, Abstaende und Typografie der einzelnen
 * Sektionen werden in Elementor gepflegt - hier stehen nur:
 *   1. Design-Tokens (als CSS-Variablen)
 *   2. Basis-Reset und Grundtypografie
 *   3. Fixierter Header / Hero-Verhalten
 *   4. Styles fuer die beiden Theme-Widgets (Navigation, Formular)
 *   5. Kleine Helfer-Klassen, die in Elementor unter "CSS-Klassen" gesetzt werden
 */

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

:root {
	/* Marke */
	--wm-navy: #151c27;
	--wm-navy-soft: #7d8493;
	--wm-gold: #755a30;
	--wm-gold-light: #ffddb0;
	--wm-gold-dim: #e5c18e;
	--wm-gold-ink: #291800;

	/* Blau-Grau (Text auf dunklem Grund) */
	--wm-blue-pale: #dce2f3;
	--wm-blue-dim: #c0c6d6;

	/* Flaechen */
	--wm-surface: #fbf9f8;
	--wm-surface-lowest: #ffffff;
	--wm-surface-low: #f5f3f3;
	--wm-surface-container: #efeded;
	--wm-surface-high: #eae8e7;
	--wm-surface-highest: #e4e2e2;

	/* Text und Linien */
	--wm-ink: #1b1c1c;
	--wm-ink-soft: #45474c;
	--wm-outline: #76777c;
	--wm-outline-variant: #c6c6cc;

	/* Schrift */
	--wm-font-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
	--wm-font-body: "Inter", "Segoe UI", system-ui, sans-serif;

	/* Layout */
	--wm-container: 1280px;
	--wm-gutter: 24px;
	--wm-radius: 12px;

	/* Wird per JS auf die tatsaechliche Header-Hoehe gesetzt. */
	--wm-header-h: 80px;
}

/* -------------------------------------------------------------------------
 * 2. Basis
 * ---------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--wm-header-h) + 16px);
}

body {
	margin: 0;
	background-color: var(--wm-surface);
	color: var(--wm-ink);
	font-family: var(--wm-font-body);
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--wm-font-head);
	color: var(--wm-navy);
	margin: 0;
}

p {
	margin: 0 0 1em;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--wm-gold);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Sichtbarer Fokus fuer Tastatur-Navigation. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--wm-gold-dim);
	outline-offset: 2px;
}

.wm-screen-reader-text,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wm-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--wm-navy);
	color: #fff;
	font-family: var(--wm-font-body);
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	transition: top 0.2s ease;
}

.wm-skip-link:focus {
	top: 16px;
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * 3. Grundgeruest: Header, Main, Footer
 * ---------------------------------------------------------------------- */

.wm-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 500;
}

/*
 * Hintergrund und Schatten kommen aus der Elementor-Vorlage und bleiben damit
 * editierbar. Nur wenn keine Vorlage gerendert wurde, springt das Theme ein.
 */
.wm-site-header:has(.wm-fallback),
.wm-site-footer:has(.wm-fallback) {
	background-color: var(--wm-navy);
}

.wm-site-header:has(.wm-fallback) {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.admin-bar .wm-site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .wm-site-header {
		top: 46px;
	}
}

/* Standard: Inhalt beginnt unter dem fixierten Header. */
.wm-site-main {
	padding-top: var(--wm-header-h);
}

/*
 * Seiten, deren erste Sektion die CSS-Klasse "wm-hero" traegt, laufen bewusst
 * unter den Header (Bild reicht bis ganz nach oben). Der Header-Abstand steckt
 * dann im Innenabstand der Hero-Sektion und bleibt in Elementor editierbar.
 */
.wm-site-main:has(.wm-hero) {
	padding-top: 0;
}

/* Fallback fuer Browser ohne :has() - Hero zieht sich selbst nach oben. */
@supports not selector(:has(*)) {
	.wm-hero {
		margin-top: calc(-1 * var(--wm-header-h));
	}
}

/* Elementor-Standardabstand zwischen Widgets neutralisieren -
   Abstaende steuern wir bewusst ueber die Container. */
.wm-site-main .elementor-widget:not(:last-child) {
	margin-block-end: 0;
}

/* -------------------------------------------------------------------------
 * 4. Fallback-Header/Footer (nur aktiv, solange keine Elementor-Vorlage
 *    zugewiesen ist - z. B. direkt nach der Theme-Aktivierung)
 * ---------------------------------------------------------------------- */

.wm-fallback {
	max-width: var(--wm-container);
	margin: 0 auto;
	padding: 0 var(--wm-gutter);
	min-height: 80px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.wm-fallback__brand {
	display: flex;
	align-items: center;
	gap: 16px;
	color: #fff;
	font-family: var(--wm-font-head);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.wm-fallback__brand img {
	height: 32px;
	width: auto;
}

.wm-fallback ul {
	display: flex;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wm-fallback a {
	color: var(--wm-blue-pale);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
}

.wm-fallback a:hover {
	color: #fff;
}

.wm-fallback--footer {
	min-height: 0;
	padding-block: 48px;
	color: var(--wm-blue-pale);
	font-size: 14px;
}

/* Einfache Textseiten (404, Suche, Seiten ohne Elementor). */
.wm-page {
	max-width: var(--wm-container);
	margin: 0 auto;
	padding: 80px var(--wm-gutter) 120px;
}

.wm-page--center {
	max-width: 720px;
	text-align: center;
}

.wm-page__eyebrow {
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wm-gold);
	margin-bottom: 16px;
}

.wm-page__title {
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 32px;
}

.wm-page__content {
	max-width: 70ch;
	color: var(--wm-ink-soft);
	font-size: 18px;
	line-height: 28px;
}

.wm-page--center .wm-page__content {
	margin: 0 auto;
}

.wm-page__button {
	display: inline-block;
	margin-top: 16px;
	padding: 16px 32px;
	background: var(--wm-gold);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 2px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wm-page__button:hover {
	background: var(--wm-gold-light);
	color: var(--wm-gold-ink);
	text-decoration: none;
}

.wm-teaser {
	padding-bottom: 32px;
	margin-bottom: 32px;
	border-bottom: 1px solid var(--wm-outline-variant);
}

.wm-teaser__title {
	font-size: 24px;
	line-height: 32px;
	margin-bottom: 8px;
}

/* -------------------------------------------------------------------------
 * 5. Widget: WESMOVE Navigation
 * ---------------------------------------------------------------------- */

.wm-nav {
	display: flex;
	align-items: center;
}

.wm-nav__list {
	display: flex;
	align-items: center;
	gap: var(--wm-nav-gap, 32px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.wm-nav__list li {
	margin: 0;
	position: relative;
}

.wm-nav__list a {
	display: block;
	padding: 8px 0;
	color: var(--wm-nav-color, #dce2f3);
	font-family: var(--wm-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.05em;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.wm-nav__list a:hover,
.wm-nav__list a:focus {
	color: var(--wm-nav-color-hover, #ffffff);
	text-decoration: none;
}

.wm-nav__list .current-menu-item > a,
.wm-nav__list .current_page_item > a,
.wm-nav__list .current-menu-ancestor > a {
	color: var(--wm-nav-color-active, #ffddb0);
	border-bottom-color: var(--wm-nav-color-active, #ffddb0);
	font-weight: 700;
}

/* Untermenues - simpel gehalten, aber vorhanden. */
.wm-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: var(--wm-navy);
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.wm-nav__list li:hover > .sub-menu,
.wm-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wm-nav__list .sub-menu a {
	padding: 8px 20px;
	border-bottom: 0;
}

/* Burger-Button */
.wm-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--wm-nav-toggle-color, #ffffff);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.wm-nav__toggle .wm-icon {
	font-size: 28px;
}

.wm-nav__toggle-close {
	display: none;
}

.wm-nav[data-open="true"] .wm-nav__toggle-open {
	display: none;
}

.wm-nav[data-open="true"] .wm-nav__toggle-close {
	display: inline-block;
}

/* Mobile Panel */
@media (max-width: 1024px) {
	.wm-nav--collapse-tablet .wm-nav__toggle {
		display: inline-flex;
	}

	.wm-nav--collapse-tablet .wm-nav__list {
		position: fixed;
		top: var(--wm-header-h);
		left: 0;
		right: 0;
		max-height: calc(100vh - var(--wm-header-h));
		overflow-y: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 24px 32px;
		background: var(--wm-nav-panel-bg, #151c27);
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.admin-bar .wm-nav--collapse-tablet .wm-nav__list {
		top: calc(var(--wm-header-h) + 32px);
	}

	.wm-nav--collapse-tablet[data-open="true"] .wm-nav__list {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.wm-nav--collapse-tablet .wm-nav__list a {
		padding: 16px 0;
		font-size: 16px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.wm-nav--collapse-tablet .wm-nav__list .current-menu-item > a {
		border-bottom-color: var(--wm-nav-color-active, #ffddb0);
	}

	.wm-nav--collapse-tablet .wm-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		padding: 0 0 0 16px;
	}
}

@media (max-width: 767px) {
	.wm-nav--collapse-mobile .wm-nav__toggle {
		display: inline-flex;
	}
}

@media (min-width: 1025px) {
	.wm-nav--collapse-mobile .wm-nav__toggle,
	.wm-nav--collapse-tablet .wm-nav__toggle {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * 6. Widget: WESMOVE Formular
 * ---------------------------------------------------------------------- */

.wm-form__grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wm-form-gap, 16px);
}

.wm-form__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 100%;
	min-width: 0;
}

.wm-form__field--half {
	flex: 1 1 calc(50% - (var(--wm-form-gap, 16px) / 2));
}

@media (max-width: 767px) {
	.wm-form__field--half {
		flex: 1 1 100%;
	}
}

.wm-form__label {
	font-family: var(--wm-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.05em;
	color: var(--wm-form-label, #dce2f3);
}

.wm-form__input,
.wm-form__textarea,
.wm-form__select {
	width: 100%;
	padding: var(--wm-form-input-padding, 12px);
	font-family: var(--wm-font-body);
	font-size: 16px;
	line-height: 24px;
	color: var(--wm-form-input-color, #ffffff);
	background-color: var(--wm-form-input-bg, transparent);
	border: 1px solid var(--wm-form-input-border, rgba(118, 119, 124, 0.3));
	border-radius: var(--wm-form-radius, 2px);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wm-form__textarea {
	min-height: 120px;
	resize: vertical;
}

.wm-form__input::placeholder,
.wm-form__textarea::placeholder {
	color: var(--wm-form-input-color, #ffffff);
	opacity: 0.45;
}

.wm-form__input:focus,
.wm-form__textarea:focus,
.wm-form__select:focus {
	outline: none;
	border-color: var(--wm-form-input-focus, #755a30);
	box-shadow: 0 0 0 1px var(--wm-form-input-focus, #755a30);
}

/* Datumsfeld auf dunklem Grund lesbar halten. */
.wm-form__input[type="date"] {
	color-scheme: dark;
}

.wm-form--light .wm-form__input[type="date"] {
	color-scheme: light;
}

.wm-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 8px;
	flex: 1 1 100%;
}

.wm-form__consent input {
	width: 16px;
	height: 16px;
	margin: 4px 0 0;
	accent-color: var(--wm-form-input-focus, #755a30);
	flex-shrink: 0;
}

.wm-form__consent label {
	font-family: var(--wm-font-body);
	font-size: 14px;
	line-height: 20px;
	color: var(--wm-form-consent, #c0c6d6);
	cursor: pointer;
}

.wm-form__consent a {
	color: inherit;
	text-decoration: underline;
}

/* Honeypot - nur fuer Bots sichtbar. */
.wm-form__trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wm-form__actions {
	margin-top: 24px;
}

.wm-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: var(--wm-form-btn-padding, 16px 32px);
	font-family: var(--wm-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wm-form-btn-color, #ffffff);
	background-color: var(--wm-form-btn-bg, #755a30);
	border: 0;
	border-radius: var(--wm-form-radius, 2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wm-form__submit:hover:not([disabled]) {
	background-color: var(--wm-form-btn-bg-hover, #ffddb0);
	color: var(--wm-form-btn-color-hover, #291800);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.wm-form__submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.wm-form--full-button .wm-form__submit {
	width: 100%;
}

@media (max-width: 767px) {
	.wm-form__submit {
		width: 100%;
	}
}

.wm-form__message {
	margin-top: 20px;
	padding: 14px 18px;
	border-radius: var(--wm-form-radius, 2px);
	font-size: 15px;
	line-height: 22px;
}

.wm-form__message[hidden] {
	display: none;
}

.wm-form__message--success {
	background-color: rgba(117, 90, 48, 0.15);
	border: 1px solid var(--wm-gold-dim);
	color: var(--wm-form-success, #ffddb0);
}

.wm-form__message--error {
	background-color: rgba(186, 26, 26, 0.12);
	border: 1px solid #ba1a1a;
	color: var(--wm-form-error, #ffb4ab);
}

.wm-form__field--invalid .wm-form__input,
.wm-form__field--invalid .wm-form__textarea {
	border-color: #ba1a1a;
}

/* -------------------------------------------------------------------------
 * 7. Helfer-Klassen fuer Elementor ("Erweitert -> CSS-Klassen")
 * ---------------------------------------------------------------------- */

/* Karte mit weichem Schatten-Hover. */
.wm-card {
	transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.wm-card:hover {
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Verbindungslinie hinter den vier Ablauf-Schritten. */
.wm-steps {
	position: relative;
}

.wm-steps::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	background: rgba(198, 198, 204, 0.3);
	transform: translateY(-50%);
	z-index: 0;
}

.wm-steps > .e-con,
.wm-steps > .elementor-element {
	position: relative;
	z-index: 1;
}

@media (max-width: 1024px) {
	.wm-steps::before {
		display: none;
	}
}

/*
 * Bild-Kachel der Referenzen-Galerie.
 * Die Kacheln nutzen Hintergrundbilder, deshalb reagiert die ganze Kachel -
 * sie hebt sich leicht an und wird eine Spur heller.
 */
.wm-zoom {
	overflow: hidden;
	transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
}

.wm-zoom:hover {
	transform: translateY(-4px);
	filter: brightness(1.06);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: reduce) {
	.wm-zoom,
	.wm-card,
	.wm-corner::after {
		transition: none;
	}

	.wm-zoom:hover {
		transform: none;
	}
}

/* Ecken-Akzent oben rechts auf Karten. */
.wm-corner {
	position: relative;
	overflow: hidden;
}

.wm-corner::after {
	content: "";
	position: absolute;
	top: -32px;
	right: -32px;
	width: 128px;
	height: 128px;
	border-bottom-left-radius: 100%;
	background: rgba(117, 90, 48, 0.05);
	transition: transform 0.3s ease;
	pointer-events: none;
}

.wm-corner:hover::after {
	transform: scale(1.1);
}

/* Goldener Trennstrich unter zentrierten Ueberschriften. */
.wm-rule {
	width: 64px;
	height: 4px;
	background: var(--wm-gold);
	margin: 0 auto;
}

/* Pfeil im Button leicht nach rechts schieben. */
.wm-arrow .elementor-button:hover .elementor-button-icon {
	transform: translateX(4px);
}

.wm-arrow .elementor-button-icon {
	transition: transform 0.2s ease;
}

/* Vertikaler Trenner zwischen den Hero-Merkmalen. */
.wm-divider-y {
	width: 1px;
	align-self: stretch;
	background: rgba(198, 198, 204, 0.3);
}

@media (max-width: 767px) {
	.wm-divider-y {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * 8. Drucken
 * ---------------------------------------------------------------------- */

@media print {
	.wm-site-header,
	.wm-site-footer,
	.wm-nav__toggle {
		display: none !important;
	}

	.wm-site-main {
		padding-top: 0;
	}
}
