/* ==========================================================================
   MISBAHI TECH - MULTILINGUAL LUXURY TYPOGRAPHY & DESIGN SYSTEM
   Featuring: Noto Sans Devanagari, Noto Nastaliq Urdu, Gulzar, Amiri, Cairo, Tajawal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;500;600;700;800;900&family=Gulzar&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700;800;900&family=Reem+Kufi:wght@400;500;600;700&family=Scheherazade+New:wght@400;600;700&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* RTL & Multilingual Base Direction Variables */
:root {
  --font-hindi-main: 'Noto Sans Devanagari', 'Plus Jakarta Sans', sans-serif;
  --font-hindi-title: 'Noto Sans Devanagari', 'Outfit', sans-serif;
  --font-urdu-nastaliq: 'Noto Nastaliq Urdu', 'Gulzar', 'Jameel Noori Nastaliq', 'Urdu Typesetting', 'Mehr Nastaliq Web', Tahoma, serif;
  --font-urdu-title: 'Gulzar', 'Noto Nastaliq Urdu', 'Amiri', serif;
  --font-arabic-modern: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
  --font-arabic-calligraphy: 'Amiri', 'Reem Kufi', 'Scheherazade New', serif;
  --font-arabic-heading: 'Tajawal', 'Cairo', 'Reem Kufi', sans-serif;

  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --gradient-emerald-gold: linear-gradient(135deg, #10B981 0%, #F59E0B 50%, #FFD700 100%);
  --gradient-arabic-title: linear-gradient(135deg, #FFE259 0%, #FFA751 50%, #38BDF8 100%);
  --gradient-islamic: linear-gradient(135deg, #059669 0%, #10B981 50%, #34D399 100%);
}

/* ==========================================================================
   HINDI INTERFACE SPECIFIC RULES
   ========================================================================== */
body.lang-hi {
  direction: ltr;
  text-align: left;
  font-family: var(--font-hindi-main);
  line-height: 1.75;
}

body.lang-hi h1, 
body.lang-hi h2, 
body.lang-hi h3,
body.lang-hi h4,
body.lang-hi h5,
body.lang-hi h6 {
  font-family: var(--font-hindi-title);
  font-weight: 700;
  line-height: 1.35;
}

body.lang-hi .btn-primary,
body.lang-hi .btn-gold,
body.lang-hi .btn-secondary,
body.lang-hi .nav-link,
body.lang-hi .badge-gold,
body.lang-hi .badge-purple {
  font-family: var(--font-hindi-main);
  font-weight: 600;
}

/* ==========================================================================
   URDU INTERFACE SPECIFIC RULES
   ========================================================================== */
body.lang-ur {
  direction: rtl;
  text-align: right;
  font-family: var(--font-urdu-nastaliq);
  line-height: 2.1;
  letter-spacing: 0px;
}

body.lang-ur h1, 
body.lang-ur h2, 
body.lang-ur h3 {
  font-family: var(--font-urdu-title);
  line-height: 2.2;
  letter-spacing: normal;
  font-weight: 700;
}

body.lang-ur h4,
body.lang-ur h5,
body.lang-ur h6,
body.lang-ur .btn-primary,
body.lang-ur .btn-gold,
body.lang-ur .btn-secondary,
body.lang-ur .nav-link,
body.lang-ur .badge-gold,
body.lang-ur .badge-purple,
body.lang-ur .badge-emerald {
  font-family: var(--font-urdu-nastaliq);
  line-height: 2.0;
}

body.lang-ur p,
body.lang-ur li,
body.lang-ur span,
body.lang-ur .hero-description {
  line-height: 2.2;
}

/* ==========================================================================
   ARABIC INTERFACE SPECIFIC RULES
   ========================================================================== */
body.lang-ar {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic-modern);
  line-height: 1.8;
  letter-spacing: -0.2px;
}

body.lang-ar h1, 
body.lang-ar h2, 
body.lang-ar h3,
body.lang-ar h4 {
  font-family: var(--font-arabic-heading);
  line-height: 1.5;
  font-weight: 800;
}

body.lang-ar .calligraphy-font {
  font-family: var(--font-arabic-calligraphy);
  font-weight: 700;
}

body.lang-ar .hero-title,
body.lang-ar .section-title {
  font-family: var(--font-arabic-heading);
  letter-spacing: -0.5px;
}

/* ==========================================================================
   RTL COMMON LAYOUT FIXES
   ========================================================================== */
[dir="rtl"] .nav-container {
  flex-direction: row;
}

[dir="rtl"] .logo {
  flex-direction: row;
}

[dir="rtl"] .logo-badge {
  margin-left: 10px;
  margin-right: 0;
}

[dir="rtl"] .nav-actions {
  flex-direction: row;
}

[dir="rtl"] .hero-grid {
  grid-template-columns: 1fr 1fr;
}

[dir="rtl"] .feature-item i,
[dir="rtl"] .process-step i,
[dir="rtl"] .footer-contact-item i {
  margin-left: 12px;
  margin-right: 0;
}

[dir="rtl"] .btn-primary i,
[dir="rtl"] .btn-gold i,
[dir="rtl"] .btn-secondary i,
[dir="rtl"] .btn-emerald i {
  margin-left: 8px;
  margin-right: 0;
}

[dir="rtl"] .check-list li i {
  margin-left: 10px;
  margin-right: 0;
}

[dir="rtl"] .currency-badge {
  margin-right: 6px;
  margin-left: 0;
}

/* RTL Border Highlights */
[dir="rtl"] .glass-card-border-right {
  border-right: 3px solid var(--accent-gold);
  border-left: 1px solid var(--border-glass);
}

[dir="rtl"] .glass-card-border-emerald {
  border-right: 3px solid var(--accent-emerald);
  border-left: 1px solid var(--border-glass);
}

/* ==========================================================================
   INTERACTIVE LANGUAGE SWITCHER
   ========================================================================== */
.lang-switcher-dropdown {
  position: relative;
  display: inline-block;
  z-index: 10000;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  background: #0B132B;
  background: rgba(11, 19, 43, 0.98);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(218, 165, 32, 0.3);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 999999 !important;
  animation: fadeIn 0.2s ease-out;
}

[dir="rtl"] .lang-dropdown-menu {
  left: auto;
  right: 0;
}

/* Hover support & Active click support */
.lang-switcher-dropdown:hover .lang-dropdown-menu,
.lang-dropdown-menu.active {
  display: flex !important;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #F8FAFC !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-option:hover {
  background: rgba(255, 215, 0, 0.2) !important;
  color: var(--accent-gold) !important;
  transform: translateX(4px);
}

[dir="rtl"] .lang-option:hover {
  transform: translateX(-4px);
}

.lang-option.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35) 0%, rgba(218, 165, 32, 0.35) 100%);
  color: var(--accent-gold) !important;
  font-weight: 800;
  border-right: 3px solid var(--accent-gold);
}

