/**
 * Visning af [midspar_jobs].
 *
 * Temaets kort-styling er scoped under #icon-with-text og rammer derfor ikke
 * shortcode-outputtet. Vi replikerer den her, scoped under .midspar-jm-grid,
 * så pluginet er selvbærende og uafhængigt af temaets markup/ID.
 * Værdier aflæst 1:1 fra temaets renderede kort.
 */

.midspar-jm-grid {
	display: grid;
	grid-template-columns: repeat(var(--midspar-jm-cols, 3), minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

/*
 * Fuld bredde: bryder ud af en smal indholdskolonne og centrerer grid'et i
 * sidens fulde bredde (op til --midspar-jm-maxwidth). Bruges når shortcode'en
 * sidder i et smalt tekst-/WYSIWYG-modul i stedet for en fuldbredde-sektion.
 */
.midspar-jm-grid--fullwidth {
	width: min(var(--midspar-jm-maxwidth, 1240px), calc(100vw - 40px));
	max-width: none;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
}

.midspar-jm-grid .icon-with-text-block {
	position: relative;
	top: 0;
	margin: 0;
	min-height: 290px;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 8px 19px rgba(0, 0, 0, 0.1);
	transition: 0.3s;
}

/* Padding-bottom giver plads til den absolut-placerede pil nederst. */
.midspar-jm-grid .icon-with-text-block > a {
	display: block;
	height: 100%;
	padding: 39px 47px 50px 46px;
	text-decoration: none;
}

.midspar-jm-grid .icon-with-text-block img.icon {
	position: absolute;
	top: 39px;
	left: 46px;
	width: 80px;
	height: 80px;
}

/* Titel: rykket op under ikonet, maks. 3 linjer. */
.midspar-jm-grid .icon-with-text-block h6 {
	margin: 95px 0 0;
	padding: 0;
	color: #000;
	font-family: "Roboto Slab", serif;
	font-size: 20px;
	line-height: 22px;
	font-weight: 400;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Under-tekst: lige under titlen med lille mellemrum (som det oprindelige design). */
.midspar-jm-grid .icon-with-text-block p {
	margin: 16px 0 0;
	padding: 0;
	color: #33333c;
	font-family: "Lato", sans-serif;
	font-size: 16px;
	line-height: 24px;
}

.midspar-jm-grid .icon-with-text-block img.arrow {
	position: absolute;
	right: 32px;
	bottom: 27px;
	width: 13px;
	height: auto;
	transition: 0.3s;
}

/* Hover: kortet løftes, pilen rykker. */
.midspar-jm-grid .icon-with-text-block:hover {
	top: -5px;
}

.midspar-jm-grid .icon-with-text-block:hover img.arrow {
	right: 29px;
}

.midspar-jm-empty {
	margin: 1em 0;
}

@media (max-width: 980px) {
	.midspar-jm-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.midspar-jm-grid {
		grid-template-columns: 1fr;
	}
}
