/* ==========================================================================
   M34 Kontakt – Figma 49:691 / 50:572
   Figma: form 580 | contact column 540 (from x 780).
   ========================================================================== */

section.m34_kontakt .m34_body {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	padding-top: 64px;
}

section.m34_kontakt .m34_col_formular {
	flex: 0 1 580px;
	min-width: 0;
}

section.m34_kontakt .m34_col_kontakt {
	display: flex;
	flex-direction: column;
	gap: 24px;
	flex: 0 1 540px;
	min-width: 0;
}

section.m34_kontakt p {
	margin: 0;
}

/* ---------- Contact Form 7 ---------- */
section.m34_kontakt .wpcf7 form {
	display: flex;
	flex-direction: column;
	margin: 0;
}

section.m34_kontakt .m34_field + .m34_field {
	padding-top: 24px;
}

section.m34_kontakt .m34_field label {
	display: block;
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--btw_grau);
}

section.m34_kontakt .wpcf7-form-control-wrap {
	display: block;
	margin-top: 8px;
}

section.m34_kontakt .wpcf7 input[type="text"],
section.m34_kontakt .wpcf7 input[type="email"],
section.m34_kontakt .wpcf7 textarea {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 12px 14px;
	background-color: var(--btw_weiss);
	border: 1px solid var(--btw_hellgrau);
	border-radius: 0;
	box-shadow: none;
	font-family: var(--font_family);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--btw_schwarz);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color var(--btw_speed) var(--btw_ease);
}

section.m34_kontakt .wpcf7 textarea {
	height: 136px;
	resize: vertical;
}

section.m34_kontakt .wpcf7 input:hover,
section.m34_kontakt .wpcf7 textarea:hover {
	border-color: var(--btw_grau);
}

section.m34_kontakt .wpcf7 input:focus-visible,
section.m34_kontakt .wpcf7 textarea:focus-visible {
	border-color: var(--btw_schwarz);
	outline: 2px solid var(--btw_schwarz);
	outline-offset: 0;
}

section.m34_kontakt .wpcf7 .wpcf7-not-valid {
	border-color: var(--btw_schwarz);
}

/* Parent styles the tip as pink alert box – project look: plain text under the field */
section.m34_kontakt .wpcf7 form .wpcf7-not-valid-tip {
	margin: 0;
	padding: 6px 0 0;
	background: none;
	border: 0;
	border-radius: 0;
}

section.m34_kontakt .wpcf7-not-valid-tip {
	display: block;
	padding-top: 6px;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--btw_schwarz);
}

section.m34_kontakt .wpcf7-not-valid-tip::before {
	content: '× ';
}

/* Submit: button look with the sliding surface (input itself cannot hold a pseudo element) */
section.m34_kontakt .m34_submit {
	position: relative;
	z-index: 0;
	display: inline-flex;
	align-self: flex-start;
	margin-top: 24px;
	overflow: hidden;
	background-color: var(--btw_schwarz);
	border: 1px solid var(--btw_schwarz);
}

section.m34_kontakt .m34_submit::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-color: #fff; /* Hover "Invertieren" like all buttons (css/project.css) */
	mix-blend-mode: difference;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--btw_speed) var(--btw_ease);
}

@media (hover: hover) {
	section.m34_kontakt .m34_submit:not(:has(input:disabled)):hover::before {
		transform: scaleX(1);
	}
}

section.m34_kontakt .m34_submit:not(:has(input:disabled)):focus-within::before {
	transform: scaleX(1);
}

/* Disabled until the privacy checkbox is ticked: shown as inactive, no hover */
section.m34_kontakt .m34_submit:has(input:disabled) {
	background-color: var(--btw_linie);
	border-color: var(--btw_linie);
}

section.m34_kontakt .m34_submit:has(input:disabled)::before {
	transform: scaleX(0);
}

section.m34_kontakt .wpcf7 input[type="submit"]:disabled {
	color: var(--btw_grau);
	cursor: not-allowed;
}

