/* ============================================
   أجاري — تنسيق الموقع
   نفس لوحة ألوان التطبيق للحفاظ على الهوية
   ============================================ */

:root {
  --primary: #3D2E24;
  --primary-light: #5C4433;
  --primary-dark: #2A1F18;
  --primary-bg: #F3ECE4;
  --gold: #C9A227;
  --gold-light: #E3C766;
  --gold-dark: #A8851C;
  --gold-bg: #FBF4E4;
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --text: #2A1F18;
  --muted: #6B5D52;
  --light: #8A7A6D;
  --border: #E8DFD3;
  --border-light: #F2EBE1;
  --success: #6B8E5A;
  --danger: #C05746;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Tajawal', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

/* ===== الترويسة ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 20px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand img { height: 42px; width: auto; }

.brand-text {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.brand-sub {
  font-size: 11px;
  opacity: .7;
  display: block;
  margin-top: -2px;
}

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }

.site-nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 9px;
  transition: background .2s, color .2s;
}

.site-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a.active { background: rgba(201,162,39,.22); color: var(--gold-light); font-weight: 700; }

/* ===== الغلاف ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 46px 24px 38px;
  text-align: center;
}

.page-hero h1 {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p { font-size: 14px; opacity: .8; }

/* ===== المحتوى ===== */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px 70px; }
.wrap.pull-up { margin-top: -22px; }

section.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 16px;
}

section.card h2 {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}

section.card h3 {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
}

p { font-size: 15px; margin-bottom: 11px; }
p:last-child { margin-bottom: 0; }

ul { list-style: none; margin: 10px 0; }

li {
  position: relative;
  padding-right: 21px;
  margin-bottom: 9px;
  font-size: 15px;
}

li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

a { color: var(--primary); font-weight: 700; }
strong { font-weight: 700; }

.note {
  background: var(--gold-bg);
  border: 1px solid rgba(201,162,39,.3);
  border-radius: 14px;
  padding: 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  margin-top: 20px;
}

.alert {
  background: #FBEEEB;
  border: 1px solid rgba(192,87,70,.25);
  border-radius: 14px;
  padding: 18px;
  font-size: 14px;
  margin: 16px 0;
}

.steps { counter-reset: step; list-style: none; padding: 0; }

.steps li {
  padding-right: 40px;
  margin-bottom: 15px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  top: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}

th, td {
  padding: 11px 13px;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--primary-bg);
  font-weight: 700;
  font-size: 13px;
}

/* التخصيص هنا لازم يطابق section.card حتى يغلبها */
section.card.contact-box,
.contact-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 1px solid var(--primary-dark);
  color: #fff;
  border-radius: 18px;
  padding: 26px;
  text-align: center;
}

section.card.contact-box p,
.contact-box p { color: rgba(255,255,255,.88); }

section.card.contact-box h2,
.contact-box h2 { color: #fff; justify-content: center; }

/* الروابط النصية فقط — الأزرار لها ألوانها الخاصة */
.contact-box a:not(.btn):not(.btn-wa) { color: var(--gold-light); }

/* النص داخل الأزرار يبقى بلونه الأصلي دائماً */
.btn, .btn:hover, .btn:visited { color: var(--primary-dark) !important; }
.btn-wa, .btn-wa:hover, .btn-wa:visited { color: #fff !important; }

/* رقم الواتساب تحت الأزرار — أبيض واضح */
.contact-box .contact-line,
.contact-box .contact-line a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--gold);
  color: var(--primary-dark);
  padding: 0 26px;
  height: 50px;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

/* ===== التذييل ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.62);
  padding: 30px 24px;
  text-align: center;
  font-size: 13px;
}

.site-footer a {
  color: rgba(255,255,255,.82);
  margin: 0 9px;
  font-weight: 400;
}

.footer-links { margin-bottom: 12px; }

@media (max-width: 640px) {
  .page-hero h1 { font-size: 24px; }
  section.card { padding: 20px; }
  .header-inner { justify-content: center; }
  .site-nav { justify-content: center; width: 100%; }
}

/* ============================================
   أزرار التواصل
   ============================================ */
.contact-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* الزران بعرض متساوٍ مهما اختلف طول النص */
.contact-actions .btn,
.contact-actions .btn-wa {
  flex: 1 1 0;
  min-width: 170px;
  max-width: 230px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #25D366;
  color: #fff;
  padding: 0 26px;
  height: 50px;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

.btn-wa svg { width: 19px; height: 19px; fill: currentColor; }

/* الرقم يُقرأ من اليسار لليمين دائماً */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  margin-top: 10px;
}

/* ============================================
   النسخة الإنجليزية — اتجاه من اليسار لليمين
   ============================================ */
html[dir="ltr"] body { font-family: 'Inter', 'Tajawal', Arial, sans-serif; }
html[dir="ltr"] li { padding-right: 0; padding-left: 21px; }
html[dir="ltr"] li::before { right: auto; left: 0; }
html[dir="ltr"] .steps li { padding-right: 0; padding-left: 40px; }
html[dir="ltr"] th, html[dir="ltr"] td { text-align: left; }

/* زر تبديل اللغة */
.lang-switch {
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  font-weight: 700;
}
