/* =========================================================
   ✅ Urdu & Arabic Article Typography (Rocket LMS Compatible)
   Author: Shamim (QFC LMS)
   Version: 5.0 — Clean, Optimized & Jameel Nastaleeq Integrated
   ========================================================= */

/* --- Font Imports --- */
@font-face {
  font-family: 'JameelNooriNastaleeq';
  src: url('/fonts/JameelNooriNastaleeq.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'TraditionalArabic';
  src: url('/fonts/TraditionalArabic.woff2') format('woff2');
  font-display: swap;
}

/* --- Base Urdu Article Layout --- */
.urdu-article,
.blog-content,
.article-content,
.post-content,
.webinar-page .content,
.page-content,
.course-description {
  font-family: 'JameelNooriNastaleeq', 'TraditionalArabic', serif !important;
  direction: rtl;
  text-align: justify;
  line-height: 2.1;
  font-size: 18px;
  color: #111;
  margin-inline: auto !important;
  padding-inline: 20px !important;
  box-sizing: border-box;
  max-width: 860px;
  word-spacing: 2px;
  letter-spacing: 0.2px;
}

/* --- Urdu Headings --- */
.urdu-article h1,
.urdu-article h2,
.urdu-article h3,
.urdu-article h4,
.urdu-article h5,
.urdu-article h6 {
  font-family: 'JameelNooriNastaleeq', serif !important;
  font-weight: 600;
  line-height: 1.8;
  color: #111;
  margin-bottom: 10px;
  text-align: right;
}

/* --- Inline English Text (Fallback) --- */
.urdu-article p:lang(en),
.blog-content p:lang(en),
.article-content p:lang(en),
.post-content p:lang(en) {
  direction: ltr;
  text-align: left;
  font-family: 'Gilroy', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #222;
}

/* --- Blockquote / Verse Styling --- */
.urdu-article blockquote {
  font-family: 'TraditionalArabic', serif;
  background: #f9f9f9;
  border-right: 5px solid #ccc;
  padding: 12px 16px;
  margin: 16px 0;
  color: #333;
  font-style: italic;
  border-radius: 6px;
}

/* --- Lists --- */
.urdu-article ul,
.urdu-article ol {
  margin: 10px 40px 10px 0;
  padding: 0;
}

.urdu-article li {
  margin-bottom: 6px;
  line-height: 2;
}

/* --- Images --- */
.urdu-article img {
  display: block;
  margin: 15px auto;
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Tables --- */
.urdu-article table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}

.urdu-article th,
.urdu-article td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: right;
  line-height: 2;
}

.urdu-article th {
  background-color: #f3f3f3;
  font-weight: 600;
}

/* --- Code / Highlight --- */
.urdu-article code,
.urdu-article pre {
  background-color: #f5f5f5;
  padding: 5px 10px;
  border-radius: 5px;
  direction: ltr;
  display: inline-block;
  font-family: monospace;
  font-size: 14px;
}

/* --- Quotes or Poetry --- */
.urdu-article .poetry,
.urdu-article .verse {
  font-family: 'JameelNooriNastaleeq', serif;
  font-size: 19px;
  text-align: center;
  line-height: 2.3;
  color: #222;
  margin: 10px 0;
}

/* --- Author Box / Footer --- */
.article-footer,
.author-box {
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 25px;
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}

/* --- Inline Quotes --- */
.urdu-article q {
  quotes: "«" "»";
  font-style: italic;
  color: #333;
}

/* --- Highlight or Important Text --- */
.urdu-article mark {
  background-color: #fff9c4;
  padding: 2px 4px;
  border-radius: 3px;
}

/* --- Responsive (Mobile / Tablet) --- */
@media (max-width: 768px) {
  .urdu-article,
  .blog-content,
  .article-content,
  .post-content {
    font-size: 16px;
    line-height: 1.9;
    padding-inline: 12px !important;
  }
}

/* --- Global Urdu Fix: Force Nastaleeq Font --- */
html[lang="ur"] body,
html[lang="ur"] body *,
.blog, .blog *,
.single-article, .single-article *,
.article-content, .article-content *,
.post-body, .post-body *,
.ck-content, .ck-content *,
.ql-editor, .ql-editor *,
.page-content, .page-content * {
  font-family: 'JameelNooriNastaleeq', 'NotoNastaliqUrdu', serif !important;
  direction: rtl !important;
  text-align: right !important;
  line-height: 2.3 !important;
  font-size: 19px !important;
  font-weight: normal !important;
  color: #111;
}

/* --- Prevent Icon Font Issues --- */
.fa, .fas, .far, .fab,
[class^="feather-"], [class*=" feather-"],
i[class*="fa-"], i[class*="feather-"] {
  font-family: inherit !important;
}