section.m34_kontakt .wpcf7 input[type="submit"] {
	height: 46px; /* 48 incl. the 1px border of .m34_submit */
	margin: 0;
	padding: 0 21px;
	background: transparent;
	border: 0;
	border-radius: 0;
	font-family: var(--font_family);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.65;
	color: var(--btw_weiss);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

section.m34_kontakt .wpcf7 input[type="submit"]:focus-visible {
	outline: 2px solid var(--btw_schwarz);
	outline-offset: 3px;
}

section.m34_kontakt .wpcf7-spinner {
	position: absolute;
	right: 12px;
	top: 14px;
	margin: 0;
}

section.m34_kontakt .wpcf7-response-output {
	margin: 16px 0 0 !important; /* CF7 sets inline-like margins in its own markup */
	padding: 12px 16px !important;
	border: 1px solid var(--btw_schwarz) !important;
	font-size: 0.875rem;
	line-height: 1.5;
}

section.m34_kontakt .m34_hinweis_container {
	padding-top: 16px;
	font-size: 0.75rem;
	line-height: 1.65;
}

section.m34_kontakt .m34_hinweis_container,
section.m34_kontakt .m34_hinweis_container p {
	color: var(--btw_grau);
}

section.m34_kontakt .m34_hinweis_container a,
section.m34_kontakt .m34_hinweis_container a:visited,
section.m34_kontakt .m34_hinweis_container a:hover,
section.m34_kontakt .m34_hinweis_container a:focus,
section.m34_kontakt .m34_hinweis_container a:active {
	color: var(--btw_schwarz);
}

/* ---------- Tiles ---------- */
section.m34_kontakt .m34_kacheln_titel {
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--btw_grau);
}

section.m34_kontakt .m34_kacheln {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

section.m34_kontakt .m34_kachel_item {
	margin: 0;
	padding: 0;
}

section.m34_kontakt .m34_kachel_item::before {
	content: none;
}

section.m34_kontakt .m34_kachel,
section.m34_kontakt .m34_kachel:visited,
section.m34_kontakt .m34_kachel:hover,
section.m34_kontakt .m34_kachel:focus,
section.m34_kontakt .m34_kachel:active {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 24px 28px;
	border: 1px dashed var(--btw_hellgrau);
	text-decoration: none;
	color: var(--btw_schwarz);
}

/* Hover: solid frame fades in, arrow moves */
section.m34_kontakt .m34_kachel::after {
	content: '';
	position: absolute;
	inset: -1px;
	border: 1px solid var(--btw_schwarz);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--btw_speed) var(--btw_ease);
}

@media (hover: hover) {
	section.m34_kontakt .m34_kachel:hover::after {
		opacity: 1;
	}

	section.m34_kontakt .m34_kachel:hover .btw_arrow {
		transform: translateX(4px);
	}

	section.m34_kontakt .m34_kachel:hover .btw_arrow--hoch {
		transform: translateY(-4px);
	}
}

section.m34_kontakt .m34_kachel:focus-visible::after {
	opacity: 1;
}

section.m34_kontakt .m34_kachel_titel {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.65;
	letter-spacing: -0.02em;
	color: var(--btw_schwarz);
}

section.m34_kontakt .m34_kachel_text {
	padding-top: 8px;
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--btw_grau);
}

/* ---------- Address ---------- */
section.m34_kontakt .m34_adresse {
	display: flex;
	flex-direction: column;
	font-style: normal;
	font-size: 0.9375rem;
	line-height: 2;
	color: var(--btw_schwarz);
}

section.m34_kontakt .m34_adresse .btw_block_link,
section.m34_kontakt .m34_adresse .btw_block_link:visited,
section.m34_kontakt .m34_adresse .btw_block_link:hover,
section.m34_kontakt .m34_adresse .btw_block_link:focus,
section.m34_kontakt .m34_adresse .btw_block_link:active {
	color: var(--btw_schwarz);
}

@media all and (max-width: 991px) {
	section.m34_kontakt .m34_body {
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
		padding-top: 28px;
	}

	section.m34_kontakt .m34_col_formular,
	section.m34_kontakt .m34_col_kontakt {
		flex: 0 0 auto;
		max-width: 640px;
	}

	/* Figma mobile: tiles first, then the form, address last; no tile heading */
	section.m34_kontakt .m34_kacheln_titel_container {
		display: none;
	}

	section.m34_kontakt .m34_col_kontakt {
		display: contents;
	}

	section.m34_kontakt .m34_kacheln {
		order: 1;
		gap: 14px;
	}

	section.m34_kontakt .m34_col_formular {
		order: 2;
	}

	section.m34_kontakt .m34_adresse {
		order: 3;
		margin-top: -8px;
		font-size: 0.875rem;
		line-height: 1.8;
	}
}

