@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* theme bridge: allow admin tokens ( --nf-* ) to override site palette */
:root{
  --bg: var(--nf-bg, #0b0f14);
  --surface: var(--nf-surface, rgba(255,255,255,0.06));
  --surface-2: var(--nf-surface-2, rgba(255,255,255,0.09));
  --text: var(--nf-text, rgba(255,255,255,0.92));
  --muted: var(--nf-muted, rgba(255,255,255,0.68));
  --border: var(--nf-border, rgba(255,255,255,0.12));
  --primary: var(--nf-primary, #6ee7ff);
  --primary-2: var(--nf-primary-2, #22c55e);
  --danger: var(--nf-danger, #ef4444);
  --shadow: var(--nf-shadow, 0 10px 30px rgba(0,0,0,0.35));
  --radius-xl: var(--nf-radius-xl, 18px);
  --radius-lg: var(--nf-radius-lg, 16px);
  --radius-md: var(--nf-radius-md, 14px);
  --container: 1200px;

  /* slider */
  --hero-ms: 5200ms;
  --hero-in-x: 0px;

  /* video */
  --video-radius: 22px;
  --video-ring: 6px;
  --video-pad: 8px;
  --video-orbit-size: 46deg;
  --video-orbit-ms: 3200ms;
  --video-hue-ms: 9000ms;

  /* orbit */
  --orbit-a: rgba(255, 70, 175, 0.92);
  --orbit-b: rgba(255, 210, 80, 0.96);
  --orbit-c: rgba(120, 255, 220, 0.96);

  /* topbar sizing */
  --tb-h: 40px;
  --tb-pad-x: 12px;
  --tb-gap: 8px;
  --tb-radius: 999px;
  --tb-font: 700;

  /* footer */
  --footer-gap: 14px;
  --footer-card: rgba(255,255,255,0.04);
  --footer-card2: rgba(0,0,0,0.22);

  /* footer tri columns (desktop) */
  --footer-col-contact: 0.82fr;
  --footer-col-popular: 0.66fr;
  --footer-col-legal:   1.52fr;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{
  margin: 0;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(110,231,255,0.12), transparent 60%),
              radial-gradient(900px 500px at 85% 15%, rgba(34,197,94,0.10), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
img, video{ max-width: 100%; height: auto; display: block; }
iframe{ max-width: 100%; display:block; }
button, input, select, textarea{ font: inherit; }

.is-rtl{ direction: rtl; text-align: right; --hero-in-x: -16px; }
.is-ltr{ direction: ltr; text-align: left; --hero-in-x: 16px; }

.sr-only{
  position:absolute!important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

.skip-link{
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  transform: translateY(-120%);
  transition: transform 160ms ease;
  border: 1px solid rgba(255,255,255,0.18);
}
.skip-link:focus{ transform: translateY(0); }

.app-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11,15,20,0.72);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.app-body{
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1 1 auto;
}

.app-main{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 16px 34px;
  min-width: 0;
}

.app-footer{
  border-top: 1px solid var(--border);
  background: rgba(11,15,20,0.72);
}

/* ---------- Topbar ---------- */
.topbar{ width: 100%; }

.topbar-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "left right"
    "nav  nav";
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
  overflow: visible;
}
.is-rtl .topbar-inner{
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "right left"
    "nav   nav";
}

.topbar-left{
  grid-area: left;
  display: flex;
  align-items: center;
  gap: var(--tb-gap);
  min-width: 0;
}
.topbar-right{
  grid-area: right;
  display: flex;
  align-items: center;
  gap: var(--tb-gap);
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: wrap;
}
.topbar-nav{
  grid-area: nav;
  display: flex;
  align-items: center;
  gap: var(--tb-gap);
  padding: 8px 2px 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar{ display: none; }

.topbar .nav-link,
.topbar .btn,
.topbar .chip,
.topbar .brand{
  height: var(--tb-h);
  min-height: var(--tb-h);
  padding-block: 0;
  padding-inline: var(--tb-pad-x);
  border-radius: var(--tb-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
  white-space: nowrap;
}

.nav-link{
  color: var(--muted);
  border: 1px solid transparent;
  font-weight: var(--tb-font);
  background: transparent;
}
.nav-link:hover{
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}

.brand{
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
}
.brand-mark{
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110,231,255,0.18), rgba(34,197,94,0.10));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  font-weight: 800;
  flex: 0 0 auto;
}
.brand-text{
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 340px);
}

.icon-btn{
  width: var(--tb-h);
  height: var(--tb-h);
  border-radius: var(--tb-radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  user-select: none;
  touch-action: manipulation;
}
.icon-btn:hover{ background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }
.icon-btn:active{ transform: translateY(1px); }
.icon-lines{
  width: 18px;
  height: 12px;
  display: inline-block;
  position: relative;
}
.icon-lines::before,
.icon-lines::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
}
.icon-lines::before{ top: 1px; }
.icon-lines::after{ bottom: 1px; }
.icon-lines{
  background: rgba(255,255,255,0.86);
  border-radius: 999px;
  height: 2px;
  margin-top: 5px;
}

.lang-switch{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--tb-h);
  padding: 0 6px;
  border-radius: var(--tb-radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  flex: 0 0 auto;
}
.chip{
  padding-inline: 10px;
  border-radius: var(--tb-radius);
  font-weight: var(--tb-font);
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
}
.chip.is-active{
  color: #081018;
  background: rgba(110,231,255,0.95);
  border-color: rgba(110,231,255,0.55);
}

.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  user-select: none;
  touch-action: manipulation;
  font-weight: var(--tb-font);
}
.btn:hover{ background: rgba(255,255,255,0.06); }
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: linear-gradient(135deg, rgba(110,231,255,0.92), rgba(34,197,94,0.65));
  color: #081018;
  border-color: rgba(110,231,255,0.45);
  box-shadow: 0 12px 26px rgba(110,231,255,0.10), 0 10px 30px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.btn-primary::after{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: rotate(18deg) translate3d(-30%,0,0);
  animation: btnSheen 4.8s ease-in-out infinite;
  pointer-events:none;
}
@keyframes btnSheen{
  0%{ transform: rotate(18deg) translate3d(-40%,0,0); opacity: 0; }
  18%{ opacity: 1; }
  35%{ transform: rotate(18deg) translate3d(40%,0,0); opacity: 0; }
  100%{ transform: rotate(18deg) translate3d(40%,0,0); opacity: 0; }
}
.btn-primary:hover{
  box-shadow: 0 14px 34px rgba(110,231,255,0.14), 0 14px 40px rgba(0,0,0,0.28);
}
.btn-ghost{
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-weight: var(--tb-font);
}

/* ---------- ✅ Badge / Counter (RED) ---------- */
/* Use any of:
   - <span class="nf-badge" data-nf-badge="tickets">3</span>
   - <span class="nf-badge" data-nf-badge="messages">1</span>
   - or legacy classes: .nf-badge--tickets / .nf-badge--messages
*/
.nf-badge,
[data-nf-badge],
.nf-badge--tickets, .nf-badge--messages,
.nf-badge-tickets, .nf-badge-messages{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 26px rgba(239,68,68,0.20);
  white-space: nowrap;
}
.nf-badge[hidden],
[data-nf-badge][hidden],
.nf-badge--tickets[hidden], .nf-badge--messages[hidden],
.nf-badge-tickets[hidden], .nf-badge-messages[hidden]{
  display: none !important;
}
.nf-badge-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nf-badge--corner{
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  z-index: 2;
}

/* ---------- Dropdown (currency) ---------- */
.nf-dd{ position: relative; display: inline-block; }
.nf-dd > summary{ list-style: none; }
.nf-dd > summary::-webkit-details-marker{ display: none; }

.nf-dd-summary{
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nf-dd-summary-caret{ font-size: 12px; opacity: .8; }

.nf-dd-menu{
  position: absolute;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 170px;
  background: rgba(15,23,42,.94);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
}
.is-rtl .nf-dd-menu{ right: 0; left: auto; }
.is-ltr .nf-dd-menu{ left: 0; right: auto; }

.nf-dd-item{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(15,23,42,.20);
}
.nf-dd-item:last-child{ margin-bottom: 0; }
.nf-dd-item-label{ opacity: .88; font-size: 12px; white-space: nowrap; }
.nf-dd-item:hover,
.nf-dd-item:focus,
.nf-dd-item:focus-visible{
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.12);
  outline: none;
}
.nf-dd-item:active{ background: rgba(255,255,255,.18); }

/* ---------- Footer ---------- */
.footer{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 16px;
}
.footer-inner{ width: 100%; }

.footer-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--footer-gap);
  align-items: stretch;
  justify-items: stretch;
}

.footer-card{
  min-width: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(520px 240px at 12% 15%, rgba(110,231,255,0.08), transparent 62%),
    radial-gradient(520px 240px at 92% 20%, rgba(34,197,94,0.06), transparent 62%),
    linear-gradient(180deg, var(--footer-card), var(--footer-card2));
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.footer-card::before{
  content:"";
  position:absolute;
  inset:-40% -20%;
  background: radial-gradient(closest-side, rgba(110,231,255,0.08), transparent 70%);
  transform: rotate(18deg);
  opacity: 0.8;
  pointer-events:none;
}
.footer-card > *{ position: relative; }
.footer-card--brand::before{
  background: radial-gradient(closest-side, rgba(34,197,94,0.08), transparent 70%);
}

.footer-card-title{
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
}
.footer-brand-mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, rgba(110,231,255,0.16), rgba(34,197,94,0.10));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.footer-brand-text{ min-width: 0; }
.footer-brand-title{
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-brand-sub{
  color: var(--muted);
  font-weight: 200;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-sep{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 12px 0;
}
.footer-bottom{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer-copyright{
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Tri footer layout */
.footer-note{
  color: var(--muted);
  font-weight: 200;
  line-height: 1.8;
}
.footer-grid.footer-grid--tri{ align-items: start; }

/* Desktop tri */
@media (min-width: 921px){
  .footer-grid.footer-grid--tri{
    grid-template-columns: var(--footer-col-contact) var(--footer-col-popular) var(--footer-col-legal);
    grid-template-areas:
      "brand brand brand"
      "left  middle right";
  }
  .is-rtl .footer-grid.footer-grid--tri{
    grid-template-columns: var(--footer-col-legal) var(--footer-col-popular) var(--footer-col-contact);
    grid-template-areas:
      "brand brand brand"
      "right middle left";
  }
  .footer-col--brand{ grid-area: brand; }
  .footer-col--left{ grid-area: left; }
  .footer-col--middle{ grid-area: middle; }
  .footer-col--right{ grid-area: right; }
}

/* ✅ Mobile footer (NOT three stacked columns): brand full, then 2 cols, then contact full */
@media (max-width: 920px){
  .footer-grid.footer-grid--tri{
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    grid-template-areas:
      "brand brand"
      "right middle"
      "left  left";
  }
  .footer-col--brand{ grid-area: brand; }
  .footer-col--left{ grid-area: left; }
  .footer-col--middle{ grid-area: middle; }
  .footer-col--right{ grid-area: right; }
}

/* Legal blocks */
.footer-legal-block{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.footer-legal-title{
  font-weight: 800;
  margin-bottom: 8px;
}
.footer-legal-body{
  font-size: 14px;
  line-height: 1.95;
  color: rgba(255,255,255,0.86);
  font-weight: 200;
  word-break: break-word;
}

/* Contact rows */
.footer-row{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 10px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  margin-bottom: 10px;
}
.footer-row--link{
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.footer-row--link:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
.footer-row-ico{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  flex: 0 0 auto;
  color: rgba(255,255,255,0.90);
}
.footer-ico-svg{ display:block; }

.footer-row-body{ min-width: 0; }
.footer-row-label{
  font-weight: 800;
  font-size: 12px;
  color: rgba(255,255,255,0.86);
  margin-bottom: 2px;
}
.footer-row-value{
  color: var(--muted);
  font-weight: 200;
  white-space: normal;
  word-break: break-word;
}

/* Icon-only links */
.footer-iconbar{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.footer-iconlink{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.90);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.footer-iconlink:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(110,231,255,0.35);
  transform: translateY(-1px);
}
.footer-iconlink svg,
.footer-iconlink .footer-ico-svg{
  width: 28px;
  height: 28px;
}

/* Popular links */
.footer-popular{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.footer-popular-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  color: var(--muted);
  font-weight: 700;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, color 120ms ease;
}
.footer-popular-link:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(110,231,255,0.28);
  color: var(--text);
  transform: translateY(-1px);
}
.footer-popular-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(110,231,255,0.92);
  box-shadow: 0 0 16px rgba(110,231,255,0.18);
  flex: 0 0 auto;
}
.footer-popular-text{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Toast ---------- */
.toast-root{
  position: fixed;
  inset: auto 0 0 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  z-index: 9999;
  pointer-events: none;
}
.toast{
  width: min(520px, calc(100vw - 28px));
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-hiding{
  opacity: 0;
  transform: translateY(8px);
}
.toast-title{ font-weight: 800; margin: 0 0 4px; }
.toast-msg{ color: var(--muted); margin: 0; font-weight: 400; }
.toast-close{
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 12px;
}
.toast-close:hover{ color: var(--text); background: rgba(255,255,255,0.06); }

/* =========================================================
   Home
   ========================================================= */

.home-hero{
  width: 100%;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* ✅ FIX: enforce side-by-side structure with grid (desktop + mobile) */
.home-head{
  display: grid;
  grid-template-columns: 1fr minmax(160px, 220px);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}
.is-rtl .home-head{ direction: rtl; }

.home-copy{
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.home-copy::before{
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background:
    radial-gradient(520px 240px at 10% 15%, rgba(110,231,255,0.18), transparent 62%),
    radial-gradient(520px 240px at 92% 20%, rgba(34,197,94,0.14), transparent 62%),
    radial-gradient(420px 220px at 55% 95%, rgba(110,231,255,0.10), transparent 66%);
  opacity: 0.95;
  transform: translateZ(0);
  animation: heroGlow 8.5s ease-in-out infinite;
}
.home-copy::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
  opacity: 0.9;
}
@keyframes heroGlow{
  0%{ transform: translate3d(0,0,0) scale(1); opacity: 0.92; }
  50%{ transform: translate3d(0,-4px,0) scale(1.02); opacity: 1; }
  100%{ transform: translate3d(0,0,0) scale(1); opacity: 0.92; }
}

.home-qr-wrap{
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.home-qr{
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  padding: 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
  align-content: center;
  position: relative;
  overflow: hidden;
}
.home-qr::before{
  content: "";
  position: absolute;
  inset: -30% -10%;
  background: radial-gradient(closest-side, rgba(110,231,255,0.10), transparent 70%);
  transform: rotate(18deg);
  opacity: 0.8;
}
.home-qr-img{
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--radius-md);
  background: #fff;
  position: relative;
}
.home-qr-caption{
  color: var(--muted);
  font-size: 12px;
  font-weight: 200;
  text-align: center;
  position: relative;
}

/* ---------- Slider ---------- */
.hero-slider{
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding-bottom: 10px;
}
.hero-slider::after{
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
}
.hero-slider::before{
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(110,231,255,0.92), rgba(34,197,94,0.65));
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0.9;
  animation: heroProgress var(--hero-ms) linear infinite;
  box-shadow: 0 0 18px rgba(110,231,255,0.18);
}
@keyframes heroProgress{
  from{ transform: scaleX(0); }
  to{ transform: scaleX(1); }
}
.hero-slide-radio{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hero-slides{
  position: relative;
  min-width: 0;
  display: grid;
  overflow: hidden;
}
.hero-slides::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: rotate(18deg) translate3d(-40%,0,0);
  opacity: 0.0;
  pointer-events:none;
}
@keyframes heroSweep{
  0%{ transform: rotate(18deg) translate3d(-45%,0,0); opacity: 0; }
  18%{ opacity: 0.45; }
  45%{ transform: rotate(18deg) translate3d(45%,0,0); opacity: 0; }
  100%{ transform: rotate(18deg) translate3d(45%,0,0); opacity: 0; }
}
.hero-slide{
  grid-area: 1 / 1;
  min-width: 0;
  position: relative;
  padding-inline: 8px;
  padding-top: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--hero-in-x), 12px, 0);
  filter: blur(2px);
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}
#hero-slide-1:checked ~ .hero-slides .hero-slide--1,
#hero-slide-2:checked ~ .hero-slides .hero-slide--2,
#hero-slide-3:checked ~ .hero-slides .hero-slide--3,
#hero-slide-4:checked ~ .hero-slides .hero-slide--4,
#hero-slide-5:checked ~ .hero-slides .hero-slide--5{
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0,0,0);
  filter: blur(0);
}
#hero-slide-1:checked ~ .hero-slides::before,
#hero-slide-2:checked ~ .hero-slides::before,
#hero-slide-3:checked ~ .hero-slides::before,
#hero-slide-4:checked ~ .hero-slides::before,
#hero-slide-5:checked ~ .hero-slides::before{
  animation: heroSweep var(--hero-ms) ease-in-out infinite;
}

@keyframes heroTitleIn{
  from{ opacity: 0; transform: translate3d(var(--hero-in-x), 12px, 0); filter: blur(2px); }
  to{ opacity: 1; transform: translate3d(0,0,0); filter: blur(0); }
}
@keyframes heroSubIn{
  from{ opacity: 0; transform: translate3d(var(--hero-in-x), 14px, 0); }
  to{ opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes heroCtaIn{
  from{ opacity: 0; transform: translate3d(var(--hero-in-x), 16px, 0) scale(0.98); }
  to{ opacity: 1; transform: translate3d(0,0,0) scale(1); }
}
@keyframes heroUnderlineIn{
  from{ transform: scaleX(0.15); opacity: 0.35; }
  to{ transform: scaleX(1); opacity: 0.85; }
}
#hero-slide-1:checked ~ .hero-slides .hero-slide--1 .home-title,
#hero-slide-2:checked ~ .hero-slides .hero-slide--2 .home-title,
#hero-slide-3:checked ~ .hero-slides .hero-slide--3 .home-title,
#hero-slide-4:checked ~ .hero-slides .hero-slide--4 .home-title,
#hero-slide-5:checked ~ .hero-slides .hero-slide--5 .home-title{
  animation: heroTitleIn 520ms cubic-bezier(.2,.9,.2,1) both;
}
#hero-slide-1:checked ~ .hero-slides .hero-slide--1 .home-sub,
#hero-slide-2:checked ~ .hero-slides .hero-slide--2 .home-sub,
#hero-slide-3:checked ~ .hero-slides .hero-slide--3 .home-sub,
#hero-slide-4:checked ~ .hero-slides .hero-slide--4 .home-sub,
#hero-slide-5:checked ~ .hero-slides .hero-slide--5 .home-sub{
  animation: heroSubIn 560ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: 80ms;
}
#hero-slide-1:checked ~ .hero-slides .hero-slide--1 .home-ctas,
#hero-slide-2:checked ~ .hero-slides .hero-slide--2 .home-ctas,
#hero-slide-3:checked ~ .hero-slides .hero-slide--3 .home-ctas,
#hero-slide-4:checked ~ .hero-slides .hero-slide--4 .home-ctas,
#hero-slide-5:checked ~ .hero-slides .hero-slide--5 .home-ctas{
  animation: heroCtaIn 620ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: 150ms;
}

.hero-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.34);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}
.hero-slider:hover .hero-arrow{ opacity: 0.92; }
.hero-arrow span{
  font-size: 24px;
  line-height: 1;
  color: rgba(255,255,255,0.92);
}
.hero-prev{ inset-inline-start: 6px; }
.hero-next{ inset-inline-end: 6px; }
.hero-arrow:hover{ background: rgba(0,0,0,0.48); }
.hero-arrow:active{ transform: translateY(-50%) translateY(1px); }

