/* =========================
   فونت وزیر
   ========================= */
@font-face {
    font-family: "Vazir";
    src: url("fonts/Vazir-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazir";
    src: url("fonts/Vazir-Bold.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت وزیر به کل کتاب */
html, body {
    font-family: "Vazir", sans-serif !important;
    line-height: 1.9;
}

/* عناوین */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
}

/* =========================
   متن راست‌به‌چپ
   ========================= */
main {
    direction: rtl;
    text-align: right;
}

/* =========================
   عرض محتوا
   ========================= */
.content main {
    max-width: 800px;
    margin: 0 auto;
}

/* =========================
   رنگ نام گوینده
   ========================= */
.content strong {
    color: #5a3e1b;
}

/* =========================
   ایتالیک صحنه‌ها
   ========================= */
.content em {
    color: #777;
    font-size: 0.9em;
    font-style: italic;
}

/* =========================
   اصلاح جای پانویس
   ========================= */
a.footnote-reference {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    unicode-bidi: isolate;
    direction: ltr;
    margin-left: 0.15em;
    font-family: "Vazir", sans-serif !important;
    font-variant-numeric: traditional;
}

a.footnote-reference sup {
    font-family: "Vazir", sans-serif !important;
    font-variant-numeric: traditional;
    font-size: 0.75em;
    vertical-align: super;
}

/* =========================
   کدها و code block
   ========================= */
code, pre, code span {
    font-family: monospace !important;
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
}

pre {
    overflow-x: auto;
    padding: 0.8em;
    border-radius: 5px;
}

pre code {
    line-height: 1.5;
}

/* =========================
   انتخاب متن
   ========================= */
::selection {
    background: rgba(0, 100, 128, 0.25);
}

/* =========================
   چاپ
   ========================= */
@media print {
    h2 {
        page-break-before: always;
    }
    .sidebar-scrollbox {
        display: none;
    }
    .content main {
        max-width: 100%;
    }
}

/* =========================
   موبایل
   ========================= */
@media (max-width: 768px) {
    .content {
        padding: 1em;
    }
    html, body {
        font-size: 16px;
    }
    h1 {
        font-size: 1.6em;
    }
    h2 {
        font-size: 1.3em;
    }
}
