.outerwrap.image-blocks-horizontal {
	container-type: inline-size;
	container-name: imageblockshorizontal;
}

.image-blocks-horizontal__card {
	margin-bottom: var(--grid-gutter-width);
}

.image-blocks-horizontal__content {
	border: 2px solid var(--gray-lighter);
	padding: 30px;
	box-sizing: border-box;
	border-radius: 0 0 15px 15px;
}

.image-blocks-horizontal__content h4 {
	margin: 10px 0 30px;
}

.image-blocks-horizontal__image {
	position: relative;
	aspect-ratio: 1;
	border-radius: 15px 15px 0 0;
	overflow: hidden;
}

.image-blocks-horizontal__item-icon {
	font-size: 150px;
}

.image-blocks-horizontal__image .link-coverall {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.image-blocks-horizontal__image:has(img[style*="object-fit: contain"]),
.image-blocks-horizontal__image:has(.image-blocks-horizontal__item-icon) {
	background: var(--gray-lighter);
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.image-blocks-horizontal__image:has(img[style*="object-fit: contain"]) img {
    top: 50%;
    left: 50%;
    width: calc(100% - 60px) !important;
    height: calc(100% - 60px) !important;
    transform: translate(-50%, -50%);
}

.image-blocks-horizontal__image img {
	object-fit: cover;
	object-position: center center;
	position: absolute;
	top: 0;
	left: 0;
	height: 100% !important;
	width: 100% !important;
}


/* item backgrounds */
.image-blocks-horizontal__card[class*="bg-"] {
	border-radius: 15px;
}

.image-blocks-horizontal__card[class*="bg-"] .image-blocks-horizontal__content {
	border: 0 none;
}

.image-blocks-horizontal__card[class*="bg-"] .image-blocks-horizontal__image:has(img[style*="object-fit: contain"]) {
	background-color: transparent;
}

.image-blocks-horizontal__card.bg-primary {
	background-color: var(--brand-primary);
}

.image-blocks-horizontal__card.bg-info {
	background-color: var(--brand-info);
}

.image-blocks-horizontal__card.bg-success {
	background-color: var(--brand-success);
}

.image-blocks-horizontal__card.bg-warning {
	background-color: var(--brand-warning);
}

.image-blocks-horizontal__card.bg-danger {
	background-color: var(--brand-danger);
}

.image-blocks-horizontal__card.bg-dark {
	background-color: var(--gray-darker);
}

.image-blocks-horizontal__card.bg-gray-lighter {
	background-color: var(--gray-lighter);
}

.image-blocks-horizontal__card.bg-msr-yellow {
	background-color: var(--msr-yellow);
}

.image-blocks-horizontal__card.bg-crown-red {
	background-color: var(--crown-red);
}

.image-blocks-horizontal__card.bg-primary,
.image-blocks-horizontal__card.bg-info,
.image-blocks-horizontal__card.bg-success,
.image-blocks-horizontal__card.bg-danger,
.image-blocks-horizontal__card.bg-dark,
.image-blocks-horizontal__card.bg-msr-yellow,
.image-blocks-horizontal__card.bg-crown-red {
	color: #fff;

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		color: #fff;
	}

	a:not(.btn) {
		color: #fff;
	}
	a:not(.btn):hover {
		color: #fff;
	}

}

/* Adjust the whole set if one icon is set, so that things line up if semi-iconographic images are used */
.image-blocks-horizontal__items:has(.image-blocks-horizontal__item-icon) .image-blocks-horizontal__image:has(img[style*="object-fit: contain"]) img {
	max-width: 150px;
	max-height: 150px;
}

@media (min-width: 992px) {
	@container imageblockshorizontal (min-width: 565px) {
		.image-blocks-horizontal__content h4 {
			margin: 10px 0 10px;
		}

		.image-blocks-horizontal__content {
			border-left: 0 none;
			border-radius: 0 15px 15px 0;
		}

		.image-blocks-horizontal__image {
			border-radius: 15px 0 0 15px;
		}
	}
	@container imageblockshorizontal (max-width: 565px) {
		.image-blocks-horizontal__content {
			border-top: 0 none;
		}
	}
}