.hero-dots{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 2px;
}
.hero-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, width 140ms ease;
}
.hero-dot:hover{ transform: translateY(-1px) scale(1.05); background: rgba(255,255,255,0.10); }
#hero-slide-1:checked ~ .hero-dots label[for="hero-slide-1"],
#hero-slide-2:checked ~ .hero-dots label[for="hero-slide-2"],
#hero-slide-3:checked ~ .hero-dots label[for="hero-slide-3"],
#hero-slide-4:checked ~ .hero-dots label[for="hero-slide-4"],
#hero-slide-5:checked ~ .hero-dots label[for="hero-slide-5"]{
  width: 22px;
  background: rgba(110,231,255,0.95);
  border-color: rgba(110,231,255,0.55);
  box-shadow: 0 0 18px rgba(110,231,255,0.18);
}

/* Texts */
.home-title{
  margin: 0 0 10px;
  font-size: clamp(18px, 4.8vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .2px;
  position: relative;
}
.home-title::after{
  content: "";
  display: block;
  width: min(160px, 46%);
  height: 3px;
  border-radius: 999px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(110,231,255,0.85), rgba(34,197,94,0.55));
  opacity: 0.85;
  transform-origin: 0 50%;
  transform: scaleX(1);
}
#hero-slide-1:checked ~ .hero-slides .hero-slide--1 .home-title::after,
#hero-slide-2:checked ~ .hero-slides .hero-slide--2 .home-title::after,
#hero-slide-3:checked ~ .hero-slides .hero-slide--3 .home-title::after,
#hero-slide-4:checked ~ .hero-slides .hero-slide--4 .home-title::after,
#hero-slide-5:checked ~ .hero-slides .hero-slide--5 .home-title::after{
  animation: heroUnderlineIn 650ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: 120ms;
}
.home-sub{
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 200;
  max-width: 62ch;
}
.home-ctas{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 0;
}

