.icon-links-block {
	display: grid;
	grid-template-columns: repeat(var(--icl-columns), minmax(0, 1fr));
	gap: clamp(1rem, 3vw, var(--icl-gap));
	width: 100%;

	/* If a background colour is used... */
	&.has-background {

		@media (max-width: 500px) {
			row-gap: clamp(1rem, 3vw, var(--icl-gap)) !important;
		}
		.icon-link-item {
			padding: 40px 30px;
		}

	}

	/* Responsive column cascade - overrides the ACF-selected column count */
	@media (max-width: 1188px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--padding-y);
	}

	@media (max-width: 886px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 80px;
	}

	@media (max-width: 662px) {
		grid-template-columns: 1fr;
		row-gap: 40px;
	}

	/* Link item styles */
	.icon-link-item {

		display: flex;
		flex-direction: column;

		&[class*="text-center"] {
			align-items: center;
		}

		@media (max-width: 662px) {
			max-width: 100%;
		}

		.icon-wrapper {
			/* 10% tint of the chosen icon accent colour (falls back to teal) */
			background-color: color-mix(in srgb, var(--icl-icon-color, var(--wp--preset--color--teal)) 10%, transparent);
			border-radius: 50%;
			display: grid;
			justify-self: center;
			place-content: center;
			height: 48px;
			text-align: center;
			width: 48px;

			.icon-svg {
				/* Recolours the uploaded SVG by using it as a mask over a solid fill,
				   since an <img>'s own colours can't be overridden with CSS. */
				background-color: var(--icl-icon-color, var(--wp--preset--color--teal));
				display: inline-block;
				height: 24px;
				width: 24px;
				-webkit-mask-image: var(--icl-icon-mask);
				mask-image: var(--icl-icon-mask);
				-webkit-mask-position: center;
				mask-position: center;
				-webkit-mask-repeat: no-repeat;
				mask-repeat: no-repeat;
				-webkit-mask-size: contain;
				mask-size: contain;
			}
		}

		.logo-wrapper {
			display: grid;
			justify-self: center;
			place-content: center;
			height: 80px;
			text-align: center;
			width: 200px;
			img {
				height: 100%;
				object-fit: contain;
				object-position: center;
				width: 100%;
			}
		}

	}

}


.wp-block-separator + .icon-links-block {
	margin-bottom: var(--padding-y);
	margin-top: 60px;

	@media (max-width: 662px) {
		margin-top: var(--padding-y);		
	}
	
}

.wp-block-group.has-background h2 + .wp-block-separator,
.wp-block-group.has-background h3 + .wp-block-separator {
	margin-top: var(--padding-y);
}