[dir="ltr"] .lang-option.active {
  border-right: none;
  border-left: 3px solid var(--accent-gold);
}

/* ==========================================================================
   EMERALD & GOLD ISLAMIC AESTHETICS
   ========================================================================== */
.badge-emerald {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: #34D399;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 0 15px var(--accent-emerald-glow);
}

.btn-emerald {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  background: var(--gradient-islamic);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  text-decoration: none;
}

.btn-emerald:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
  color: #FFFFFF;
}

/* Bismillah Luxury Header Crest */
.bismillah-crest {
  text-align: center;
  margin-bottom: 20px;
}

.bismillah-text {
  font-family: var(--font-arabic-calligraphy);
  font-size: 1.8rem;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  display: inline-block;
  padding: 6px 24px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  position: relative;
}

.bismillah-text::before,
.bismillah-text::after {
  content: '✦';
  color: var(--accent-emerald);
  font-size: 1rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.bismillah-text::before {
  right: -5px;
}

.bismillah-text::after {
  left: -5px;
}

/* 3D Islamic Calligraphy Interactive Showcase Card */
.calligraphy-showcase-box {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.12) 0%, rgba(11, 19, 43, 0.85) 75%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 35px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

.calligraphy-showcase-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.calligraphy-main-display {
  font-family: var(--font-urdu-title);
  font-size: 2.8rem;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0;
  line-height: 2.0;
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.3));
}

body.lang-ar .calligraphy-main-display {
  font-family: var(--font-arabic-calligraphy);
  font-size: 3.2rem;
  line-height: 1.6;
}

/* Currency Switcher Floating Controls */
.currency-selector-bar {
  display: inline-flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glow);
  margin-bottom: 25px;
}

.currency-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.currency-tab:hover {
  color: var(--text-main);
}

.currency-tab.active {
  background: var(--gradient-gold);
  color: #0F172A;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Responsive Overrides for RTL */
@media (max-width: 992px) {
  [dir="rtl"] .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  body.lang-ur .calligraphy-main-display {
    font-size: 2.2rem;
  }

  body.lang-ar .calligraphy-main-display {
    font-size: 2.4rem;
  }
}
