/*
 * en2x Downloads – module styles.
 *
 * List layout: thumbnail left, text block right, thin dividers between rows.
 * Tablet keeps the thumbnail; mobile hides it (text + download link only).
 * Headline h2 (#250F51); format label + title in the primary colour. Font is
 * inherited (Rubik from Salient).
 */

.en2x-downloads {
	font-family: inherit;
}

/* Standalone shortcode placement (full-width row): align to the shared container
 * side gutter, same mechanism as the article modules, so the list flushes with
 * the columns above. Embedded usage (Content Grid → .en2x-grid__download) keeps
 * the bare .en2x-downloads and is unaffected. */
.en2x-downloads-standalone {
	margin-left: var(--en2x-side-gutter, 20px);
	margin-right: var(--en2x-side-gutter, 20px);
}

/* On stacked layouts the inter-row gap above the module collapses, so the
 * standalone list sits flush against the content above. Restore a top gap when
 * the Salient columns collapse. Only the standalone wrapper is affected; the
 * Content Grid embed (.en2x-grid__download) is untouched. */
@media (max-width: 999px) {
	.en2x-downloads-standalone {
		margin-top: 32px;
	}
}

.en2x-downloads__title {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--en2x-color-headline, #250F51);
}

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

.en2x-download {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 18px 0;
	border-top: 1px solid rgba(37, 15, 81, 0.12);
}

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

/* Thumbnail (512x320 / 16:10 source, displayed small, landscape). */
.en2x-download__thumb {
	flex: 0 0 144px;
	width: 144px;
	aspect-ratio: 512 / 320;
}

.en2x-download__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.en2x-download__body {
	flex: 1 1 auto;
	min-width: 0;
}

.en2x-download__label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 700;
	color: var(--en2x-color-primary, #221182);
}

.en2x-download__title {
	display: block;
	margin-bottom: 10px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--en2x-color-primary, #221182);
	text-decoration: none;
}

.en2x-download__title:hover,
.en2x-download__title:focus {
	text-decoration: underline;
}

/* Download link: arrow-in-box icon + text. */
.en2x-download__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--en2x-color-headline, #250F51);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.en2x-download__link:hover,
.en2x-download__link:focus {
	color: var(--en2x-color-primary, #221182);
}

.en2x-download__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 4px;
	background: var(--en2x-color-primary, #221182);
	color: #fff;
	flex: 0 0 auto;
}

.en2x-download__icon svg {
	display: block;
}

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

/* ---------------------------------------------------------------------------
 * Mobile: hide the thumbnail, text + download link only.
 * ------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.en2x-download__thumb {
		display: none;
	}
}
