/* Landing page partners: two logo strips sliding in opposite directions.
   ----------------------------------------------------------------------
   After deraya-edu.com. Loaded by front/landing/index.blade.php on both
   sites; the markup is front/landing/partials/partners.blade.php and the
   logo loading js/landing-partners.js. Each row holds its logos twice and
   slides by half its width, so the loop is seamless; hovering pauses it.
   The logos keep their own brand colours on both sites. */

.partners-marquee {
  display: grid;
  gap: 4px;
}

/* Full width, with the ends fading out rather than cutting logos off.
   The block padding leaves room for the hover lift and its shadow. */
.partners-marquee__track {
  overflow: hidden;
  padding-block: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

/* The row holds its logos twice. The gap is repeated after the last logo
   too, so half the row is exactly one set: sliding by 50% lands on the
   copy where the original started, and the loop has no jump. */
.partners-marquee__row {
  --marquee-gap: 24px;
  display: flex;
  gap: var(--marquee-gap);
  width: max-content;
  padding-inline-end: var(--marquee-gap);
  animation: partners-marquee 40s linear infinite;
}

.partners-marquee__row--reverse {
  animation-direction: reverse;
  animation-duration: 34s;
}

.partners-marquee__row:hover,
.partners-marquee__row:focus-within {
  animation-play-state: paused;
}

/* In RTL the row starts at the right, so it slides the other way. */
[dir="rtl"] .partners-marquee__row {
  animation-name: partners-marquee-rtl;
}

@keyframes partners-marquee {
  to { transform: translateX(-50%); }
}

@keyframes partners-marquee-rtl {
  to { transform: translateX(50%); }
}

/* The landing page's card, resized for a strip. */
.partners-marquee .partner-card {
  flex: none;
  width: 150px;
  height: 96px;
  min-height: 0;
  padding: 10px 14px;
  border-radius: 14px;
}

/* The logo files carry their own white margins, so let them fill the card. */
.partners-marquee .partner-card img {
  max-height: 76px;
}

.partners-marquee .partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.partners-marquee .partner-card:hover img {
  transform: none;
}

@media (max-width: 767px) {
  .partners-marquee__row {
    --marquee-gap: 16px;
  }

  .partners-marquee .partner-card {
    width: 120px;
    height: 80px;
    padding: 8px 10px;
  }

  .partners-marquee .partner-card img {
    max-height: 64px;
  }
}

/* No motion: each strip becomes a plain horizontal scroller of one set. */
@media (prefers-reduced-motion: reduce) {
  .partners-marquee__track {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .partners-marquee__row {
    animation: none;
  }

  .partners-marquee__row > [aria-hidden="true"] {
    display: none;
  }
}
