/* ============================================================
   EGYPTIAN EXCHANGE — Main Stylesheet
   ============================================================
   Table of Contents:
   01. TOKENS (المتغيرات)
   02. FONTS (الخطوط)
   03. RESET & GLOBAL
   04. LAYOUT HELPERS
   05. TYPE SCALE
   06. BUTTONS
   07. LOGO
   08. UTILITY BAR
   09. HEADER / NAV
   10. DRAWER
   11. HERO SECTION
   12. CONVERTER
   13. RATE CARD
   14. TRUST STRIP
   15. CARDS
   16. SPLIT FEATURE
   17. CTA BAND
   18. FOOTER
   19. FLOATING RAIL
   20. PAGE HERO
   21. BRANCHES PAGE
   22. CONTACT
   23. TIMELINE
   24. FAQ
   25. REVEAL ANIMATIONS
   26. TO TOP BUTTON
   27. PAGES TRANSITIONS
   28. PRELOADER
   29. RESPONSIVE
   30. REDUCED MOTION
   ============================================================ */


/* ============================================================
   01. TOKENS — المتغيرات الأساسية
   ============================================================ */
:root {
  /* الألوان الأساسية */
  --brand: #042E99;
  --brand-600: #0338B8;
  --brand-700: #022478;
  --brass: #FFFFFF;

  /* درجات مشتقة من الأزرق */
  --brand-025: #F4F6FC;
  --brand-050: #E9EDFB;
  --brand-100: #D7DEF7;

  /* رماديات محايدة */
  --ink: #14161F;
  --ink-700: #2B2E3B;
  --ink-500: #5B5F70;
  --muted: #82869A;

  /* أسطح */
  --paper: #FFFFFF;
  --wash: #F6F7FA;
  --mist: #ECEEF3;
  --line: #E3E5EC;
  --line-2: #ECEEF3;

  /* ألوان أسعار العملات */
  --rate-buy: #042E99;
  --rate-buy-soft: rgba(4, 46, 153, 0.5);
  --rate-sell: #16A34A;
  --rate-sell-soft: rgba(22, 163, 74, 0.65);

  /* Effects */
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(14, 17, 48, .07), 0 1px 3px rgba(14, 17, 48, .05);
  --sh-2: 0 6px 18px rgba(14, 17, 48, .09), 0 1px 4px rgba(14, 17, 48, .05);
  --sh-3: 0 22px 50px rgba(14, 17, 48, .16), 0 4px 14px rgba(14, 17, 48, .07);
  --sh-brand: 0 14px 32px rgba(4, 46, 153, .28);
  --sh-brass: 0 10px 26px rgba(169, 129, 47, .28);

  --nav-h: 76px;
  --util-h: 38px;
  --wrap: 1240px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* Fonts */
  --font-ar: 'Alexandria', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-en: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: var(--font-ar);
  --f-display: var(--font-ar);
  --f-en: var(--font-en);
}


/* ============================================================
   02. FONTS — الخطوط (عربي: Alexandria / إنجليزي: Poppins)
   ============================================================ */
body {
  font-family: var(--font-ar);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="en"] body,
html[dir="ltr"] body {
  font-family: var(--font-en);
  font-weight: 200;
  font-size: 1.05em;
}

/* الأرقام والأكواد الإنجليزية */
[dir="ltr"],
[lang="en"],
.font-en {
  font-family: var(--font-en);
  font-weight: 300;
}

/* في الوضع العربي، الأرقام تفضل Poppins */
html[lang="ar"] input[type="number"],
html[lang="ar"] input[type="tel"],
html[lang="ar"] .rate-row__val,
html[lang="ar"] .converter__transaction-btn,
html[lang="ar"] select,
html[lang="ar"] option {
  font-family: var(--font-en);
  font-weight: 400;
}

/* العناوين */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3,
.hero__title {
  font-family: var(--font-ar);
  font-weight: 500;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6,
html[lang="en"] .h1,
html[lang="en"] .h2,
html[lang="en"] .h3,
html[lang="en"] .hero__title {
  font-family: var(--font-en);
  font-weight: 300;
}

/* الأزرار */
.btn {
  font-family: var(--font-ar);
  font-weight: 500;
}

html[lang="en"] .btn {
  font-family: var(--font-en);
  font-weight: 400;
}

/* شارة الترخيص */
.hero__badge {
  font-family: var(--font-ar);
  font-weight: 400;
}

html[lang="en"] .hero__badge {
  font-family: var(--font-en);
  font-weight: 300;
}


/* ============================================================
   03. RESET & GLOBAL
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  line-height: 1.18;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}


/* ============================================================
   04. LAYOUT HELPERS
   ============================================================ */
.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 7vw, 104px) 0;
}

