/* Block / Feature grid — card variant, with Card / Service cells.
   Columns 2 | 3 | 4 (.is-cols-N); desktop column gap follows the count (32 / 24 / 20), rows 32.
   Tablet: 3 and 4 columns become 2 at gap 24. Mobile: one per row, gap 16.
   Cards: no shadow, 1px border on white, radius 12, padding 32; hover lifts 4px.
   Body truncates at three lines. */

.axn-feature-grid .axn-container {
	display: flex;
	flex-direction: column;
	gap: var(--space-56);
}

.axn-feature-grid.is-centred .axn-section-header {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

.axn-grid {
	--cols: 4;
	--col-gap: 20px;
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: 32px var(--col-gap);
}

.axn-grid.is-cols-2 { --cols: 2; --col-gap: 32px; }
.axn-grid.is-cols-3 { --cols: 3; --col-gap: 24px; }
.axn-grid.is-cols-4 { --cols: 4; --col-gap: 20px; }

.axn-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-20);
	padding: var(--space-32);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-12);
	background: var(--c-white);
	color: var(--c-navy);
	transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.axn-card:hover {
	border-color: var(--c-neutral-300);
}

@media (prefers-reduced-motion: no-preference) {
	.axn-card:has(a):hover {
		transform: translateY(-4px);
	}
}

.axn-card .axn-ico {
	color: var(--c-logo-blue);
}

.axn-card__title {
	font-family: var(--font-display);
	font-size: var(--type-h4-size);
	line-height: var(--type-h4-line);
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--c-navy);
}

.axn-card__title a {
	color: inherit;
	text-decoration: none;
}

.axn-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.axn-card__body {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	font-size: var(--type-body-m-size);
	line-height: var(--type-body-m-line);
	color: var(--c-neutral-700);
}

.axn-card .axn-arrow-link,
.axn-card .is-style-arrow-link a {
	margin-top: auto;
	color: var(--c-dark-blue);
}

.axn-card .wp-block-image,
.axn-card > figure {
	margin: calc(-1 * var(--space-32)) calc(-1 * var(--space-32)) 0;
	width: calc(100% + 2 * var(--space-32));
	overflow: hidden;
	border-radius: var(--radius-12) var(--radius-12) 0 0;
}

.axn-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Card with an arrow link ("Læs casen"): the link sits at the foot and its hit area covers the card. */
.axn-card .axn-card__link {
	margin-top: auto;
}

.axn-card__link::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--radius-12);
}

.axn-card.has-link:hover .axn-card__link {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.axn-card.has-link:hover .axn-card__link::after {
	transform: translateX(2px);
}

.axn-card__link:focus-visible {
	outline: none;
}

.axn-card__link:focus-visible::before {
	outline: 2px solid var(--border-focus);
	outline-offset: 2px;
}

.axn-feature-grid.is-full-text .axn-card__body {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
	line-clamp: none;
}

.axn-feature-grid__footer {
	display: flex;
}

.axn-feature-grid.is-centred .axn-feature-grid__footer {
	justify-content: center;
}

@media (max-width: 1023px) {
	.axn-grid.is-cols-3,
	.axn-grid.is-cols-4 {
		--cols: 2;
		--col-gap: 24px;
		row-gap: 24px;
	}
}

@media (max-width: 767px) {
	.axn-feature-grid .axn-container {
		gap: var(--space-40);
	}

	.axn-grid,
	.axn-grid.is-cols-2,
	.axn-grid.is-cols-3,
	.axn-grid.is-cols-4 {
		--cols: 1;
		gap: var(--space-16);
	}

	.axn-card {
		gap: var(--space-12);
		padding: var(--space-24);
	}

	.axn-card .wp-block-image,
	.axn-card > figure {
		margin: calc(-1 * var(--space-24)) calc(-1 * var(--space-24)) 0;
		width: calc(100% + 2 * var(--space-24));
	}
}

/* Card / Service — Media=Icon: a 56 pale-blue tile (radius 8) holding a 24 icon in text/accent. */
.axn-card__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-8);
	background: var(--surface-accent);
	color: var(--text-accent);
}

.axn-card .axn-card__icon .axn-ico {
	color: var(--text-accent);
}
