/**
 * Static logo row with vertical dividers. See template-parts/logo-row.php.
 * Same section padding/heading treatment as gallery-carousel.css's
 * `.cwf-gallery`/`.cwf-gallery__heading--large` (this replaces that
 * component for Home's "Our Clients" section specifically), kept as
 * its own file/component rather than folded into gallery-carousel.css
 * since it has no slider mechanics at all -- a genuinely different
 * component, not a variant of the carousel.
 */
.cwf-logo-row {
	padding: 60px 56px;
	background: var(--color-black);
	text-align: center;
}

.cwf-logo-row__heading {
	margin: 0 0 40px;
	font-family: var(--font-nav-submenu); /* Montserrat, matches gallery-carousel.php's `heading_variant: 'large'` treatment this section used previously */
	font-size: 60px;
	font-weight: 600;
	text-transform: capitalize;
	color: var(--color-white);
}

.cwf-logo-row__row {
	display: flex;
	flex-wrap: nowrap; /* per the client's explicit request -- all 8
	                       logos stay on one line at every width, never
	                       stack into multiple rows */
	align-items: center;
	justify-content: center;
	max-width: 1600px; /* was 1328px (every other section's inset width)
	                       -- widened per the client's request for
	                       bigger logos: 8 items sharing a fixed width is
	                       the real ceiling on how large each can render,
	                       so more total width matters more here than it
	                       would for a normal single block of content. */
	margin: 0 auto;
	width: 100%;
}

.cwf-logo-row__item {
	position: relative; /* positions the ::after divider below */
	display: flex;
	flex: 1 1 0; /* per the client's explicit request -- no scrollbar,
	                 ever: each of the 8 items shrinks equally so the
	                 whole row always fits the available width exactly,
	                 instead of overflowing into a scrollable row (the
	                 earlier approach). `min-width: 0` is required for
	                 this to actually shrink below the logo's natural
	                 size -- flex items default to `min-width: auto`
	                 (their content's own intrinsic width), which
	                 silently ignores `flex-shrink` otherwise. */
	min-width: 0;
	align-items: center;
	justify-content: center;
	padding: 8px 4px; /* was 16px 6px -- decreased further per the
	                      client's follow-up request ("still very small,
	                      lots of padding") -- every pixel of padding
	                      directly steals from how big object-fit:
	                      contain can render each logo, in both this
	                      dimension and, once the box is taller (below),
	                      the vertical one too. */
	height: 140px; /* was 90px -- the other lever for "bigger": most
	                    logos here are wide/short, so extra box HEIGHT
	                    is often what object-fit: contain was actually
	                    scaling down against, not available width. */
}

/* The divider -- a thin vertical white line between each logo, per the
   client's explicit request, faded at both ends (transparent -> white
   -> transparent) rather than a hard-edged line -- same fade-at-the-
   ends idea as template-parts/section-divider.php's own horizontal
   line, just rotated 90deg here. A gradient can't be applied to a
   plain `border`, so this is a `::after` pseudo-element instead:
   absolutely positioned, 1px wide, full height of the item, with the
   gradient as its background. `:not(:last-child)` rather than a
   separate element between pairs: simpler markup, and (before
   `flex-wrap: nowrap` above) it degraded gracefully when the row
   wrapped too, without needing special first/last-in-row detection. */
.cwf-logo-row__item:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 1px;
	background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.cwf-logo-row__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain; /* both dimensions fixed to the shrinking flex
	                         item's own box, not just height -- lets
	                         object-fit actually scale the logo down
	                         proportionally as the item shrinks, rather
	                         than the image trying to render at its own
	                         intrinsic width and getting clipped/
	                         distorted by a `max-width` cap instead. */
}

@media (max-width: 767px) {
	.cwf-logo-row {
		padding: 40px 20px;
	}
	.cwf-logo-row__heading {
		font-size: clamp(28px, 7vw, 44px);
		margin-bottom: 24px;
	}
	.cwf-logo-row__item {
		height: 90px; /* was 64px -- bumped along with the desktop height increase, still shorter than desktop's 140px since a phone-width row has far less width to spare per item */
		padding: 6px 2px; /* was 10px 4px -- even tighter than desktop's
		                      already-reduced padding, 8 shrinking items
		                      have far less room to spare on a
		                      phone-width row */
	}
}