@media all and (max-width: 575px) {
	section.m34_kontakt .m34_field + .m34_field {
		padding-top: 18px;
	}

	section.m34_kontakt .m34_field label {
		font-size: 0.6875rem;
		line-height: 1.5;
	}

	section.m34_kontakt .wpcf7-form-control-wrap {
		margin-top: 6px;
	}

	section.m34_kontakt .wpcf7 textarea {
		height: 120px;
	}

	section.m34_kontakt .m34_submit {
		align-self: stretch;
		margin-top: 18px;
	}

	section.m34_kontakt .wpcf7 input[type="submit"] {
		width: 100%;
		height: 50px;
	}

	section.m34_kontakt .m34_hinweis_container {
		padding-top: 12px;
		font-size: 0.6875rem;
	}

	section.m34_kontakt .m34_kachel,
	section.m34_kontakt .m34_kachel:visited,
	section.m34_kontakt .m34_kachel:hover {
		padding: 20px;
	}

	section.m34_kontakt .m34_kachel_titel {
		font-size: 1.0625rem;
		letter-spacing: 0;
	}

	section.m34_kontakt .m34_kachel_text {
		padding-top: 6px;
		font-size: 0.8125rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	section.m34_kontakt .m34_submit::before,
	section.m34_kontakt .wpcf7-acceptance label::before,
	section.m34_kontakt .wpcf7-acceptance label::after,
	section.m34_kontakt .m34_kachel::after,
	section.m34_kontakt .wpcf7 input,
	section.m34_kontakt .wpcf7 textarea {
		transition: none;
	}
}

/* Privacy consent (always part of the form, also when missing in the design) */
section.m34_kontakt .m34_field--acceptance {
	padding-top: 24px;
}

section.m34_kontakt .wpcf7-acceptance .wpcf7-list-item {
	display: block;
	margin: 0;
}

section.m34_kontakt .wpcf7-acceptance label {
	position: relative;
	display: block;
	padding-left: 32px;
	font-size: 0.75rem;
	line-height: 1.65;
	letter-spacing: 0;
	text-transform: none;
	color: var(--btw_grau);
	cursor: pointer;
}

section.m34_kontakt .wpcf7-acceptance .wpcf7-list-item-label {
	color: var(--btw_grau);
}

section.m34_kontakt .wpcf7-acceptance label::before {
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	background-color: var(--btw_weiss);
	border: 1px solid var(--btw_schwarz);
	transition: background-color var(--btw_speed) var(--btw_ease);
}

section.m34_kontakt .wpcf7-acceptance label:has(input:checked)::before {
	background-color: var(--btw_schwarz);
}

section.m34_kontakt .wpcf7-acceptance label::after {
	top: 7px;
	left: 5px;
	width: 10px;
	height: 7px;
	transform: scale(.6);
	transition: opacity var(--btw_speed) var(--btw_ease), transform var(--btw_speed) var(--btw_ease);
}

section.m34_kontakt .wpcf7-acceptance label:has(input:checked)::after {
	opacity: 1;
	transform: scale(1);
}

section.m34_kontakt .wpcf7-acceptance label:has(input:focus-visible)::before {
	outline: 2px solid var(--btw_schwarz);
	outline-offset: 3px;
}

section.m34_kontakt .wpcf7-acceptance a,
section.m34_kontakt .wpcf7-acceptance a:visited,
section.m34_kontakt .wpcf7-acceptance a:hover,
section.m34_kontakt .wpcf7-acceptance a:focus,
section.m34_kontakt .wpcf7-acceptance a:active {
	display: inline-block; /* hover block, see css/project.css */
	color: var(--btw_schwarz);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media all and (max-width: 575px) {
	section.m34_kontakt .m34_field--acceptance {
		padding-top: 18px;
	}

	section.m34_kontakt .wpcf7-acceptance label {
		font-size: 0.6875rem;
	}
}

/* CF7 without its own stylesheet: hidden helpers stay hidden */
section.m34_kontakt .wpcf7 .hidden-fields-container {
	display: none;
}

section.m34_kontakt .wpcf7 form.init .wpcf7-response-output,
section.m34_kontakt .wpcf7 form.resetting .wpcf7-response-output,
section.m34_kontakt .wpcf7 form.submitting .wpcf7-response-output {
	display: none;
}

section.m34_kontakt .wpcf7-spinner {
	display: none;
}

section.m34_kontakt .wpcf7 form.submitting .wpcf7-spinner {
	display: block;
}
