/* Shared Header (Home + Rates): extracted from page CSS for easier maintenance */
/**
 * توکن‌های رنگ/گرادیان هم‌تراز با .home-header--v2 — برای لندینگ، ویجت نرخ و اسکلتون #ticker-list
 * (در index.css / app.css با var(--home-v2-…) مصرف می‌شود.)
 */
:root{
  --home-v2-topbar-bg:linear-gradient(92deg,#0b1733 0%,#0f2046 55%,#123065 100%);
  --home-v2-meta-bar-bg:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);
  --home-v2-meta-border:rgba(148,163,184,0.22);
  --home-v2-nav-surface:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
  --home-v2-nav-border:rgba(148,163,184,0.28);
  --home-v2-nav-shadow:0 6px 20px -18px rgba(15,23,42,0.35);
  --home-v2-pill-bg:rgba(37,99,235,0.42);
  --home-v2-pill-border:rgba(147,197,253,0.55);
  --home-v2-pill-text:#f8fafc;
  --home-v2-link-on-meta:#e2e8f0;
  --home-v2-item-strong:#1e293b;
  --home-v2-item-muted:#475569;
  --home-v2-primary-bg:rgba(16,185,129,0.18);
  --home-v2-primary-border:rgba(16,185,129,0.48);
  --home-v2-primary-text:#065f46;
  --home-v2-focus-ring:#93c5fd;
  --home-v2-spotlight-footer:linear-gradient(180deg,#123065 0%,#0b1733 100%);
  --home-v2-status-green:#22c55e;
}

.home-header{
  position:relative;
  z-index:100;
}
.home-header--v2{
  position:sticky;
  top:0;
  --hn-pad-y:0.4rem;
  --hn-pad-x:1rem;
  --hn-meta-pad-y:0.2rem;
  --hn-meta-pad-x:0.42rem;
}

/* Top bar: desktop */
.home-topbar{
  display:none;
  background:linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color:#94a3b8;
  font-family:var(--font-fa);
  font-size:0.8125rem;
  border-bottom:1px solid rgba(148,163,184,0.15);
}
.home-topbar-inner{
  max-width:1120px;
  margin:0 auto;
  padding:0.45rem 1.25rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.home-topbar-pill{
  display:inline-flex;
  align-items:center;
  padding:0.2rem 0.65rem;
  border-radius:999px;
  background:rgba(27,79,216,0.2);
  color:#e2e8f0;
  font-weight:600;
  border:1px solid rgba(99,102,241,0.25);
}
.home-topbar-end{display:flex;align-items:center;gap:0.5rem}
.home-topbar-link{
  color:#cbd5e1;
  text-decoration:none;
  font-weight:600;
  font-size:0.76rem;
}
.home-topbar-link--tertiary{opacity:0.78}
.home-topbar-link:hover{color:#fff}
.home-topbar-sep{
  width:4px;height:4px;border-radius:50%;
  background:#64748b;
  opacity:0.8;
}

@media (min-width: 769px){
  .home-topbar{display:block}
}

nav.home-nav{
  height:auto;
  min-height:var(--home-nav-h, 56px);
  padding:0;
  position:relative;
  top:auto;
  overflow:visible;
  background:rgba(255,255,255,0.78);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid rgba(226,232,240,0.95);
  box-shadow:0 1px 0 rgba(255,255,255,0.7) inset;
}

.home-nav{--home-nav-h:56px}
@media (min-width: 769px){
  .home-nav{--home-nav-h:4rem}
}

.home-nav-inner{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  justify-content:flex-start;
  gap:0.65rem;
  padding:0.55rem 1rem;
  min-height:var(--home-nav-h);
}
.home-nav-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0.55rem;
  width:100%;
  min-width:0;
}
.home-nav-meta{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0.45rem;
  padding-bottom:0.3rem;
  border-bottom:1px solid rgba(148,163,184,0.18);
}

.home-nav-brand{
  display:flex;
  align-items:center;
  gap:0.85rem;
  min-width:0;
}
.home-nav-logo img{
  height:36px;
  width:auto;
  display:block;
}
.home-nav-logo.fx-brand-wordmark{
  font-family:var(--font-display);
  font-weight:900;
  font-size:1.14rem;
  letter-spacing:-0.04em;
  color:var(--text);
  text-decoration:none;
  line-height:1.1;
  white-space:nowrap;
}
.home-header--v2 .home-nav-logo.fx-brand-wordmark{
  color:#0f172a;
}
.home-nav-tagline{
  display:none;
  margin:0;
  font-family:var(--font-fa);
  font-size:0.78rem;
  color:var(--muted);
  font-weight:600;
  line-height:1.45;
  max-width:20rem;
  border-inline-end:2px solid var(--brand-light);
  padding-inline-end:0.85rem;
}
@media (min-width: 769px){
  .home-nav-tagline{display:block}
}

.home-nav-toggle{
  display:none;
  flex-shrink:0;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  margin:0;
  padding:0;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,0.06);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.home-nav-toggle:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
}
.home-nav-toggle-bars{
  display:flex;
  flex-direction:column;
  gap:5px;
  width:20px;
}
.home-nav-toggle-bar{
  display:block;
  height:2px;
  border-radius:1px;
  background:var(--text);
  transition:transform 0.2s ease, opacity 0.2s ease;
}
.home-nav.is-menu-open .home-nav-toggle-bar:nth-child(1){transform:translateY(7px) rotate(45deg)}
.home-nav.is-menu-open .home-nav-toggle-bar:nth-child(2){opacity:0}
.home-nav.is-menu-open .home-nav-toggle-bar:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

.home-nav-backdrop{
  display:none;
  position:fixed;
  inset:0;
  top:var(--home-nav-h);
  width:100%;
  border:none;
  padding:0;
  margin:0;
  cursor:pointer;
  background:rgba(15,23,42,0.4);
  z-index:98;
  -webkit-tap-highlight-color:transparent;
}
.home-nav.is-menu-open .home-nav-backdrop{display:block}
body.home-nav-lock-scroll{overflow:hidden}

.home-nav-links{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0.35rem;
  font-family:var(--font-fa);
  font-size:0.875rem;
}
.home-nav-li{
  list-style:none;
  margin:0;
  padding:0;
}
.home-nav-item{
  text-decoration:none;
  color:#475569;
  font-weight:700;
  padding:0.5rem 0.9rem;
  border-radius:999px;
  transition:background 0.15s ease, color 0.15s ease;
}
.home-nav-item:hover{
  color:var(--brand);
  background:var(--brand-light);
}
.home-nav-cta-outline{
  border:1px solid rgba(27,79,216,0.35);
  background:rgba(238,243,255,0.65);
}
.home-nav-cta-outline:hover{
  border-color:var(--brand);
  background:var(--brand-light);
}

.home-nav-login{
  text-decoration:none;
  color:#fff!important;
  background:linear-gradient(165deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius:999px;
  padding:0.5rem 1.15rem!important;
  font-weight:800;
  box-shadow:0 2px 8px rgba(27,79,216,0.25);
}
.home-nav-login:hover{
  filter:brightness(1.05);
  color:#fff!important;
}

@media (min-width: 769px){
  .home-nav-inner{padding:0.55rem 1.25rem}
  .home-nav-logo img{height:36px}
}

@media (max-width: 768px){
  nav.home-nav{
    background:#fff;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    border-bottom:1px solid var(--border);
    box-shadow:0 4px 24px rgba(15,23,42,0.06);
  }
  /* یک ردیف: متا؛ ردیف بعد: لوگو + همبرگر داخل home-nav-row */
  .home-nav-meta{
    width:100%;
    flex:1 1 100%;
    order:-1;
    padding-bottom:0;
    border-bottom:none;
    min-width:0;
  }
  .home-nav-row{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    width:100%;
    gap:0.38rem;
    min-width:0;
  }
  .home-nav-row .home-nav-brand{flex:0 1 auto;min-width:0}
  .home-nav-row .home-nav-toolbar{display:none}
  .home-nav-row .home-nav-toggle{display:inline-flex;flex-shrink:0;margin-inline-start:auto}
  .home-nav-row .home-nav-links{
    flex:1 1 100%;
    width:100%;
    margin-top:0;
  }
}

/* Shared mobile menu behavior */
@media (max-width: 768px){
  .home-nav-inner{
    flex-wrap:wrap;
    align-items:stretch;
    gap:0.45rem;
    padding:0.45rem 0.6rem;
    min-height:0;
  }
  .home-nav-links{
    position:fixed;
    left:0;
    right:0;
    top:var(--home-nav-h);
    flex-direction:column;
    align-items:stretch;
    gap:0.25rem;
    padding:0.75rem 0.65rem 1.25rem;
    margin:0;
    background:#fff;
    border-bottom:1px solid var(--border);
    box-shadow:0 16px 40px rgba(15,23,42,0.14);
    font-size:1rem;
    z-index:99;
    max-height:min(72vh,420px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    transform:translateY(-120%);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:transform 0.22s ease, opacity 0.2s ease, visibility 0.2s;
  }
  .home-nav.is-menu-open .home-nav-links{
    transform:translateY(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .home-nav-links .home-nav-item,
  .home-nav-links .home-nav-login{
    border-radius:12px!important;
    justify-content:center;
    text-align:center;
  }
  .home-nav-links .home-nav-item{
    padding:0.85rem 1rem;
    background:#f8fafc;
    color:#334155;
  }
  .home-nav-links .home-nav-item:hover{
    background:var(--brand-light);
    color:var(--brand);
  }
  .home-nav-links > li{width:100%}
  .home-nav-li--mobile-util{border-top:1px solid rgba(148,163,184,0.22);padding-top:0.85rem;margin-top:0.25rem}
  .home-nav-mobile-util{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:center;
    gap:0.85rem;
  }
  .home-nav-details__panel .home-nav-item{
    justify-content:flex-start;
    text-align:start;
  }
  .home-nav-links > .home-nav-li--cta{margin-top:0.25rem}
  .home-nav-links .home-nav-login{margin-top:0}
}

/* ===== Header V2 (premium desktop + clean mobile) ===== */
.home-header--v2 .home-topbar{
  display:block;
  background:var(--home-v2-topbar-bg);
}
.home-header--v2 .home-topbar-inner{
  max-width:1180px;
  padding:0.42rem 1.2rem;
}
.home-header--v2 .home-topbar-pill{
  background:rgba(37,99,235,0.32);
  border-color:rgba(147,197,253,0.42);
  color:#f8fbff;
}
.home-topbar-status{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#dcfce7;
  font-weight:700;
  font-size:0.72rem;
  white-space:nowrap;
}
.home-topbar-status-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--home-v2-status-green);
  box-shadow:0 0 0 4px rgba(34,197,94,0.2);
}

.home-header--v2 .home-nav{
  /* دو ردیف: نوار سرویس + ردیف لوگو/منو — هم‌تراز با backdrop و منوی کشویی */
  --home-nav-h:88px;
  background:var(--home-v2-nav-surface);
  border-bottom:1px solid var(--home-v2-nav-border);
  box-shadow:var(--home-v2-nav-shadow);
}
.home-header--v2 .home-nav-inner{
  max-width:1180px;
  flex-wrap:wrap;
  align-items:center;
  align-content:flex-start;
  row-gap:0.42rem;
  column-gap:0.55rem;
  padding:var(--hn-pad-y) var(--hn-pad-x);
  min-height:0;
}
/* نوار اطلاعات سرویس: تمام‌عرضِ محتوای هدر (هدر بار)، ردیف اول */
.home-header--v2 .home-nav-meta{
  order:-1;
  flex:1 1 100%;
  width:100%;
  max-width:none;
  min-width:0;
  box-sizing:border-box;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:0.35rem;
  border-bottom:none;
  border:1px solid var(--home-v2-meta-border);
  background:var(--home-v2-meta-bar-bg);
  border-radius:10px;
  padding:var(--hn-meta-pad-y) var(--hn-meta-pad-x);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
}
/* نوار متا: کنتراست روشن روی پس تیره */
.home-header--v2 .home-nav-meta .home-topbar-pill{
  background:var(--home-v2-pill-bg);
  border-color:var(--home-v2-pill-border);
  color:var(--home-v2-pill-text);
  font-size:0.69rem;
  padding:0.12rem 0.45rem;
}
.home-header--v2 .home-nav-meta .home-topbar-link{
  display:inline-flex;
  align-items:center;
  color:var(--home-v2-link-on-meta);
  font-weight:700;
  font-size:0.72rem;
  border-radius:7px;
  padding:0.16rem 0.42rem;
  transition:background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.home-header--v2 .home-nav-meta .home-topbar-link:focus-visible{
  outline:2px solid var(--home-v2-focus-ring);
  outline-offset:3px;
  color:#fff;
  background-color:rgba(255,255,255,0.12);
}
.home-header--v2 .home-nav-meta .home-topbar-link:active{
  background-color:rgba(255,255,255,0.18);
}
.home-header--v2 .home-nav-meta .home-topbar-link--tertiary{
  color:#cbd5e1;
  opacity:0.92;
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-nav-meta .home-topbar-link:hover{
    color:#fff;
    background-color:rgba(255,255,255,0.14);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .home-header--v2 .home-nav-meta .home-topbar-link--tertiary:hover{
    color:#fff;
    background-color:rgba(255,255,255,0.1);
    opacity:1;
  }
}
/* اپ بار واقعی (پس تیره): لینک روشن؛ استایل قبلی همهٔ .home-topbar-link داخل v2 باعث کنتراست بد می‌شد */
.home-header--v2 .home-topbar .home-topbar-link{
  color:#cbd5e1;
  font-weight:700;
  border-radius:8px;
  padding:0.18rem 0.45rem;
  transition:background-color .16s ease, color .16s ease;
}
.home-header--v2 .home-topbar .home-topbar-link--tertiary{
  color:#94a3b8;
  opacity:0.92;
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-topbar .home-topbar-link:hover{
    color:#fff;
    background-color:rgba(255,255,255,0.1);
  }
  .home-header--v2 .home-topbar .home-topbar-link--tertiary:hover{
    color:#e2e8f0;
    background-color:rgba(255,255,255,0.08);
    opacity:1;
  }
}
.home-header--v2 .home-topbar .home-topbar-link:focus-visible{
  outline:2px solid var(--home-v2-focus-ring);
  outline-offset:3px;
}
.home-header--v2 .home-nav-logo img{height:36px;width:auto}
.home-header--v2 .home-nav-tagline{
  display:block;
  font-size:0.69rem;
  line-height:1.32;
  color:var(--home-v2-item-muted);
  max-width:14.5rem;
  padding-inline-end:0.55rem;
  border-inline-end:1px solid rgba(148,163,184,0.42);
}
@media (max-width:1040px){
  .home-header--v2 .home-nav-tagline{display:none}
}

.home-nav-visually-hidden{
  position:absolute!important;
  width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip-path:inset(50%)!important;
  white-space:nowrap!important;border:0!important;
}

.home-header--v2 .home-nav-row{
  flex-wrap:nowrap;
  align-items:center;
  gap:0.85rem;
  flex:1 1 100%;
  min-height:43px;
  min-width:0;
}
.home-header--v2 .home-nav-links{
  margin-inline-start:0;
  margin-inline-end:0;
  flex:1 1 auto;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:0.42rem;
  column-gap:1rem;
  min-width:0;
}
@media (min-width: 769px){
  .home-header--v2 .home-nav-li--mobile-util{display:none!important}
}
.home-header--v2 .home-nav-brand{
  flex:0 0 auto;
}

.home-header--v2 .home-nav-toolbar{
  flex-shrink:0;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
}
/** تراز پنل زبان با دکمه در تولبار (عرض پنل با min-width در .home-nav-shell-lang__panel) */
.home-header--v2 .home-nav-toolbar .home-nav-shell-lang__panel{
  inset-inline-start:auto;
  inset-inline-end:0;
}

.home-nav-toolbar-btn{
  box-sizing:border-box;
  flex:0 0 auto;
  width:44px;
  height:44px;
  margin:0;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(15,23,42,0.14);
  border-radius:10px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,0.05);
  color:#0f172a;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.home-nav-toolbar-btn--link{
  text-decoration:none;
  cursor:pointer;
}
@media (hover:hover) and (pointer:fine){
  .home-nav-toolbar-btn:hover:not(:disabled){
    background:#f8fafc;
    border-color:rgba(15,23,42,0.22);
    color:#1d4ed8;
  }
}
.home-nav-toolbar-btn:focus-visible{
  outline:2px solid var(--brand, #1b4fd8);
  outline-offset:3px;
}

/* دکمهٔ تم: حامل آیکون باید line-height صفر و svg به صورت block باشد تا دقیقاً وسط ۴۴×۴۴ بیفتد */
.site-shell-theme-toggle.home-nav-toolbar-btn{
  position:relative;
}
.site-shell-theme-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  line-height:0;
  flex-shrink:0;
}
.site-shell-theme-icon svg{
  display:block;
  width:22px;
  height:22px;
  margin:0;
  flex-shrink:0;
}

.home-nav-details{
  position:relative;
}
.home-nav-details__summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0;
  cursor:pointer;
  min-height:44px;
  padding:0 0.65rem;
  border-radius:8px;
  font-family:var(--font-fa);
  font-weight:760;
  font-size:clamp(0.8125rem, 1.05vw, 1rem);
  line-height:1.2;
  color:var(--home-v2-item-strong);
  -webkit-user-select:none;
  user-select:none;
  transition:background-color .16s ease, color .16s ease;
}
.home-nav-details__summary::-webkit-details-marker{display:none}
.home-nav-details__label{white-space:nowrap}
.home-nav-details__caret{
  display:inline-flex;
  align-items:center;
  color:currentColor;
  opacity:0.85;
  transition:transform .2s ease;
}
.home-nav-details[open] > .home-nav-details__summary .home-nav-details__caret{
  transform:rotate(-180deg);
}
.home-nav-details__panel{
  position:absolute;
  top:calc(100% + 7px);
  inset-inline-start:0;
  min-width:12.85rem;
  padding:7px;
  border-radius:10px;
  background:#fff;
  border:1px solid var(--home-v2-nav-border);
  box-shadow:0 14px 40px -22px rgba(15,23,42,0.45);
  z-index:120;
}
.home-nav-details__panel .home-nav-item{
  display:flex;
  width:100%;
  justify-content:flex-start;
  box-sizing:border-box;
  padding:0.48rem 0.65rem!important;
  font-size:0.82rem!important;
  font-weight:720!important;
  border-radius:8px!important;
}
.home-nav-item--sublink{
  padding:0.45rem 0.55rem!important;
}

.home-nav-shell-lang{position:relative;min-width:0}
.home-nav-shell-lang__summary::-webkit-details-marker{display:none}
.home-nav-shell-lang__summary{
  list-style:none;
  margin:0;
}
.home-nav-shell-lang__panel{
  position:absolute;
  top:calc(100% + 7px);
  inset-inline-start:0;
  /* عرض واقعی؛ نباید به پهنای جزئیات (= دکمه) محدود شود — max-width:100٪ باعث نوار تک‌کاراکتر می‌شد */
  width:min(20rem,calc(100vw - 2rem));
  min-width:min(260px,calc(100vw - 1.5rem));
  max-width:none;
  padding:14px 14px 12px;
  border-radius:12px;
  background:linear-gradient(165deg,#ffffff 0%,#f8fafc 100%);
  border:1px solid rgba(15,23,42,0.1);
  box-shadow:
    0 4px 6px -1px rgba(15,23,42,0.06),
    0 18px 44px -24px rgba(15,23,42,0.35);
  z-index:130;
  box-sizing:border-box;
}
.home-nav-shell-lang__panel::before{
  content:'';
  display:block;
  height:3px;
  margin:-14px -14px 12px;
  border-radius:12px 12px 0 0;
  background:linear-gradient(90deg,var(--brand,#1B4FD8) 0%,#3b82f6 55%,rgba(59,130,246,0.35) 100%);
  opacity:0.95;
}
.home-nav-shell-lang__title{
  margin:0 0 10px;
  padding:0 2px;
  font-family:var(--font-display);
  font-weight:800;
  font-size:0.9375rem;
  line-height:1.3;
  color:#0f172a;
  letter-spacing:-0.02em;
  word-break:normal;
  overflow-wrap:break-word;
}
.home-nav-shell-lang__body{
  margin:0;
  padding:10px 12px;
  font-family:var(--font-fa);
  font-weight:550;
  font-size:0.8125rem;
  line-height:1.65;
  color:#475569;
  background:rgba(27,79,216,0.06);
  border:1px solid rgba(27,79,216,0.12);
  border-radius:10px;
  overflow-wrap:break-word;
  word-break:normal;
}

.home-header--v2 .home-nav-item{
  color:var(--home-v2-item-strong);
  font-weight:760;
  font-size:clamp(0.8125rem,1.05vw,1rem);
  border-radius:8px;
  padding:0 0.75rem;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.home-header--v2 .home-nav-item--tertiary{
  color:var(--home-v2-item-muted);
  font-weight:680;
}
.home-header--v2 .home-nav-item:focus-visible{
  outline:2px solid var(--brand, #1b4fd8);
  outline-offset:3px;
}
.home-header--v2 .home-nav-item--primary{
  background:var(--home-v2-primary-bg);
  border:1px solid var(--home-v2-primary-border);
  color:var(--home-v2-primary-text);
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-nav-details__summary:hover{
    background:#eef2ff;
    color:#1d4ed8;
  }
  .home-header--v2 .home-nav-item:hover{
    background:#e9efff;
    color:#1d4ed8;
  }
  .home-header--v2 .home-nav-item--primary:hover{
    background:rgba(16,185,129,0.28);
    color:#064e3b;
  }
  .home-header--v2 .home-nav-item:active{
    transform:translateY(1px);
  }
}
.home-header--v2 .home-nav-logo{
  border-radius:10px;
  transition:opacity .16s ease, box-shadow .16s ease;
}
.home-header--v2 .home-nav-logo:focus-visible{
  outline:2px solid var(--brand, #1b4fd8);
  outline-offset:4px;
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-nav-logo.fx-brand-wordmark:hover{
    opacity:0.88;
  }
}
.home-header--v2 .home-nav-toggle{
  transition:background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-nav-toggle:hover{
    background:#f1f5f9;
    border-color:rgba(15,23,42,0.2);
    box-shadow:0 2px 8px rgba(15,23,42,0.08);
  }
}
.home-header--v2 .home-nav-toggle:active{
  background:#e2e8f0;
}
.home-header--v2 .home-nav-login{
  margin-inline-start:0;
  border-radius:10px;
  padding:0.38rem 0.82rem !important;
  font-size:0.8125rem;
  box-shadow:0 4px 14px -10px rgba(15,23,42,0.42);
  transition:filter .16s ease, transform .14s ease, box-shadow .18s ease;
}
@media (hover:hover) and (pointer:fine){
  .home-header--v2 .home-nav-login:hover{
    filter:brightness(1.06);
    transform:translateY(-1px);
    box-shadow:0 10px 22px -12px rgba(15,23,42,0.55);
  }
  .home-header--v2 .home-nav-login:active{
    transform:translateY(0);
    filter:brightness(0.98);
  }
}
.home-header--v2 .home-nav-login--member{
  background:linear-gradient(160deg,#0f766e 0%,#059669 100%);
}
.home-header--v2 .home-nav-login--risk{
  background:linear-gradient(160deg,#d97706 0%,#b45309 100%);
}

@media (max-width: 768px){
  .home-header--v2{padding-top:env(safe-area-inset-top, 0px)}
  .home-header--v2 .home-topbar{display:none}
  .home-header--v2 .home-nav{
    --home-nav-h:84px;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:#fff;
  }
  .home-header--v2 .home-nav-inner{
    --hn-pad-y:0.32rem;
    --hn-pad-x:0.55rem;
    gap:0.38rem;
    flex-wrap:wrap;
    align-items:stretch;
  }
  .home-header--v2 .home-nav-meta{
    --hn-meta-pad-y:0.14rem;
    --hn-meta-pad-x:0.32rem;
    gap:0.28rem;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .home-header--v2 .home-nav-meta::-webkit-scrollbar{display:none}
  .home-header--v2 .home-topbar-link--tertiary{display:none}
  .home-header--v2 .home-topbar-link{font-size:0.68rem}
  .home-header--v2 .home-nav-logo img{height:32px}
  .home-header--v2 .home-nav-logo.fx-brand-wordmark{font-size:1.02rem}
  .home-header--v2 .home-nav-tagline{display:none}
  .home-header--v2 .home-nav-toggle{display:inline-flex}
  .home-header--v2 .home-nav-links{
    position:fixed;
    top:calc(var(--home-nav-h) + env(safe-area-inset-top, 0px));
    left:0;
    right:0;
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:0.4rem;
    padding:0.8rem 0.75rem 1.2rem;
    background:#fff;
    border-bottom:1px solid #e2e8f0;
    transform:translateY(-120%);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:transform .2s ease,opacity .2s ease,visibility .2s ease;
    max-height:min(72vh,440px);
    overflow-y:auto;
    z-index:99;
  }
  .home-header--v2 .home-nav.is-menu-open .home-nav-links{
    transform:translateY(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .home-header--v2 .home-nav-item,
  .home-header--v2 .home-nav-login{
    min-height:44px;
    border-radius:12px !important;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    margin:0;
  }
  .home-header--v2 .home-nav-backdrop{
    top:calc(var(--home-nav-h) + env(safe-area-inset-top, 0px));
    background:rgba(15,23,42,0.48);
    touch-action:none;
    overscroll-behavior:none;
  }
  .home-header--v2 .home-nav-row{
    flex-wrap:nowrap;
    flex:1 1 100%;
  }
  .home-header--v2 .home-nav-details__panel{
    position:static;
    box-shadow:none;
    border:0;
    background:transparent;
    padding:0.3rem 0.15rem 0.65rem;
    margin:0;
  }
  .home-header--v2 .home-nav-details__summary{
    width:100%;
    justify-content:space-between;
    box-sizing:border-box;
    background:#f8fafc;
    border:1px solid rgba(148,163,184,0.32);
    padding:0.75rem 1rem;
  }
  /** وقتی «زبان رابط» باز است ردیف تم را حفظ می‌کنیم و پنل را overlay تمام‌عرض می‌گذاریم (نه static که اسکرول منو را خراب کند) */
  .home-header--v2 .home-nav-mobile-util{
    flex-wrap:wrap;
    justify-content:center;
    row-gap:0.45rem;
  }
  .home-header--v2 .home-nav-mobile-util .site-shell-theme-toggle{
    order:1;
    flex:0 0 auto;
  }
  .home-header--v2 .home-nav-mobile-util:has(.home-nav-shell-lang[open]) .home-nav-shell-lang{
    flex:1 0 100%;
    width:100%;
    order:2;
    min-width:0;
  }
  .home-header--v2 .home-nav-shell-lang__panel{
    position:absolute;
    top:calc(100% + 6px);
    inset-inline-start:0;
    inset-inline-end:0;
    width:auto;
    margin-block-start:0;
    max-width:none;
    padding:12px 12px 10px;
    box-shadow:
      0 4px 6px -1px rgba(15,23,42,0.07),
      0 14px 36px -20px rgba(15,23,42,0.4);
    border:1px solid rgba(148,163,184,0.42);
    background:linear-gradient(165deg,#ffffff 0%,#f1f5f9 100%);
    z-index:5;
  }
  .home-header--v2 .home-nav-shell-lang__panel::before{
    margin:-12px -12px 10px;
    border-radius:12px 12px 0 0;
  }
  .home-header--v2 .home-nav-shell-lang__body{
    background:rgba(27,79,216,0.07);
    border-color:rgba(27,79,216,0.14);
  }
  /* منوی کشویی: تا داده‌های واقعی دست‌نخورده مانند قبلی؛ ارتفاع پویا + جلوگیری از scroll chain صفحه */
  .home-header--v2 .home-nav-links{
    padding-top:0.95rem;
    padding-bottom:max(1rem, env(safe-area-inset-bottom, 0px));
    max-height:min(82dvh, 560px);
    overscroll-behavior:contain;
  }
}

@media (max-width: 480px){
  .home-header--v2 .home-nav-meta{
    border-radius:8px;
  }
  .home-header--v2 .home-topbar-status{
    max-width:min(44vw,160px);
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

@media (max-width:380px){
  .home-header--v2 .home-nav-meta .home-topbar-pill{
    font-size:0.62rem;
    padding-inline:0.34rem;
  }
}

.home-header--v2 .home-nav-backdrop{-webkit-tap-highlight-color:transparent}

@media (prefers-reduced-motion: reduce){
  .home-nav.is-menu-open .home-nav-links,
  .home-nav .home-nav-links{
    transition-duration:0.01ms;
  }
  .home-nav.is-menu-open .home-nav-toggle-bar:nth-child(1),
  .home-nav.is-menu-open .home-nav-toggle-bar:nth-child(3){
    transition-duration:0.01ms;
  }
}

/* تم تیرهٔ پوستهٔ مارکتینگ (کلید واحد با داشبورد: data-fx-shell-theme روی <html>) */
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav{
  background:linear-gradient(180deg,#0f172a 0%,#1e293b 100%);
  border-bottom-color:rgba(148,163,184,0.2);
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-meta{
  background:linear-gradient(180deg,#020617 0%,#172033 100%);
  border-color:rgba(148,163,184,0.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-logo.fx-brand-wordmark{
  color:#f1f5f9!important;
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-tagline{
  color:#94a3b8!important;
  border-inline-end-color:rgba(148,163,184,0.35);
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-item{
  color:#e2e8f0;
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-item--tertiary{
  color:#cbd5e1;
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-item--primary{
  background:rgba(16,185,129,0.22);
  border-color:rgba(45,212,191,0.42);
  color:#ccfbf1;
}
@media (hover:hover) and (pointer:fine){
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-item:hover{
    background:rgba(148,163,184,0.18);
    color:#fff;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-item--primary:hover{
    background:rgba(16,185,129,0.32);
    color:#ecfdf5;
  }
}
:root[data-fx-shell-theme='dark'] .home-nav-details__summary{
  color:#f1f5f9;
}
@media (hover:hover) and (pointer:fine){
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-details__summary:hover{
    background:rgba(148,163,184,0.16);
    color:#fff;
  }
}
:root[data-fx-shell-theme='dark'] .home-nav-details__panel,
:root[data-fx-shell-theme='dark'] .home-nav-shell-lang__panel{
  background:linear-gradient(165deg,#1a2332 0%,#151c29 100%);
  border-color:rgba(71,85,105,0.55);
  box-shadow:
    0 4px 6px -1px rgba(0,0,0,0.25),
    0 20px 44px -28px rgba(0,0,0,0.55);
}
:root[data-fx-shell-theme='dark'] .home-nav-shell-lang__panel::before{
  opacity:0.88;
}
:root[data-fx-shell-theme='dark'] .home-nav-details__panel .home-nav-item{
  color:#e2e8f0;
}
@media (hover:hover) and (pointer:fine){
  :root[data-fx-shell-theme='dark'] .home-nav-details__panel .home-nav-item:hover{
    background:rgba(255,255,255,0.08);
    color:#fff;
  }
}
:root[data-fx-shell-theme='dark'] .home-nav-shell-lang__title{color:#f1f5f9}
:root[data-fx-shell-theme='dark'] .home-nav-shell-lang__body{
  color:#cbd5e1;
  background:rgba(59,130,246,0.12);
  border-color:rgba(96,165,250,0.28);
}
:root[data-fx-shell-theme='dark'] .home-nav-toolbar-btn{
  background:#111827;
  border-color:rgba(148,163,184,0.28);
  color:#f8fafc;
}
@media (hover:hover) and (pointer:fine){
  :root[data-fx-shell-theme='dark'] .home-nav-toolbar-btn:hover:not(:disabled){
    background:#1f2937;
    border-color:rgba(147,197,253,0.42);
    color:#fff;
  }
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-toggle{
  background:#111827;
  border-color:rgba(148,163,184,0.22);
}
:root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-toggle-bar{
  background:#e2e8f0;
}
@media (max-width: 768px){
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav{background:#111827!important}
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-links{
    background:#111827!important;
    border-bottom-color:rgba(71,85,105,0.45);
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-links .home-nav-item{
    background:rgba(148,163,184,0.12);
    color:#f1f5f9!important;
    border:none;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-links .home-nav-item:hover{
    background:rgba(99,102,241,0.22);
    color:#fff!important;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-details__summary{
    background:rgba(148,163,184,0.12);
    border-color:rgba(100,116,139,0.45);
    color:#f8fafc;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-shell-lang__panel{
    background:linear-gradient(165deg,rgba(30,41,59,0.98) 0%,#151c29 100%);
    border-color:rgba(71,85,105,0.55);
    color:#e5e7eb;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-shell-lang__body{
    background:rgba(59,130,246,0.14);
    border-color:rgba(96,165,250,0.25);
    color:#cbd5e1;
  }
  :root[data-fx-shell-theme='dark'] .home-header--v2 .home-nav-backdrop{
    background:rgba(2,6,23,0.58);
  }
}

/* ─── پوسته: جدا کردن هدر دسکتاپ / موبایل (mount از site-chrome.js) ─── */
.fx-site-header-desktop-wrap{display:contents}
.fx-site-header-mobile-wrap{display:none}
@media (max-width:768px){
  .fx-site-header-desktop-wrap{display:none!important}
  .fx-site-header-mobile-wrap{display:block!important}
}

/* هدر موبایل اختصاصی — نوار فشرده + همان الگوی کشویی */
.home-header--mobile{
  position:sticky;
  top:0;
  z-index:100;
  padding-top:env(safe-area-inset-top,0);
}
.home-header--mobile .home-nav--mobile{
  --home-nav-h:56px;
  position:relative;
  min-height:var(--home-nav-h);
  background:var(--home-v2-nav-surface);
  border-bottom:1px solid var(--home-v2-nav-border);
  box-shadow:var(--home-v2-nav-shadow);
  overflow:visible;
}
.home-nav-mobile-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.5rem;
  min-height:var(--home-nav-h);
  padding:0.38rem 0.65rem;
  box-sizing:border-box;
}
.home-nav-mobile-bar__start{
  display:flex;
  align-items:center;
  gap:0.45rem;
  min-width:0;
}
.home-nav-mobile-brand{
  display:flex;
  align-items:center;
  gap:0.45rem;
  min-width:0;
}
.home-nav-mobile-drawer-layer{
  position:static;
}
.home-nav-mobile-bar__end{
  display:flex;
  align-items:center;
  gap:0.45rem;
  flex-shrink:0;
}
.home-nav-mobile-logo{
  font-family:var(--font-display);
  font-weight:900;
  font-size:1.05rem;
  letter-spacing:-0.04em;
  color:#0f172a;
  text-decoration:none;
  line-height:1.1;
  white-space:nowrap;
}
.home-nav-mobile-pill{
  font-size:0.62rem;
  font-weight:800;
  padding:0.14rem 0.4rem;
  border-radius:999px;
  background:var(--home-v2-pill-bg);
  border:1px solid var(--home-v2-pill-border);
  color:var(--home-v2-pill-text);
  white-space:nowrap;
}
.home-nav-mobile-live{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:0.68rem;
  font-weight:760;
  color:var(--home-v2-item-muted);
  white-space:nowrap;
}
.home-header--mobile .home-nav-toggle--mobile{
  display:inline-flex;
}
.home-header--mobile .home-nav-links--mobile-drawer{
  list-style:none;
  margin:0;
  padding:0;
  position:fixed;
  left:0;
  right:0;
  top:calc(var(--home-nav-h) + env(safe-area-inset-top,0));
  max-height:min(82dvh,560px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:0.85rem 0.7rem max(1rem, env(safe-area-inset-bottom,0));
  background:#fff;
  border-bottom:1px solid #e2e8f0;
  display:flex;
  flex-direction:column;
  gap:0.35rem;
  font-family:var(--font-fa);
  z-index:99;
  transform:translateY(-120%);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:transform .2s ease, opacity .2s ease, visibility .2s ease;
  box-shadow:0 16px 40px rgba(15,23,42,0.14);
}
.home-header--mobile .home-nav--mobile.is-menu-open .home-nav-links--mobile-drawer{
  transform:translateY(0);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.home-header--mobile .home-nav-backdrop{
  display:none;
  position:fixed;
  inset:0;
  top:calc(var(--home-nav-h) + env(safe-area-inset-top,0));
  border:none;
  padding:0;
  margin:0;
  cursor:pointer;
  background:rgba(15,23,42,0.48);
  z-index:98;
  touch-action:none;
  overscroll-behavior:none;
}
.home-header--mobile .home-nav--mobile.is-menu-open .home-nav-backdrop{display:block}
.home-header--mobile .home-nav-links--mobile-drawer .home-nav-li{width:100%}
.home-header--mobile .home-nav-links--mobile-drawer .home-nav-item,
.home-header--mobile .home-nav-links--mobile-drawer .home-nav-login{
  min-height:44px;
  border-radius:12px!important;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  width:100%;
  box-sizing:border-box;
  font-weight:760;
}
.home-header--mobile .home-nav-links--mobile-drawer .home-nav-item:not(.home-nav-item--sublink){
  background:#f8fafc;
  color:#334155;
}
.home-header--mobile .home-nav-item--primary{
  background:var(--home-v2-primary-bg);
  border:1px solid var(--home-v2-primary-border);
  color:var(--home-v2-primary-text);
}
.home-header--mobile .home-nav-links--mobile-drawer .home-nav-item--sublink{
  justify-content:flex-start;
  text-align:start;
}
.home-header--mobile .home-nav-details__panel{
  position:static;
  box-shadow:none;
  border:0;
  background:transparent;
  padding:0.25rem 0.1rem 0.55rem;
}
.home-header--mobile .home-nav-details__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0.28rem;
  width:100%;
}
.home-header--mobile .home-nav-details__list > li{
  list-style:none;
  margin:0;
  padding:0;
  width:100%;
}
.home-header--mobile .home-nav-details__summary{
  width:100%;
  justify-content:space-between;
  box-sizing:border-box;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,0.32);
  padding:0.75rem 1rem;
  border-radius:12px;
}
.home-header--mobile .home-nav-li--mobile-util{
  border-top:1px solid rgba(148,163,184,0.22);
  padding-top:0.85rem;
  margin-top:0.25rem;
}
.home-header--mobile .home-nav-mobile-util{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:0.75rem;
}
.home-header--mobile .home-nav-shell-lang__panel{
  position:absolute;
  top:calc(100% + 6px);
  inset-inline-start:0;
  inset-inline-end:0;
  width:auto;
}
@media (prefers-reduced-motion:reduce){
  .home-header--mobile .home-nav-links--mobile-drawer{transition-duration:.01ms}
}

:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav--mobile{
  background:linear-gradient(180deg,#0f172a 0%,#1e293b 100%);
  border-bottom-color:rgba(148,163,184,0.2);
}
:root[data-fx-shell-theme='dark'] .home-nav-mobile-logo{color:#f1f5f9}
:root[data-fx-shell-theme='dark'] .home-nav-mobile-live{color:#94a3b8}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer{
  background:#111827;
  border-bottom-color:rgba(71,85,105,0.45);
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer .home-nav-item:not(.home-nav-item--sublink){
  background:rgba(148,163,184,0.12);
  color:#f1f5f9;
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-details__summary{
  background:rgba(148,163,184,0.12);
  border-color:rgba(100,116,139,0.45);
  color:#f8fafc;
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer .home-nav-item--primary{
  background:rgba(16,185,129,0.22);
  border-color:rgba(45,212,191,0.42);
  color:#ccfbf1;
}
/* زیرمنوی آکاردئون (خدمات / بیشتر): پس زمینه تیره + متن روشن —رفع متن کم‌رنگ روی باکس روشن */
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-details__panel{
  background:rgba(30,41,59,0.92);
  border:1px solid rgba(71,85,105,0.55);
  border-radius:12px;
  padding:0.4rem 0.5rem 0.6rem;
  margin:0.2rem 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer .home-nav-item--sublink{
  background:transparent;
  color:#e2e8f0;
  border:none;
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer .home-nav-item--sublink.home-nav-item--tertiary{
  color:#cbd5e1;
}
@media (hover:hover) and (pointer:fine){
  :root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-links--mobile-drawer .home-nav-item--sublink:hover{
    background:rgba(255,255,255,0.08);
    color:#fff;
  }
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-backdrop{
  background:rgba(2,6,23,0.58);
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-toggle{
  background:#111827;
  border-color:rgba(148,163,184,0.22);
}
:root[data-fx-shell-theme='dark'] .home-header--mobile .home-nav-toggle-bar{
  background:#e2e8f0;
}
