/* AEKE .sg — logo-list section: the press logos.
 *
 * A port of the theme's `logo-list.css`.
 *
 * MEASURED AGAINST THE LIVE SITE: twelve logos in a six-column grid, two rows, 20px
 * gap, each in a 204px cell holding a 184px image — so `.logo-list--logo--has-bg`'s
 * 10px padding on each side, and the cell row is 101px (81 of image plus that
 * padding). The list itself carries the 50px page gutter.
 */

.logo-list {
  max-width: var(--grid-width-row);
  margin-right: auto;
  margin-left: auto;
  padding: 0 15px;
}

@media (min-width: 48em) {
  .logo-list {
    padding: 0 50px;
  }
}

.logo-list--inner {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 48em) {
  .logo-list--inner {
    gap: 20px;
    grid-template-columns: repeat(var(--logo-columns, 6), 1fr);
  }
}

.logo-list--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

/* A logo cell with its own ground. The theme calls this `--has-bg` and paints it
   with `--logo-bg`; the padding is what makes the image 184 rather than 204 wide. */
.logo-list--logo--has-bg {
  isolation: isolate;
  padding: 10px;
  border-radius: var(--block-border-radius);
  background: var(--logo-bg);
}

.logo-list--logo img {
  width: 100%;
  height: auto;
  transition: transform 0.25s var(--ease-theme);
}

/* Only a logo that goes somewhere responds to a pointer. `aria-disabled` is the
   theme's own switch, and it doubles as the cursor guard. */
.logo-list--logo:not([aria-disabled]):hover img {
  transform: scale(1.07);
}

.logo-list--logo[aria-disabled] {
  pointer-events: none;
}

/* Below 768px the row becomes a horizontal, snapping strip — two cells visible at a
   time. Same treatment as the gallery, the workout strip and the media grid. */
@media (max-width: 47.99em) {
  .logo-list--inner.swipe-on-mobile {
    grid-auto-flow: column;
    grid-auto-columns: minmax(calc(50vw - 30px), 1fr);
    grid-template-columns: repeat(auto-fill, minmax(calc(50vw - 30px), 1fr));
    width: calc(100% + 30px);
    margin-left: -15px;
    padding: 0 15px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .logo-list--inner.swipe-on-mobile::-webkit-scrollbar {
    display: none;
  }

  .logo-list--inner.swipe-on-mobile .logo-list--logo {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}
