/* «Наші клієнти» — the home logo strip (render.php; motion: view.js). One row of fixed tiles: --n across (8 on desktop =
   the old 8-column cells), --g gap, --h height; a step = one tile + gap = (100 % + --g) / --n of the row's width. */
.bm-b-clients {
	--n: 8;
	--g: 14px;
	--h: 74px;
	padding: 56px 0 60px;
	background: var(--bm-g50);
	border-top: 1px solid var(--bm-border);
}
.bm-b-clients__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.bm-b-clients .bm-b-clients__head { margin-bottom: 0; }
.bm-b-clients .bm-eyebrow { margin: 0; }

/* Pause / play (WCAG 2.2.2): kept in its place while hidden (no shift when view.js shows it) */
.bm-b-clients__toggle {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	margin-left: auto;
	padding: 0;
	border: 1px solid var(--bm-g300);
	border-radius: 50%;
	background: #fff;
	color: var(--bm-strong);
	cursor: pointer;
	visibility: hidden;
	transition: background-color 200ms var(--bm-ease-out), border-color 200ms var(--bm-ease-out), color 200ms var(--bm-ease-out);
}
.bm-b-clients.is-auto .bm-b-clients__toggle { visibility: visible; }
.bm-b-clients__toggle:hover { background: var(--bm-orange); border-color: var(--bm-orange); color: #fff; }
.bm-b-clients__toggle .bm-ico { width: 16px; height: 16px; stroke-width: 2.4; stroke-linecap: round; }
.bm-b-clients__play,
.bm-b-clients__toggle[aria-pressed="true"] .bm-b-clients__pause { display: none; }
.bm-b-clients__toggle[aria-pressed="true"] .bm-b-clients__play { display: block; }

/* The row: scrollable without JS / with reduced motion; view.js (.is-auto) clips it and moves the track */
.bm-b-clients__view { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.bm-b-clients.is-auto .bm-b-clients__view { overflow: hidden; overflow: clip; scroll-snap-type: none; }
.bm-b-clients__track { display: flex; gap: var(--g); }
.bm-b-clients.is-auto .bm-b-clients__track {
	transform: translateX(calc((100% + var(--g)) / var(--n) * var(--pos, 0) * -1));
	transition: transform 700ms var(--bm-ease-out);
	will-change: transform;
}
.bm-b-clients__item {
	flex: 0 0 calc((100% - (var(--n) - 1) * var(--g)) / var(--n));
	height: var(--h);
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-r);
	background: #fff;
	scroll-snap-align: start;
}
/* the link fills the cell (the whole cell is the tap target); its focus ring sits inside the clipped row */
.bm-b-clients__tile { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 12px; border-radius: inherit; }
.bm-b-clients__tile:focus-visible { outline-offset: -3px; }
.bm-b-clients__name { font: 700 15px/1.2 var(--bm-fd); letter-spacing: .03em; text-align: center; color: var(--bm-muted-text); }
/* similar visual weight: --lw / --lwm = the display width under BM_CLIENTS_LOGO_STRIP / _PHONE (render.php) */
.bm-b-clients__img { width: var(--lw, auto); max-width: 100%; height: auto; max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter 200ms, opacity 200ms; }
/* a logo on a filled background (clients copy "plate": true; owner 2026-10-01): grey at rest too, but at full opacity —
   at 0.7 its grey plate fades towards the white cell and washes the light letters out */
.bm-b-clients__item--plate .bm-b-clients__img { opacity: 1; }
.bm-b-clients__tile:hover .bm-b-clients__img,
.bm-b-clients__tile:focus-visible .bm-b-clients__img { filter: none; opacity: 1; }
/* a logo view.js keeps unloaded until the row is near (no src yet): its box stays, its alt is not painted as text */
.bm-b-clients__img:not([src]) { color: transparent; }

@media (prefers-reduced-motion: no-preference) {
	.bm-b-clients__view { scrollbar-width: none; }
	.bm-b-clients__view::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bm-b-clients__toggle { display: none; }
	.bm-b-clients__view { padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--bm-g300) transparent; }
}
@media (pointer: coarse) {
	.bm-b-clients__toggle { width: 44px; height: 44px; }
}
@media (max-width: 1100px) {
	.bm-b-clients { --n: 6; }
}
@media (max-width: 899px) {
	.bm-b-clients { --n: 5; }
}
@media (max-width: 767px) {
	.bm-b-clients { --n: 4; --g: 10px; --h: 64px; padding: 40px 0 44px; }
	.bm-b-clients__tile { padding: 10px; }
	.bm-b-clients__img { width: var(--lwm, auto); }
}
@media (max-width: 599px) {
	.bm-b-clients { --n: 3; }
}
