/* ============================================================================
   فونت‌های فارسی Local — بدون هیچ وابستگی به CDN خارجی
   ----------------------------------------------------------------------------
   Estedad   : OFL-1.1 — Copyright (c) Amin Abedi (Fontamin)
               فایل‌های مجوز: static/fonts/estedad/OFL.txt و AUTHORS.txt
               https://github.com/aminabedi68/Estedad  (نسخه 8.5)
   Vazirmatn : OFL-1.1 — Copyright (c) The Vazirmatn Project Authors
               فایل مجوز: static/fonts/vazirmatn/OFL.txt
               https://github.com/rastikerdar/vazirmatn  (نسخه 33.003)

   هر وزن فقط وقتی دانلود می‌شود که CSS واقعاً آن وزن را بخواهد (lazy load)،
   پس افزودن تک‌تک وزن‌ها هزینهٔ اضافهٔ اولیه ندارد.
   آدرسهایی که قبلاً خراب بود:
     https://cdn.jsdelivr.net/gh/rastikerdar/estedad-font@v6.0.0/dist/font-face.css  → 404
   (آن مخزن هرگز وجود نداشته است؛ Estedad در مخزن aminabedi68/Estedad منتشر می‌شود.)
   ========================================================================== */

/* ---------- Estedad (100 تا 900؛ فقط وزن‌های مصرف‌شده در پروژه) ---------- */
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-ExtraBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/estedad/Estedad-Black.woff2') format('woff2');
}

/* ---------- Vazirmatn (وزن‌های مصرف‌شده در پروژه) ---------- */
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Black.woff2') format('woff2');
}

/* ============================================================================
   زنجیرهٔ یکپارچهٔ فونت (Fallback chain)
   ----------------------------------------------------------------------------
   تنظیم «فونت عمومی» پنل مدیریت روی کلاس <html> می‌نشیند (base.html) و همین
   توکن‌ها را انتخاب می‌کند. اگر فونت انتخاب‌شده روی دستگاه نصب نباشد، فونت
   Local بعدی و سپس Tahoma/Segoe UI به‌کار می‌رود تا متن هرگز ناخوانا نشود.
   ========================================================================== */
:root {
    /* پیش‌فرض سایت: Estedad (مقادیر هرگز از CDN نمی‌آیند) */
    --pv-font: 'Estedad', 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}

html.font-estedad {
    --pv-font: 'Estedad', 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}
html.font-vazirmatn {
    --pv-font: 'Vazirmatn', 'Estedad', Tahoma, 'Segoe UI', sans-serif;
}
html.font-samim {
    /* Samim فایل Local ندارد؛ Vazirmatn (OFL) جایگزین خوانای آن است */
    --pv-font: 'Samim', 'Vazirmatn', 'Estedad', Tahoma, 'Segoe UI', sans-serif;
}
html.font-tahoma {
    --pv-font: Tahoma, 'Segoe UI', 'Vazirmatn', 'Estedad', sans-serif;
}
