/* English typography — local Inter with cross-browser fallbacks */

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --app-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-font-sans-serif: var(--app-font-family);
    --bs-body-font-family: var(--app-font-family);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* The compiled Bootstrap bundle ships its own body font stack, so we use
   !important to make sure the local English (Inter) font wins the cascade.
   Setting it on `body` covers all text via inheritance; icon elements
   (<i class="fa">) keep their own font because they are not targeted here. */
body,
button,
input,
select,
textarea,
.form-control,
.form-select,
.btn,
.nav-link,
.dropdown-menu,
.dropdown-item,
.modal-content,
.table,
.navbar,
.card,
.badge,
.alert {
    font-family: var(--app-font-family) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
p,
label,
.form-label,
.form-text {
    font-family: var(--app-font-family) !important;
}

.tox-tinymce,
.tox .tox-edit-area__iframe {
    font-family: var(--app-font-family);
}


/* استایل چپ‌چین برای blog-article-content-card */
.blog-article-content-card {
    direction: ltr;
    text-align: left;
    line-height: 1.8;
    max-width: 100%;
    word-wrap: break-word;
}

.blog-article-content-card h1,
.blog-article-content-card h2,
.blog-article-content-card h3,
.blog-article-content-card h4,
.blog-article-content-card h5,
.blog-article-content-card h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.blog-article-content-card p {
    margin-bottom: 1em;
}

.blog-article-content-card a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

.blog-article-content-card a:hover {
    border-bottom-color: currentColor;
}

/* لیست‌ها */
.blog-article-content-card ul,
.blog-article-content-card ol {
    margin: 0.75em 0 0.75em 1.5em;
    padding-left: 0;
}

.blog-article-content-card li {
    margin-bottom: 0.25em;
}

/* جدول‌ها */
.blog-article-content-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.blog-article-content-card th,
.blog-article-content-card td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.blog-article-content-card th {
    font-weight: 600;
}

/* نقل قول */
.blog-article-content-card blockquote {
    margin: 1em 0;
    padding: 0.5em 1.5em;
    border-left: 4px solid;
    font-style: italic;
}

/* کد و pre */
.blog-article-content-card code {
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.blog-article-content-card pre {
    padding: 1em;
    overflow-x: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.blog-article-content-card pre code {
    padding: 0;
    background: transparent;
}

/* تصاویر */
.blog-article-content-card img {
    max-width: 100%;
    height: auto;
}

.blog-article-content-card figure {
    margin: 1em 0;
}

.blog-article-content-card figcaption {
    font-size: 0.85em;
    text-align: center;
    margin-top: 0.5em;
}

/* جداکننده */
.blog-article-content-card hr {
    margin: 2em 0;
    border: none;
    height: 1px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .blog-article-content-card {
        font-size: 0.95rem;
    }

    .blog-article-content-card table,
    .blog-article-content-card thead,
    .blog-article-content-card tbody,
    .blog-article-content-card tr,
    .blog-article-content-card th,
    .blog-article-content-card td {
        display: block;
    }

    .blog-article-content-card th,
    .blog-article-content-card td {
        text-align: left;
    }
}