/* ============================================================
   Testimonial / Referenz Widget
   Bild = Hintergrundbild der Spalte -> füllt IMMER die volle
   Höhe der Box, egal wie schmal das Bild gemacht wird.
   Padding, Farben, Radius, Schatten kommen über Elementor-Controls.

   Anfuehrungszeichen: Paar um das Zitat, per ::before / ::after.
   Gestapelter Zustand (.elw-stack) wird per JS anhand des im
   Widget eingestellten Umbruchpunkts gesetzt.
   Rundes Bild NUR im Zwischenbereich (Tablet / Handy quer),
   unter 768px wieder volles Bild in ganzer Breite.
   Aufklappen laeuft ueber die Klasse .elw-open am Wrapper.
   ============================================================ */
.elw-testimonial {
	/* Grundwerte (werden von den Elementor-Controls überschrieben) */
	--elw-bg: #ffffff;
	--elw-orange: #EC6535;

	/* Bildhöhe, wenn Bild und Text untereinander stehen (Mobil) */
	--elw-img-h-mob: 240px;

	/* Rundes Bild im Zwischenbereich (Elementor-Controls) */
	--elw-kreis: 200px;
	--elw-kreis-top: 32px;
	--elw-kreis-size: cover;
	--elw-kreis-pos-x: 50%;
	--elw-kreis-pos-y: 25%;

	/* Fade-out / Aufklappen */
	--elw-collapsed: 7.5em;
	--elw-fade-h: 3.2em;
	--elw-v-align: center;
	--elw-v-offset: 0px;
	--elw-v-size: 14px;
	--elw-v-strich: 3px;
	--elw-v-gap: 18px;

	display: flex;
	align-items: stretch;   /* beide Spalten gleich hoch */
	background: #fff;
}

/* Bildspalte: Bild als background, damit es die Höhe mitgeht */
.elw-testimonial__media {
	flex: 0 0 45%;
	max-width: 45%;
	align-self: stretch;            /* zieht sich auf volle Box-Höhe */
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	min-height: 100%;
}

