/* ===== أساسيات ===== */
* { box-sizing: border-box; }
:root {
  --bg: #f7f7f7;
  --text: #222;
  --muted: #666;
  --gold: #FBB03B;
  --header-bg: #222;
  --header-fg: #fff;
  color-scheme: light;
}
html { font-family: 'Cairo', Arial, sans-serif; }
body {
  margin: 0;
  background: var(--bg);
  direction: rtl; /* آمن مع الخصائص المنطقية أدناه */
}

/* يمنع خروج المحتوى خارج الشاشة على الموبايل */
img, video { max-width: 100%; height: auto; display: block; }
section, .container { overflow-wrap: anywhere; }

/* ===== الحاوية العامة ===== */
.container {
  max-width: 1200px;
  margin-inline: auto;          /* بديل آمن RTL/LTR لـ margin: 0 auto */
  padding-inline: 16px;         /* بديل آمن لـ padding-left/right */
}

/* ===== الهيدر / الترويسة ===== */
.header {
  background: var(--header-bg);
  color: var(--header-fg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #111;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px; /* المسافة بين الشعار والنص */
  text-decoration: none;
  color: #FBB03B; 
  font-size: clamp(1.1rem, 1.2vw + 1rem, 1.6rem);
  font-weight: bold;
  text-shadow: 0 0 4px rgba(255,255,255,0.4);

  margin-right: -70PX; /* ← يحرك اللوجو لليسار (زيد أو قلل القيمة حسب رغبتك) */
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 10px;
}

/* قائمة سطح المكتب */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;                /* تتحوّل لشبكة بالموبايل */
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;              /* يسمح بالنزول لسطر ثاني بدلاً من الانسكاب */
}
nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 10px;
  transition: color .18s ease, background .18s ease;
}
nav a.active, nav a:hover { color: var(--gold); background: rgba(255,215,0,.08); }

/* زر لغة */
.lang-btn {
  background: var(--gold);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: bold;
  font-size: .98rem;
  transition: background .18s ease, color .18s ease;
}
.lang-btn:hover { background: #d4ad00; color: #fff; }

/* ===== البانر ===== */
.hero {
  background: none !important;
  color: #fff;
  padding-block: 0 !important;
  text-align: center;
}
.hero .gold { color: var(--gold); font-weight: 700; }
.main-btn {
  display: inline-block;
  margin-block-start: 12px;
  background: var(--gold);
  color: var(--text);
  padding: 12px 32px;
  border-radius: 22px;
  font-weight: bold;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.main-btn:hover { background: #d4ad00; color: #fff; }
.main-btn:active { transform: scale(.98); }

/* ===== أقسام سريعة / شبكات ===== */
.quick-sections { background: #fff; padding-block: 40px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.qs-card {
  display: block;
  background: #f3f3f3;
  color: var(--text);
  font-weight: 700;
  text-align: center;
  padding-block: 26px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.qs-card:hover { background: var(--gold); color: var(--text); }
.qs-card:active { transform: translateY(1px); }

/* ===== الفوتر ===== */
.footer {
  background: var(--header-bg);
  color: var(--gold);
  text-align: center;
  padding-block: 16px;
  font-size: .98rem;
  margin-block-start: 48px;
}

/* ===== تركيز لوحة المفاتيح (وصولية) ===== */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== تقليل الحركة عند المستخدم الذي يفضل ذلك ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== استجابة عامة ===== */
@media (max-width: 992px) {
  .container { padding-inline: 14px; }
  nav ul { gap: 12px; }
}

@media (max-width: 768px) {
  /* الهيدر يتكيّف بدون كسر التخطيط */
  .header .container { flex-wrap: wrap; row-gap: 10px; }

  /* البانر ينتقل لتدرّج عمودي بالموبايل ليتسع النص */
  .hero { background: linear-gradient(180deg, var(--header-bg) 60%, var(--gold) 100%); }

  /* الشبكة تقلص الأعمدة */
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
}

/* ===== Drawer للموبايل (اختياري) ===== */
/* فعّله إذا أضفت زر .nav-toggle و .site-nav بداخل الهيدر كما شرحت لك سابقًا */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--gold);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
  }
  /* حول nav إلى درج جانبي */
  .site-nav {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;      /* آمن RTL */
    width: min(78vw, 320px);
    background: #fff;
    box-shadow: 0 0 30px rgba(0,0,0,.15);
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 12px;
    transform: translateX(100%);
    transition: transform .2s ease;
    z-index: 1000;
  }
  .site-nav ul {
    display: grid;
    gap: 8px;
  }
  .site-nav a { color: var(--text); }
  .site-nav a.active, .site-nav a:hover { background: #fffbe7; }

  /* حالة الفتح (أضف الصنف nav-open على <html> أو <body>) */
  .nav-open .site-nav { transform: translateX(0); }

  /* طبقة تغطية عند فتح الدرج */
  .scrim[hidden] { display: none !important; }
  .scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 900;
  }
}
/* ===== Slider Basics ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;        /* يمكن تعديلها */
  display: grid;
  place-items: stretch;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  user-select: none;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease, transform 700ms ease;
  transform: scale(1.02);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
  pointer-events: auto;
}

.slide picture, 
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide img {
  filter: brightness(62%);
}

/* نص السلايد */
.slide .content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: right;
  max-width: clamp(320px, 40vw, 640px);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 32px);
  /* تموضع داخل السلايد */
  display: grid;
  align-content: center;
  justify-items: end;
  height: 100%;
}

