/* ==========================================================================
   ۱. استایل‌های سراسری و اختصاصی دسکتاپ (دسکتاپ اولویت اول)
   ========================================================================== */

header.ft-stripe-main {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  z-index: 999;
}

header.ft-stripe-main .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1140px;
  position: relative;
}

.logo {
  font-weight: bold;
  font-size: 1.25rem;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: inherit;
}

.logo img {
  display: block;
  max-height: 100%;
  object-fit: contain;
}

.logo-text {
  display: inline-block;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.5em;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.3rem 1rem;
  text-decoration: none;
  font-size: 0.9375em;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.btn .arrow path {
  fill: none;
  stroke-width: 2px;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.btn .arrow path.arrow-line {
  transform: scaleX(0);
  transform-origin: center;
}

.btn:hover .arrow path.arrow-line {
  transform: scaleX(1);
}

.btn:hover .arrow path.arrow-tip {
  transform: translateX(0.125rem);
}

/* استایل باکس آیکون */
.menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  line-height: 1;
}

.menu-item-icon svg {
  fill: currentColor;
  width: 1.2em; 
  height: 1.2em;
}

.menu-item-icon i {
  font-size: 1.2em;
}

nav.menu {
  display: flex;
  align-items: center;
  position: relative;
  --arrow-size: 20px;
}

nav.menu .menu-drop-wrapper {
  display: flex;
  align-items: center;
}

nav.menu .menu-link {
  display: flex;
  align-items: center;
  font-size: 0.9375em;
  font-weight: 500;
  text-decoration: none;
  padding: 1.2rem 1.25rem;
  transition: color 0.3s ease, opacity 0.3s ease;
}

nav.menu .menu-content {
  display: none;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  justify-content: center;
  transform: perspective(1200px) perspective(2200px);
  transform-origin: 50% 0;
  max-width: none !important;
}

nav.menu .menu-arrow {
  display: block;
  position: absolute;
  top: calc(-1 * var(--arrow-size) * 0.7);
  left: 0;
  height: calc(var(--arrow-size) * 0.7);
  z-index: 12;
  pointer-events: none;
}

nav.menu .menu-arrow .menu-arrow-wrap {
  position: relative;
  top: 1px;
  opacity: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

nav.menu .menu-arrow .menu-arrow-wrap span {
  display: block;
  width: var(--arrow-size);
  height: var(--arrow-size);
  background: var(--dropdown-bg, #ffffff);
  transform: rotate(45deg);
  margin-top: calc(var(--arrow-size) * 0.35);
  box-shadow: -1.5px -1.5px 3px rgba(0, 0, 0, 0.04);
}

nav.menu .menu-bg {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  max-width: none !important;
  flex-shrink: 0 !important;
}

nav.menu .menu-dropdown {
  position: absolute;
  top: 0;
  left: 50%;
  width: 540px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  max-width: none !important;
  text-align: right;
}

nav.menu .menu-dropdown.small {
  width: 400px;
  max-width: none !important;
}

nav.menu .menu-dropdown.wide {
  width: 800px;
  max-width: none !important;
}

nav.menu .menu-dropdown.custom {
  width: 600px;
  max-width: none !important;
}

nav.menu .menu-dropdown.active {
  pointer-events: auto;
}

nav.menu .menu-dropdown-content {
  padding: var(--dropdown-padding, 25px 30px 30px 30px);
  box-sizing: border-box;
  max-width: none !important;
}

.no-template-notice {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   مخفی‌سازی ۱۰۰٪ منوی موبایل در حالت دسکتاپ با افزایش اولویت سلکتورها
   -------------------------------------------------------------------------- */
header.ft-stripe-main .hamburger-toggle,
header.ft-stripe-main .mobile-menu-drawer {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* ==========================================================================
   ۲. استایل‌های مخصوص تبلت و موبایل (تنها در زیر سایز 1024px بارگذاری می‌شوند)
   ========================================================================== */

@media (max-width: 1024px) {
  /* مخفی‌سازی هدر اصلی دسکتاپ */
  header.ft-stripe-main nav.menu,
  header.ft-stripe-main .btn {
    display: none !important;
  }

  /* فعال‌سازی کلید همبرگری در موبایل */
  header.ft-stripe-main .hamburger-toggle {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
  }

  header.ft-stripe-main .hamburger-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  header.ft-stripe-main .hamburger-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  header.ft-stripe-main .hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  header.ft-stripe-main .hamburger-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* فعال‌سازی دراور کشویی موبایل */
  header.ft-stripe-main .mobile-menu-drawer {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background-color: #18181c;
    box-shadow: -5px 0 15px rgba(0,0,0,0.25);
    z-index: 1005;
    
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 80px 20px 20px 20px;
    box-sizing: border-box;
    overflow-y: auto;
  }

  header.ft-stripe-main .mobile-menu-drawer.active {
    transform: translateX(0);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  header.ft-stripe-main .mobile-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  header.ft-stripe-main .mobile-menu-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 15px 5px;
    transition: color 0.3s ease;
  }

  header.ft-stripe-main .mobile-menu-item.has-submenu .mobile-submenu-toggle {
    justify-content: space-between;
  }

  header.ft-stripe-main .mobile-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-left: 5px;
  }

  header.ft-stripe-main .mobile-menu-item.active .mobile-arrow {
    transform: rotate(-135deg);
  }

  header.ft-stripe-main .mobile-submenu {
    display: none;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 10px;
  }
}