.kw-custom {
	display: block;
}

.kw-custom-intro {
	margin: 0 0 14px;
}

.kw-custom-intro > :first-child {
	margin-top: 0;
}

.kw-custom-intro > :last-child {
	margin-bottom: 0;
}

.kw-custom-items {
	display: grid;
	grid-template-columns: repeat(var(--kw-custom-cols, 2), minmax(0, 1fr));
	gap: var(--kw-custom-gap, 5px);
	align-items: center;
	justify-items: center;
}

.kw-custom-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, var(--kw-custom-item-width, 100%));
	max-height: var(--kw-custom-item-height, none);
	min-width: 0;
	min-height: 0;
	border: 0;
	padding: 0;
	background: transparent;
	text-decoration: none;
	transition: opacity .15s ease;
}

a.kw-custom-item:hover,
a.kw-custom-item:focus {
	opacity: .82;
	text-decoration: none;
}

.kw-custom-image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: var(--kw-custom-item-height, 100%);
	object-fit: contain;
}

.kw-custom-picture {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, var(--kw-custom-item-width, 100%));
	max-width: 100%;
	max-height: var(--kw-custom-item-height, none);
}

@media (min-width: 521px) {
	.kw-custom-fixed-height .kw-custom-items {
		height: var(--kw-custom-fixed-height, auto);
		overflow: hidden;
		align-content: center;
	}

	.kw-custom-fixed-height.kw-custom-fixed-ignore-gap .kw-custom-items {
		gap: 0;
		align-content: space-evenly;
	}

	.kw-custom-fixed-height.kw-custom-fixed-force-fit .kw-custom-item,
	.kw-custom-fixed-height.kw-custom-fixed-force-fit .kw-custom-picture,
	.kw-custom-fixed-height.kw-custom-fixed-force-fit .kw-custom-image {
		max-height: var(--kw-custom-fixed-row-height, 100%);
	}
}

@media (max-width: 520px) {
	.kw-custom-items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kw-custom-mobile-single .kw-custom-items {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}

	.kw-custom-mobile-single .kw-custom-item {
		width: min(100%, var(--kw-custom-mobile-width, 260px));
		max-height: var(--kw-custom-item-mobile-height, var(--kw-custom-mobile-height, 520px));
	}

	.kw-custom-mobile-single .kw-custom-picture {
		width: min(100%, var(--kw-custom-item-mobile-width, var(--kw-custom-mobile-width, 260px)));
		max-height: var(--kw-custom-item-mobile-height, var(--kw-custom-mobile-height, 520px));
	}

	.kw-custom-mobile-single .kw-custom-image {
		width: auto;
		max-width: min(100%, var(--kw-custom-item-mobile-width, var(--kw-custom-mobile-width, 260px)));
		max-height: var(--kw-custom-item-mobile-height, var(--kw-custom-mobile-height, 520px));
	}
}
