/* =========================================================
   base.css — الأساس المشترك لكل صفحات الموقع
   (ألوان، خطوط، حاوية، أزرار، هيدر، قائمة جانبية، فوتر)
   ========================================================= */

:root {
  /* ألوان مأخوذة من التصميم الأصلي */
  --c-ink: #17252a;          /* نصوص داكنة وعناوين القائمة */
  --c-text: #46707f;         /* لون النص الأساسي */
  --c-heading: #07425c;      /* العناوين الكبيرة */
  --c-heading-2: #09607e;    /* عناوين فرعية */
  --c-primary: #03a9f4;      /* الأزرق الأساسي (روابط وأزرار) */
  --c-primary-dark: #0288d1;
  --c-red: #b3123a;          /* عناوين بطاقات حمراء */
  --c-navy: #0b3a52;         /* أزرار داكنة */
  --c-footer: #09212a;       /* خلفية الفوتر */
  --c-panel: #f1f1f1;        /* خلفية القائمة الجانبية */
  --c-white: #fff;
  --c-soft: #f6feff;

  /* تدرّجات متكررة */
  --g-hero: linear-gradient(-225deg, #f6feff 25%, rgba(152, 136, 200, .8) 100%);
  --g-card: linear-gradient(180deg, #eef9ff 0%, #e3e8fb 100%);
  --g-btn-dark: linear-gradient(90deg, #0d2f42 0%, #3d6a8c 100%);
  --g-btn-blue: linear-gradient(90deg, #8fc5f5 0%, #c9e3ff 100%);

  --shadow-card: 0 12px 24px -6px rgba(23, 37, 42, .25);
  --shadow-soft: 0 6px 18px rgba(23, 37, 42, .12);

  --radius: 30px;
  --container: 1232px;
  --gutter: 16px;

  --font: "Open Sans", "Geeza Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: #fff;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s, background .2s, opacity .2s; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; color: var(--c-ink); line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; top: 8px; right: 8px; z-index: 1000; background: #fff; padding: 8px 12px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: 90px; position: relative; }
.text-center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600; font-size: 18px; line-height: 1.2;
  color: #fff;
  background: var(--g-btn-dark);
  box-shadow: 0 10px 20px -6px rgba(13, 47, 66, .55);
  border: 0;
  transition: transform .2s, box-shadow .2s, filter .2s;
  white-space: nowrap;
}
.btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.08); }
.btn svg { width: 1.6em; height: 1.6em; fill: currentColor; flex: none; }
.btn--blue { background: var(--c-primary); box-shadow: 0 10px 20px -8px rgba(3, 169, 244, .7); border-radius: 18px; }
.btn--light { background: var(--g-btn-blue); color: var(--c-ink); box-shadow: var(--shadow-soft); border-radius: 16px; }
.btn--light:hover { color: var(--c-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }

/* =========================================================
   الهيدر العام (يظهر في الصفحة الرئيسية فوق الهيرو)
   ========================================================= */
.site-header {
  position: absolute; inset-inline: 0; top: 0; z-index: 50;
  padding: 5px 0;
}
.site-header.is-stuck {
  position: fixed;
  background: linear-gradient(-225deg, rgba(246, 254, 255, .93) 25%, rgba(217, 217, 238, .95) 100%);
  box-shadow: 0 0 9.8px 1.96px rgba(0, 0, 0, .196);
}
.site-header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 96px;
  padding-inline: 16px;
}
.site-header__logo { margin-inline-start: auto; display: block; }
.site-header__logo img { width: 164px; height: auto; }
.site-header__links { display: flex; align-items: center; }
.site-header__links a {
  display: block; min-width: 107px; text-align: center;
  font-size: 27.2px; font-weight: 700; line-height: 1.25; color: var(--c-ink);
}
.site-header__links a:hover { color: var(--c-primary); }
.wa-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 160px; height: 45px; padding: 0 14px; border-radius: 14px;
  background: linear-gradient(90deg, #243949 0%, #517fa4 100%);
  color: #fff; font-weight: 700; font-size: 22.4px; line-height: 1;
  box-shadow: 0 6px 14px -4px rgba(13, 47, 66, .5);
}
.wa-pill:hover { color: #fff; filter: brightness(1.1); }
.hamburger {
  width: 45px; height: 45px; padding: 0; border: 0; background: none;
  color: var(--c-footer); display: inline-flex; align-items: center; justify-content: center;
}
.hamburger svg { width: 28px; height: 35px; fill: currentColor; }

@media (max-width: 1240px) {
  .site-header__links a { min-width: 0; padding-inline: 10px; font-size: 22px; }
}
@media (max-width: 1023px) {
  .site-header__links { display: none; }
  .site-header__inner { justify-content: space-between; min-height: 72px; }
  .site-header__logo { margin-inline-start: 0; }
  .site-header__logo img { width: 80px; }
  .wa-pill { min-width: 0; height: 45px; font-size: 16px; padding: 0 16px; }
  .hamburger { color: #0b5c86; }
  .hamburger svg { width: 34px; height: 34px; }
}

/* =========================================================
   القائمة الجانبية (Off-canvas)
   ========================================================= */
.offcanvas-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 998;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.offcanvas {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 999;
  width: 430px; max-width: 100%;
  background: var(--c-panel);
  transform: translateX(100%);
  transition: transform .35s ease;
  overflow-y: auto; display: flex; flex-direction: column;
}
body.menu-open { overflow: hidden; }
body.menu-open .offcanvas { transform: none; }
body.menu-open .offcanvas-overlay { opacity: 1; visibility: visible; }
.offcanvas__close {
  position: absolute; top: 10px; left: 10px; width: 40px; height: 40px;
  border: 0; background: none; color: var(--c-ink); font-size: 30px; line-height: 1;
}
.offcanvas__head {
  padding: 18px 24px 14px; display: flex; justify-content: center;
  background: linear-gradient(180deg, #fff 0%, #e9eef0 100%);
}
.offcanvas__head img { width: auto; max-height: 123px; }
.offcanvas__menu a {
  display: block; padding: 23px 24px;
  font-size: 21px; font-weight: 800; line-height: 1.5; color: #3f4243;
  border-bottom: 1px solid #dcdcdc;
}
.offcanvas__menu a:hover, .offcanvas__menu a[aria-current="page"] { background: var(--c-primary); color: #fff; }
.offcanvas__menu li:first-child a { background: var(--c-primary); color: #fff; }
.offcanvas__gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px;
}
.offcanvas__gallery img {
  width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 30px;
  background: linear-gradient(180deg, #d9ecfb, #cfd3f3);
}
.offcanvas__copy { text-align: center; font-size: 14px; padding: 10px 16px 24px; margin: 0; }
/* على الموبايل كانت القائمة في الأصل بعرض 230px وروابط أصغر */
@media (max-width: 767px) {
  .offcanvas { width: 230px; }
  .offcanvas__head { padding: 14px 12px 10px; }
  .offcanvas__head img { max-height: 90px; }
  .offcanvas__menu a { padding: 12px 14px; font-size: 14px; }
  .offcanvas__gallery { gap: 10px; padding: 12px; margin-top: 40px; }
  .offcanvas__gallery img { border-radius: 20px; }
  .offcanvas__copy { font-size: 12px; }
  .offcanvas__close { top: 4px; left: 4px; font-size: 26px; }
}

/* =========================================================
   الفوتر
   ========================================================= */
.site-footer {
  background: var(--c-footer); color: #fff;
  text-align: center; padding: 16px; font-size: 16px; line-height: 26px;
}
.site-footer p { margin: 0; }
@media (max-width: 767px) { .site-footer { font-size: 11px; font-weight: 300; padding: 14px 10px; } }

/* زر واتساب عائم (مستخدم في بعض الصفحات) */
.float-wa {
  position: fixed; bottom: 20px; left: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.float-wa svg { width: 30px; height: 30px; fill: #fff; }

/* حركة ظهور بسيطة عند التمرير */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* مبدّل واجهات الصفحة الرئيسية (يضيفه المولّد تلقائيًا أسفل يسار الشاشة) */
.design-switch {
  position: fixed; left: 18px; bottom: 18px; z-index: 900;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px; border-radius: 999px;
  font-family: var(--font); font-size: 14px; font-weight: 700; line-height: 1;
  background: rgba(9, 33, 42, .9); color: #fff;
  box-shadow: 0 12px 32px -10px rgba(9, 33, 42, .6), inset 0 0 0 1px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.design-switch__label { padding: 0 10px 0 8px; font-weight: 600; opacity: .75; }
.design-switch a {
  color: #fff; padding: 9px 13px; border-radius: 999px; white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.design-switch a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.design-switch a[aria-current="page"] { background: #fff; color: #09212a; }
.design-switch a:focus-visible { outline: 2px solid #03a9f4; outline-offset: 2px; }
@media (max-width: 600px) {
  .design-switch { left: 8px; bottom: 10px; font-size: 12px; padding: 4px; gap: 2px; }
  .design-switch__label { display: none; }
  .design-switch a { padding: 8px 9px; }
}