/* ---- Platzhalter, wenn kein Bild hinterlegt ist ---- */
.elw-testimonial__ph {
	--elw-ph-h-mob: 200px;
	background-color: #1a2332;
	background-image: none;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.elw-testimonial__ph-mark {
	display: block;
	font-family: Arial, sans-serif;
	font-weight: 700;
	font-size: 180px;
	line-height: 0.7;
	color: var(--elw-orange);
	margin-top: 0.28em;
	user-select: none;
	pointer-events: none;
}

.elw-testimonial__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 40px 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.elw-testimonial__quote {
	position: relative;
	font-size: 16px;
	line-height: 1.7;
	color: #3c4858;
	margin-bottom: 28px;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: normal;
}

/* ---- Anfuehrungszeichen als Paar um das Zitat ---- */
.elw-testimonial__quote--marks::before {
	content: "\201C";
	color: var(--elw-orange);
	font-family: Arial, sans-serif;
	font-weight: 700;
	font-size: 44px;
	line-height: 0;
	vertical-align: -0.3em;
	margin-right: 5px;
}
.elw-testimonial__quote--marks::after {
	content: "\201D";
	color: var(--elw-orange);
	font-family: Arial, sans-serif;
	font-weight: 700;
	font-size: 44px;
	line-height: 0;
	vertical-align: -0.3em;
	margin-left: 3px;
}

.elw-testimonial__name {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 700;
	color: #1a2332;
}
.elw-testimonial__meta {
	margin: 0;
	font-size: 14px;
}
.elw-testimonial__position { color: #8c97a5; }
.elw-testimonial__sep      { color: #d0d6dd; margin: 0 8px; }
.elw-testimonial__company  { color: var(--elw-orange); font-weight: 600; }

/* Aufklapp-Button: oberhalb des Umbruchpunkts inaktiv */
.elw-testimonial__more,
.elw-testimonial__more:hover,
.elw-testimonial__more:focus,
.elw-testimonial__more:active {
	display: none;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none;
	padding: 0 !important;
	margin: 0;
	font: inherit;
	color: inherit;
	text-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* ============================================================
   Gestapelt: Bild oben, Text darunter
   Klasse .elw-stack wird per JS gesetzt (Umbruchpunkt im Widget)
   ============================================================ */
.elw-testimonial.elw-stack {
	flex-direction: column !important;
}

/* ---- Anfuehrungszeichen etwas kleiner ---- */
.elw-testimonial.elw-stack .elw-testimonial__quote--marks::before,
.elw-testimonial.elw-stack .elw-testimonial__quote--marks::after {
	font-size: 34px;
}

/* ---- Firma auf eigener Zeile, ohne Trennstrich ---- */
.elw-testimonial.elw-stack .elw-testimonial__meta {
	line-height: 1.5;
}
.elw-testimonial.elw-stack .elw-testimonial__position,
.elw-testimonial.elw-stack .elw-testimonial__company {
	display: block;
}
.elw-testimonial.elw-stack .elw-testimonial__sep {
	display: none;
}
.elw-testimonial.elw-stack .elw-testimonial__company {
	margin-top: 2px;
}

/* ---- Fade-out + Aufklappen ---- */
.elw-testimonial--fade.elw-stack .elw-testimonial__quote {
	max-height: var(--elw-collapsed);
	overflow: hidden;
	margin-bottom: 0;
	transition: max-height .4s ease;
	background: linear-gradient(to bottom,
		rgba(255, 255, 255, 0) calc(100% - var(--elw-fade-h)),
		var(--elw-bg) 100%);
}
.elw-testimonial--fade.elw-stack .elw-testimonial__quote::before {
	position: relative;
	z-index: 2;
}
.elw-testimonial--fade.elw-stack .elw-testimonial__quote::after {
	/* im eingeklappten Zustand kein Schluss-Zeichen mitten im Text */
	display: none;
}
.elw-testimonial--fade.elw-stack.elw-open .elw-testimonial__quote--marks::after {
	display: inline;
}
.elw-testimonial--fade.elw-stack.elw-open .elw-testimonial__quote {
	max-height: 400em;
	background: none;
}

/* ---- Orangenes V ---- */
.elw-testimonial--fade.elw-stack .elw-testimonial__more {
	display: flex;
	align-items: center;
	justify-content: var(--elw-v-align);
	width: 100%;
	min-height: 44px;
	margin-top: var(--elw-v-offset);
	margin-bottom: var(--elw-v-gap);
	-webkit-tap-highlight-color: transparent;
}
.elw-testimonial__v {
	display: block;
	width: var(--elw-v-size);
	height: var(--elw-v-size);
	border: 0;
	border-right: var(--elw-v-strich) solid var(--elw-orange);
	border-bottom: var(--elw-v-strich) solid var(--elw-orange);
	background: none;
	transform: rotate(45deg);
	transform-origin: center;
	margin-bottom: 4px;
	transition: transform .3s ease;
}
.elw-testimonial--fade.elw-stack.elw-open .elw-testimonial__more .elw-testimonial__v {
	transform: rotate(225deg);
	margin-bottom: 0;
	margin-top: 4px;
}

/* ============================================================
   NUR Zwischenbereich (ab 768px bis Umbruchpunkt):
   Bild als zentrierter Kreis statt breitem Streifen
   ============================================================ */
@media (min-width: 768px) {
	.elw-testimonial.elw-stack .elw-testimonial__media {
		flex: 0 0 auto !important;
		width: var(--elw-kreis) !important;
		max-width: var(--elw-kreis) !important;
		height: var(--elw-kreis) !important;
		min-height: var(--elw-kreis) !important;
		aspect-ratio: 1 / 1 !important;
		border-radius: 50% !important;
		margin: var(--elw-kreis-top) auto 0 auto !important;
		background-size: var(--elw-kreis-size) !important;
		background-position: var(--elw-kreis-pos-x) var(--elw-kreis-pos-y) !important;
		align-self: center !important;
	}
	.elw-testimonial.elw-stack .elw-testimonial__ph {
		width: var(--elw-kreis) !important;
		max-width: var(--elw-kreis) !important;
		height: var(--elw-kreis) !important;
		min-height: var(--elw-kreis) !important;
		border-radius: 50% !important;
	}
	.elw-testimonial.elw-stack .elw-testimonial__ph-mark {
		font-size: calc(var(--elw-kreis) * 0.7);
	}
	.elw-testimonial.elw-stack .elw-testimonial__body {
		padding-top: 24px !important;
	}
}

/* ============================================================
   Mobil (unter 768px): volles Bild in ganzer Breite – wie zuvor
   ============================================================ */
@media (max-width: 767px) {
	.elw-testimonial {
		flex-direction: column !important;
	}
	.elw-testimonial .elw-testimonial__media {
		flex-basis: auto !important;
		width: auto !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: var(--elw-img-h-mob) !important;
		aspect-ratio: auto !important;
		border-radius: 0 !important;
		margin: 0 !important;
		align-self: stretch !important;
		background-position: center center;
	}
	.elw-testimonial .elw-testimonial__ph {
		width: auto !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: var(--elw-ph-h-mob) !important;
		border-radius: 0 !important;
	}
	.elw-testimonial .elw-testimonial__ph-mark {
		font-size: 180px;
	}
}