.slide .content h1 {
  font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(24px, 4vw, 44px);
  margin: 0 0 12px;
}

.slide .content p {
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.8;
  margin: 0 0 18px;
}

.gold { color: #d4af37; }

/* زر رئيسي (لو عندك كلاس موجود مسبقًا اتركه) */
.main-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #d4af37;
  color: #111;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}
.main-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* أزرار التحكم */
.ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 4vw, 48px);
  height: clamp(36px, 4vw, 48px);
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: clamp(20px, 3vw, 26px);
  cursor: pointer;
  z-index: 3;
  display: grid;
  place-items: center;
  transition: background 200ms ease, transform 200ms ease;
}
.ctrl:hover { background: rgba(0,0,0,.55); transform: translateY(-50%) scale(1.05); }
.ctrl:focus-visible { outline: 3px solid #d4af37; outline-offset: 2px; }

.ctrl.prev { inset-inline-start: 12px; }
.ctrl.next { inset-inline-end: 12px; }

/* المؤشرات */
.indicators {
  position: absolute;
  inset-inline: 0;
  bottom: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 3;
}

.dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, width .25s ease;
}
.dot.active {
  background: #d4af37;
  width: 22px;  /* قرص ممدود للدلالة على الفعال */
}
.dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* تحسين إمكانية الوصول: إخفاء نصوص مرئية لقرّاء الشاشة */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
  .ctrl, .dot { transition: none; }
}

/* استجابة عامة للشاشات الأصغر */
@media (max-width: 768px) {
  .hero{ min-height: calc(100vh - 64px) !important; } /* عدّل 64px إذا اختلف ارتفاع الهيدر عندك */
  .slide .content { justify-items: stretch; text-align: right; }
}
/* وعاء عام مرتب على كل المقاسات */
.container{
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* ---- الهيدر ---- */
.header{
  background:#1c1c1c;
  color:#fff;
}
.header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}
/* القائمة الأساسية (ديسكتوب) */
header nav ul{
  display:flex; gap:18px; list-style:none; margin:0; padding:0;
}
header nav a{ color:#fff; text-decoration:none; padding:8px 12px; border-radius:10px; }
header nav a.active{ background:#d4af37; color:#111; }

/* زر القائمة (يظهر بالجوال فقط) */
.menu-toggle{
  display:none;
  background:#d4af37; color:#111; border:0; border-radius:10px;
  padding:8px 12px; font-weight:700; cursor:pointer;
}

/* ---- السلايدر/الهيرو ---- */
.hero{ min-height: 64vh; }
@media (max-width: 992px){
  .hero{ min-height: 56vh; }
}
@media (max-width: 768px){
  .hero{ min-height: 48vh; }
  .slide .content{
    max-width: 100%;
    padding: 20px;
    text-align: center;            /* نص أوسط بالجوال */
    justify-items: center;
  }
  .slide .content h1{ font-size: clamp(22px,5vw,28px); }
  .slide .content p{ font-size: 14px; line-height: 1.7; }
  .ctrl{ width:38px; height:38px; font-size:18px; }
}

/* ---- القائمة على الشاشات الصغيرة ---- */
@media (max-width: 992px){
  .menu-toggle{ display:inline-block; }
  header .container{ gap:8px; }
  /* أخفي القائمة افتراضياً */
  header .container nav{
    position: absolute;
    inset-inline: 0;
    top: 60px;                      /* تحت الهيدر */
    background:#1c1c1c;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .25s ease;
    z-index: 50;
  }
  header .container nav.open{ transform: scaleY(1); }
  header nav ul{
    flex-direction:column;
    gap:0;
    padding:8px 12px;
  }
  header nav li a{
    display:block;
    padding:12px;
    border-radius:8px;
  }
}

/* ---- شبكة شعارات العملاء ---- */
.clients-logos{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 24px;
  justify-items:center;
}
.clients-logos img{
  max-width: 180px;
  max-height: 120px;
  width: auto; height: auto;
  background:#fff;
  padding:16px;
  border-radius:16px;
  filter: grayscale(50%);
  transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.clients-logos img:hover{
  filter:none;
  transform: translateY(-4px) scale(1.12);
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
}
@media (max-width: 768px){
  .clients-logos{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* صفّين واضحين بالجوال */
    gap: 16px;
  }
  .clients-logos img{
    max-width: 150px;
    max-height: 100px;
    padding:12px;
  }
}

/* ---- أزرار عامة ---- */
.main-btn{
  width: fit-content;
}
@media (max-width: 768px){
  .main-btn{
    width: 100%;
    text-align: center;
  }
}

/* منع تمدد أي صورة خارج الإطار */
img{ max-width:100%; height:auto; }
/* يمنع فراغات غريبة */
html, body { height: 100%; margin: 0; }

/* الهيرو/السلايدر */
.hero{ position: relative; overflow: hidden; }
.slider{ position: relative; width: 100%; height: 100%; }
.slide{ position: absolute; inset: 0; }
.slide picture, .slide img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* إضافة الشعار فوق الصورة */
.slide-logo {
  position: absolute;
  top: 25%; /* يمكن تعديل المسافة من الأعلى حسب الحاجة */
  left: 25%; /* يمكن تعديل المسافة من اليسار حسب الحاجة */
  height: 15%; /* تحديد الحجم بما يتناسب مع المربع */
  width: auto; /* الحفاظ على نسبة العرض والارتفاع */
  z-index: 2;
  opacity: 0.8; /* إذا أردت تعديل الشفافية */
}

