/*
 * en2x Verteiler Spalten – structural styles.
 *
 * A robust grid of entries (headline, icon/image, button, text) with a column
 * count per breakpoint set via inline custom properties. Headline + icon colour
 * come from the instance var --en2x-vs-headline. Every entry shares the same
 * structure and the headline area reserves two lines, so columns stay aligned
 * even when one headline wraps. Brings its own side gutter for full-width rows.
 * Font inherited (Rubik).
 */

.en2x-verteiler {
	/* Self-brought side gutter so the grid aligns at the container edge in
	 * full-width-content rows instead of touching the screen edge. */
	padding-left: var(--en2x-side-gutter, 20px);
	padding-right: var(--en2x-side-gutter, 20px);
	font-family: inherit;
}

.en2x-verteiler__grid {
	display: grid;
	/* Desktop: larger row gap so a row-2 headline isn't tight under the row-1
	 * text. Tablet/mobile use a smaller, consistent row gap (set below) so the
	 * vertical rhythm between stacked items stays uniform after wrapping. */
	gap: 64px 32px;
	grid-template-columns: repeat(var(--en2x-vs-cols-dt, 4), minmax(0, 1fr));
	align-items: start;
}

/* ---------------------------------------------------------------------------
 * Entry
 * ------------------------------------------------------------------------- */

.en2x-verteiler__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* Reserve two lines so the icons line up across columns even when a headline
 * wraps to two lines (the weakness of the manual WPBakery layout). */
.en2x-verteiler__headline {
	margin: 0 0 30px;
	min-height: 2.4em;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--en2x-vs-headline, #250F51);
}

.en2x-verteiler__media {
	margin: 0 0 20px;
	line-height: 0;
}

/* Icon/image as a link (same target as the button); subtle hover. */
.en2x-verteiler__media-link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

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

/* Icon without a circle, in the headline colour. */
.en2x-verteiler__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 56px;
	line-height: 1;
	color: var(--en2x-vs-headline, #250F51);
}

.en2x-verteiler__icon i {
	color: inherit;
}

/* Uploaded image alternative (1000x1000 source). */
.en2x-verteiler__img {
	display: block;
	width: 120px;
	height: 120px;
	object-fit: cover;
}

.en2x-verteiler__button {
	display: inline-block;
	margin: 0 0 20px;
	padding: 9px 22px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--en2x-button-radius, 999px);
	transition: opacity 0.15s ease;
}

.en2x-verteiler__button:hover,
.en2x-verteiler__button:focus {
	opacity: 0.9;
}

.en2x-verteiler__text {
	font-size: 15px;
	line-height: 1.6;
	color: inherit;
}

.en2x-verteiler__text p {
	margin: 0 0 12px;
}

.en2x-verteiler__text :last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Extra block (download OR teaser): spans two columns on desktop.
 * ------------------------------------------------------------------------- */

.en2x-verteiler__special {
	grid-column: span 2;
	/* Fill the full height of its grid row so the (coloured) block is as tall as
	 * the entry cell next to it instead of only its own content height. */
	align-self: stretch;
	/* The block's text colour comes inline; headline + text inherit it. */
	color: inherit;
}

/* When a background colour is set, pad the block (filled box, square corners). */
.en2x-verteiler__special--filled {
	padding: 28px 32px;
}

/* Download heading + teaser headline follow the block text colour. */
.en2x-verteiler__special .en2x-downloads__title {
	color: inherit;
}

/* Teaser sub-block: left-aligned headline + text + button. */
.en2x-verteiler__teaser {
	text-align: left;
}

.en2x-verteiler__teaser-headline {
	margin: 0 0 16px;
	/* Same size as the column entry headlines. */
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: inherit;
}

.en2x-verteiler__teaser-text {
	font-size: 15px;
	line-height: 1.6;
}

.en2x-verteiler__teaser-text p {
	margin: 0 0 14px;
}

.en2x-verteiler__teaser-text :last-child {
	margin-bottom: 0;
}

.en2x-verteiler__teaser-button {
	display: inline-block;
	margin-top: 20px;
	padding: 11px 26px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--en2x-button-radius, 999px);
	transition: opacity 0.15s ease;
}

.en2x-verteiler__teaser-button:hover,
.en2x-verteiler__teaser-button:focus {
	opacity: 0.9;
}

/* Download sub-block: holds the shared .en2x-downloads markup. Background and
 * padding come from the block wrapper (--filled), so it follows the chosen
 * block background colour instead of a fixed white box. */
.en2x-verteiler__download {
	/* no own background/padding – controlled by .en2x-verteiler__special */
}

/* ---------------------------------------------------------------------------
 * Responsive: column counts per breakpoint; the extra block goes full-row.
 * ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.en2x-verteiler__grid {
		grid-template-columns: repeat(var(--en2x-vs-cols-tb, 2), minmax(0, 1fr));
		/* Uniform vertical gap once wrapped (identical to mobile). */
		gap: 44px 32px;
	}

	.en2x-verteiler__special {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.en2x-verteiler__grid {
		grid-template-columns: repeat(var(--en2x-vs-cols-mb, 1), minmax(0, 1fr));
		/* Same vertical gap as tablet so wrapped items keep a uniform rhythm. */
		gap: 44px 20px;
	}

	.en2x-verteiler__special {
		grid-column: 1 / -1;
	}
}
