/*
  فونت Vazirmatn: اگر فایل در assets/fonts/ گذاشته شود خودکار استفاده می‌شود
  (نام فایل: Vazirmatn-Variable.woff2). در غیر این صورت فالبک سیستم (بالاتر در --font).
*/
@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn"), local("Vazirmatn UI"),
       url("../../assets/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;            /* اسکرول افقی کل صفحه ممنوع */
}

/*
  overflow-x:hidden روی body عمداً گذاشته نشده: ست‌کردنش هم‌زمان روی html و body، مرورگر را
  مجبور می‌کند overflow-y هر دو را (حتی با overflow-y:visible صریح) به auto تبدیل کند و همین
  دو Scroll Container مستقل می‌سازد که position:sticky (نوار دسته‌بندی/زیردسته) را می‌شکند.
  overflow-x روی html به‌تنهایی برای جلوگیری از اسکرول افقی کافی است.
*/
body {
  margin: 0;
  max-width: 100%;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }

button {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;     /* Single Tap بدون تأخیر / بدون Double-Tap zoom */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* دسترسی با کیبورد (کامپیوتر) */
button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--top-gap) var(--page-pad) 0;
}
