﻿@font-face {
    font-family: 'YekanBakh-Regular';
    src: url('/fonts/YekanBakh-Regular.woff2') format('woff2'), url('/fonts/YekanBakh-Regular.woff') format('woff'), url('/fonts/YekanBakh-Regular.ttf') format('truetype');
    font-display: swap;
}
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* هدر */
    .header {
      background: #fff;
      box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
      position: relative;
      z-index: 1000;
    }

    .navbar {
      max-width: 1200px;
      margin: auto;
      padding: 15px 20px;
      min-height: 75px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 25px;
    }

    .logo {
      font-size: 23px;
      font-weight: bold;
      color: #2563eb;
      text-decoration: none;
      white-space: nowrap;
    }

    /* منوی اصلی */
    .nav-menu {
      display: flex;
      align-items: center;
      list-style: none;
      gap: 8px;
    }

    .nav-item {
      position: relative;
    }

    .nav-link,
    .submenu-toggle {
      font-family: inherit;
      font-size: 14px;
      color: #fff;
      text-decoration: none;
      border: none;
      background: transparent;
      cursor: pointer;
      padding: 13px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      border-radius: 8px;
      white-space: nowrap;
      transition: background 0.2s, color 0.2s;
    }

    .nav-link:hover,
    .submenu-toggle:hover {
      color: #ff9700;
    }

    /* فلش زیرمنو */
    .arrow {
      display: inline-block;
      width: 7px;
      height: 7px;
      border-left: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(-45deg);
      transition: transform 0.25s;
      flex-shrink: 0;
      margin-top: -4px;
    }

    .has-submenu.open > .submenu-toggle .arrow {
      transform: rotate(135deg);
      margin-top: 4px;
    }

    /* زیرمنو */
    .submenu {
      display: none;
      list-style: none;
      background: #fff;
      border-radius: 10px;
      min-width: 210px;
      padding: 8px;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

    .has-submenu.open > .submenu {
      display: block;
      animation: showMenu 0.2s ease;
    }

    .submenu a {
      display: block;
      text-decoration: none;
      color: #444;
      font-size: 13px;
      padding: 12px;
      border-radius: 7px;
      transition: 0.2s;
    }

    .submenu a:hover {
      color: #ff9700;
      background: #f5ede1;
    }

    /* دسکتاپ */
    @media (min-width: 769px) {
      .submenu {
        position: absolute;
        top: calc(100% + 5px);
        right: 0;
      }
    }

    /* دکمه همبرگری */
    .hamburger {
      display: none;
      width: 44px;
      height: 44px;
      border: none;
      background: #eff6ff;
      border-radius: 8px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
    }

    .hamburger span {
      display: block;
      width: 23px;
      height: 2px;
      background: #2563eb;
      border-radius: 5px;
      transition: 0.25s;
    }

    .hamburger.active span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    @keyframes showMenu {
      from {
        opacity: 0;
        transform: translateY(-5px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* موبایل و تبلت */
    @media (max-width: 768px) {
      .navbar {
        min-height: 70px;
        flex-wrap: wrap;
        gap: 0;
        padding: 12px 16px;
      }

      .hamburger {
        display: flex;
      }

      .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-top: 15px;
      }

      .nav-menu.active {
        display: flex;
      }

      .nav-item {
        width: 100%;
      }

      .nav-link,
      .submenu-toggle {
        width: 100%;
        min-height: 46px;
        font-size: 14px;
        padding: 12px;
      }

      .submenu {
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border-radius: 8px;
        background: #f5f7fb;
        margin: 4px 0 8px;
        padding: 5px 12px 5px 0;
      }

      .submenu a {
        padding: 13px 15px;
        font-size: 13px;
      }
    }



    /* ---------- چیدمان کلی هدر ---------- */
.site-header {
  top: 0; left: 0; right: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}
.site-header .site-logo { flex-shrink: 0; display: block; line-height: 0; }
.site-header .site-logo img { height: 44px; width: auto; max-width: none; display: block; }

.site-header .divMenu { margin: 0; padding: 0; width: auto; float: none; }
.site-header .navbar { padding: 0; min-height: 0; max-width: none; margin: 0; flex-wrap: nowrap; }

.site-header .header-cta {
  flex-shrink: 0;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.site-header .header-cta:hover { background: #ff9700; color: #fff;border:1px solid #ff9700 }

.nav-backdrop { display: none; }

/* دسکتاپ */
@media (min-width: 769px) {
  .site-header { padding: 14px 32px; }
  .site-header .divMenu { flex: 1; display: flex; justify-content: center; }
  .site-header .site-logo img { height: 70px; }
}

/* ---------- موبایل: پنل شیشه‌ای از سمت راست ---------- */
@media (max-width: 768px) {
  .site-header .site-logo img { height: 50px; }

  /* دکمه همبرگری */
  .site-header .hamburger {
    position: relative;
    z-index: 1200;
    width: 42px; height: 42px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    gap: 5px;
    transition: background .3s;
  }
  .site-header .hamburger span {
    width: 18px; height: 1.5px;
    background: #fff;
    transition: transform .5s cubic-bezier(.32,.72,0,1), opacity .25s;
  }
  .site-header .hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header .hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* پس‌زمینه تیره و بلور */
  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden;
    transition: opacity .5s ease, visibility 0s .5s;
  }
  .nav-backdrop.active { opacity: 1; visibility: visible; transition-delay: 0s; }

  /* پنل منو */
  .site-header .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: min(88vw, 400px);
    height: 100vh; height: 100dvh;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 96px 28px 40px;
    overflow-y: auto;
    background: rgba(12, 16, 30, .78);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border-left: 1px solid rgba(255,255,255,.08);
    box-shadow: -30px 0 80px rgba(0,0,0,.45);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .6s cubic-bezier(.32,.72,0,1), visibility 0s .6s;
  }
  .site-header .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  /* آیتم‌ها: ورود پله‌ای */
  .site-header .nav-item {
    opacity: 0;
    transform: translateX(36px);
    transition: opacity .45s ease, transform .6s cubic-bezier(.32,.72,0,1);
  }
  .site-header .nav-menu.active .nav-item {
    opacity: 1;
    transform: none;
  }
  .nav-menu.active .nav-item:nth-child(1) { transition-delay: .15s; }
  .nav-menu.active .nav-item:nth-child(2) { transition-delay: .21s; }
  .nav-menu.active .nav-item:nth-child(3) { transition-delay: .27s; }
  .nav-menu.active .nav-item:nth-child(4) { transition-delay: .33s; }
  .nav-menu.active .nav-item:nth-child(5) { transition-delay: .39s; }

  /* تایپوگرافی بزرگ شبیه اپل */
  .site-header .nav-link,
  .site-header .submenu-toggle {
    font-size: 15px;
    font-weight: 600;
    color: #f5f5f7;
    padding: 16px 0;
    min-height: 0;
    border-radius: 0;
    background: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: color .25s, padding .3s;
  }
  .site-header .nav-link:hover,
  .site-header .submenu-toggle:hover {
    background: none;
    color: #60a5fa;
    padding-right: 6px;
  }

  /* زیرمنو: آکاردئونی نرم */
  .site-header .submenu {
    display: block;
    position: static;
    max-height: 0;
    overflow: hidden;
    margin: 0; padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    transition: max-height .55s cubic-bezier(.32,.72,0,1);
    animation: none;
  }
  .site-header .has-submenu.open > .submenu { max-height: 320px; animation: none; }

  .site-header .submenu a {
    color: rgba(245,245,247,.65);
    font-size: 17px;
    padding: 12px 14px 12px 0;
    background: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .35s ease .1s, transform .35s ease .1s, color .2s;
  }
  .site-header .has-submenu.open .submenu a { opacity: 1; transform: none; }
  .site-header .submenu a:hover { color: #fff; background: none; }

  .site-header .submenu-toggle .arrow { width: 9px; height: 9px; }

  /* قفل اسکرول صفحه هنگام باز بودن منو */
  html.menu-open, html.menu-open body { overflow: hidden; }
}

@media (max-width: 380px) {
  .site-header { padding: 12px; gap: 10px; }
  .site-header .header-cta { padding: 8px 12px; font-size: 12px; }
}

/* ===== فقط گوشی: همبرگر راست | لوگو وسط | مشاوره چپ ===== */
@media (max-width: 768px) {
    .site-header {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        /* همبرگر → راست */
        .site-header .divMenu {
            order: 1;
            flex: 0 0 auto;
        }

        /* لوگو → وسط */
        .site-header .site-logo {
            order: 2;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        /* دکمه مشاوره → چپ */
        .site-header .header-cta {
            order: 3;
            margin-right: auto;
            font-size:0.5em
        }
}



/* دسکتاپ: نمایش زیرمنو با هاور موس */
@media (min-width: 769px) {
    .has-submenu:hover > .submenu,
    .has-submenu:focus-within > .submenu {
        display: block;
    }

    .has-submenu:hover > .submenu-toggle .arrow,
    .has-submenu:focus-within > .submenu-toggle .arrow {
        transform: rotate(135deg);
        margin-top: 4px;
    }

    /* جلوگیری از فاصله‌ای که باعث بسته شدن زیرمنو می‌شود */
    .submenu {
        top: 100%;
        padding-top: 8px;
    }
}
