/* ==========================================================================
   International collaborations section

   Replaces a stack of full-width banner images and inline-styled headings with
   a responsive partner-card grid: one column on phones, three from tablet up.
   ========================================================================== */

.intl-collab {
  padding: clamp(24px, 5vw, 56px) 0 clamp(28px, 5vw, 60px);
  background: linear-gradient(180deg, #fbfbfc 0%, #f4f5f7 100%);

  /* Full-bleed. The wrapper (.imp_text_vid_container) has side padding, so
     without this the section's background stopped short of the screen edges
     and the page colour showed through as pale strips down both sides. */
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.intl-collab__banner {
  max-width: 1120px;
  margin: 0 auto clamp(20px, 4vw, 40px);
  padding: 0 clamp(14px, 3vw, 24px);
}

.intl-collab__banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 20, 32, .12);
}

.intl-collab__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 24px);
  text-align: center;
}

.intl-collab__eyebrow {
  margin: 0 0 8px;
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #eb6020;
}

.intl-collab__title {
  margin: 0 auto clamp(14px, 2.4vw, 20px);
  max-width: 24ch;
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  color: #14161c;
}

/* Was a fixed-height 80px box whose 32px heading overflowed on any narrow
   screen. It now sizes to its content, but keeps the attention-grabbing blink
   the original had. The colour is animated rather than opacity, so the text
   never disappears completely and stays readable throughout the cycle. */
.intl-collab__highlight {
  display: inline-block;
  margin: 0 auto clamp(22px, 4vw, 38px);
  padding: 10px 20px;
  background: #fffec8;
  border: 1px solid #f2e9a0;
  border-radius: 999px;
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 700;
  line-height: 1.3;
  color: #c2450f;
  animation: intlCollabBlink 1.2s steps(1, end) infinite;
}

@keyframes intlCollabBlink {
  0%,  49% { color: #c2450f; background: #fffec8; }
  50%, 99% { color: #8b0000; background: #fff7a8; }
}

@media (prefers-reduced-motion: reduce) {
  .intl-collab__highlight { animation: none; }
}

/* --------------------------------------------------------------------------
   Partner rail - one compact row that scrolls itself

   The cards are rendered twice in the markup and the rail is translated by
   exactly -50%, so the moment the first set leaves the viewport the second set
   is in precisely the same place: the loop has no visible seam and needs no
   JavaScript. The track stays swipeable, and the animation pauses whenever the
   visitor is interacting with it.
   -------------------------------------------------------------------------- */

.intl-collab__marquee {
  position: relative;
  overflow: hidden;
  padding: 4px 0 10px;

  /* Full-bleed: break out of every ancestor's side padding so the rail runs
     the whole width of the screen. A scrolling strip that stops short of the
     edges reads as clipped; running edge to edge makes the motion obvious. */
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);

  /* Fade the cut edges so cards enter and leave instead of being sliced off */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.intl-collab__rail {
  display: flex;
  width: max-content;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  animation: intlCollabScroll 34s linear infinite;
}

/* -50% is one full copy of the card set */
@keyframes intlCollabScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.intl-collab__marquee:hover .intl-collab__rail,
.intl-collab__marquee:focus-within .intl-collab__rail {
  animation-play-state: paused;
}

.partner-card {
  flex: 0 0 auto;
  width: 216px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(16, 20, 32, .08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 20, 32, .06);
  transition: box-shadow .28s cubic-bezier(.4, 0, .2, 1);
}

.partner-card:hover { box-shadow: 0 12px 28px rgba(16, 20, 32, .14); }

/* Fixed ratio so three banners of differing sizes line up as a tidy row */
.partner-card__media {
  aspect-ratio: 16 / 9;
  background: #eef0f3;
  overflow: hidden;
}

@supports not (aspect-ratio: 16 / 9) {
  .partner-card__media { height: 0; padding-top: 56.25%; position: relative; }
  .partner-card__media img { position: absolute; inset: 0; }
}

.partner-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.partner-card__body { padding: 10px 12px 12px; }

.partner-card__name {
  margin: 0 0 2px;
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #14161c;
}

.partner-card__place {
  margin: 0;
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #61667a;
}

@media (min-width: 992px) {
  .partner-card { width: 260px; }
  .intl-collab__rail { gap: 18px; animation-duration: 44s; }
  .partner-card__name { font-size: 15px; }
}

/* A moving strip is exactly what reduced-motion asks us not to do. Fall back
   to a static, manually swipeable row. */
@media (prefers-reduced-motion: reduce) {
  .intl-collab__marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .intl-collab__rail { animation: none; }
  .partner-card { transition: none; }
}

/* ==========================================================================
   Desktop (>=992px): restore the original presentation.

   The markup had to be rebuilt (it contained an unclosed </div and three style
   attributes broken by a stray quote), so desktop cannot simply revert to the
   old HTML. These rules render the corrected markup the way the original
   looked: a full-width banner per partner, its name centred above it, and the
   highlight back in its yellow blinking bar.
   ========================================================================== */

@media (min-width: 992px) {
    .intl-collab {
        background: none;
        padding: 15px 0;
        width: auto;
        margin-left: 0;
        transform: none;
    }

    .intl-collab__banner,
    .intl-collab__inner { max-width: 100%; padding: 0 15px; }

    .intl-collab__banner img { border-radius: 0; box-shadow: none; }

    .intl-collab__eyebrow { display: none; }

    .intl-collab__title {
        max-width: none;
        font-size: 1.2rem;
        font-weight: bold;
        margin-bottom: 20px;
    }

    /* the original full-width yellow bar */
    .intl-collab__highlight {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 80px;
        margin: 0 0 20px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: #FFFEC8;
        color: #EB6020;
        font-size: 32px;
        font-weight: 700;
        letter-spacing: .3px;
    }

    /* stacked, not a rail */
    .intl-collab__marquee {
        width: auto;
        margin-left: 0;
        transform: none;
        overflow: visible;
        padding: 0;
        -webkit-mask-image: none;
                mask-image: none;
    }

    .intl-collab__rail {
        display: block;
        width: auto;
        animation: none;
    }

    /* the duplicate set exists only to make the mobile loop seamless */
    .intl-collab__rail .partner-card[aria-hidden="true"] { display: none; }

    .partner-card {
        width: auto;
        max-width: 800px;
        margin: 0 auto;
        display: flex;
        flex-direction: column-reverse;   /* name above image, as before */
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .partner-card:hover { box-shadow: none; }

    .partner-card__media {
        aspect-ratio: auto;
        background: none;
        overflow: visible;
    }

    .partner-card__media img { height: auto; border-radius: 10px; }
    .partner-card:hover .partner-card__media img { transform: none; }

    .partner-card__body { padding: 0; text-align: center; }

    .partner-card__name {
        font-size: 1.5rem;
        font-weight: bold;
        margin: 15px 0;
        color: inherit;
    }

    .partner-card__place { display: none; }
}
