/* =====================================
   LOGO ANIMATION – EXTRA LARGE (FINAL)
   ===================================== */

.logo-section {
  width: 100%;
  height: 280px;
  margin-top: 70px; /* ارتفاع الناف بار */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

/* الحاوية الرئيسية */
.logo-animation {
  position: relative;
  width: 777px;
  height: 444px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* أجزاء اللوجو */
.logo-part {
  height: 100%;
  max-height: 320px;
  width: auto;
  opacity: 0;
}

/* =========================
   RIGHT PART (يمين → التصاق → استقرار)
   ========================= */
.logo-part.right {
  animation: logoRightFinal 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes logoRightFinal {
  0% {
    transform: translateX(120%);
    margin-left: 0;
    opacity: 0;
  }

  55% {
    transform: translateX(0);
    margin-left: -120px; /* اقتراب */
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    margin-left: -50px; /* استقرار */
    opacity: 1;
  }
}

/* =========================
   LEFT PART (يسار → اندفاع قوي → رجوع)
   ========================= */
.logo-part.left {
  animation: logoLeftFinal 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes logoLeftFinal {
  0% {
    transform: translateX(-120%);
    margin-right: 0;
    opacity: 0;
  }

  55% {
    transform: translateX(0);
    margin-right: -520px; /* اندفاع قوي */
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    margin-right: -50px; /* استقرار نهائي */
    opacity: 1;
  }
}

/* =========================
   MOBILE ADJUSTMENTS
   ========================= */
@media (max-width: 768px) {
  .logo-section {
    height: 190px;
  }

  .logo-animation {
    width: 90vw;
    height: 200px;
  }

  .logo-part {
    max-height: 140px;
  }

  .logo-part.right {
    animation: logoRightMobile 2s ease forwards;
  }

  .logo-part.left {
    animation: logoLeftMobile 2s ease forwards;
  }

  @keyframes logoRightMobile {
    0% {
      transform: translateX(120%);
      margin-left: 0;
      opacity: 0;
    }
    60% {
      margin-left: -60px;
      opacity: 1;
    }
    100% {
      margin-left: -20px;
      opacity: 1;
    }
  }

  @keyframes logoLeftMobile {
    0% {
      transform: translateX(-120%);
      margin-right: 0;
      opacity: 0;
    }
    60% {
      margin-right: -180px;
      opacity: 1;
    }
    100% {
      margin-right: -20px;
      opacity: 1;
    }
  }
}