/* ---------- Video ---------- */
.home-media{ min-width: 0; }
.home-media--center{
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

@keyframes orbitRotate{ to{ transform: rotate(360deg); } }
@keyframes orbitHue{ to{ filter: hue-rotate(360deg); } }

.home-media-card{
  position: relative;
  isolation: isolate;
  border-radius: var(--video-radius);
  overflow: hidden;
  border: var(--video-ring) solid transparent;
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(110,231,255,0.06), transparent 60%),
    radial-gradient(780px 480px at 88% 18%, rgba(34,197,94,0.05), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.24)) padding-box,
    conic-gradient(
      from 180deg,
      rgba(110,231,255,0.98),
      rgba(34,197,94,0.95),
      rgba(110,231,255,0.98),
      rgba(34,197,94,0.95),
      rgba(110,231,255,0.98)
    ) border-box;
  padding: var(--video-pad);
  box-shadow:
    0 24px 72px rgba(0,0,0,0.50),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 26px rgba(110,231,255,0.06),
    0 0 22px rgba(34,197,94,0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.home-media-card::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: var(--video-ring) solid transparent;
  background:
    linear-gradient(transparent, transparent) padding-box,
    conic-gradient(
      from 0deg,
      rgba(255,255,255,0.0) 0deg,
      rgba(255,255,255,0.0) calc(360deg - var(--video-orbit-size)),
      rgba(255,255,255,0.12) calc(360deg - var(--video-orbit-size)),
      var(--orbit-a) calc(360deg - (var(--video-orbit-size) * 0.82)),
      rgba(255,255,255,0.92) calc(360deg - (var(--video-orbit-size) * 0.66)),
      var(--orbit-b) calc(360deg - (var(--video-orbit-size) * 0.46)),
      var(--orbit-c) calc(360deg - (var(--video-orbit-size) * 0.28)),
      rgba(255,255,255,0.0) 360deg
    ) border-box;
  opacity: 0.96;
  filter: saturate(1.35) brightness(1.22) contrast(1.06);
  transform-origin: 50% 50%;
  animation: orbitRotate var(--video-orbit-ms) linear infinite, orbitHue var(--video-hue-ms) linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.home-media-card > *{ position: relative; z-index: 1; }
.home-media-card:hover{
  transform: translateY(-2px);
  box-shadow:
    0 30px 92px rgba(0,0,0,0.56),
    0 0 42px rgba(110,231,255,0.10),
    0 0 32px rgba(34,197,94,0.08),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  filter: saturate(1.06);
}

.home-ratio{
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: calc(var(--video-radius) - var(--video-ring) - var(--video-pad));
  overflow: hidden;
  background: rgba(0,0,0,0.30);
}
.home-iframe,
.home-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .home-media-card::after{ animation: none !important; }
  .home-media-card{ transition: none !important; }
  .home-copy::before{ animation: none !important; }
  .btn-primary::after{ animation: none !important; }
  .hero-slider::before{ animation: none !important; }
  .hero-slides::before{ animation: none !important; }
  .hero-slide{ transition: none !important; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 880px){
  .topbar-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: visible;
  }
  .topbar-left{ flex: 0 0 auto; }
  .topbar-right{ flex: 0 0 auto; flex-wrap: nowrap; }
  .topbar-nav{ padding: 0; overflow: visible; }
}

