/* [agwp_figure] – Bild mit frei platzierbarem, drehbarem Badge */

#top .agwp-figure { position: relative; margin: 0; }

#top .agwp-figure .agwp-figure__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--ratio, 4 / 5);
	border-radius: 32px;
	border: 1px solid var(--agwp-line);
	overflow: hidden;
	background: repeating-linear-gradient(45deg, var(--agwp-surf) 0 14px, transparent 14px 28px);
}
#top .agwp-figure--auto .agwp-figure__media { aspect-ratio: auto; }
#top .agwp-figure .agwp-figure__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}
#top .agwp-figure--auto .agwp-figure__img { height: auto; }
#top .agwp-figure .agwp-figure__ph { font: 500 .8125rem/1.4 var(--agwp-font-mono); color: var(--agwp-ink2); }

/* Badge */
#top .agwp-figure .agwp-figure__badge {
	position: absolute;
	z-index: 2;
	max-width: calc(100% - 24px);
	padding: 14px 20px;
	border-radius: 16px;
	font: 800 var(--agwp-fs-small)/1.3 var(--agwp-font-body);
	transform: rotate(var(--r, 0deg));
}
/* #wrap_all: Enfold faerbt <figcaption> ueber das Farbset (Bildunterschrift) – hier gewinnt immer das Badge */
#top #wrap_all .agwp-figure .agwp-figure__badge--acc   { background: var(--agwp-acc); color: var(--agwp-onacc); box-shadow: 0 16px 36px var(--agwp-glow); }
#top #wrap_all .agwp-figure .agwp-figure__badge--dark  { background: #0D1520; color: #fff; box-shadow: 0 16px 36px -12px rgba(13, 21, 32, .5); }
#top #wrap_all .agwp-figure .agwp-figure__badge--light { background: var(--agwp-bg2); color: var(--agwp-ink); border: 1px solid var(--agwp-line); box-shadow: 0 16px 36px -16px rgba(13, 21, 32, .35); }
#top #wrap_all .agwp-figure .agwp-figure__badge :is(strong, span:not(.agwp-figure__icon)) { color: inherit; }

/* Positionen (x/y = Abstand vom jeweiligen Rand, negativ = ragt hinaus) */
#top .agwp-figure .agwp-figure__badge--top-left     { top: var(--y);    left: var(--x); }
#top .agwp-figure .agwp-figure__badge--top-right    { top: var(--y);    right: var(--x); }
#top .agwp-figure .agwp-figure__badge--bottom-left  { bottom: var(--y); left: var(--x); }
#top .agwp-figure .agwp-figure__badge--bottom-right { bottom: var(--y); right: var(--x); }
#top .agwp-figure .agwp-figure__badge--top,
#top .agwp-figure .agwp-figure__badge--bottom {
	left: 50%;
	transform: translateX(calc(-50% + var(--x))) rotate(var(--r, 0deg));
	white-space: nowrap;
}
#top .agwp-figure .agwp-figure__badge--top    { top: var(--y); }
#top .agwp-figure .agwp-figure__badge--bottom { bottom: var(--y); }

/* Handy: nicht ueber den Bildschirmrand ragen lassen */
@media (max-width: 600px) {
	#top .agwp-figure .agwp-figure__badge--top-left,
	#top .agwp-figure .agwp-figure__badge--bottom-left  { left: max(var(--x), 12px); }
	#top .agwp-figure .agwp-figure__badge--top-right,
	#top .agwp-figure .agwp-figure__badge--bottom-right { right: max(var(--x), 12px); }
	#top .agwp-figure .agwp-figure__badge--top,
	#top .agwp-figure .agwp-figure__badge--bottom { white-space: normal; }
}

/* Schatten unter dem Bild (shadow="1") */
#top .agwp-figure--shadow .agwp-figure__media { box-shadow: 0 30px 70px -30px rgba(13, 21, 32, .45); border-color: transparent; }

/* Badge mit Icon und Unterzeile (icon="…" / sub="…") */
#top .agwp-figure .agwp-figure__badge--rich {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(360px, calc(100% - 24px));
	padding: 12px 18px 12px 12px;
	font-weight: 400;
}
#top .agwp-figure .agwp-figure__badge--rich.agwp-figure__badge--light { box-shadow: 0 18px 40px -16px rgba(13, 21, 32, .35); }
#top .agwp-figure .agwp-figure__icon {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--agwp-grad);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 800 1rem/1 var(--agwp-font-body);
}
#top .agwp-figure .agwp-figure__txt { display: flex; flex-direction: column; line-height: 1.25; }
#top .agwp-figure .agwp-figure__txt strong { font-size: var(--agwp-fs-small); font-weight: 700; }
#top .agwp-figure .agwp-figure__txt > span { font-size: .8125rem; opacity: .75; }
