/* Section 9 ("خلّني أعرّفك على ربعنا" — crew/partner logos) — a plain,
   un-pinned white page: normal document scroll carries section 8 straight
   into this one, no pinned-scroll trick like sections 4-8 use. Two animated
   layers: the intro text reveals with the same scroll-linked mask used
   everywhere else (see .services-mask in services.css), then the logo row
   runs a continuous, self-playing marquee — the "always animated" premium
   touch — independent of scroll. Each logo sits in an unstyled fixed-size
   square slot (no card/border/background) so every brand mark gets the same
   footprint and reads at the same visual size via object-fit: contain,
   regardless of its own source dimensions/aspect ratio — logos render in
   their native color, no monochrome/hover-tint treatment. */

.partners-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: var(--color-surface);
  /* No forced full-screen height any more: the contact form section sits
     right below and fills what used to be an empty gap under the logos. */
  padding: clamp(72px, 12vh, 120px) 0 clamp(8px, 2vw, 24px);
}

.partners-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--color-logo-lavender) 16%, transparent), transparent 60%);
}

.partners-intro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.partners-mask {
  overflow: hidden;
}

.partners-heading,
.partners-subheading {
  transform: translateY(100%);
  will-change: transform;
}

.partners-heading {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: clamp(36px, 6.4vw, 78px);
  line-height: 1.1;
  color: var(--color-ink);
}

.partners-subheading {
  margin-top: 16px;
  font-family: var(--font-ar-secondary);
  font-weight: 600;
  font-size: clamp(16px, 1.8vw, 23px);
  color: var(--color-ink-muted);
}

/* --- Badge marquee --- */

.partners-marquee {
  position: relative;
  z-index: 1;
  /* On the Arabic page this sits in an RTL ancestor. .partners-track already
     forces ltr for its own content order (see below), but the oversized
     track box itself still anchored to this element's inline-start edge —
     the RIGHT edge under RTL — so translateX(-50%) shifted it clean off
     the visible mask instead of looping. Forcing ltr here too anchors the
     track to the left, same as the (already-working) English page. */
  direction: ltr;
  width: 100%;
  max-width: 1240px;
  margin-top: clamp(56px, 9vh, 100px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.partners-marquee.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Forced ltr, like .intro-title-letters in hero.css: on the Arabic page the
   track sits in an RTL ancestor, and the loop only reads as seamless if the
   badge order stays fixed regardless of page direction. */
.partners-track {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  width: max-content;
  animation: partners-marquee-scroll 30s linear infinite;
}

.partners-marquee:hover .partners-track {
  animation-play-state: paused;
}

@keyframes partners-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* Track holds two identical copies of the 9 logos back to back, so
       shifting by exactly half its width loops with no visible seam. */
    transform: translateX(-50%);
  }
}

.partner-logo-tile {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(120px, 12vw, 168px);
  height: clamp(120px, 12vw, 168px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.partner-logo-tile:hover {
  transform: scale(1.08);
  z-index: 2;
}

.partner-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .partners-section {
    padding: 72px 0 8px;
  }

  .partner-logo-tile {
    width: 96px;
    height: 96px;
  }

  .partners-track {
    gap: 16px;
  }
}

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