/* ✅ Mobile hero: keep side-by-side but shrink QR */
@media (max-width: 520px){
  .app-main{ padding: 16px 12px 26px; }
  .footer{ padding: 18px 12px; }
  .footer-card{ padding: 14px; }

  .home-head{
    grid-template-columns: 1fr minmax(120px, 150px);
    gap: 12px;
  }
  .home-copy{ padding: 14px; }
  .home-qr{ padding: 10px; }
  .home-qr-caption{ font-size: 11px; }
}

/* ✅ Very small phones: stack to avoid overflow */
@media (max-width: 360px){
  .home-head{
    grid-template-columns: 1fr;
  }
  .home-qr-wrap{ order: 2; }
}

/* tighter video on very small */
@media (max-width: 420px){
  :root{
    --video-pad: 7px;
    --video-radius: 20px;
    --video-ring: 5px;
    --video-orbit-size: 52deg;
    --video-orbit-ms: 3600ms;
  }
}

/* =========================================================
   Sidebar + Account Layout (robust)
   - Desktop: real 2-column layout
   - Mobile: off-canvas ONLY when body.sidebar-open
   - Fallback: when not sidebar-open, sidebar stays in-flow (prevents "broken" pages)
   ========================================================= */

/* Base sidebar card (safe even if layout classes differ) */
.app-sidebar{
  min-width: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(520px 240px at 12% 15%, rgba(110,231,255,0.06), transparent 62%),
    radial-gradient(520px 240px at 92% 20%, rgba(34,197,94,0.05), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.22));
  box-shadow: var(--shadow);
  padding: 14px;
}