.section--wash {
  background: var(--wash);
}

.section--mist {
  background: var(--mist);
}

.stack-sm {
  display: grid;
  gap: 10px;
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 18px;
  clip-path: none;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-sm);
  z-index: 100;
}


/* ============================================================
   05. TYPE SCALE
   ============================================================ */
.display {
  font-size: clamp(2.2rem, 1.2rem + 4vw, 4.4rem);
  line-height: 1.1;
}

.h2 {
  font-size: clamp(1.7rem, 1.15rem + 2.2vw, 2.75rem);
}

.h3 {
  font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem);
}

.lede {
  font-size: clamp(1rem, .96rem + .3vw, 1.175rem);
  color: var(--ink-500);
  line-height: 1.9;
  font-family: var(--f-body);
}

.small {
  font-size: .875rem;
}

.eyebrow {
  font-family: var(--f-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--brand);
  background: var(--brand-050);
  border-radius: var(--r-pill);
  padding: 6px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  justify-self: start;
  border: 1px solid rgba(4, 46, 153, .25);
}

.sec-head {
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: 16px;
  margin-bottom: clamp(34px, 4vw, 56px);
}

.sec-head .eyebrow {
  justify-self: center;
}

.sec-head--start {
  margin-inline: 0;
  text-align: start;
}


/* ============================================================
   06. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: .95rem;
  transition: .22s var(--ease);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.btn--primary:hover {
  background: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(4, 46, 153, .34);
}

.btn--ghost {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--light {
  background: #fff;
  color: var(--brand);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(4, 46, 153, .2);
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
}

.btn--sm {
  padding: 9px 18px;
  font-size: .875rem;
}

.btn--block {
  width: 100%;
}


/* ============================================================
   07. LOGO — النسخة النهائية المضبوطة
   ============================================================ */

.logo {
  display: inline-flex;
  align-items: center;       /* توسيط المارك عمودياً مع النص */
  gap: 12px;
  direction: ltr;            /* ✅ الترتيب ثابت مهما كانت اللغة */
  text-decoration: none;

  
  /* 🔼 رفع اللوجو لفوق شوية */
  transform: translateY(-3px);
}

.logo__mark {
  width: 58px;
  height: 58px;
  flex: none;
  color: var(--brand);
  display: block;
}


.logo__mark path {
  fill: currentColor;
}

/* 📌 البلوك اللي فيه العربي والإنجليزي */
.logo__type {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  line-height: 1;

  /* 🔑 السر هنا: نلغي أي text-align جاي من بره */
  text-align: start;
}

/* 📌 العربي */
.logo__ar {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.34rem;
  color: var(--brand);
  letter-spacing: .01em;
  line-height: 1.15;

  /* 🔑 مهم: نلغي direction الافتراضي للـ flex عشان العربي يتعرض صح */
  direction: rtl;
  unicode-bidi: isolate;
}

/* 📌 الإنجليزي */
.logo__en {
  font-family: var(--f-en);
  font-size: .8rem;
  font-weight: 300;
  letter-spacing: .24em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;

  /* 🔑 السر الحقيقي: نثبّت الإنجليزي على LTR مهما كانت الصفحة */
  direction: ltr;
  unicode-bidi: isolate;

  /* 🔑 نخليه يبدأ من نفس نقطة العربي */
  align-self: stretch;
  text-align: inherit;
}

/* ============================================================
   ✅ لما الصفحة تكون عربي (RTL):
   العربي والإنجليزي يبدأوا من اليمين، جنب المارك
   ============================================================ */
html[dir="rtl"] .logo__type {
  text-align: right;
}

html[dir="rtl"] .logo__en {
  text-align: right;
}

/* ============================================================
   ✅ لما الصفحة تكون إنجليزي (LTR):
   العربي والإنجليزي يبدأوا من الشمال، جنب المارك
   ============================================================ */
