/* ========================================== */
/* استایل لوگوها - App_Styles/Logo/logo.css */
/* ========================================== */

/* ========================================== */
/* ⭐⭐ متغیرهای جابجایی لوگو از variables.css استفاده می‌شود */
/* ========================================== */

/* ========================================== */
/* کانتینر اصلی لوگو */
/* ========================================== */
.logo-wrapper {
  display: flex;
  align-items: flex-start; /* ← همیشه از بالا */
  justify-content: space-between; /* ← همیشه دو طرف */
  width: calc(100% - (var(--side-spacing) * 2));
  margin-left: var(--side-spacing);
  margin-right: var(--side-spacing);
  margin-top: var(--logo-top-margin);
  padding: 0;
  background: transparent;
  box-sizing: border-box;
  position: relative;
  flex-wrap: nowrap; /* ← هرگز به خط بعد نروند */
}

/* ========================================== */
/* کانتینر هر لوگو */
/* ========================================== */
.logo-container {
  position: relative;
  display: flex;
  align-items: flex-start; /* ← همیشه از بالا */
  flex: 1;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.logo-container-left {
  justify-content: flex-start; /* ← همیشه سمت چپ */
  order: 0;
}

.logo-container-right {
  justify-content: flex-end; /* ← همیشه سمت راست */
  order: 1;
}

.logo-container img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-hidden {
  display: none !important;
}

/* ========================================== */
/* ⭐⭐ لوگو برای زبان‌های راست‌چین (fa, ar, he) */
/* ========================================== */
.logo-pair-left {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start; /* ← همیشه سمت چپ */
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.logo-fa-ar {
  width: calc(9vw * var(--logo-scale));
  height: calc(9vw * var(--logo-scale));
  max-width: calc(100px * var(--logo-scale));
  max-height: calc(100px * var(--logo-scale));
  position: relative;
  z-index: 1;
  transform: translate(var(--logo-fa-translate-x), var(--logo-fa-translate-y));
  flex-shrink: 0;
  display: block;
}

.logotitle-fa-ar {
  width: calc(38vw * var(--logo-scale));
  height: auto;
  max-width: calc(400px * var(--logo-scale));
  position: relative;
  z-index: 1;
  transform: translate(
    var(--logotitle-fa-translate-x),
    var(--logotitle-fa-translate-y)
  );
  flex-shrink: 0;
  display: block;
}

/* ========================================== */
/* ⭐⭐ لوگو برای زبان‌های چپ‌چین (en, ru, zh) */
/* ========================================== */
.logo-pair-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end; /* ← همیشه سمت راست */
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.logotitle-en-ru {
  width: calc(38vw * var(--logo-scale));
  height: auto;
  max-width: calc(300px * var(--logo-scale));
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transform: translate(
    var(--logotitle-en-translate-x),
    var(--logotitle-en-translate-y)
  );
  display: block;
}

.logo-en-ru {
  width: calc(9vw * var(--logo-scale));
  height: calc(9vw * var(--logo-scale));
  max-width: calc(100px * var(--logo-scale));
  max-height: calc(100px * var(--logo-scale));
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transform: translate(var(--logo-en-translate-x), var(--logo-en-translate-y));
  display: block;
}

/* ========================================== */
/* ========================================== */
/* ⭐⭐ کوئری برای تغییر اندازه در موبایل (فقط اندازه، نه موقعیت) */
/* ========================================== */
/* ========================================== */

/* تبلت */
@media (max-width: 1024px) {
  .logo-wrapper {
    margin-top: calc(var(--logo-top-margin) * 0.8);
  }

  .logo-pair-left {
    gap: 6px;
  }

  .logo-pair-right {
    gap: 6px;
  }
}

/* موبایل - فقط اندازه لوگوها تغییر می‌کند، موقعیت ثابت */
@media (max-width: 768px) {
  .logo-wrapper {
    margin-top: calc(var(--logo-top-margin) * 0.6);
    flex-wrap: nowrap; /* ← هرگز به خط بعد نروند */
  }

  .logo-container {
    align-items: flex-start; /* ← همیشه از بالا */
  }

  .logo-container-left {
    justify-content: flex-start; /* ← همیشه سمت چپ */
  }

  .logo-container-right {
    justify-content: flex-end; /* ← همیشه سمت راست */
  }

  .logo-pair-left {
    justify-content: flex-start; /* ← همیشه سمت چپ */
    gap: 5px;
  }

  .logo-pair-right {
    justify-content: flex-end; /* ← همیشه سمت راست */
    gap: 5px;
  }
}

/* موبایل خیلی کوچک */
@media (max-width: 480px) {
  .logo-wrapper {
    margin-top: calc(var(--logo-top-margin) * 0.4);
    flex-wrap: nowrap; /* ← هرگز به خط بعد نروند */
  }

  .logo-pair-left {
    gap: 4px;
  }

  .logo-pair-right {
    gap: 4px;
  }
}
