/* ==========================================================================
   Immobilien-Projekte: Karten, Slider, Kennzahlen, Makler, Störer
   ========================================================================== */

:root {
	--mtw-rot: #e32528;
	--mtw-verlauf: linear-gradient(87deg, #e02b20 0%, #ef5555 100%);
	--mtw-grau: #666666;
	--mtw-hell: #f2f2f2;
}

/* --- Etikett / Badges ---------------------------------------------------- */

.mtw-label,
.mtw-badge {
	display: inline-block;
	padding: 0 10px;
	border-radius: 4px;
	background: var(--mtw-verlauf);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 24px;
	text-transform: uppercase;
}

.mtw-badge {
	font-size: 13px;
	line-height: 20px;
}

.mtw-badge--grau {
	background: #8e8e93;
}

/* --- Kennzahlen-Zeile ---------------------------------------------------- */

.mtw-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 0;
	padding: 0 !important;
	list-style: none !important;
	color: var(--mtw-grau);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
}

.mtw-specs__item {
	padding-left: 28px;
	background: left center / 20px 20px no-repeat;
	min-height: 20px;
}

.mtw-specs__item--ort {
	flex-basis: 100%;
	background-image: url(../../images/icons/location.svg);
}

.mtw-specs__item--zimmer {
	background-image: url(../../images/icons/rooms.svg);
}

.mtw-specs__item--flaeche {
	background-image: url(../../images/icons/livingspace.svg);
}

/* --- Projektkarten ------------------------------------------------------- */

.mtw-karten {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px;
}

.mtw-karten--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mtw-karten--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mtw-karten--1 { grid-template-columns: minmax(0, 1fr); }

.mtw-karte {
	position: relative;
	display: flex;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mtw-karte:hover,
.mtw-karte:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 18px 26px -8px rgba(0, 0, 0, 0.28);
}

/* Doppelte Klasse, damit Divis ".et_color_scheme_red a" (rötlich) nicht greift */
.mtw-karte .mtw-karte__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	color: var(--mtw-grau);
	text-decoration: none;
}

.mtw-karte__bild {
	position: relative;
	height: 230px;
	background: var(--mtw-hell);
}

.mtw-karte__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mtw-karte__bild .mtw-label {
	position: absolute;
	top: 10px;
	left: 10px;
	max-width: calc(100% - 20px);
}

.mtw-karte__text {
	flex: 1 1 auto;
	padding: 25px 15px 25px 25px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
}

.mtw-karte__titel {
	padding-bottom: 10px;
	color: var(--mtw-rot);
	font-size: 23px;
	font-weight: 700;
	line-height: 1.3;
	hyphens: auto;
}

.mtw-karte__text p {
	padding: 0;
}

.mtw-karte__specs {
	padding: 25px;
	border-top: 2px solid var(--mtw-hell);
}

@media (max-width: 980px) {
	.mtw-karten,
	.mtw-karten--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 30px;
	}
}

