/* =========================================================
   Partners — شركاء النجاح
   Faithful rebuild of Figma node 2571:1332 (canvas 1280 · height ~808)
   Scope: everything prefixed .partners — no :root / global styling.
   band bg   #F7F7FB · eyebrow #372873 · title #241B4F · subtitle #6B6790
   ========================================================= */

.partners {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  padding: 96px 64px 72px;
  background: #f7f7fb;
  font-family: var(--font);
  overflow-x: clip;
}
.partners *,
.partners *::before,
.partners *::after { box-sizing: border-box; }

/* ---- Heading --------------------------------------------------------- */
.partners__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  text-align: center;
}
.partners__eyebrow {
  margin: 0;
  color: #372873;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.42px;
}
.partners__title {
  margin: 0;
  color: #241b4f;
  font-size: 34px;
  font-weight: 700;
}
.partners__subtitle {
  margin: 0;
  color: #6b6790;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

/* ---- Orbit (desktop/tablet) ------------------------------------------- */
.partners__orbit-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible; /* tooltips may rise above the dome */
  /* fluid downscale so the fixed 1152px scene always fits (>=1248 → 1) */
  --pt-scale: min(1, calc((100vw - 96px) / 1152));
  height: calc(552px * var(--pt-scale));
}
.partners__orbit {
  position: relative;
  flex-shrink: 0;
  width: 1152px;
  height: 552px;
  overflow: visible; /* badges/tooltips are no longer clipped; only .partners__rings is */
  transform: scale(var(--pt-scale));
  transform-origin: top center;
}

.partners__rings {
  position: absolute;
  inset: 0;
  overflow: hidden; /* crops every ring to its top half — the "dome" */
}

.partners__ring {
  position: absolute;
  border-radius: 50%;
}
.partners__ring--1 {
  left: 56px;  top: 32px;  width: 1040px; height: 1040px;
  background: #eeedf6; border: 1px solid #2a1e59;
}
.partners__ring--2 {
  left: 161px; top: 154px; width: 830px; height: 830px;
  background: #eeedf6; border: 1px solid #2a1e59;
}
.partners__ring--3 {
  left: 266px; top: 254px; width: 620px; height: 620px;
  background: #e8e5f3; border: 1px solid #372873;
}

.partners__badge {
  position: absolute;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(36, 27, 79, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.partners__badge:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 28px rgba(36, 27, 79, 0.22);
}
.partners__badge img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

/* name tooltip — shown above the badge on hover/focus */
.partners__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  transform: translateX(-50%) translateY(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #e3e1f0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(36, 27, 79, 0.2);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}
.partners__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
.partners__tip-en {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #6b6790;
  text-transform: uppercase;
}
.partners__tip-ar {
  font-size: 14px;
  font-weight: 700;
  color: #241b4f;
  direction: rtl;
}
.partners__badge:hover .partners__tip,
.partners__badge:focus-within .partners__tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.partners__badge--1 { left: 321px; top: 24px;  }
.partners__badge--2 { left: 729px; top: 24px;  }
.partners__badge--3 { left: 529px; top: 120px; }
.partners__badge--4 { left: 341px; top: 276px; }
.partners__badge--5 { left: 709px; top: 276px; }
.partners__badge--6 { left: 87px;  top: 230px; }
.partners__badge--7 { left: 978px; top: 230px; }
.partners__badge--8 { left: 147px; top: 413px; }
.partners__badge--9 { left: 923px; top: 413px; }

.partners__brand {
  position: absolute;
  left: 421px;
  top: 404px;
  width: 325px;
  height: 70px;
  object-fit: contain;
}

/* ---- Logo cloud (mobile fallback) -------------------------------------- */
.partners__cloud {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 520px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.partners__cloud li {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(36, 27, 79, 0.12);
  overflow: hidden;
}
.partners__cloud img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1120px) {
  .partners { padding: 80px 32px 56px; }
}

/* Below this, the dome scales too small to read — swap to a plain logo grid */
@media (max-width: 900px) {
  .partners { padding: 64px 20px 48px; gap: 36px; }
  .partners__orbit-wrap { display: none; }
  .partners__cloud { display: flex; }
}

@media (max-width: 480px) {
  .partners__title { font-size: 26px; }
  .partners__subtitle { font-size: 15px; }
  .partners__cloud li { width: 64px; height: 64px; }
}
