/* ==========================================================================
   logo-wall.css – Clients (1:6211), Consultants (1:7245), Contractors (1:6646)
   Blue page hero + a wall of 240 × 136 logo tiles: 6 per row, 32px column gap,
   rows 184px apart with a #c8c8c8 rule 24px under each row and a short #c8c8c8
   divider between tiles. A shorter last row is centred (as in Figma).
   ========================================================================== */

.logo-wall { position: relative; padding-top: calc(106 * var(--u)); }
.logo-wall__triangles { position: absolute; width: calc(224 * var(--u)); height: calc(588 * var(--u)); max-width: none; pointer-events: none; }
.logo-wall__triangles--left { left: calc(-2 * var(--u)); top: calc(-228 * var(--u)); }
.logo-wall__triangles--right { right: 0; width: calc(221 * var(--u)); top: calc(var(--tri-top) * var(--u)); z-index: -1; }

.logo-wall__grid {
  --cols: 6; --gap-x: calc(32 * var(--u)); --gap-y: calc(48 * var(--u));
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center;
  column-gap: var(--gap-x); row-gap: var(--gap-y);
}
.logo-wall__item {
  position: relative;
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap-x)) / var(--cols));
  aspect-ratio: 240 / 136;
  background: #fff;
}
.logo-wall__item img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s var(--ease-out); }
.logo-wall__item:hover img { transform: scale(1.04); }
/* vertical divider in the middle of the gap, left of every tile except the first in a row */
.logo-wall__item::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(var(--gap-x) / -2); width: 1px;
  background: var(--c-border);
}
/* horizontal rule under every full row (drawn from the row's first tile, full grid width) */
.logo-wall__item::after {
  content: ""; position: absolute; left: 0; height: 1px;
  bottom: calc(var(--gap-y) / -2);
  width: calc(var(--cols) * 100% + (var(--cols) - 1) * var(--gap-x) * 1);
  background: var(--c-border);
  display: none;
}

/* desktop: 6 per row */
.logo-wall__item:nth-child(6n + 1)::before { display: none; }
.logo-wall__item:nth-child(6n + 1):not(:nth-last-child(-n + 6))::after { display: block; }

/* the grid fades in row by row (handled in js/logo-wall.js) */

/* ==========================================================================
   TABLET + MOBILE (< 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .logo-wall { padding-top: 56px; }
  .logo-wall__triangles { display: none; }
  .logo-wall__grid { --cols: 4; --gap-x: 24px; --gap-y: 40px; }
  .logo-wall__item:nth-child(6n + 1)::before { display: block; }
  .logo-wall__item:nth-child(6n + 1):not(:nth-last-child(-n + 6))::after { display: none; }
  .logo-wall__item:nth-child(4n + 1)::before { display: none; }
  .logo-wall__item:nth-child(4n + 1):not(:nth-last-child(-n + 4))::after { display: block; }
}

@media (max-width: 767.98px) {
  .logo-wall__grid { --cols: 2; --gap-x: 20px; --gap-y: 32px; }
  .logo-wall__item:nth-child(4n + 1)::before { display: block; }
  .logo-wall__item:nth-child(4n + 1):not(:nth-last-child(-n + 4))::after { display: none; }
  .logo-wall__item:nth-child(2n + 1)::before { display: none; }
  .logo-wall__item:nth-child(2n + 1):not(:nth-last-child(-n + 2))::after { display: block; }
}