html[dir="ltr"] .logo__type {
  text-align: left;
}

html[dir="ltr"] .logo__en {
  text-align: left;
}

/* ============================================================
   الحالة الفاتحة (الفوتر)
   ============================================================ */
.logo--light .logo__mark,
.logo--light .logo__ar {
  color: #fff;
}

.logo--light .logo__en {
  color: rgba(255, 255, 255, .68);
}


/* ============================================================
   08. UTILITY BAR
   ============================================================ */
.utility {
  background: var(--brand-700);
  color: #fff;
  font-size: .82rem;
  height: var(--util-h);
  display: flex;
  align-items: center;
}

.utility .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.utility__list {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.utility a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  opacity: .85;
  transition: .2s;
}

.utility a:hover {
  opacity: 1;
  color: #fff;
}

.utility svg {
  width: 14px;
  height: 14px;
}

.utility__lang {
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--r-pill);
  padding: 3px 14px;
  font-weight: 600;
  letter-spacing: .04em;
}

.utility__lang:hover {
  background: rgba(255, 255, 255, .14);
}


/* ============================================================
   09. HEADER / NAV
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 251, 246, .95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
  transition: .25s var(--ease);
}

.header.is-stuck {
  box-shadow: var(--sh-2);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__menu a {
  position: relative;
  padding: 10px 15px;
  border-radius: var(--r-sm);
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-500);
  transition: .2s var(--ease);
}

.nav__menu a:hover {
  color: var(--brand);
  background: var(--brand-050);
}

.nav__menu a.is-active {
  color: var(--brand);
  font-weight: 600;
}

.nav__menu a.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 15px;
  bottom: 2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}


/* ============================================================
   10. DRAWER (القائمة الجانبية)
   ============================================================ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
  overflow: hidden;
}

.drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 46, 153, .55);
  cursor: pointer;
  opacity: 0;
  transition: opacity .28s var(--ease);
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: min(340px, 86vw);
  height: 100%;
  background: var(--paper);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
}

html[dir="rtl"] .drawer__panel {
  transform: translateX(-100%);
  box-shadow: 10px 0 30px rgba(0, 0, 0, .15);
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drawer__close {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--wash);
  cursor: pointer;
}

.drawer__close svg {
  width: 20px;
  height: 20px;
}

.drawer nav a {
  display: block;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--ink-500);
  transition: background .2s, color .2s;
  border-inline-start: 3px solid transparent;
  cursor: pointer;
}

.drawer nav a:hover {
  background: var(--brand-050);
  color: var(--brand);
}

.drawer nav a.is-active {
  background: var(--brand-050);
  color: var(--brand);
  border-inline-start-color: var(--brand);
}

.drawer__foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  display: grid;
  gap: 10px;
}


/* ============================================================
   11. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  padding-top: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 88% -6%, #042E99 0%, transparent 55%),
    radial-gradient(90% 80% at 0% 108%, #042E99 0%, transparent 62%),
    var(--brand);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .06;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 4vw, 64px);
  align-items: stretch;
  padding: clamp(40px, 5vw, 80px) 0;
}

/* ========== Hero Copy ========== */
.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}

/* شارة الترخيص */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  width: fit-content;
  margin-bottom: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #22C55E;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}

/* العنوان */
.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.hero__title-line {
  display: block;
  line-height: 1.15;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
}

/* النص */
.hero__lede {
  color: rgba(255, 255, 255, .8);
  font-size: clamp(0.95rem, .9rem + .3vw, 1.05rem);
  line-height: 1.8;
  max-width: 100%;
  margin: 0;
}

/* الإحصائيات */
.hero__stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.stat-item b {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  min-width: 60px;
}

.stat-item span {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

/* الأزرار */
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.hero__cta .btn {
  padding: 11px 22px;
  font-size: .9rem;
}


/* ============================================================
   12. CONVERTER (أداة تحويل العملات - Light Mode)
   ============================================================ */
.converter {
  max-width: 100%;
  margin-top: auto;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 148, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 148, 0.08);
  display: flex;
  flex-direction: column;
}

/* رأس الأداة */
.converter__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 148, 0.08);
}

.converter__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(215, 178, 92, 0.15);
  color: #B8924A;
  border-radius: 12px;
}

.converter__icon svg {
  width: 24px;
  height: 24px;
}

