/**
 * Service cards grid — pattern: services-grid-checkerboard
 *
 * Alternating soft panels; centered icon, title, copy. PHP array controls default card count.
 */

.wp-site-blocks .bnb-services-checkerboard,
.editor-styles-wrapper .bnb-services-checkerboard {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: var(--wp--preset--spacing--60, 1.5rem);
	padding-bottom: var(--wp--preset--spacing--60, 1.5rem);
}

.bnb-services-checkerboard__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
	width: 100%;
	max-width: 100%;
	align-items: stretch;
}

/* Odd: accent-secondary; even (salmon slot): accent */
.bnb-services-checkerboard__grid > .bnb-services-checkerboard__card:nth-child(odd) {
	background-color: var(--wp--preset--color--accent-secondary, #edeef6);
}

.bnb-services-checkerboard__grid > .bnb-services-checkerboard__card:nth-child(even) {
	background-color: var(--wp--preset--color--accent, #ecc4c0);
}

.bnb-services-checkerboard__card {
	position: relative;
	z-index: 0;
	width: 100%;
	max-width: 100%;
	height: 335px;
	border-radius: 2rem;
	text-align: center;
	padding: 30px;
	margin: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	margin-block-start: 0 !important;
	transform: scale(1);
	transform-origin: center center;
	box-shadow: 0 2px 10px rgba(26, 26, 26, 0.04);
}

/* Hover: transition only (no scroll-reveal keyframe animation on these cards). */
.bnb-services-checkerboard__card:hover,
.bnb-services-checkerboard__card:focus-within {
	transform: scale(1.05);
	box-shadow: 0 14px 32px rgba(26, 26, 26, 0.1);
	z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
	.bnb-services-checkerboard__card {
		--bnb-svc-card-ease: cubic-bezier(0.33, 1, 0.68, 1);

		transition:
			transform 0.55s var(--bnb-svc-card-ease),
			box-shadow 0.55s var(--bnb-svc-card-ease);
	}
}

@media (max-width: 1024px) {
	.bnb-services-checkerboard__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.bnb-services-checkerboard__grid {
		grid-template-columns: 1fr;
	}
}

.bnb-services-checkerboard__icon,
figure.bnb-services-checkerboard__icon.wp-block-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	margin: 0 0 12px !important;
	flex-shrink: 0;
	box-sizing: border-box;
}

.bnb-services-checkerboard__icon img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain !important;
}

.bnb-services-checkerboard__title,
.bnb-services-checkerboard__card h3.bnb-services-checkerboard__title {
	margin: 0 0 12px !important;
	font-size: 26px !important;
	font-weight: 700 !important;
	color: #464646 !important;
	line-height: 1.25 !important;
	width: 200px !important;
}

.bnb-services-checkerboard__text,
.bnb-services-checkerboard__card p.bnb-services-checkerboard__text {
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #464646 !important;
	line-height: 1.55 !important;
}

@media (max-width: 500px) {
	.bnb-services-checkerboard__title,
	.bnb-services-checkerboard__card h3.bnb-services-checkerboard__title {
		font-size: 22px !important;
	}

	.bnb-services-checkerboard__text,
	.bnb-services-checkerboard__card p.bnb-services-checkerboard__text {
		font-size: 13px !important;
	}
}
