:root {
	--tile-canvas-height-desktop: 323px;
	--tile-canvas-background-width: 150px;
	--tile-canvas-image-width: 525px;
}

.tx_tuebingenai_tiles {
	display: grid;
	grid-template: auto auto / auto;
	align-items: start;
	background: var(--color-light-gray);
}

.tx_tuebingenai_tiles__headline {
	grid-row: 1 / 2;
	font-size: var(--font-size);
}

.tiles {
	grid-row: 2 / 3;
	grid-column: 1 / 2;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--hr-spacing-2);
}

.tile {
	position: relative;
	background-color: var(--color-white);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 75%;
	aspect-ratio: 1;
	cursor: pointer;
	overflow: hidden;
}

.tile:focus,
.tile--active {
	border: 0;
}

.tile:focus::after,
.tile--active::after {
	content: '';
	position: absolute;
	bottom: -24px;
	left: calc(50% - 12px);
	width: 0;
	height: 0;
	border: 12px solid transparent;
}

.tile__title {
	visibility: hidden;
}

.tiles-canvas {
	grid-row: 2 / 3;
	grid-column: 1 / 2;
	background-color: var(--color-white);
	height: 100%;
	max-width: 100%;
}

.tiles-canvasnav {
	display: grid;
	grid-template-columns: 40px 40px auto 40px;
	gap: var(--vr-spacing-1);
	border: var(--hr-spacing-1) var(--color-white) solid;
	border-bottom-width: 0;
}

.tiles-canvasnav__item {
	border: 2px solid var(--color-border);
	display: block;
	text-align: center;
	padding: 0.2em;
	border-radius: 9999px;
	cursor: pointer;
	width: 40px;
}

.tiles-canvasnav__item:last-of-type {
	grid-column: -1/-2;
}

.tile-canvas {
	background-repeat: no-repeat;
	background-position: right bottom;
	background-size: var(--tile-canvas-background-width);
	border: 1em solid var(--color-white);
	min-height: 363px;
}

.tile-canvas__image {
	display: none;
}

@media screen and (min-width: 600px) {
	.tiles {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (min-width: 1000px) {
	.tx_tuebingenai_tiles {
		row-gap: var(--vr-spacing-2);
	}

	.tx_tuebingenai_tiles__headline {
		margin-bottom: 0;
	}

	.tiles {
		grid-template-columns: repeat(6, 1fr);
	}

	.tile {
		grid-row: 1;
	}

	.tile--active {
		overflow: visible;
	}

	.tiles-canvas {
		grid-row: 3 / 4;
		min-height: calc(var(--tile-canvas-height-desktop) + 2em);
	}

	.tile-canvas {
		background: var(--color-white) !important;
	}

	.tile-canvas__headline,
	.tile-canvas__text {
		max-width: calc(100% - var(--tile-canvas-image-width) - var(--hr-spacing-2));
	}

	.tile-canvas__headline {
		font-size: var(--font-size-headline-large);
		line-height: var(--line-height-headline-large);
	}

	.tile-canvas__image {
		display: block;
		width: auto;
		height: var(--tile-canvas-height-desktop);
		position: absolute;
		right: 0;
		top: 0;
	}
}

/*
 Remove the background image of the fivth tile
 */
@media screen and (max-width: 999px) {
	.tile-canvas--5 {
		background-image: none !important;
	}
}
