/* IBD Modern — mobile marquee only. */
@media (max-width: 991.98px) {
  #clients .logo-carousel {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    isolation: isolate;
  }

  #clients .logo-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    gap: 0 !important;
    margin: 0 !important;
    animation: ibdMobileLogoMarquee 24s linear infinite !important;
    -webkit-animation: ibdMobileLogoMarquee 24s linear infinite !important;
    transition: none !important;
    will-change: transform;
  }

  #clients .logo-carousel-track img {
    flex: 0 0 50vw !important;
    width: 50vw !important;
    max-width: 50vw !important;
    height: 72px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    object-fit: contain !important;
    display: block !important;
  }
}

/* MOBILE STATIC SERVICES GRID — the interactive 3D cube is switched
   off entirely on mobile (see services() in ibd.js: the whole
   '(max-width: 991.98px)' ScrollTrigger branch is now a no-op, so
   there is no pin, no scroll-driven rotation, nothing left that can
   race against image loading or scroll timing on a phone). Desktop
   keeps the original rotating cube, completely unchanged, via the
   '(min-width: 992px)' branch in that same file.
   These are the SAME six .face elements/photos used by the desktop
   cube (so nothing else about the markup needed to change) --
   here they're just laid out as a plain, static 2-column photo grid
   that scrolls normally with the page like any other section. Last
   stylesheet wins, so this is the authoritative mobile layout for
   these elements. */
@media (max-width: 991.98px) {
  #services.services {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-top: 62px !important;
    padding-bottom: 40px !important;
  }

  #services .cube-pin-frame {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    position: static !important;
    overflow: visible !important;
    transform: none !important;
    transform-style: flat !important;
  }

  #services .cube-wrapper {
    width: 100% !important;
    height: auto !important;
    max-width: 420px !important;
    margin: 24px auto 0 !important;
    padding: 0 4px !important;
    display: block !important;
    transform: none !important;
    perspective: none !important;
    -webkit-perspective: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
    overflow: visible !important;
  }

  #services .cube-wrapper::before,
  #services .cube-wrapper::after {
    display: none !important;
  }

  #services .cube {
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    position: static !important;
    transform: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
  }

  #services .face {
    position: static !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
  }

  #services .face img {
    display: none !important;
  }

  #services .front,
  #services .back,
  #services .right,
  #services .left,
  #services .top,
  #services .bottom {
    transform: none !important;
  }
}


@keyframes ibdMobileLogoMarquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #clients .logo-carousel-track {
    animation: none !important;
    -webkit-animation: none !important;
  }
}
