/* ============================================================
   NoorAlFajr — Typography
   Multi-script typography for 20 languages
   ============================================================ */

/* ─── Google Fonts Import ─── */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Scheherazade+New:wght@400;700&family=Hind+Siliguri:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;700&family=Noto+Sans+Devanagari:wght@400;500;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ─── Base Heading Sizes ─── */
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

/* ─── Arabic Typography ─── */
.arabic, .text-arabic, [lang="ar"] {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: bidi-override;
  text-align: right;
  line-height: var(--lh-arabic);
  letter-spacing: 0;
}

.arabic-sm   { font-size: var(--text-arabic-sm); }
.arabic-md   { font-size: var(--text-arabic-base); }
.arabic-lg   { font-size: var(--text-arabic-lg); }
.arabic-xl   { font-size: var(--text-arabic-xl); }
.arabic-2xl  { font-size: var(--text-arabic-2xl); }
.arabic-quran{ font-size: var(--text-arabic-quran); font-family: 'Scheherazade New', var(--font-arabic); }

/* ─── Bengali Typography ─── */
.bengali, [lang="bn"] {
  font-family: var(--font-bengali);
}

/* ─── Urdu Typography ─── */
.urdu, [lang="ur"] {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  line-height: 2.2;
}

/* ─── Hindi Typography ─── */
[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--font-english); }

/* ─── Page-level RTL languages ─── */
html[lang="ar"], html[lang="ur"], html[lang="fa"] {
  direction: rtl;
}

/* ─── Quran Specific ─── */
.quran-text {
  font-family: 'Scheherazade New', var(--font-arabic);
  font-size: var(--text-arabic-quran);
  line-height: 2.8;
  direction: rtl;
  text-align: justify;
  color: var(--gray-900);
  word-spacing: 0.1em;
}

.quran-text .ayah-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: white;
  font-family: var(--font-english);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  margin-inline-start: 0.5rem;
  vertical-align: middle;
}

/* ─── Basmala ─── */
.basmala {
  font-family: 'Scheherazade New', var(--font-arabic);
  font-size: var(--text-arabic-xl);
  text-align: center;
  color: var(--primary-800);
  direction: rtl;
  line-height: 2.5;
  margin-block: var(--space-6);
}

/* ─── Arabic Transliteration ─── */
.transliteration {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ─── Section Labels ─── */
.section-label {
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--primary-600);
}

/* ─── Decorative Arabic Heading ─── */
.heading-arabic-deco {
  position: relative;
  text-align: center;
  padding-bottom: var(--space-3);
}
.heading-arabic-deco::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
}

/* ─── Utility Variations ─── */
.text-balance  { text-wrap: balance; }
.text-pretty   { text-wrap: pretty; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2  { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3  { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-4  { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Hadith Grade Colors ─── */
.grade-sahih   { color: var(--color-success); font-weight: var(--fw-semibold); }
.grade-hasan   { color: var(--color-info);    font-weight: var(--fw-semibold); }
.grade-daif    { color: var(--color-warning);  font-weight: var(--fw-semibold); }
.grade-mawdu   { color: var(--color-error);   font-weight: var(--fw-semibold); }
