/* CustomerStoriesLogo — Figma 16806-33498 (desktop) / 19816-24341 (tablet↓) */

.csl {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  font-family: Inter, sans-serif;
  background-color: transparent;
}

.csl--dark {
  background-color: transparent;
}

.csl__grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #e6e5e3;
  border-top: none;
  border-radius: 4px;
  overflow: hidden;
}

.csl--dark .csl__grid {
  border-color: rgba(255, 255, 255, 0.2);
}

.csl__row {
  display: flex;
  width: 100%;
  height: 140px;
}

.csl__row:not(:last-child) {
  margin-bottom: -1px;
}

.csl__cell {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  margin-right: -1px;
  border: 1px solid #e6e5e3;
  background-color: #ffffff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.csl__cell:last-child {
  margin-right: 0;
}

.csl--dark .csl__cell {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: #000000;
}

.csl__cell--linked:hover,
.csl__cell--linked:focus-visible {
  flex: 0 0 clamp(200px, 32vw, 360px);
  z-index: 2;
}

.csl__row:has(.csl__cell--linked:hover) .csl__cell:not(:hover),
.csl__row:has(.csl__cell--linked:focus-visible) .csl__cell:not(:focus-visible) {
  flex: 1 1 0;
}

.csl__cell--linked {
  cursor: pointer;
}

.csl__cell-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.csl__cell-bg img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110%;
  height: 110%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    lightgray 0px -20.349px / 100% 118.333% no-repeat;
  filter: blur(6px);
}

.csl__cell--linked:hover .csl__cell-bg,
.csl__cell--linked:focus-visible .csl__cell-bg {
  opacity: 1;
}

.csl__logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  height: 48px;
}

.csl__logo-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.csl__logo-img--hover {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}

.csl__cell--linked:hover .csl__logo-img--default,
.csl__cell--linked:focus-visible .csl__logo-img--default {
  opacity: 0;
}

.csl__cell--linked:hover .csl__logo-img--hover,
.csl__cell--linked:focus-visible .csl__logo-img--hover {
  opacity: 1;
}

.csl__arrow {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 266.667px;
  background-color: #f0eeec;
  color: #0e0d0c;
  pointer-events: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.csl__arrow-label {
  text-align: center;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 450;
  line-height: 150%;
  letter-spacing: -0.12px;
  white-space: nowrap;
}

.csl--dark .csl__arrow {
  background-color: rgba(239, 238, 236, 0.2);
  color: #ffffff;
}

.csl__cell--linked:hover .csl__arrow,
.csl__cell--linked:focus-visible .csl__arrow {
  background-color: rgba(239, 238, 236, 0.2);
  color: #ffffff;
  cursor: pointer;
}

.csl__arrow-icon {
  display: block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .csl__cell--linked:hover,
  .csl__cell--linked:focus-visible {
    flex: 0 0 clamp(160px, 38vw, 280px);
  }
}

/* iPad and down — Figma node 19816-24341: flat 2-column grid, 140px cells */
@media (max-width: 991px) {
  .csl__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Flatten desktop rows of 5 so all cells flow into the 2-col grid */
  .csl__row {
    display: contents;
  }

  .csl__cell {
    flex: none;
    width: auto;
    height: 140px;
    margin-right: -1px;
    margin-bottom: -1px;
  }

  /* Right-column cells in the 2-col grid — keep right border visible */
  .csl__row:nth-child(odd) .csl__cell:nth-child(even),
  .csl__row:nth-child(even) .csl__cell:nth-child(odd) {
    margin-right: 0;
  }

  /* No top border on the visual top row in 2-col layout */
  .csl__row:first-child .csl__cell:nth-child(-n + 2) {
    border-top: none;
  }

  .csl__cell--linked:hover,
  .csl__cell--linked:focus-visible {
    flex: none;
  }

  /* Case-study cells show photo + white logo at rest (no hover on touch) */
  .csl__cell--preview .csl__cell-bg {
    opacity: 1;
  }

  .csl__cell--preview .csl__logo-img--default {
    opacity: 0;
  }

  .csl__cell--preview .csl__logo-img--hover {
    opacity: 1;
  }

  .csl__cell--preview .csl__arrow {
    background-color: rgba(239, 238, 236, 0.2);
    color: #ffffff;
  }
}

