/*
 * DRK Image Overlay – Stylesheet
 * Funktioniert sowohl im Editor (Block-Editor-Preview) als auch im Frontend.
 *
 * Layout-Prinzip:
 *  .drk-io-wrap ist position:relative und enthält das original <figure>/<img>
 *  Overlay-Elemente werden absolut darüber positioniert.
 */

.drk-io-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0; /* verhindert Lücken durch <figure> baseline */
}

/* das ursprüngliche figure soll seine Größe behalten, aber als Anker dienen */
.drk-io-wrap > figure,
.drk-io-wrap > .wp-block-image {
	margin: 0;
	line-height: normal;
}

.drk-io-wrap img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ----------------------------------------------------------------------
   Weißer Header-Container oben links
   ---------------------------------------------------------------------- */
.drk-io-header {
	position: absolute;
	top: clamp(8px, 2.5%, 24px);
	left: clamp(8px, 2.5%, 24px);
	display: inline-flex;
	align-items: center;
	gap: clamp(8px, 1.2%, 16px);
	padding: clamp(8px, 1.5%, 18px) clamp(12px, 2%, 22px);
	background-color: var(--drk-io-white, #ffffff);
	color: var(--drk-io-text-on-white, #1a1a1a);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-weight: 700;
	line-height: 1.15;
	max-width: 70%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	z-index: 2;
}

.drk-io-header__logo {
	height: clamp(28px, 5vw, 64px);
	width: auto;
	display: block;
	flex-shrink: 0;
}

.drk-io-header__sep {
	display: inline-block;
	width: 1px;
	align-self: stretch;
	background-color: var(--drk-io-text-on-white, #1a1a1a);
	flex-shrink: 0;
}

.drk-io-header__org-name,
.drk-io-header__org-suffix {
	display: block;
	font-size: clamp(11px, 1.4vw, 18px);
}

.drk-io-header__org-suffix {
	font-weight: 800;
}

/* ----------------------------------------------------------------------
   Roter Caption-Container unten links (Styleguide: untere Bildhälfte)
   ---------------------------------------------------------------------- */
.drk-io-caption {
	position: absolute;
	bottom: clamp(12px, 4%, 48px);
	left: clamp(8px, 2.5%, 24px);
	max-width: 85%;
	display: inline-flex;
	flex-direction: column;
	gap: clamp(4px, 0.8%, 10px);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--drk-io-text-on-red, #ffffff);
	z-index: 2;
}

.drk-io-caption__title,
.drk-io-caption__desc {
	display: inline;
	background-color: var(--drk-io-red, #e30613);
	padding: clamp(4px, 0.8%, 12px) clamp(10px, 1.6%, 20px);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	line-height: 1.25;
	width: fit-content;
}

.drk-io-caption__title {
	font-size: clamp(18px, 3.8vw, 48px);
	font-weight: 800;
}

.drk-io-caption__desc {
	font-size: clamp(14px, 2.4vw, 32px);
	font-weight: 600;
}

/* ----------------------------------------------------------------------
   Editor-Hinweise (im Block-Editor sichtbar)
   ---------------------------------------------------------------------- */
.drk-io-editor-hint {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	color: #555;
	font-style: italic;
}