.converter__title-wrap {
  flex: 1;
  min-width: 0;
}

.converter__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #0a0a2e;
  line-height: 1.3;
}

.converter__subtitle {
  font-size: 13px;
  margin: 0;
  color: #6b6b7e;
  line-height: 1.5;
}

/* أزرار بيع/شراء */
.converter__transaction {
  margin-bottom: 16px;
}

.converter__transaction-options {
  display: inline-flex;
  background: #f4f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.converter__transaction-btn {
  padding: 8px 24px;
  border: 0;
  background: transparent;
  color: #6b6b7e;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.converter__transaction-btn:hover {
  color: #0a0a2e;
}

.converter__transaction-btn.is-active {
  background: #000094;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 148, 0.2);
}

/* الصفوف */
.converter__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* حقول الإدخال */
.converter .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.converter .form-field label {
  font-size: 12px;
  font-weight: 500;
  color: #4a4a5e;
  letter-spacing: 0.3px;
}

.converter .form-field input,
.converter .form-field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #f8f9fc;
  border: 1px solid #e2e4ec;
  border-radius: 10px;
  color: #0a0a2e;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.converter .form-field input:focus,
.converter .form-field select:focus {
  border-color: #000094;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 0, 148, 0.1);
}

/* حقل النتيجة */
.converter .form-field--result input {
  background: rgba(215, 178, 92, 0.1);
  border-color: rgba(215, 178, 92, 0.4);
  color: #B8924A;
  font-weight: 600;
  font-size: 16px;
}

/* Select */
.converter .form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000094' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
  padding-left: 36px;
  padding-right: 14px;
}

[dir="ltr"] .converter .form-field select {
  background-position: right 12px center;
  padding-left: 14px;
  padding-right: 36px;
}

.converter .form-field select option {
  background: #ffffff;
  color: #0a0a2e;
}

/* زر التبديل */
.converter__swap {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px;
  position: relative;
}

.converter__swap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e4ec;
  transform: translateY(-50%);
}

.converter__swap-btn {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid #d0d3de;
  border-radius: 50%;
  color: #000094;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 148, 0.08);
}

.converter__swap-btn:hover {
  background: #000094;
  color: #ffffff;
  border-color: #000094;
  transform: rotate(180deg);
  box-shadow: 0 4px 12px rgba(0, 0, 148, 0.25);
}

.converter__swap-btn svg {
  width: 18px;
  height: 18px;
}

/* ملاحظة */
.converter__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e4ec;
  font-size: 12px;
  color: #6b6b7e;
  line-height: 1.5;
}

.converter__note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #B8924A;
}


/* ============================================================
   13. RATE CARD (بطاقة الأسعار)
   ============================================================ */
.rate-card {
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--sh-3);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rate-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.rate-card__head h3 {
  font-size: 1.05rem;
  color: var(--brand);
  margin: 0;
}

.rate-card__stamp {
  font-size: .7rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rate-card__stamp i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  display: block;
  flex-shrink: 0;
}

#rateCardsContainer {
  flex: 1 1 auto;
  overflow-y: auto;
}

.rate-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
}

.rate-row:last-of-type {
  border-bottom: 0;
}

.rate-row:nth-of-type(even) {
  background: rgba(4, 46, 153, .02);
}

.rate-row__cur {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.rate-row__flag {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  font-size: 1rem !important;
  font-weight: 700;
  flex: 0 0 50px !important;
  background: var(--brand-050);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--brand);
}

.rate-row__flag img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

