/* ==========================================================================
   MW Elementor Widgets – Technik-Hotspots
   Variablen aus Elementor: --th-accent --th-on-accent --th-stage --th-title
   --th-text --th-card --th-line --th-muted --th-radius --th-gap
   Die Section-Hintergrundfarbe (dunkel) setzt du am Elementor-Container.
   Bühne: 1200 × 680 Einheiten, Bildfeld = Quadrat 492 bei (354|94).
   ========================================================================== */

.mw-th {
	--th-accent: #81B53C;
	--th-on-accent: #121216;
	--th-stage: #FFFFFF;
	--th-title: #FFFFFF;
	--th-text: #B9BBB4;
	--th-card: #1D1E23;
	--th-line: #2C2D33;
	--th-muted: #9A9C95;
	--th-radius: 18px;
	--th-gap: 56px;

	display: flex;
	flex-direction: column;
	gap: var(--th-gap);
	container: mwth / inline-size;
}
.mw-th * { box-sizing: border-box; }

/* ---------- Bühne ---------- */
.mw-th__stage {
	position: relative;
	container: mwthstage / inline-size;
}
.mw-th__visual {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1200 / 680;
}

.mw-th__bgtext {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -52%);
	font-size: 39cqw;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.05em;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 2px var(--th-line);
	pointer-events: none;
	user-select: none;
}
.mw-th__bgtext::before { content: attr(data-text); }

.mw-th__ring {
	position: absolute;
	left: 50%;
	top: 50%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	pointer-events: none;
}
.mw-th__ring--outer { width: 62%; border: 1px dashed var(--th-line); }
.mw-th__ring--inner { width: 56%; border: 1px solid var(--th-line); }

.mw-th__circle {
	position: absolute;
	left: 25%;
	top: 5.88%;
	width: 50%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--th-stage);
	box-shadow:
		0 0 0 10px color-mix(in srgb, var(--th-accent) 18%, transparent),
		0 0 140px color-mix(in srgb, var(--th-accent) 35%, transparent);
}

/* Bildfeld – gegen Theme-/Elementor-img-Styles abgesichert */
.mw-th .mw-th__visual img.mw-th__img {
	position: absolute;
	left: 29.5%;
	top: 13.82%;
	width: 41% !important;
	height: 72.35% !important;
	max-width: none !important;
	object-fit: contain;
	mix-blend-mode: multiply;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.mw-th__lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}
.mw-th__lines path {
	fill: none;
	stroke: var(--th-accent);
	stroke-width: 1.5;
	stroke-dasharray: 4 5;
	vector-effect: non-scaling-stroke;
}

.mw-th__dot,
.mw-th__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--th-accent);
	color: var(--th-on-accent);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}
.mw-th__dot {
	position: absolute;
	margin: -15px 0 0 -15px;
	z-index: 3;
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--th-accent) 25%, transparent);
}
.mw-th-pulse-yes .mw-th__dot::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--th-accent);
	animation: mwThPulse 2.2s ease-out infinite;
}
@keyframes mwThPulse {
	0%   { transform: scale(1);   opacity: .9; }
	100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- Erklärungen ---------- */
.mw-th .mw-th__labels {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: none;
}
.mw-th__label {
	position: absolute;
	top: var(--th-y, 50%);
	width: 22.5%;
	transform: translateY(-15px); /* Nummer sitzt genau auf der Linie */
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	padding: 0;
	pointer-events: auto;
}
.mw-th__label::marker { content: none; }
.mw-th__label--left  { left: 0; flex-direction: row-reverse; text-align: right; }
.mw-th__label--right { left: 77.5%; }
.mw-th__num { flex: none; }
.mw-th__label-body { min-width: 0; }

.mw-th .mw-th__label-title {
	margin: 0;
	padding: 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--th-title);
}
.mw-th .mw-th__label-text {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--th-text);
}

/* ---------- Zahlen-Kacheln ---------- */
.mw-th__stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mw-th .mw-th__stats {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mw-th__stat {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 22px 20px;
	background: var(--th-card);
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
}
.mw-th__stat::marker { content: none; }
.mw-th__stat-value {
	font-size: 34px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.03em;
	color: var(--th-title);
	font-variant-numeric: tabular-nums;
}
.mw-th__stat.is-accent .mw-th__stat-value { color: var(--th-accent); }
.mw-th__stat-label {
	font-size: 13px;
	line-height: 1.4;
	color: var(--th-text);
}

/* ---------- Datenblatt ---------- */
.mw-th__specs {
	background: var(--th-card);
	border: 1px solid var(--th-line);
	border-radius: calc(var(--th-radius) + 2px);
	padding: 22px 28px;
}
.mw-th__specs-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	list-style: none;
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
	color: var(--th-title);
}
.mw-th__specs-toggle::-webkit-details-marker { display: none; }
.mw-th__specs-toggle::marker { content: none; }
.mw-th__specs-toggle:focus-visible {
	outline: 3px solid var(--th-accent);
	outline-offset: 4px;
	border-radius: 6px;
}
.mw-th__pm {
	position: relative;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: var(--th-accent);
	transition: transform .2s ease;
}
.mw-th__pm::before,
.mw-th__pm::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 2px;
	margin: -1px 0 0 -7px;
	background: var(--th-on-accent);
	border-radius: 2px;
}
.mw-th__pm::after { transform: rotate(90deg); }
.mw-th__specs[open] .mw-th__pm { transform: rotate(45deg); }

.mw-th .mw-th__spec-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 48px;
	margin: 12px 0 0;
	padding: 0;
}
.mw-th__spec {
	display: grid;
	grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
	gap: 16px;
	padding: 15px 0;
	border-bottom: 1px solid var(--th-line);
	font-size: 15px;
	line-height: 1.45;
}
.mw-th .mw-th__spec dt { margin: 0; color: var(--th-muted); font-weight: 400; }
.mw-th .mw-th__spec dd { margin: 0; color: var(--th-title); font-weight: 500; }

/* ---------- Schmale Breiten ---------- */
@container mwthstage (max-width: 860px) {
	.mw-th__lines { display: none; }
	/* Bühne vergrössern, damit der Kreis fast die ganze Breite füllt */
	.mw-th__crop { overflow: hidden; padding-block: 8px; }
	.mw-th__visual { width: 180%; max-width: none; margin-left: -40%; }
	.mw-th__bgtext { font-size: 70cqw; }
	.mw-th .mw-th__labels {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
		margin-top: 24px;
	}
	.mw-th__label,
	.mw-th__label--left,
	.mw-th__label--right {
		position: static;
		width: auto;
		transform: none;
		flex-direction: row;
		text-align: left;
	}
}
@container mwthstage (max-width: 520px) {
	.mw-th .mw-th__labels { grid-template-columns: minmax(0, 1fr); }
	.mw-th__dot { width: 24px; height: 24px; margin: -12px 0 0 -12px; font-size: 11px; }
	.mw-th__bgtext { -webkit-text-stroke-width: 1px; }
}
/* Rückfall für die Kachel-Spalten (Elementor-Einstellung hat Vorrang) */
@container mwth (max-width: 1000px) {
	.mw-th__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container mwth (max-width: 560px) {
	.mw-th__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container mwth (max-width: 700px) {
	.mw-th .mw-th__spec-grid { grid-template-columns: minmax(0, 1fr); }
	.mw-th__spec { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
	.mw-th__specs { padding: 18px 20px; }
	.mw-th__stat-value { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	.mw-th-pulse-yes .mw-th__dot::after { animation: none; }
	.mw-th__pm { transition: none; }
}
