/* ==========================================================================
   abr5 global navigation + footer
   Used by service subdomains and the auth/account pages so every abr5 host
   shares the same menu, language options and footer. Fully self-contained:
   every selector is scoped under .g-header / .g-footer so it cannot disturb
   the host page's own styles.
   ========================================================================== */
.g-header,.g-footer{
  --g-bg:#07111d;
  --g-bg-2:#0b1a2b;
  --g-line:rgba(255,255,255,.10);
  --g-line-strong:rgba(255,255,255,.16);
  --g-ink:#eaf3fc;
  --g-muted:#9db3c9;
  --g-brand:#2f95f0;
  --g-brand-2:#22d3ee;
  --g-radius:9px;
  font-family:Vazirmatn,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.g-header *,.g-footer *{box-sizing:border-box}
.g-header a,.g-footer a{text-decoration:none}
.g-header button,.g-header summary,.g-footer summary{font:inherit;color:inherit}

/* ------------------------------------------------------------------ header */
.g-header{
  position:relative;z-index:80;
  background:linear-gradient(180deg,#081522,#06101b);
  border-bottom:1px solid var(--g-line);
  color:var(--g-ink);
}
.g-header .g-inner{
  max-width:1200px;margin:0 auto;padding:0 20px;
  min-height:58px;display:flex;align-items:center;gap:16px;
}
.g-header .g-brand{
  display:inline-flex;align-items:center;gap:0;flex:0 0 auto;
  color:var(--g-ink);font-weight:800;font-size:17px;letter-spacing:-.2px;
}
.g-header .g-brand:hover{color:#fff}
.g-header .g-mark{
  width:28px;height:28px;margin-inline-end:9px;border-radius:8px;display:grid;place-items:center;flex:0 0 auto;
  background:linear-gradient(135deg,#0078d4,#00a2ff 55%,#22d3ee);
  box-shadow:0 6px 16px -8px rgba(0,120,212,.9),inset 0 1px 0 rgba(255,255,255,.4);
}
.g-header .g-mark svg{width:16px;height:16px;display:block}
.g-header .g-brand span{color:#7fb4e0;font-weight:500}
.g-header .g-nav{display:flex;align-items:center;gap:1px;flex:1 1 auto;min-width:0}
.g-header .g-link,
.g-header .g-menu>summary{
  display:inline-flex;align-items:center;gap:5px;
  padding:7px 10px;border-radius:8px;cursor:pointer;
  font-size:13.5px;font-weight:500;color:#c9d9e9;white-space:nowrap;
  background:none;border:0;list-style:none;
  transition:background .15s ease,color .15s ease;
}
.g-header .g-link:hover,
.g-header .g-menu>summary:hover,
.g-header .g-menu[open]>summary{background:rgba(255,255,255,.07);color:#fff}
.g-header .g-menu>summary::-webkit-details-marker{display:none}
.g-header .g-menu>summary::after{
  content:"";width:6px;height:6px;margin-inline-start:3px;
  border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;
  transform:translateY(-2px) rotate(45deg);opacity:.75;
}
.g-header .g-menu{position:relative}
.g-header .g-drop{
  position:absolute;top:calc(100% + 10px);inset-inline-start:0;
  width:min(620px,calc(100vw - 40px));
  background:linear-gradient(180deg,#0c1d30,#081522);
  border:1px solid var(--g-line-strong);border-radius:16px;
  padding:12px;box-shadow:0 34px 80px -30px rgba(0,0,0,.9);
  display:none;
}
.g-header .g-menu[open] .g-drop{display:block}
.g-header .g-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px}
.g-header .g-item{
  display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border-radius:10px;
  color:var(--g-ink);
}
.g-header .g-item:hover{background:rgba(47,149,240,.14)}
.g-header .g-ico{
  width:30px;height:30px;border-radius:8px;flex:0 0 auto;display:grid;place-items:center;
  background:rgba(47,149,240,.16);color:#7cc4ff;font-size:12px;font-weight:700;
}
.g-header .g-item b{display:block;font-size:13px;line-height:1.45;font-weight:600}
.g-header .g-item small{display:block;font-size:11.5px;line-height:1.45;color:var(--g-muted)}
.g-header .g-dropfoot{
  margin-top:10px;padding-top:10px;border-top:1px solid var(--g-line);
  display:flex;gap:16px;flex-wrap:wrap;
}
.g-header .g-dropfoot a{font-size:12.5px;color:#8fc6f5;font-weight:600}
.g-header .g-dropfoot a:hover{color:#fff;text-decoration:underline}
.g-header .g-actions{display:flex;align-items:center;gap:7px;margin-inline-start:auto;flex:0 0 auto}

/* language */
.g-header .g-lang{position:relative}
.g-header .g-lang>summary{
  display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:8px;
  cursor:pointer;list-style:none;font-size:12.5px;font-weight:600;color:#c9d9e9;
  border:1px solid var(--g-line);
}
.g-header .g-lang>summary:hover{border-color:var(--g-line-strong);color:#fff}
.g-header .g-lang>summary::-webkit-details-marker{display:none}
.g-header .g-lang svg{width:14px;height:14px}
.g-header .g-langlist{
  position:absolute;top:calc(100% + 8px);inset-inline-end:0;min-width:150px;
  background:var(--g-bg-2);border:1px solid var(--g-line-strong);border-radius:11px;
  padding:6px;display:none;flex-direction:column;gap:1px;
  box-shadow:0 24px 60px -28px rgba(0,0,0,.9);
}
.g-header .g-lang[open] .g-langlist{display:flex}
.g-header .g-langlist a{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:7px 9px;border-radius:7px;font-size:12.5px;color:#c9d9e9;
}
.g-header .g-langlist a:hover{background:rgba(255,255,255,.08);color:#fff}
.g-header .g-langlist .code{font-size:10.5px;color:var(--g-muted);letter-spacing:.4px}
.g-header .g-langlist a[aria-current="true"]{color:#8fc6f5}
.g-header .g-signin{
  padding:7px 11px;border-radius:8px;font-size:13px;font-weight:600;color:#d5e6f5;
}
.g-header .g-signin:hover{background:rgba(255,255,255,.08);color:#fff}
.g-header .g-cta{
  padding:8px 14px;border-radius:9px;font-size:13px;font-weight:700;color:#fff;
  background:linear-gradient(135deg,#0078d4,#1e9bff);
  box-shadow:0 8px 20px -10px rgba(30,155,255,.9),inset 0 1px 0 rgba(255,255,255,.3);
}
.g-header .g-cta:hover{background:linear-gradient(135deg,#0084e8,#38bdf8);color:#fff}
.g-header .g-burger{
  display:none;width:34px;height:34px;border-radius:8px;place-items:center;cursor:pointer;
  background:rgba(255,255,255,.06);border:1px solid var(--g-line);color:#dbe9f7;
}
.g-header .g-burger svg{width:18px;height:18px}

@media (max-width:960px){
  .g-header .g-inner{flex-wrap:wrap;padding:0 16px;min-height:54px}
  .g-header .g-burger{display:grid;margin-inline-start:auto}
  .g-header .g-actions{display:none}
  .g-header .g-nav{
    display:none;order:3;flex:1 0 100%;
    flex-direction:column;align-items:stretch;gap:2px;
    padding:8px 0 14px;
  }
  .g-header.is-open .g-nav{display:flex}
  .g-header .g-link,.g-header .g-menu>summary{
    width:100%;justify-content:space-between;padding:11px 10px;font-size:14.5px;
  }
  .g-header .g-menu>summary::after{transform:rotate(45deg);translate:0 -2px}
  .g-header .g-menu[open]>summary::after{transform:rotate(225deg);translate:0 2px}
  .g-header .g-drop{
    position:static;width:auto;margin:4px 0 6px;padding:6px;
    box-shadow:none;background:rgba(255,255,255,.035);border-radius:11px;
  }
  .g-header .g-grid{grid-template-columns:1fr}
  .g-header .g-dropfoot{padding:8px 10px 2px}
  .g-header .g-mobile-actions{
    display:flex;gap:8px;align-items:center;padding:10px 0 2px;border-top:1px solid var(--g-line);margin-top:6px;
  }
  .g-header .g-mobile-actions .g-cta{flex:1;text-align:center;padding:10px 14px}
}
.g-header .g-mobile-lang{display:none}
.g-header .g-mobile-actions{display:none}
@media (max-width:960px){
  .g-header .g-mobile-lang{
    display:flex;gap:6px;flex-wrap:wrap;padding:10px 4px 6px;
  }
  .g-header .g-mobile-lang a{
    font-size:11.5px;font-weight:700;letter-spacing:.4px;color:#a9c3da;
    padding:6px 9px;border:1px solid var(--g-line);border-radius:7px;
  }
  .g-header .g-mobile-lang a[aria-current="true"]{color:#fff;border-color:rgba(47,149,240,.65);background:rgba(47,149,240,.18)}
  .g-header .g-mobile-actions{display:flex}
}

/* ------------------------------------------------------------------ footer */
.g-footer{
  background:linear-gradient(180deg,#081522,#050d17 70%);
  border-top:1px solid var(--g-line);
  color:var(--g-muted);
  margin-top:56px;
}
.g-footer .g-fwrap{max-width:1200px;margin:0 auto;padding:46px 20px 22px}
.g-footer .g-fgrid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:30px}
.g-footer .g-fbrand .g-brand{display:inline-flex;align-items:center;gap:0;color:var(--g-ink);font-weight:800;font-size:17px}
.g-footer .g-fbrand .g-mark{
  width:28px;height:28px;margin-inline-end:9px;border-radius:8px;display:grid;place-items:center;
  background:linear-gradient(135deg,#0078d4,#22d3ee);
}
.g-footer .g-fbrand .g-mark svg{width:16px;height:16px}
.g-footer .g-fbrand p{margin:14px 0 0;font-size:12.5px;line-height:1.85;max-width:34ch;color:var(--g-muted)}
.g-footer h4{margin:0 0 12px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#7f97ae;font-weight:700}
.g-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.g-footer li a{font-size:12.5px;color:#b7cadc}
.g-footer li a:hover{color:#fff;text-decoration:underline}
.g-footer .g-fbottom{
  margin-top:34px;padding-top:18px;border-top:1px solid var(--g-line);
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  font-size:12px;color:#8399ae;
}
.g-footer .g-fbottom .g-legal{display:flex;gap:16px;flex-wrap:wrap}
.g-footer .g-fbottom a{color:#9fc1dd}
.g-footer .g-fbottom a:hover{color:#fff}
.g-footer .g-flang{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;margin-top:14px}
.g-footer .g-flang a{color:#9fc1dd}
.g-footer .g-flang a:hover{color:#fff}
@media (max-width:900px){
  .g-footer .g-fgrid{grid-template-columns:1fr 1fr;gap:26px}
}
@media (max-width:560px){
  .g-footer .g-fgrid{grid-template-columns:1fr 1fr;gap:22px}
  .g-footer .g-fwrap{padding-top:34px}
  .g-footer .g-fbrand{grid-column:1 / -1}
}

/* Narrow phones: keep each service's own top bar and account buttons on one line. */
@media (max-width:420px){
  .topbar{padding-inline:13px;gap:9px}
  .topbar .brand small{display:none}
  .topbar .navlink{font-size:13px;white-space:nowrap}
  .topbar .authnav{gap:6px;flex:0 0 auto}
  .topbar .authnav .btn{padding:6px 9px;font-size:12px}
  .topbar .spacer{min-width:0}
}

@media (max-width:340px){
  .topbar{padding-inline:10px;gap:7px}
  .topbar .authnav{gap:4px}
  .topbar .authnav .btn{padding:6px 7px;font-size:11.5px}
}