.rate-row__name {
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* ============================================================
   RATE VALUES — أسعار البيع والشراء (مكبرة + ألوان)
   ============================================================ */
.rate-row__val {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.15rem;
  min-width: 80px;
  text-align: center;
  color: var(--ink-700);
  flex-shrink: 0;
  line-height: 1.2;
  padding: 4px 0;
}

.rate-row__val small {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ✨ سعر الشراء (أول عنصر رقمي) — كحلي */
.rate-row__val:nth-of-type(2) {
  color: var(--rate-buy);
}

.rate-row__val:nth-of-type(2) small {
  color: var(--rate-buy-soft);
}

/* ✨ سعر البيع (آخر عنصر رقمي) — أخضر */
.rate-row__val:last-of-type {
  color: var(--rate-sell);
}

.rate-row__val:last-of-type small {
  color: var(--rate-sell-soft);
}

.rate-card__note {
  padding: 14px 22px;
  font-size: .7rem;
  color: var(--muted);
  line-height: 1.6;
  background: rgba(4, 46, 153, .03);
  margin: 0;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}


/* ============================================================
   14. TRUST STRIP
   ============================================================ */
.trust {
  background: var(--paper);
  border-bottom: 1px solid var(--line-2);
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.trust__item {
  padding: 30px 26px;
  display: grid;
  gap: 6px;
  border-inline-start: 1px solid var(--line-2);
}

.trust__item:first-child {
  border-inline-start: 0;
}

.trust__item b {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2.3rem);
  color: var(--brand);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.trust__item span {
  font-size: .88rem;
  color: var(--muted);
}


/* ============================================================
   15. CARDS
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  transition: .24s var(--ease);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  transition: .24s var(--ease);
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--sh-2);
  transform: translateY(-3px);
}

.card:hover::before {
  background: var(--brand);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--brand-050);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.14rem;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: var(--f-body);
}

.card p {
  color: var(--ink-500);
  font-size: .94rem;
  line-height: 1.85;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--brand);
}

.card__link svg {
  width: 15px;
  height: 15px;
  transition: .2s;
}

.card:hover .card__link svg {
  transform: translateX(-4px);
}

html[dir="ltr"] .card:hover .card__link svg {
  transform: translateX(4px);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}


/* ============================================================
   16. SPLIT FEATURE
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.split__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-3);
  aspect-ratio: 4/3;
  background: var(--mist);
  border: 1px solid var(--line);
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__body {
  display: grid;
  gap: 18px;
  align-content: start;
}

.ticks {
  display: grid;
  gap: 13px;
  margin-top: 6px;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-500);
  font-size: .96rem;
  line-height: 1.8;
}

.ticks svg {
  width: 21px;
  height: 21px;
  flex: none;
  color: var(--brand);
  margin-top: 5px;
}


/* ============================================================
   17. CTA BAND
   ============================================================ */
.cta-band {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(34px, 4.5vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .22);
}

.cta-band__pattern {
  position: absolute;
  inset: 0;
  opacity: .08;
  z-index: -1;
}

.cta-band h2 {
  color: #fff;
  max-width: 20ch;
}

.cta-band p {
  color: rgba(255, 255, 255, .75);
  margin-top: 8px;
  max-width: 46ch;
  font-family: var(--f-body);
}


/* ============================================================
   18. FOOTER
   ============================================================ */
.footer {
  background: var(--brand);
  color: rgba(255, 255, 255, .68);
  padding-top: clamp(48px, 6vw, 76px);
  font-size: .92rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 38px;
  padding-bottom: 44px;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 18px;
  font-family: var(--f-body);
  font-weight: 600;
}

.footer a {
  transition: .2s;
}

.footer a:hover {
  color: #fff;
}

.footer__links {
  display: grid;
  gap: 11px;
}

.footer__about p {
  line-height: 1.95;
  margin-top: 18px;
  max-width: 38ch;
}

.footer__contact li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 13px;
  line-height: 1.7;
}

.footer__contact svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 5px;
  color: #fff;
}

.social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  transition: .22s var(--ease);
}

.social a:hover {
  background: #fff;
  transform: translateY(-3px);
}

.social a:hover svg {
  color: var(--brand);
}

.social svg {
  width: 17px;
  height: 17px;
  color: #fff;
}

.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: rgba(255, 255, 255, .45);
}


/* ============================================================
   19. FLOATING RAIL
   ============================================================ */
.rail {
  position: fixed;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: grid;
  gap: 8px;
}

.rail a {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-start-end-radius: var(--r);
  border-end-end-radius: var(--r);
  box-shadow: var(--sh-2);
  transition: .24s var(--ease);
  position: relative;
}

.rail a:hover {
  width: 60px;
  background: var(--brand-600);
}

.rail a svg {
  width: 22px;
  height: 22px;
}

