/*
 * en2x Link-Liste mit Hintergrundbild – module styles.
 *
 * Desktop: two-column feel – a light box on the left overlapping the full-bleed
 * background image on the right. Mobile: the image layer is hidden and the
 * configured mobile background colour shows instead; the box goes full width,
 * no overlap. Brand colours come from the configuration as inline styles; font
 * is inherited (Rubik from Salient).
 */

.en2x-link-image {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 480px;
	/* Fallback / mobile surface; the image layer covers it on desktop. */
	background-color: var(--en2x-li-mobile-bg, #221182);
	overflow: hidden;
}

/* Background image as its own layer so it can be hidden on mobile. */
.en2x-link-image__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-repeat: no-repeat;
	background-size: cover;
}

/* Light box, overlapping the image. */
.en2x-link-image__box {
	position: relative;
	z-index: 1;
	width: 46%;
	margin: 56px 0 56px 56px;
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 6px 24px rgba(37, 15, 81, 0.18);
	font-family: inherit;
}

/* Headline (h2) – uppercase like the other headlines, colour inherited from
 * the box (configured text colour). */
.en2x-link-image__headline {
	margin: 0 0 24px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: inherit;
}

.en2x-link-image__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.en2x-link-image__item {
	list-style: none; /* override Salient's <li> bullets */
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(37, 15, 81, 0.15);
}

.en2x-link-image__item::before,
.en2x-link-image__item::marker {
	content: none;
}

.en2x-link-image__item:last-child {
	border-bottom: 1px solid rgba(37, 15, 81, 0.15);
}

/* Whole row clickable: title (h3) left, icon square right. */
.en2x-link-image__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.en2x-link-image__link:hover,
.en2x-link-image__link:focus {
	opacity: 0.85;
}

.en2x-link-image__link--plain {
	cursor: default;
}

.en2x-link-image__link-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
}

/* Icon in a primary-coloured square (white glyph), slightly squared corners. */
.en2x-link-image__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 3px;
	background: var(--en2x-color-primary, #221182);
	color: #fff;
	font-size: 16px;
}

.en2x-link-image__link:hover .en2x-link-image__icon,
.en2x-link-image__link:focus .en2x-link-image__icon {
	background: #190b63; /* darker variant of var(--en2x-color-primary) */
}

/* ---------------------------------------------------------------------------
 * Mobile: hide image, show the configured colour, stack everything.
 * ------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.en2x-link-image {
		display: block;
		min-height: 0;
		padding: 24px;
	}

	.en2x-link-image__media {
		display: none;
	}

	.en2x-link-image__box {
		width: auto;
		margin: 0;
	}
}
