/* =====================================================
   Persian styles ONLY
   Loaded AFTER styles.css
   ===================================================== */

/* 1) Register Persian fonts */
@font-face {
  font-family: "DoranL";
  src: url("/css/fonts/DoranFaNum-Light.ttf") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DoranR";
  src: url("/css/fonts/DoranFaNum-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: "DoranB";
  src: url("/css/fonts/DoranFaNum-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DoranXB";
  src: url("/css/fonts/DoranFaNum-ExtraBold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 2) Base Persian text (do NOT touch sizes) */
html[lang="fa"] body {
  font-family: "doranR", system-ui, Arial, sans-serif;
  direction: rtl;
}

/* 3) Main blog title ONLY */
html[lang="fa"] .blog-title {
  font-family: "doranB", serif;
  font-weight: normal;
}

/* 4) Subtitles & section headings */
html[lang="fa"] .blog-subtitle,
html[lang="fa"] .blog-section-title {
  font-family: "doranL", system-ui, Arial, sans-serif;
}

/* 5) English inline snippets inside Persian text should use DoranR (NOT monospace) */
html[lang="fa"] .ltr-text {
  font-family: "DoranR", "Doran", Arial, sans-serif;
  direction: ltr;
  unicode-bidi: isolate;
}

/* 2) Real code elements should stay monospace */
html[lang="fa"] code,
html[lang="fa"] kbd,
html[lang="fa"] pre,
html[lang="fa"] samp {
  font-family: var(--bs-font-monospace);
}


/* 6) Lists – correct RTL spacing */
html[lang="fa"] ul,
html[lang="fa"] ol {
  padding-right: 2rem;
  padding-left: 0;
}

/* 7) Image credits align properly in RTL */
html[lang="fa"] .image-credit {
  text-align: right;
}

/* 8) Footer text consistency */
html[lang="fa"] footer {
  font-family: "doranL", system-ui, Arial, sans-serif;
}

html[lang="fa"] {
  --bs-body-font-size: 1.05rem; /* try 1.1–1.2 */
  --bs-body-line-height: 1.9;
}


html[lang="fa"] .masthead h1,
html[lang="fa"] .masthead .h1,
html[lang="fa"] h1.masthead-heading {
  font-family: "doranXB", serif !important;
  letter-spacing: 0 !important;

}

html[lang="fa"] body {
  letter-spacing: 0;
}


/* Persian contact cards (address / email / whatsapp) */
html[lang="fa"] .card-body {
  font-family: "doranB", system-ui, Arial, sans-serif;
  letter-spacing: 0;
}

/* Card titles (آدرس / ایمیل / واتس‌اپ) */
html[lang="fa"] .card-body h4 {
  font-family: "doranB", serif;
  text-transform: none !important; /* disable text-uppercase */
  letter-spacing: 0 !important;
}

/* Card content text */
html[lang="fa"] .card-body .small {
  font-family: "doranB", system-ui, Arial, sans-serif;
  font-size: 1rem; /* override Bootstrap .small */
  letter-spacing: 0;
}

/* Persian buttons (Read more, etc.) */
html[lang="fa"] .btn {
  font-family: "doranL", system-ui, Arial, sans-serif;
  letter-spacing: 0;
}


/* Persian blog tag buttons */
html[lang="fa"] .tag-buttons .btn {
  font-size: 0.7rem;   /* subtle increase */
  line-height: 1.0;
  letter-spacing: 0;
  font-family: "doranL", system-ui, Arial, sans-serif;
}

/* Fix icon–text spacing for Persian (RTL) */
html[lang="fa"] .blog-card-meta i {
  margin-inline-end: 0.4rem !important;   /* kill Bootstrap me-* */
  margin-inline-start: 0.4rem !important; /* single space */
}


html[lang="fa"] #mainNav .navbar-nav .lang-switch {
  font-family: "Nunito", system-ui, Arial, sans-serif;
  letter-spacing: 0;
}