.rail a[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  inset-inline-start: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.rail a:hover::after {
  opacity: 1;
}

.rail .is-wa {
  background: #1E8E56;
}

.rail .is-wa:hover {
  background: #17703F;
}


/* ============================================================
   20. PAGE HERO (Inner Pages)
   ============================================================ */
.phero {
  position: relative;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.phero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(110% 100% at 80% 0%, #042E99 0%, transparent 60%), var(--brand);
}

.phero__pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .06;
}

.phero__inner {
  padding: clamp(46px, 6vw, 84px) 0;
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.phero h1 {
  color: #fff;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem);
}

.phero p {
  color: rgba(255, 255, 255, .78);
  line-height: 1.9;
  font-family: var(--f-body);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .83rem;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 4px;
}

.crumb a:hover {
  color: #fff;
}

.crumb svg {
  width: 13px;
  height: 13px;
  opacity: .6;
}


/* ============================================================
   21. BRANCHES PAGE
   ============================================================ */
.filters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 12px;
  box-shadow: var(--sh-1);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
}

.field svg {
  position: absolute;
  inset-inline-start: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.field input,
.field select {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--wash);
  font-size: .94rem;
  transition: .2s;
  appearance: none;
}

html[dir="rtl"] .field input,
html[dir="rtl"] .field select {
  padding: 13px 44px 13px 16px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(4, 46, 153, .05);
}

.field select {
  cursor: pointer;
}

.filters__count {
  display: flex;
  align-items: center;
  padding-inline: 18px;
  font-size: .9rem;
  color: var(--muted);
  white-space: nowrap;
}

.filters__count b {
  color: var(--brand);
  font-family: var(--f-display);
  font-size: 1.2rem;
  margin-inline-end: 6px;
}

.branch-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.map-panel {
  order: -1;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  background: var(--mist);
}

#map {
  height: min(72vh, 660px);
  width: 100%;
}

.map-panel__bar {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .86rem;
  color: var(--muted);
}

.map-panel__bar b {
  color: var(--ink);
}

.branch-list {
  display: grid;
  gap: 16px;
}

.branch {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: grid;
  grid-template-columns: 170px 1fr;
  transition: .24s var(--ease);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.branch:hover {
  box-shadow: var(--sh-3);
  border-color: var(--line-2);
  transform: translateY(-3px);
}

.branch.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(4, 46, 153, .05), var(--sh-2);
}

.branch__media {
  position: relative;
  background: var(--mist);
  overflow: hidden;
}

.branch__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s var(--ease);
}

.branch:hover .branch__media img {
  transform: scale(1.06);
}

.branch__no {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  background: rgba(4, 46, 153, .72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--f-display);
  font-size: .85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: .02em;
}

.branch__body {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.branch__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.branch__name {
  font-size: 1.05rem;
  font-family: var(--f-body);
  font-weight: 600;
}

.branch__gov {
  font-size: .74rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  flex: none;
}

.branch__rows {
  display: grid;
  gap: 8px;
}

.branch__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .875rem;
  color: var(--ink-500);
  line-height: 1.65;
}

.branch__row svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 4px;
  color: var(--brand);
  opacity: .85;
}

.branch__row a {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: embed;
}

.branch__row a:hover {
  color: var(--brand);
}

.branch__fri {
  color: var(--muted);
  font-size: .82rem;
}

.branch__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-500);
  transition: .2s;
}

.chip:hover {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.chip svg {
  width: 14px;
  height: 14px;
  order: -1;
}

.chip--solid {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chip--solid:hover {
  background: var(--brand-600);
  color: #fff;
}

.marker-pin {
  background: var(--brand);
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(4, 46, 153, .28);
  display: grid;
  place-items: center;
}

.marker-pin span {
  transform: rotate(45deg);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--f-display);
}

.marker-pin.is-active {
  background: var(--brand);
  transform: rotate(-45deg) scale(1.18);
}

.leaflet-container {
  font-family: var(--f-body) !important;
}

.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

.empty svg {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  color: var(--line);
}


/* ============================================================
   22. CONTACT
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-700);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--wash);
  transition: .2s;
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(4, 46, 153, .05);
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.span-2 {
  grid-column: 1/-1;
}

.info-card {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 32px;
  display: grid;
  gap: 22px;
  align-content: start;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .22);
}

.info-card__pattern {
  position: absolute;
  inset: 0;
  opacity: .07;
  z-index: -1;
}

.info-card h3 {
  color: #fff;
}

.info-card li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-card li+li {
  margin-top: 18px;
}

.info-card li svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 4px;
  color: #fff;
}

.info-card b {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 2px;
  font-family: var(--f-body);
}

.info-card li span {
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
  line-height: 1.7;
}


/* ============================================================
   23. TIMELINE (About)
   ============================================================ */
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-inline-start: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 9px;
  width: 2px;
  background: linear-gradient(var(--brand), var(--line));
}

