/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Aug 19 2026 | 10:05:43 */
/* =========================================
   Yekan Web — Responsive Dropdown Menu
   ========================================= */

/* وضعیت فعال منو */
.desktop-nav .current-menu-item > a,
.desktop-nav .current-menu-parent > a,
.desktop-nav .current-menu-ancestor > a,
.mobile-nav-list .current-menu-item > a,
.mobile-nav-list .current-menu-parent > a {
  color: var(--blue, #2563eb);
}

/* حالت فوکوس برای دسترسی‌پذیری */
.desktop-nav a:focus-visible,
.mobile-nav-list a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}


/* =========================================
   نسخه دسکتاپ
   ========================================= */

@media (min-width: 1101px) {
  .desktop-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .desktop-nav .nav-list > li {
    position: relative;
    margin: 0;
  }

  .desktop-nav .nav-list > li > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    padding: 8px 13px;
    color: #334155;
    font-size: 0.77rem;
    font-weight: 800;
    line-height: 1.5;
    transition:
      color 0.2s ease,
      background-color 0.2s ease;
  }

  .desktop-nav .nav-list > li > a:hover,
  .desktop-nav .nav-list > li:focus-within > a {
    background: #eff6ff;
    color: var(--blue, #2563eb);
  }

  /* فلش کنار آیتم‌های دارای زیرمنو */
  .desktop-nav .menu-item-has-children > a::after {
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
  }

  .desktop-nav .menu-item-has-children:hover > a::after,
  .desktop-nav .menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  /* کادر زیرمنو */
  .desktop-nav .sub-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 10px);
    right: 50%;
    left: auto;

    display: block;
    width: max-content;
    min-width: 270px;
    max-width: 330px;

    visibility: hidden;
    opacity: 0;
    margin: 0;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
      0 22px 55px rgba(11, 24, 73, 0.14),
      0 5px 15px rgba(11, 24, 73, 0.05);
    padding: 9px;
    pointer-events: none;
    list-style: none;

    transform: translate(50%, 13px) scale(0.98);
    transform-origin: top center;

    transition:
      opacity 0.2s ease,
      visibility 0.2s ease,
      transform 0.2s ease;
  }

  /* پل نامرئی برای قطع نشدن هاور */
  .desktop-nav .sub-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 14px;
    content: "";
  }

  /* فلش بالای کادر */
  .desktop-nav .sub-menu::after {
    position: absolute;
    top: -7px;
    right: calc(50% - 7px);
    width: 14px;
    height: 14px;
    border-top: 1px solid #dbeafe;
    border-right: 1px solid #dbeafe;
    background: #fff;
    content: "";
    transform: rotate(-45deg);
  }

  .desktop-nav li:hover > .sub-menu,
  .desktop-nav li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(50%, 0) scale(1);
  }

  .desktop-nav .sub-menu li {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
  }

  .desktop-nav .sub-menu li + li {
    margin-top: 3px;
  }

  .desktop-nav .sub-menu a {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 11px;
    border-radius: 11px;
    padding: 9px 12px;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.75;
    white-space: normal;
    transition:
      color 0.2s ease,
      background-color 0.2s ease,
      padding 0.2s ease;
  }

  /* نقطه کنار لینک زیرمنو */
  .desktop-nav .sub-menu a::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border: 2px solid #93c5fd;
    border-radius: 50%;
    background: #fff;
    content: "";
    transition:
      border-color 0.2s ease,
      background-color 0.2s ease,
      box-shadow 0.2s ease;
  }

  .desktop-nav .sub-menu a:hover,
  .desktop-nav .sub-menu a:focus-visible {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    color: var(--blue, #2563eb);
    padding-right: 16px;
  }

  .desktop-nav .sub-menu a:hover::before,
  .desktop-nav .sub-menu a:focus-visible::before,
  .desktop-nav .sub-menu .current-menu-item > a::before {
    border-color: var(--blue, #2563eb);
    background: var(--blue, #2563eb);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
  }
}


/* =========================================
   نسخه تبلت و موبایل
   ========================================= */

@media (max-width: 1100px) {
  .mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(11, 24, 73, 0.09);
    backdrop-filter: blur(16px);
  }

  .mobile-menu.open {
    max-height: calc(100dvh - 78px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-nav-list,
  .mobile-nav-list .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-nav-list {
    display: grid;
    gap: 5px;
    padding: 12px 0 4px;
  }

  .mobile-nav-list > li {
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 14px;
  }

  .mobile-nav-list > li:hover,
  .mobile-nav-list > li:focus-within,
  .mobile-nav-list > .current-menu-item,
  .mobile-nav-list > .current-menu-parent {
    border-color: #dbeafe;
    background: #f8fafc;
  }

  .mobile-nav-list > li > a {
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.7;
    transition:
      color 0.2s ease,
      background-color 0.2s ease;
  }

  .mobile-nav-list > li > a:hover {
    background: #eff6ff;
    color: var(--blue, #2563eb);
  }

  /* آیکون کنار عنوان والد */
  .mobile-nav-list .menu-item-has-children > a::after {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--blue, #2563eb);
    content: "⌄";
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-style: normal;
    line-height: 1;
  }

  /*
   * در موبایل زیرمنو همیشه زیر عنوان والد نمایش داده می‌شود.
   * این رفتار برای لمس، واضح‌تر و قابل‌اعتمادتر از هاور است.
   */
  .mobile-nav-list .sub-menu {
    position: static;
    display: grid;
    gap: 4px;
    width: auto;
    min-width: 0;
    visibility: visible;
    opacity: 1;
    margin: 0 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
    padding: 6px;
    transform: none;
  }

  .mobile-nav-list .sub-menu li {
    width: 100%;
  }

  .mobile-nav-list .sub-menu a {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.75;
  }

  .mobile-nav-list .sub-menu a::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #93c5fd;
    content: "";
  }

  .mobile-nav-list .sub-menu a:hover,
  .mobile-nav-list .sub-menu a:focus-visible,
  .mobile-nav-list .sub-menu .current-menu-item > a {
    background: #eff6ff;
    color: var(--blue, #2563eb);
  }

  .mobile-nav-list .sub-menu a:hover::before,
  .mobile-nav-list .sub-menu .current-menu-item > a::before {
    background: var(--blue, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  }
}


/* موبایل‌های کوچک */
@media (max-width: 620px) {
  .mobile-menu.open {
    max-height: calc(100dvh - 70px);
  }

  .mobile-nav-list {
    padding-top: 9px;
  }

  .mobile-nav-list > li > a {
    min-height: 46px;
    padding-inline: 11px;
    font-size: 0.74rem;
  }

  .mobile-nav-list .sub-menu {
    margin-inline: 6px;
  }

  .mobile-nav-list .sub-menu a {
    min-height: 41px;
    padding-inline: 10px;
    font-size: 0.67rem;
  }
}


/* حذف انیمیشن برای کاربرانی که آن را غیرفعال کرده‌اند */
@media (prefers-reduced-motion: reduce) {
  .desktop-nav .sub-menu,
  .desktop-nav a,
  .mobile-nav-list a {
    transition: none !important;
  }
}