/**
 * Partner logos — the bits theme.json can't express: the bottom hairline, the
 * responsive tile grid and the contained-logo fit. Loaded only when
 * .ab-partner-logos is on the page. Literal hex per design review.
 */
.ab-partner-logos {
	border-bottom: 1px solid #e9e9e9; /* Figma: section bottom rule */
}

/* Logo wall: grid so the column count is derived from the track count + gap with
   no magic basis math (6-up desktop, reflowing to 3-up then 2-up). Overrides the
   post-template's default flow layout. */
.ab-partner-logos .wp-block-post-template.ab-partner-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Neutralise the post-template's flow-layout sibling spacing: its `* + *`
   rule adds a 16px top margin to items 2-n, which is meaningless in a grid but
   inflates the shared row height and leaves the first (margin-less) tile with
   empty space below it — the "first tile out of sync" symptom. */
.ab-partner-logos .wp-block-post-template.ab-partner-grid > li {
	margin: 0;
}

/* Each tile: a white bordered box (Figma 190x150) with the logo centred and
   contained (never cropped or stretched). */
.ab-partner-box {
	height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: #fff;
	border: 0.6px solid #d4d4d8;
	border-radius: 8px;
}

.ab-partner-box .wp-block-post-featured-image {
	margin: 0;
	width: 100%;
	height: 100%;
}

.ab-partner-box .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (max-width: 900px) {
	.ab-partner-logos .wp-block-post-template.ab-partner-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 520px) {
	.ab-partner-logos .wp-block-post-template.ab-partner-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