.tl-item {
  position: relative;
  padding-bottom: 34px;
}

.tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -30px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
}

.tl-item b {
  font-family: var(--f-display);
  color: var(--brand);
  font-size: 1.15rem;
  display: block;
  margin-bottom: 5px;
}

.tl-item p {
  color: var(--ink-500);
  font-size: .95rem;
  line-height: 1.85;
  font-family: var(--f-body);
}


/* ============================================================
   24. FAQ
   ============================================================ */
.faq {
  display: grid;
  gap: 12px;
  max-width: 840px;
  margin-inline: auto;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: .2s;
}

.faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
}

.faq summary {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  font-size: .98rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--brand);
  font-weight: 400;
  line-height: 1;
  transition: .2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  padding: 0 22px 20px;
  color: var(--ink-500);
  font-size: .94rem;
  line-height: 1.9;
}


/* ============================================================
   25. REVEAL ANIMATIONS
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}


/* ============================================================
   26. TO TOP BUTTON
   ============================================================ */
.to-top {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--sh-brand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: .28s var(--ease);
}

.to-top.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top svg {
  width: 19px;
  height: 19px;
}


/* ============================================================
   27. PAGES TRANSITIONS
   ============================================================ */
.page {
  display: none;
}

.page.is-on {
  display: block;
  animation: pgIn .34s var(--ease);
}

@keyframes pgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.local-note {
  background: var(--mist);
  border-block: 1px solid var(--line);
  padding: 13px 0;
  font-size: .84rem;
  color: var(--ink-500);
}

.local-note .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.local-note svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
  flex: none;
}


/* ============================================================
   28. PRELOADER
   ============================================================ */
html.is-loading {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}

.preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .08;
  background: radial-gradient(90% 70% at 50% 20%, #042E99 0%, transparent 60%), var(--brand);
}

.preloader__logo-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
}

.preloader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  animation: preloaderRing 1s linear infinite;
}

.preloader__logo {
  width: 44px;
  height: 44px;
  color: #fff;
  animation: preloaderSpin 2.6s linear infinite;
}

.preloader__text {
  color: #fff;
  font-family: var(--f-display);
  font-size: 1.3rem;
  letter-spacing: .02em;
  opacity: .92;
}

.preloader__bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, .14);
  border-radius: 2px;
  overflow: hidden;
}

.preloader__bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: #fff;
  border-radius: 2px;
  animation: preloaderBar 1.1s ease-in-out infinite;
}

@keyframes preloaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes preloaderRing {
  to {
    transform: rotate(360deg);
  }
}

@keyframes preloaderBar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ============================================================
   29. RESPONSIVE
   ============================================================ */

/* ===== 1080px ===== */
@media (max-width: 1080px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
  }

  .hero__copy {
    align-items: center;
    text-align: center;
  }

  .hero__stats {
    align-items: center;
  }

  .hero__cta {
    justify-content: center;
  }

  .rate-card {
    align-self: stretch;
    width: 100%;
    height: auto;
  }

  .branch-layout {
    grid-template-columns: 1fr;
  }

  .map-panel {
    position: relative;
    top: 0;
    order: -1;
  }

  #map {
    height: 400px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 900px ===== */