/* Make sidebar links usable even with unknown markup */
.app-sidebar a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  color: rgba(255,255,255,0.86);
  font-weight: 800;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, color 120ms ease;
  margin-bottom: 10px;
}
.app-sidebar a:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(110,231,255,0.28);
  color: var(--text);
  transform: translateY(-1px);
}
.app-sidebar a:last-child{ margin-bottom: 0; }

/* Desktop: 2-column shell when sidebar exists */
@media (min-width: 980px){
  .app-shell.has-sidebar .app-body{
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    grid-template-areas: "side main";
  }

  body.is-rtl .app-shell.has-sidebar .app-body{
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    grid-template-areas: "main side";
  }

  .app-shell.has-sidebar .app-sidebar{ grid-area: side; }
  .app-shell.has-sidebar .app-main{
    grid-area: main;
    max-width: none;
    margin: 0;
    padding: 22px 0 34px;
  }

  /* Sidebar stays visible and scrolls */
  .app-shell.has-sidebar .app-sidebar{
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 92px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile: overlay + off-canvas ONLY when sidebar-open */
@media (max-width: 979px){
  /* overlay (works even if shell classes differ) */
  .sidebar-overlay{
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  /* By default: keep sidebar in normal flow (prevents "sidebar missing/broken" if JS/class not present) */
  .app-shell.has-sidebar .app-sidebar{
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
    transition: none;
    margin: 0 0 14px;
  }

  /* Lock page scroll when drawer is open */
  body.sidebar-open{
    overflow: hidden;
    touch-action: none;
  }

  /* Open state: convert same element to off-canvas drawer */
  body.sidebar-open .app-shell.has-sidebar .app-sidebar{
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 80;
    width: min(84vw, 360px);
    max-width: 100%;
    background: rgba(15,23,42,0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 24px 80px rgba(0,0,0,0.62);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    will-change: transform;
    transition: transform 180ms ease;
    margin: 0;
  }

  body.sidebar-open.is-ltr .app-shell.has-sidebar .app-sidebar{
    left: 0;
    right: auto;
    transform: translate3d(0,0,0);
  }
  body.sidebar-open.is-rtl .app-shell.has-sidebar .app-sidebar{
    right: 0;
    left: auto;
    transform: translate3d(0,0,0);
  }

  /* When open, show overlay */
  body.sidebar-open .sidebar-overlay{
    opacity: 1;
    pointer-events: auto;
  }
}

/* =========================================================
   ✅ Mobile Footer Accordion (keeps desktop tri-grid intact)
   ========================================================= */

.footer-acc-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  cursor: default;
}

/* caret */
.footer-acc-caret{
  width: 18px;
  height: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
}
.footer-acc-caret::before{
  content: "›";
  font-size: 18px;
  line-height: 1;
  opacity: .9;
  transform: rotate(0deg);
}
.is-rtl .footer-acc-caret::before{ content: "‹"; }

/* body container (mobile will collapse) */
.footer-acc-body{
  padding-top: 10px; /* desktop default */
}

/* Desktop: always expanded, no accordion behavior */
@media (min-width: 921px){
  .footer-acc-toggle{ display:none !important; }
  .footer-acc-caret{ display:none !important; }
  .footer-acc-head{ cursor: default; }
  .footer-acc-body{ max-height: none !important; overflow: visible !important; padding-top: 10px !important; }
}

/* Mobile: accordion */
@media (max-width: 920px){
  .footer-acc-head{
    cursor: pointer;
  }

  /* collapse by default */
  .footer-acc-body{
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    transition: max-height 220ms ease, padding-top 220ms ease;
  }

  /* expand when checked */
  .footer-acc-toggle:checked ~ .footer-acc-body{
    max-height: 1400px;
    padding-top: 10px;
  }

  /* caret rotate */
  .footer-acc-toggle:checked + .footer-acc-head .footer-acc-caret::before{
    transform: rotate(90deg);
  }
  .is-rtl .footer-acc-toggle:checked + .footer-acc-head .footer-acc-caret::before{
    transform: rotate(-90deg);
  }

  /* make card title line not wrap weirdly */
  .footer-acc-head .footer-card-title{
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Very small phones: reduce icon sizes a bit */
@media (max-width: 420px){
  .footer-iconlink{
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  .footer-iconlink svg,
  .footer-iconlink .footer-ico-svg{
    width: 24px;
    height: 24px;
  }
}

/* =========================================================
   TOPBAR v2 (safe RTL/LTR + desktop single-row + mobile single-row)
   Replace all older "topbar nav/overflow/one-row/actions" patches with this.
   ========================================================= */

/* Layout */
.topbar-inner.topbar-inner--v2{
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  overflow: visible;
}

/* Keep left / nav / right in one row on desktop */
.topbar-left{ display:flex; align-items:center; gap: var(--tb-gap); min-width: 0; }
.topbar-nav.topbar-nav--v2{ flex: 1 1 auto; min-width: 0; }
.topbar-right{ display:flex; align-items:center; gap: var(--tb-gap); min-width: 0; flex-wrap: nowrap; justify-content: flex-end; }

/* Desktop/mobile action switch */
.topbar-right--mobile{ display: none; }
@media (max-width: 879px){
  .topbar-right--desktop{ display: none !important; }
  .topbar-right--mobile{ display: inline-flex !important; }
}

/* Brand truncate */
.brand-text{
  max-width: min(52vw, 340px);
}
@media (max-width: 520px){
  .brand-text{ max-width: 34vw; }
}
@media (max-width: 420px){
  .brand-text{ max-width: 28vw; }
}

/* NAV scroller */
.topbar-nav.topbar-nav--v2{
  position: relative;
  overflow: visible;
}

.topbar-nav-scroll{
  display: flex;
  align-items: center;
  gap: var(--tb-gap);
  min-width: 0;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding: 2px 0;
  white-space: nowrap;
}
.topbar-nav-scroll::-webkit-scrollbar{ display:none; }

.topbar-nav-scroll > *{
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Edge fade + room for arrows ONLY when overflow */
.topbar-nav--overflow .topbar-nav-scroll{
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0,
    #000 18px,
    #000 calc(100% - 18px),
    transparent 100%);
  mask-image: linear-gradient(90deg,
    transparent 0,
    #000 18px,
    #000 calc(100% - 18px),
    transparent 100%);
  padding-inline: 42px;
}

/* Arrows (shown only when overflow) */
.topbar-nav-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, opacity 120ms ease;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.topbar-nav-arrow span{ font-size: 22px; line-height: 1; }
.topbar-nav--overflow .topbar-nav-arrow{ opacity: 0.92; pointer-events: auto; }
.topbar-nav-arrow:hover{ background: rgba(0,0,0,0.50); border-color: rgba(255,255,255,0.20); }
.topbar-nav-arrow:active{ transform: translateY(-50%) translateY(1px); }
.topbar-nav-arrow:disabled{ opacity: 0.35; pointer-events: none; }

.topbar-nav-arrow--start{ inset-inline-start: 6px; }
.topbar-nav-arrow--end{ inset-inline-end: 6px; }

/* Mobile: force one row + swap areas in RTL without touching desktop */
@media (max-width: 879px){
  .topbar-inner.topbar-inner--v2{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "left nav right";
    align-items: center;
    gap: 10px 12px;
    justify-content: initial;
  }

  body.is-rtl .topbar-inner.topbar-inner--v2{
    grid-template-areas: "right nav left";
  }

  .topbar-left{ grid-area: left; }
  .topbar-nav.topbar-nav--v2{ grid-area: nav; }
  .topbar-right{ grid-area: right; }
}

/* =========================
   Mobile actions dropdown
   ========================= */
.nf-actions-btn{
  height: var(--tb-h);
  width: var(--tb-h);
  border-radius: var(--tb-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nf-actions-dots{
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}
.nf-actions-dots::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.9) 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.9) 2px, transparent 3px),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,.9) 2px, transparent 3px);
}

.nf-dd-menu.nf-dd-menu--actions{
  min-width: min(86vw, 320px);
  padding: 10px;
}

body.is-rtl .nf-dd-menu.nf-dd-menu--actions{ right: 0; left: auto; }
body.is-ltr .nf-dd-menu.nf-dd-menu--actions{ left: 0; right: auto; }

.nf-actions-sec{ display:flex; flex-direction:column; gap:10px; }
.nf-actions-title{ font-weight:800; font-size:12px; color: rgba(255,255,255,.88); }
.nf-actions-sep{ height:1px; background: rgba(255,255,255,0.10); margin:10px 0; }

.nf-actions-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  font-weight:800;
}
.nf-actions-link--primary{
  background: linear-gradient(135deg, rgba(110,231,255,0.92), rgba(34,197,94,0.65));
  color:#081018;
  border-color: rgba(110,231,255,.45);
}

.nf-actions-form{ margin:0; }

.nf-actions-btn2{
  width:100%;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  font-weight:800;
  cursor:pointer;
}

.nf-actions-row{ display:flex; gap:8px; }
.nf-actions-pill{
  flex:1 1 auto;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.86);
  font-weight:900;
  cursor:pointer;
}
.nf-actions-pill.is-active{
  background: rgba(110,231,255,0.95);
  border-color: rgba(110,231,255,0.55);
  color:#081018;
}

.nf-actions-col{ display:flex; flex-direction:column; gap:8px; }
.nf-actions-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  font-weight:900;
  cursor:pointer;
  padding: 0 12px;
}
.nf-actions-item.is-active{
  background: rgba(110,231,255,0.95);
  border-color: rgba(110,231,255,0.55);
  color:#081018;
}
.nf-actions-muted{ font-weight:400; font-size:12px; opacity:.85; }

/* =========================================================
   Desktop: disable "slider" feel (no arrows, no mask, no scroller)
   Keep overflow mechanics for MOBILE only
   ========================================================= */
@media (min-width: 880px){
  .topbar-nav-arrow{
    display: none !important;
  }

  /* no fade edges on desktop */
  .topbar-nav-scroll{
    overflow: visible !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    padding-inline: 0 !important;
    scroll-snap-type: none !important;
  }

  /* even if JS adds overflow class, neutralize it on desktop */
  .topbar-nav--overflow .topbar-nav-scroll{
    -webkit-mask-image: none !important;
    mask-image: none !important;
    padding-inline: 0 !important;
  }
}