@media (max-width: 767px) {
	.mtw-karten,
	.mtw-karten--2,
	.mtw-karten--4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --- Button -------------------------------------------------------------- */

.mtw-button {
	display: block;
	padding: 9px 16px;
	border-radius: 4px;
	background: var(--mtw-verlauf);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: filter 0.2s ease;
}

.mtw-button:hover,
.mtw-button:focus-visible {
	filter: brightness(1.08);
}

.mtw-zurueck {
	display: inline-block;
	padding: 4px 10px 4px 28px;
	border-radius: 6px;
	background: var(--mtw-hell);
	color: #969696;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.7;
	position: relative;
}

.mtw-zurueck::before {
	content: "\f060";
	position: absolute;
	left: 10px;
	font-family: FontAwesome;
	font-weight: 900;
}

.mtw-zurueck:hover {
	color: var(--mtw-grau);
}

/* --- Slider -------------------------------------------------------------- */

.mtw-slider {
	position: relative;
	overflow: hidden;
	background: #dcdcdc;
}

.mtw-slider__slides {
	display: grid;
}

.mtw-slide {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(560px, 56vw, 700px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.mtw-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.9s ease, visibility 0s;
	z-index: 1;
}

.mtw-slide__bild {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.mtw-slide__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right center;
	transform-origin: 70% 40%;
	will-change: transform;
}

/* Ken-Burns-Effekt: das Bild der aktiven Folie zoomt und wandert langsam. */
.mtw-slide.is-active .mtw-slide__bild img,
.mtw-slide.is-leaving .mtw-slide__bild img {
	animation: mtw-kenburns 16s ease-out both;
}

.mtw-slide:nth-child(even).is-active .mtw-slide__bild img,
.mtw-slide:nth-child(even).is-leaving .mtw-slide__bild img {
	animation-name: mtw-kenburns-b;
	transform-origin: 40% 60%;
}

@keyframes mtw-kenburns {
	from { transform: scale(1) translate3d(0, 0, 0); }
	to   { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes mtw-kenburns-b {
	from { transform: scale(1.12) translate3d(1.5%, 1%, 0); }
	to   { transform: scale(1) translate3d(0, 0, 0); }
}

.mtw-slide__inhalt {
	position: relative;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 70px 60px;
	box-sizing: border-box;
}

.mtw-slide__karte {
	width: 390px;
	max-width: 100%;
	padding: 24px 24px 24px 30px;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
	transform: translateX(40px);
	opacity: 0;
	transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, opacity 0.6s ease 0.15s;
}

.mtw-slide.is-active .mtw-slide__karte {
	transform: none;
	opacity: 1;
}

.mtw-slide__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.mtw-slide__titel {
	margin: 0;
	padding: 20px 0 0;
	color: #333;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
}

.mtw-slide__label {
	margin: 0;
	padding: 6px 0 0;
	color: var(--mtw-rot);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.mtw-slide__text {
	margin: 0;
	padding: 14px 0 0;
	color: var(--mtw-grau);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
}

.mtw-slide__karte .mtw-specs {
	margin: 22px 0 20px;
	gap: 8px 20px;
	font-size: 15px;
}

.mtw-slide__karte .mtw-button {
	margin: 0;
}

/* Pfeile: nur das Symbol, ohne Hintergrund */
.mtw-slider__pfeil {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	opacity: 0.75;
	cursor: pointer;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mtw-slider__pfeil::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	border: solid currentColor;
	border-width: 0 0 3px 3px;
	transform: translate(-30%, -50%) rotate(45deg);
}

.mtw-slider__pfeil--weiter::before {
	transform: translate(-70%, -50%) rotate(-135deg);
}

.mtw-slider__pfeil:hover,
.mtw-slider__pfeil:focus-visible {
	opacity: 1;
}

.mtw-slider__pfeil--zurueck { left: 12px; }
.mtw-slider__pfeil--weiter { right: 12px; }

.mtw-slider__pfeil--zurueck:hover { transform: translateX(-3px); }
.mtw-slider__pfeil--weiter:hover { transform: translateX(3px); }

/* Punktnavigation: mittig */
.mtw-slider__punkte {
	position: absolute;
	right: 0;
	bottom: 22px;
	left: 0;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 8px;
	pointer-events: none;
}

.mtw-slider__punkt {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	pointer-events: auto;
}

.mtw-slider__punkt.is-active {
	background: #fff;
}

/* Smartphone: Split – Bild oben, Text darunter, beides in voller Breite */
@media (max-width: 767px) {
	.mtw-slider {
		background: #fff;
	}

	.mtw-slide {
		display: block;
		min-height: 0;
	}

	.mtw-slide__bild {
		position: relative;
		inset: auto;
		aspect-ratio: 4 / 3;
	}

	.mtw-slide__bild img {
		object-position: center;
	}

	.mtw-slide__inhalt {
		max-width: none;
		padding: 0;
	}

	.mtw-slide__karte {
		width: 100%;
		padding: 24px 20px 64px;
		border-radius: 0;
		box-shadow: none;
		transform: none;
		transition: opacity 0.6s ease 0.1s;
	}

	.mtw-slider__pfeil {
		top: 0;
		margin-top: calc(37.5vw - 22px);
	}

	.mtw-slider__pfeil--zurueck { left: 4px; }
	.mtw-slider__pfeil--weiter { right: 4px; }

	.mtw-slider__punkte {
		bottom: 24px;
	}

	.mtw-slider__punkt {
		border-color: var(--mtw-rot);
		box-shadow: none;
	}

	.mtw-slider__punkt.is-active {
		background: var(--mtw-rot);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mtw-slide,
	.mtw-slide__karte,
	.mtw-karte {
		transition: none !important;
	}

	.mtw-slide .mtw-slide__bild img {
		animation: none !important;
	}
}

/* --- Download-Center [projekt_downloads] --------------------------------- */
/* Nachbau des früheren Divi-Blurbs „Download-Center“ (gleiche Maße). */

.mtw-dl-button-modul {
	display: inline-flex;
	margin-right: 30px;
	vertical-align: top;
}

.mtw-dl-button {
	display: inline-flex;
	align-items: flex-start;
	gap: 15px;
	max-width: 310px;
	padding: 20px;
	border-radius: 4px;
	background: #f6f6f6;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.mtw-dl-button:hover,
.mtw-dl-button:focus-visible {
	background: #efefef;
}

.mtw-dl-button__icon {
	flex: 0 0 50px;
	width: 50px;
	height: auto;
}

.mtw-dl-button__text {
	display: block;
}

.mtw-dl-button__titel {
	display: block;
	margin-top: 12px;
	padding-bottom: 10px;
	color: var(--mtw-rot);
	font-size: 22px;
	font-weight: 600;
	line-height: 0.5em;
}

.mtw-dl-button__hinweis {
	display: block;
	color: var(--mtw-grau);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
}

@media (max-width: 980px) {
	.mtw-dl-button {
		max-width: 100%;
	}
}

@media (max-width: 767px) {
	.mtw-dl-button-modul {
		display: block;
		width: 100%;
		margin-right: 0;
	}

	.mtw-dl-button {
		display: flex;
		box-sizing: border-box;
		width: 100%;
	}
}

/* --- Makler & Kontakt ---------------------------------------------------- */

.mtw-makler-liste {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.mtw-makler {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	color: var(--mtw-grau);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
}

.mtw-makler__bild {
	flex: 0 0 150px;
	width: 150px;
	height: 150px;
	border-radius: 50%;
	background: var(--mtw-hell);
	overflow: hidden;
}

.mtw-makler__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mtw-makler__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.mtw-makler__name {
	margin-top: 30px;
	padding-bottom: 10px;
	color: var(--mtw-rot);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.mtw-makler a {
	color: inherit;
}

.mtw-makler a:hover {
	color: #ef5555;
}

.mtw-kontakt__spalten {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 44px;
	padding-top: 20px;
}

@media (max-width: 980px) {
	.mtw-kontakt__spalten {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.mtw-makler {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.mtw-makler__name {
		margin-top: 0;
	}
}

/* --- Störer -------------------------------------------------------------- */

/* top: Startposition unter der (nicht mitlaufenden) Navigation. Beim Scrollen
   rückt der Störer per inc/js/stoerer.js bis auf 20px an den Fensterrand nach. */
.mtw-stoerer {
	position: fixed;
	top: var(--mtw-stoerer-top, 140px);
	right: 40px;
	z-index: 999;
	display: block;
	width: 230px;
	height: 230px;
	color: #fff;
	text-decoration: none;
	transform: rotate(15deg);
	transition: transform 0.3s ease;
	pointer-events: auto;
}

a.mtw-stoerer:hover,
a.mtw-stoerer:focus-visible {
	transform: rotate(10deg) scale(1.04);
	color: #fff;
}

.mtw-stoerer__kreis {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 100%;
	padding: 28px;
	border-radius: 50%;
	background: var(--mtw-verlauf);
	box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.45);
	box-sizing: border-box;
	overflow: hidden;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.mtw-stoerer__kreis::after {
	content: "";
	position: absolute;
	inset: 10px;
	border: 3px solid #fff;
	border-radius: 50%;
	pointer-events: none;
}

.mtw-stoerer__text {
	overflow-wrap: anywhere;
	hyphens: auto;
}

.mtw-stoerer__bild {
	display: block;
	width: auto;
	max-width: 110px;
	height: auto;
	max-height: 80px;
	object-fit: contain;
}

.mtw-stoerer--mit-bild .mtw-stoerer__kreis {
	font-size: 17px;
}

.mtw-stoerer--nur-bild .mtw-stoerer__kreis {
	padding: 0;
}

.mtw-stoerer--nur-bild .mtw-stoerer__bild {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	object-fit: cover;
}

/* Tablet: kleiner */
@media (max-width: 980px) {
	.mtw-stoerer {
		top: var(--mtw-stoerer-top, 110px);
		right: 20px;
		width: 170px;
		height: 170px;
	}

	.mtw-stoerer__kreis {
		padding: 22px;
		font-size: 16px;
	}

	.mtw-stoerer--mit-bild .mtw-stoerer__kreis {
		font-size: 14px;
	}

	.mtw-stoerer__bild {
		max-width: 80px;
		max-height: 56px;
	}

	.mtw-stoerer__kreis::after {
		inset: 7px;
		border-width: 2px;
	}
}

/* Smartphone: schmales Band statt Kreis */
@media (max-width: 767px) {
	.mtw-stoerer,
	a.mtw-stoerer:hover,
	a.mtw-stoerer:focus-visible {
		position: static;
		width: auto;
		height: auto;
		transform: none;
	}

	.mtw-stoerer__kreis,
	.mtw-stoerer--nur-bild .mtw-stoerer__kreis {
		flex-direction: row;
		gap: 12px;
		min-height: 44px;
		padding: 8px 20px;
		border-radius: 0;
		box-shadow: none;
		font-size: 16px;
		line-height: 1.3;
	}

	.mtw-stoerer--mit-bild .mtw-stoerer__kreis {
		font-size: 16px;
	}

	.mtw-stoerer__kreis::after {
		display: none;
	}

	.mtw-stoerer__bild,
	.mtw-stoerer--nur-bild .mtw-stoerer__bild {
		width: auto;
		max-width: 96px;
		height: auto;
		max-height: 36px;
		object-fit: contain;
	}

	.mtw-stoerer__text br {
		display: none;
	}
}

@media print {
	.mtw-stoerer,
	.mtw-slider__pfeil,
	.mtw-slider__punkte {
		display: none;
	}
}

/* Zwei Spalten im Textmodul (Text 2/3, Logo 1/3), z. B. Bauherren-Block
   – ersetzt [su_row]/[su_column] aus Shortcodes Ultimate
------------------------------------------------------- */
.mtw-spalten {
	display: flex;
	gap: 4%;
	align-items: flex-start;
}

.mtw-spalten__haupt {
	flex: 0 0 64%;
}

.mtw-spalten__neben {
	flex: 1 1 auto;
}

.mtw-spalten__neben img {
	max-width: 100%;
	height: auto;
}

.mtw-spalten p:last-child {
	padding-bottom: 0;
}

@media (max-width: 767px) {
	.mtw-spalten {
		flex-direction: column;
		gap: 20px;
	}

	.mtw-spalten__haupt {
		flex-basis: auto;
	}
}