@media (max-width: 900px) {
  .nav__menu {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__actions .btn {
    display: none;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .trust__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__item:nth-child(3) {
    border-inline-start: 0;
  }

  .trust__item:nth-child(n+3) {
    border-top: 1px solid var(--line-2);
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filters__count {
    padding: 0;
    justify-content: center;
  }

  .rail {
    display: none;
  }

  .utility__list li:nth-child(n+3) {
    display: none;
  }
}

/* ===== 640px ===== */
@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .branch {
    grid-template-columns: 1fr;
  }

  .branch__media {
    height: 180px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    gap: 20px;
  }

  .hero__stats b {
    font-size: 1.55rem;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo__ar {
    font-size: 1.1rem;
  }

  .logo__mark {
    width: 36px;
    height: 36px;
  }

  .utility__list li:nth-child(n+2) {
    display: none;
  }

  .converter {
    padding: 20px 16px;
    margin-top: 24px;
  }

  .converter__row {
    grid-template-columns: 1fr;
  }

  .converter__transaction-btn {
    flex: 1;
    padding: 8px 16px;
  }

  .converter__transaction-options {
    display: flex;
    width: 100%;
  }
}

/* ===== 520px ===== */
@media (max-width: 520px) {
  .rate-row {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 11px 16px;
  }

  .rate-row__cur {
    gap: 10px !important;
  }

  .rate-row__flag {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    flex: 0 0 34px !important;
    font-size: 1rem !important;
  }

  .rate-row__name {
    font-size: .82rem;
    white-space: normal;
    line-height: 1.3;
  }

  /* الأرقام تفضل واضحة على الموبايل */
  .rate-row__val {
    font-size: 1rem;
    min-width: 68px;
  }

  .rate-card__head {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .rate-card__head h3 {
    font-size: 1rem;
  }
}

/* ===== 420px ===== */
@media (max-width: 420px) {
  .btn {
    white-space: normal;
    text-align: center;
    padding-inline: 20px;
  }

  .rate-row {
    padding: 10px 16px;
  }

  .rate-row__val {
    min-width: 64px;
    font-size: .95rem;
  }

  .rate-row__flag {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    flex: 0 0 30px !important;
    font-size: .8rem !important;
  }

  .rate-row__cur {
    font-size: .88rem;
    gap: 9px;
  }

  .chip {
    font-size: .76rem;
    padding: 6px 11px;
  }

  .hero__cta .btn,
  .cta-band .btn {
    width: 100%;
  }
}


/* ============================================================
   30. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .preloader__logo,
  .preloader__ring,
  .preloader__bar span {
    animation: none;
  }
}

/* السطر الواحد يبقى بلوك مستقل */
.hero__title-line {
    display: block;
}

/* التحكم في المسافة بين السطور */
.hero__title {
    line-height: 1.35;   /* المسافة العامة بين السطور */
}

/* لو عايزة مسافة أكبر، استخدمي margin-top على السطور ما عدا الأول */
.hero__title-line + .hero__title-line {
    margin-top: 0.35em;   /* زوّدي أو قلّلي الرقم حسب اللي يعجبك */
}


/* ============================================================
   Language Dropdown
   ============================================================ */

.lang-dropdown {
    position: relative;
    display: inline-block;
    z-index: 100;
}

/* ===== الزر الأساسي ===== */
.lang-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: inherit;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.lang-dropdown__trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

.lang-dropdown__current {
    white-space: nowrap;
}

.lang-dropdown__arrow {
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.lang-dropdown.is-open .lang-dropdown__arrow {
    transform: rotate(180deg);
}

/* ===== القائمة المنسدلة ===== */
.lang-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 170px;
    background: #ffffff;
    border: 1px solid #e2e6f0;
    border-radius: 12px;
    box-shadow: 
        0 4px 6px rgba(18, 23, 63, 0.04),
        0 10px 30px rgba(18, 23, 63, 0.12);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
}

.lang-dropdown.is-open .lang-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== عناصر القائمة ===== */
.lang-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #12173F;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.lang-dropdown__item:hover {
    background: #f4f6fb;
}

.lang-dropdown__item.is-active {
    background: #eef1fa;
    color: #000094;
    font-weight: 600;
}

.lang-dropdown__item.is-active::after {
    content: '✓';
    margin-inline-start: auto;
    color: #000094;
    font-weight: 700;
}

.lang-dropdown__flag {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ===== RTL Support ===== */
[dir="rtl"] .lang-dropdown__menu {
    inset-inline-end: 0;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
    .lang-dropdown__trigger {
        padding: 5px 9px;
        font-size: 0.8rem;
        gap: 6px;
    }
    .lang-dropdown__menu {
        min-width: 150px;
    }
    .lang-dropdown__item {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

/* ===== Scrollbar ===== */
.lang-dropdown__menu::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown__menu::-webkit-scrollbar-thumb {
    background: #c9cee0;
    border-radius: 3px;
}

.lang-dropdown__menu::-webkit-scrollbar-track {
    background: transparent;
}