/* ==========================================================================
   إعدادات المستقبل — Design System v2
   لوحة الألوان مستمدة من بروفايل الشركة (البرونز + الرمل + الفحمي)
   ========================================================================== */

:root {
  /* --- Brand (لوحة الشركة الجديدة) ------------------------------------ */
  --brand:      #8A6A34;   /* لون الشعار الجديد — الأساس */
  --gold-50:    #F5EBD1;   /* Shining Side  — أفتح درجة */
  --gold-100:   #EAD9A8;   /* Light Scatter — تظليل ولمسات */
  --gold-400:   #D9AE55;   /* Golden Glamor — لمعة ذهبية */
  --copper-600: #A67C3D;   /* Cobre         — اللون الأساسي */
  --bronze-800: #6B4423;   /* Ancient Bronze — عمق */
  --brass-950:  #3E2410;   /* Beauty Brass  — الأغمق */

  /* --- Neutrals دافئة مشتقة من اللوحة ---------------------------------- */
  --paper:   #FFFCF3;      /* خلفية الصفحة — أبيض دافئ */
  --surface: #FFFFFF;
  --ink-900: #2B1C0E;      /* نص أساسي */
  --ink-600: #6B4A33;      /* نص ثانوي */
  --muted:   #8A6E56;      /* نص خافت */
  --border:  #EADFC4;      /* حدود دافئة */

  /* --- Semantic -------------------------------------------------------- */
  --accent:      var(--brand);

  /* --- تدرّجات معتمدة (لا تُكتب يدويًا في أي مكان آخر) ---------------- */
  --grad-brand: linear-gradient(135deg, #C89A46 0%, var(--brand) 48%, var(--bronze-800) 100%);
  --grad-gold:  linear-gradient(135deg, var(--gold-400) 0%, var(--brand) 92%);
  --grad-pale:  linear-gradient(160deg, var(--gold-50), var(--gold-100));
  --grad-dark:  linear-gradient(165deg, #3D2712 0%, var(--ink-900) 55%, #1F1408 100%);
  --grad-rule:  linear-gradient(to left, transparent, var(--gold-400) 22%, var(--brand) 50%, var(--gold-400) 78%, transparent);
  --accent-soft: var(--gold-400);
  --accent-deep: var(--bronze-800);
  --dark:        var(--brass-950);
  --text:        var(--ink-900);
  --text-muted:  var(--muted);
  --success:     #1F7A4C;

  /* --- Elevation (ظلال بنّية دافئة بدل الرمادي) ------------------------- */
  --shadow-sm: 0 1px 2px rgba(43, 28, 14, .05), 0 2px 10px rgba(43, 28, 14, .04);
  --shadow-md: 0 10px 30px rgba(43, 28, 14, .08);
  --shadow-lg: 0 26px 64px rgba(43, 28, 14, .16);
  --ring: 0 0 0 3px rgba(173, 109, 21, .25);

  /* --- Typography (سلم مرن responsive) -------------------------------- */
  --font-body: "Cairo", system-ui, sans-serif;
  --font-display: "IBM Plex Sans Arabic", "Cairo", sans-serif;
  --fs-xs:  clamp(.75rem, .72rem + .15vw, .82rem);
  --fs-sm:  clamp(.86rem, .82rem + .2vw,  .95rem);
  --fs-base:clamp(1rem,  .96rem + .25vw,  1.08rem);
  --fs-lg:  clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  --fs-xl:  clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --fs-2xl: clamp(2rem,  1.5rem + 2.6vw,  3.4rem);
  --fs-3xl: clamp(2.6rem, 1.8rem + 4vw,   4.6rem);

  /* --- Spacing & shape ------------------------------------------------ */
  --space-section: clamp(3.5rem, 2rem + 6vw, 7rem);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --container: 1180px;

  /* --- Motion --------------------------------------------------------- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: .18s;
  --dur: .35s;
  --dur-slow: .7s;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.drawer-open { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

/* تصحيح مهم: الروابط الداخلية كانت تختفي خلف الهيدر الثابت */
section[id], div[id] { scroll-margin-top: 96px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 252, 243, .82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 28px rgba(43, 28, 14, .07);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 76px;
  transition: height var(--dur) var(--ease);
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
}
.site-header.scrolled .topbar { height: 64px; }

.logo { display: block; width: 68px; flex: 0 0 auto; transition: transform var(--dur) var(--ease); transform-origin: center right; }
.logo img { width: 100%; height: 68px; object-fit: contain; }
.site-header.scrolled .logo { transform: scale(.9); }

.brand-group { display: flex; align-items: center; gap: .6rem; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.brand-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.brand-ar { font-family: var(--font-display, inherit); font-weight: 700; font-size: clamp(.8rem, 3.2vw, 1.05rem); color: #fff; white-space: normal; }
.brand-en { font-family: var(--font-display, inherit); font-weight: 700; font-size: clamp(.9rem, 3.6vw, 1.18rem); letter-spacing: .015em; color: rgba(255,255,255,.88); white-space: normal; }
.site-header.scrolled .brand-ar { color: var(--ink-900); }
.site-header.scrolled .brand-en { color: var(--ink-600); }
.top-actions { flex: 0 0 auto; }

/* التنقل على الشاشات الكبيرة: أفقي بدل قائمة الهامبرغر */
.main-nav { display: none; gap: 1.75rem; }
.main-nav a {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-600);
  padding-block: .35rem;
  transition: color var(--dur-fast) var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="true"] { color: var(--text); }
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-header:not(.scrolled) .main-nav a { color: rgba(255,255,255,.85); }
.site-header:not(.scrolled) .main-nav a:hover { color: #fff; }


.top-actions { display: flex; align-items: center; gap: .75rem; }

/* --- الأزرار (نظام موحّد) ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding-inline: 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:active { transform: scale(.97) translateZ(0); }

.btn-primary {
  color: #fff;
  background-color: var(--brand);
  background-image: linear-gradient(90deg, var(--bronze-800) 0%, var(--brand) 55%, #C89A46 100%);
  box-shadow: 0 10px 24px rgba(121, 56, 11, .28);
}
.btn-primary:hover { box-shadow: 0 16px 34px rgba(121, 56, 11, .38); transform: translateY(-2px) translateZ(0); }

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, .06);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* --- زر القائمة ------------------------------------------------------ */
.menu-toggle {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.menu-toggle.active span:first-child { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:last-child  { transform: translateY(-7px) rotate(-45deg); }
.site-header:not(.scrolled) .menu-toggle { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }

/* --- Drawer ---------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  padding: 6rem 2rem 3rem;
  background:
    linear-gradient(115deg, rgba(255,255,255,.10) 0%, transparent 28%),
    radial-gradient(140% 90% at 100% 0%, rgba(239,187,85,.16), transparent 55%),
    linear-gradient(165deg, rgba(58, 22, 7, .96), rgba(24, 8, 2, .98));
  border-inline-start: 1px solid rgba(255, 255, 255, .16);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .35), inset 1px 0 0 rgba(255,255,255,.06);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
/* حيث يدعم المتصفح التمويه: زجاج صقيل حقيقي بدرجة شفافية أعلى */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .mobile-nav {
    background:
      linear-gradient(115deg, rgba(255,255,255,.10) 0%, transparent 28%),
      radial-gradient(140% 90% at 100% 0%, rgba(239,187,85,.16), transparent 55%),
      linear-gradient(165deg, rgba(58, 22, 7, .72), rgba(24, 8, 2, .8));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
  }
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav a {
  color: rgba(255,255,255,.8);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  opacity: 0;
  transform: translateY(14px);
}
.mobile-nav.open a { animation: navIn .55s var(--ease) forwards; }
.mobile-nav a:hover { color: var(--gold-400); }
@keyframes navIn { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: clamp(460px, 78svh, 680px);
  padding-block: 8rem 0;
  overflow: hidden;
  background: var(--ink-900);
  isolation: isolate;
}
.hero-media-wrap { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
/* البوستر والفيديو: نفس منطق العرض بالضبط — يملآن العرض بالكامل دائمًا بدون أي قص جانبي،
   والقص (إن لزم) يقتصر على الأعلى/الأسفل فقط، حتى لا يظهر أي "قفز" بينهما عند تحميل الفيديو */
.hero-poster,
.hero-media {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: auto;
  transform: translate(-50%, -50%);
}
.hero-poster { z-index: -2; }
.hero-media {
  z-index: -1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.06);
  transition: opacity 1.4s var(--ease), transform 6s var(--ease);
}
.hero-media.is-ready { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hero-wave {
  position: absolute; inset-inline: 0; z-index: 0;
  line-height: 0;
}
.hero-wave-bottom { bottom: -1px; }
.hero-wave-top { top: -1px; transform: scaleY(-1); }
.hero-wave svg { width: 100%; height: clamp(24px, 5vw, 56px); display: block; }
.hero-wave path { fill: var(--paper); }
@keyframes wave-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-2.5%); }
}
.hero-wave svg { animation: wave-drift 10s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-wave svg { animation: none; } }

.scroll-cue {
  position: absolute;
  bottom: clamp(2.5rem, 6vw, 4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px; height: 46px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 20px;
}
.scroll-cue span {
  width: 4px; height: 8px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--gold-400);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  71%  { transform: translateY(0);    opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 700px) { .scroll-cue { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

.hero-content { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
}
.hero-brand {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  margin: 1.15rem 0 0;
}
.hero-brand::before {
  content: "";
  align-self: center;
  width: 26px; height: 1px;
  background: linear-gradient(to left, var(--gold-400), transparent);
}
.hero-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  letter-spacing: .015em;
  color: var(--gold-400);
}
.hero-brand-suffix {
  font-weight: 500;
  font-size: clamp(.78rem, 1.7vw, .9rem);
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .5);
}
.hero h1 {
  margin: .5rem 0 1rem;
  font-size: var(--fs-3xl);
  font-weight: 800;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold-400), var(--copper-600) 60%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  max-width: 52ch;
  margin: 0 0 2rem;
  color: rgba(255,255,255,.78);
  font-size: var(--fs-lg);
  line-height: 1.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* --- شريط الإحصائيات — بطاقة ذهبية أنيقة أسفل الهيرو مباشرة -------------------------------------- */
.stats-bar {
  position: relative;
  z-index: 2;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.stats-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  background: var(--grad-brand);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(122, 79, 20, .35);
  padding: clamp(1.35rem, 3.5vw, 2.25rem) clamp(.5rem, 3vw, 1.5rem);
}
.stats-row::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 15% 0%, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}
.stat { position: relative; text-align: center; padding: .25rem .1rem; }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5.2vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(46,14,3,.25);
  letter-spacing: -.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat span {
  display: block;
  margin-top: .4rem;
  color: var(--gold-50);
  font-size: clamp(.66rem, 2.1vw, .85rem);
  font-weight: 600;
  line-height: 1.3;
}
@keyframes stat-pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
.stat strong.counted { animation: stat-pop .38s var(--ease); }
.stat-divider {
  position: relative;
  width: 1px; height: 46px;
  justify-self: center;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.35) 20%, rgba(255,255,255,.35) 80%, transparent);
}
@media (max-width: 380px) {
  .stat strong { font-size: 1.15rem; }
  .stat span { font-size: .6rem; }
}

/* ==========================================================================
   عناوين الأقسام
   ========================================================================== */
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.centered { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--accent-deep);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.section-head h2 { margin: .75rem 0 .6rem; font-size: var(--fs-xl); }
.section-head p { margin: 0; color: var(--text-muted); font-size: var(--fs-base); }

/* ==========================================================================
   القيم — تبديل تلقائي
   ========================================================================== */
.values { background: var(--ink-900); color: #fff; }
.values-grid { display: grid; gap: 2.5rem; align-items: center; }
.values .eyebrow { color: var(--gold-400); }
.values h2 { color: #fff; }
.values-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.values-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; aspect-ratio: 16/11; }
.value-rotator {
  min-height: 6.5rem;
  margin: 1.5rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.9;
  color: rgba(255,255,255,.9);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.value-rotator.is-fading { opacity: 0; transform: translateY(10px); }
.value-dots { display: flex; gap: .4rem; }
.value-dots button {
  width: 22px; height: 3px; padding: 0;
  border: 0; border-radius: 2px;
  background: rgba(255,255,255,.25);
  cursor: pointer;
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}
.value-dots button[aria-selected="true"] { width: 44px; background: var(--copper-600); }

/* ==========================================================================
   الاعتمادات والشهادات
   ========================================================================== */
.cert-drawer { position: relative; overflow: hidden; margin-inline: -1.25rem; }
.cert-drawer::before, .cert-drawer::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1.25rem;
  z-index: 2; pointer-events: none;
}
.cert-drawer::before { inset-inline-start: 0; background: linear-gradient(to left, transparent, var(--paper)); }
.cert-drawer::after  { inset-inline-end: 0;   background: linear-gradient(to right, transparent, var(--paper)); }
[dir="rtl"] .cert-drawer::before { background: linear-gradient(to right, transparent, var(--paper)); }
[dir="rtl"] .cert-drawer::after  { background: linear-gradient(to left, transparent, var(--paper)); }
.cert-grid {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: .5rem clamp(1.25rem, 5vw, 3rem) 1.35rem;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cert-grid::-webkit-scrollbar { display: none; }
.cert-grid.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.cert-grid.dragging .cert-card { pointer-events: none; }
.cert-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .5rem;
  flex: 0 0 auto;
  width: clamp(160px, 42vw, 210px);
  padding: 1.75rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-snap-align: start;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.cert-badge {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-brand);
  background-size: 220% 220%;
  animation: badge-shimmer 5s ease-in-out infinite;
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-sm);
  letter-spacing: .02em;
}
@keyframes badge-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) { .cert-badge { animation: none; } }
.cert-badge-logo {
  background: #fff;
  border: 1px solid var(--border);
  animation: none;
  padding: 8px;
}
.cert-badge-logo img { width: 100%; height: 100%; object-fit: contain; }
.cert-card strong { font-size: var(--fs-base); }
.cert-card span { color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.7; }
.cert-cr {
  margin: 2rem auto 0;
  max-width: 60ch;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ==========================================================================
   الخدمات — Accordion
   ========================================================================== */
.services { background: var(--surface); }
.accordion { display: grid; gap: .75rem; }
@media (min-width: 900px) { .accordion { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--paper);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.acc-item.active { border-color: var(--gold-400); box-shadow: var(--shadow-md); }
.acc-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; min-height: 66px;
  padding: 1rem 1.25rem;
  border: 0; background: transparent;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.acc-header:hover { color: var(--accent-deep); }
.acc-icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--accent-deep);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.acc-item.active .acc-icon { transform: rotate(135deg); background: var(--copper-600); color: #fff; }
/* الحل الصحيح بدل max-height الثابت: grid-template-rows */
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.acc-item.active .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p {
  margin: 0;
  padding: 0 1.25rem 1.35rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.95;
}

/* ==========================================================================
   مرشد الخدمة — بديل الحاسبة (بلا أي أسعار)
   ========================================================================== */
.wizard-section { background: var(--ink-900); color: #fff; }
.wizard-section.wizard-page { padding-top: calc(76px + clamp(2rem, 5vw, 3.5rem)); }
.wizard-section .eyebrow { color: var(--gold-400); }
.wizard-section h2 { color: #fff; }
.wizard-section .section-head p { color: rgba(255,255,255,.62); }

.wizard {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid rgba(239,187,85,.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(239,187,85,.09), rgba(68,16,4,.35));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

/* مؤشر التقدّم */
.wizard-progress { display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem; }
.wizard-progress .bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.wizard-progress .bar i {
  display: block; height: 100%; width: 0;
  border-radius: 2px;
  background: linear-gradient(to left, var(--gold-400), var(--copper-600));
  transition: width var(--dur-slow) var(--ease);
}
.wizard-progress .count { font-size: var(--fs-xs); color: var(--gold-400); font-variant-numeric: tabular-nums; }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: stepIn .5s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.wizard-step h3 {
  font-size: var(--fs-lg);
  margin-bottom: .4rem;
  color: #fff;
}
.wizard-step .hint { margin: 0 0 1.5rem; font-size: var(--fs-sm); color: rgba(255,255,255,.55); }

/* بطاقات الاختيار */
.options { display: grid; gap: .7rem; }
@media (min-width: 640px) { .options { grid-template-columns: repeat(2, 1fr); } }

.option {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.82);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.option .mark {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  font-size: .7rem;
  color: transparent;
  transition: all var(--dur-fast) var(--ease);
}
.option:hover { border-color: var(--gold-400); background: rgba(239,187,85,.1); color: #fff; }
.option[aria-pressed="true"] {
  border-color: var(--gold-400);
  background: linear-gradient(120deg, rgba(239,187,85,.22), rgba(173,109,21,.18));
  color: #fff;
}
.option[aria-pressed="true"] .mark {
  border-color: transparent;
  background: var(--gold-400);
  color: var(--brass-950);
}

.wizard-actions { display: flex; gap: .75rem; margin-top: 1.75rem; }
.wizard-actions .btn { flex: 1; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--copper-600));
  color: var(--brass-950);
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(121, 56, 11, .35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(121, 56, 11, .45); }
.btn-gold[disabled] { opacity: .4; pointer-events: none; }
.btn-quiet {
  background: transparent;
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.7);
}
.btn-quiet:hover { border-color: var(--gold-400); color: #fff; }

/* شاشة النتيجة */
.wizard-result { text-align: center; }
.wizard-result .badge {
  display: inline-grid; place-items: center;
  width: 62px; height: 62px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--copper-600));
  color: var(--brass-950);
  font-size: 1.6rem;
}
.wizard-result h3 { font-size: var(--fs-xl); }
.wizard-result .summary {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem;
  margin: 1.25rem 0 1.5rem;
}
.wizard-result .summary span {
  padding: .4rem 1rem;
  border: 1px solid rgba(239,187,85,.35);
  border-radius: var(--radius-pill);
  background: rgba(239,187,85,.1);
  font-size: var(--fs-xs);
  color: var(--gold-100);
}

/* ==========================================================================
   تواصل معنا
   ========================================================================== */
.contact { background: var(--paper); }
.contact-banner {
  position: relative;
  overflow: hidden;
  min-height: clamp(190px, 30vw, 300px);
  display: flex;
  align-items: flex-end;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.contact-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.contact-banner-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2rem clamp(1.25rem, 6vw, 4rem);
  background: linear-gradient(to top, rgba(20,8,2,.92) 8%, rgba(20,8,2,.45) 55%, transparent 100%);
}
.contact-banner-overlay .eyebrow { color: var(--gold-400); }
.contact-banner-overlay h2 { color: #fff; margin: .5rem 0 0; }
.contact-grid { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.1fr .9fr; } }

.contact-form {
  display: grid; gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* حقل فخّ للبوتات — مخفي تمامًا عن المستخدم الحقيقي */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 58px;
  padding: 1.5rem .95rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; padding-top: 1.7rem; }
.field select { appearance: none; padding-inline-end: 2.5rem; cursor: pointer; }
.field.has-select::after {
  content: "";
  position: absolute; inset-inline-end: 1rem; top: 26px;
  width: 10px; height: 10px;
  border: 2px solid var(--accent);
  border-block-start: 0; border-inline-end: 0;
  transform: rotate(-45deg);
  pointer-events: none;
}
.field label {
  position: absolute; inset-inline-start: 1rem; top: 1.05rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  pointer-events: none;
  transition: all var(--dur-fast) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.has-value + label {
  top: .45rem;
  font-size: var(--fs-xs);
  color: var(--accent-deep);
  font-weight: 600;
}
.field .error-msg { display: block; margin-top: .3rem; color: #B3261E; font-size: var(--fs-xs); min-height: 1rem; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #B3261E; }

.form-status { margin: 0; min-height: 1.5rem; font-size: var(--fs-sm); text-align: center; }
.form-status.success { color: var(--success); font-weight: 600; }
.form-status.error { color: #B3261E; }

.contact-info { display: grid; gap: 1rem; align-content: start; }
.info-card {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.info-card:hover { border-color: var(--gold-400); transform: translateX(-4px); }
.info-card .icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  color: var(--copper-600);
}
.info-card .icon svg { width: 24px; height: 24px; }
.info-card .icon-whatsapp {
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(122, 79, 20, .3);
}
.info-card strong { display: block; font-size: var(--fs-sm); }
.info-card span, .info-card a { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.7; }
.info-card a:hover { color: var(--accent-deep); }

.map {
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.map-fallback {
  display: block;
  margin-top: .6rem;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.map-fallback:hover { color: var(--accent-deep); }

/* ==========================================================================
   من نحن — رؤية / رسالة / أهداف
   ========================================================================== */
.about-us { background: var(--paper); }
.about-us .section-head p { max-width: 68ch; margin-inline: auto; }
.about-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .85rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold-400); }
.about-badge {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 79, 20, .3);
}
.about-cta-top { margin-top: 1.75rem; margin-bottom: -.5rem; }
.about-card h3 { font-size: var(--fs-lg); color: var(--accent-deep); }
.about-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.95; }
.about-goals { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; text-align: start; width: 100%; }
.about-goals li {
  position: relative;
  padding-inline-start: 1.5rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.about-goals li::before {
  content: "✓";
  position: absolute; inset-inline-start: 0; top: 0;
  color: var(--accent-deep);
  font-weight: 700;
}
.about-goals li strong { color: var(--accent-deep); font-weight: 700; }
.about-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.75rem;
}
.about-cta .btn-primary { display: inline-flex; align-items: center; gap: .6rem; }
.about-cta .btn-primary img { border-radius: 50%; background: #fff; padding: 2px; flex-shrink: 0; }



/* ==========================================================================
   Footer
   ========================================================================== */
.section--pale { background: var(--grad-pale); }

.gallery-nav { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1.5rem; }

.gallery-track {
  display: flex;
  gap: 1rem;
  padding: .5rem calc((100vw - min(var(--container), 100vw - 2.5rem)) / 2) 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-padding-inline: calc((100vw - min(var(--container), 100vw - 2.5rem)) / 2);
  scroll-behavior: smooth;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery-track.dragging * { pointer-events: none; user-select: none; }

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  margin: 0;
  width: min(78vw, 300px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform .5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.08); }
.footer { padding-block: 3.5rem 0; background: var(--ink-900); color: rgba(255,255,255,.6); }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer img { width: 140px; height: auto; flex-shrink: 0; opacity: .95; }
.footer p { font-size: var(--fs-sm); line-height: 1.9; max-width: 40ch; }
.footer h3 { color: #fff; font-size: var(--fs-base); margin-bottom: 1rem; }
.footer-links { display: grid; gap: .55rem; }
.footer-links a { font-size: var(--fs-sm); transition: color var(--dur-fast) var(--ease); }
.footer-links a:hover { color: var(--gold-400); }
.socials { display: flex; gap: .6rem; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  transition: all var(--dur-fast) var(--ease);
}
.socials a:hover { background: var(--copper-600); border-color: transparent; color: #fff; transform: translateY(-3px); }
.social-whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.social-whatsapp:hover { background: #1ebe57; }
.copyright {
  padding-block: 1.35rem;
  padding-bottom: calc(1.35rem + 56px + 1.5rem);
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: var(--fs-xs);
  text-align: center;
}

/* ==========================================================================
   WhatsApp
   ========================================================================== */
.whatsapp-widget { position: fixed; z-index: 90; bottom: 1.5rem; inset-inline-start: 1.5rem; }
.wa-button {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border: 0; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 8px 24px rgba(122, 79, 20, .45);
  cursor: pointer;
  transition: transform var(--dur) var(--ease);
}
.wa-button:hover { transform: scale(1.08); }
.wa-button::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; border: 2px solid var(--gold-400);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { to { transform: scale(1.7); opacity: 0; } }
.wa-popup {
  position: absolute; bottom: 70px; inset-inline-start: 0;
  width: min(280px, calc(100vw - 3rem));
  padding: 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(.96);
  transform-origin: bottom right;
  transition: all var(--dur) var(--ease);
}
.wa-popup.open { opacity: 1; visibility: visible; transform: none; }
.wa-popup strong { display: block; font-size: var(--fs-base); }
.wa-popup p { margin: .5rem 0 1rem; font-size: var(--fs-sm); color: var(--text-muted); }
.wa-popup .btn { width: 100%; background: var(--grad-brand); color: #fff; }
.wa-close {
  position: absolute; top: .5rem; inset-inline-start: .65rem;
  border: 0; background: none; color: var(--text-muted);
  font-size: 1.35rem; line-height: 1; cursor: pointer;
}

/* --- زر عائم لمرشد الخدمة — بشعار الشركة، في الطرف المقابل لواتساب --- */
.guide-fab {
  position: fixed; z-index: 90; bottom: 1.5rem; inset-inline-end: 1.5rem;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--gold-400);
  box-shadow: 0 8px 24px rgba(43, 28, 14, .22);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.guide-fab:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(43, 28, 14, .3); }
.guide-fab img { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; }
.guide-fab::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; border: 2px solid var(--gold-400);
  animation: pulse 2.4s var(--ease) infinite;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition: opacity var(--dur-slow) var(--ease) var(--reveal-delay, 0ms),
              transform var(--dur-slow) var(--ease) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; will-change: auto; }

/* --- ظهور متتابع لعناصر الشبكات (شعارات، معرض، بطاقات) --- */
.partners-grid > .partner-logo,
.gallery-track > .gallery-item,
.about-grid > .about-card,
.cert-grid > .cert-card,
.accordion > .acc-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.reveal.visible > .partner-logo,
.reveal.visible > .gallery-item,
.reveal.visible > .about-card,
.reveal.visible > .cert-card,
.reveal.visible > .acc-item {
  opacity: 1;
  transform: none;
}
.reveal.visible > .partner-logo:nth-child(1),  .reveal.visible > .gallery-item:nth-child(1),  .reveal.visible > .about-card:nth-child(1),  .reveal.visible > .cert-card:nth-child(1),  .reveal.visible > .acc-item:nth-child(1)  { transition-delay: .03s; }
.reveal.visible > .partner-logo:nth-child(2),  .reveal.visible > .gallery-item:nth-child(2),  .reveal.visible > .about-card:nth-child(2),  .reveal.visible > .cert-card:nth-child(2),  .reveal.visible > .acc-item:nth-child(2)  { transition-delay: .07s; }
.reveal.visible > .partner-logo:nth-child(3),  .reveal.visible > .gallery-item:nth-child(3),  .reveal.visible > .about-card:nth-child(3),  .reveal.visible > .cert-card:nth-child(3),  .reveal.visible > .acc-item:nth-child(3)  { transition-delay: .11s; }
.reveal.visible > .partner-logo:nth-child(4),  .reveal.visible > .gallery-item:nth-child(4),  .reveal.visible > .about-card:nth-child(4),  .reveal.visible > .cert-card:nth-child(4),  .reveal.visible > .acc-item:nth-child(4)  { transition-delay: .15s; }
.reveal.visible > .partner-logo:nth-child(5),  .reveal.visible > .gallery-item:nth-child(5),  .reveal.visible > .cert-card:nth-child(5)  { transition-delay: .19s; }
.reveal.visible > .partner-logo:nth-child(6),  .reveal.visible > .gallery-item:nth-child(6)  { transition-delay: .23s; }
.reveal.visible > .partner-logo:nth-child(7),  .reveal.visible > .gallery-item:nth-child(7)  { transition-delay: .27s; }
.reveal.visible > .partner-logo:nth-child(8),  .reveal.visible > .gallery-item:nth-child(8)  { transition-delay: .31s; }
.reveal.visible > .partner-logo:nth-child(9)  { transition-delay: .35s; }
.reveal.visible > .partner-logo:nth-child(10) { transition-delay: .39s; }
.reveal.visible > .partner-logo:nth-child(11) { transition-delay: .43s; }
.reveal.visible > .partner-logo:nth-child(12) { transition-delay: .47s; }
.reveal.visible > .partner-logo:nth-child(13) { transition-delay: .51s; }
.reveal.visible > .partner-logo:nth-child(n+14) { transition-delay: .55s; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 1000px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .values-grid { grid-template-columns: .85fr 1.15fr; gap: 4rem; }
  .values-media { order: 2; }
}

/* --- تفضيل تقليل الحركة ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   لمسات اللوحة الجديدة
   ========================================================================== */
/* الشعار: نسختان — داكنة على الخلفيات الفاتحة، فاتحة على الداكنة */
.logo .logo-light { display: none; }
.site-header:not(.scrolled) .logo .logo-dark { display: none; }
.site-header:not(.scrolled) .logo .logo-light { display: block; }

/* خيط ذهبي رفيع يفصل الأقسام الداكنة — يعطي إحساسًا بالرقي دون ضجيج */
.values, .wizard-section, .footer { border-top: 1px solid rgba(239, 187, 85, .18); }

/* نقشة خفيفة جدًا خلف الأقسام الداكنة */
.values, .wizard-section {
  background-image: radial-gradient(60% 50% at 80% 0%, rgba(239, 187, 85, .10), transparent 70%);
  background-color: var(--ink-900);
}

/* الاقتباس اللوني: العناوين الفرعية بلمسة نحاسية */
.section-head h2 { color: var(--brass-950); }
.values h2, .wizard-section h2 { color: #fff; }

/* ==========================================================================
   درج المشاريع الأفقي
   ========================================================================== */
.projects { background: var(--paper); overflow: hidden; }
.projects-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.projects-nav { display: flex; gap: .5rem; }
.nav-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.nav-btn:hover:not([disabled]) { background: var(--copper-600); border-color: transparent; color: #fff; transform: translateY(-2px); }
.nav-btn[disabled] { opacity: .3; cursor: default; }

/* المسار: يخرج عن حدود الحاوية ليقصّ البطاقة الأخيرة جزئيًا فيدعو للسحب */
.projects-track {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: .5rem calc((100vw - min(var(--container), 100vw - 2.5rem)) / 2) 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-padding-inline: calc((100vw - min(var(--container), 100vw - 2.5rem)) / 2);
}
.projects-track::-webkit-scrollbar { display: none; }
.projects-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.projects-track.dragging * { pointer-events: none; user-select: none; }

.project-card {
  flex: 0 0 min(330px, 78vw);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.project-card:hover, .project-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--gold-400);
  box-shadow: var(--shadow-lg);
}
.project-card figure { position: relative; margin: 0; overflow: hidden; }
.project-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform .8s var(--ease);
}
.project-card:hover img { transform: scale(1.06); }

.project-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--grad-brand);
  transition: transform .8s var(--ease);
}
.project-card:hover .project-placeholder { transform: scale(1.06); }
.project-placeholder span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 2px 10px rgba(46,14,3,.35);
}

.project-card figure::after {
  content: ""; position: absolute; inset: auto 0 0; height: 45%;
  background: linear-gradient(to top, rgba(46,14,3,.55), transparent);
}

.tag-sector, .tag-live {
  position: absolute; z-index: 2; top: .75rem;
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.tag-sector { inset-inline-end: .75rem; background: rgba(255,252,243,.9); color: var(--brass-950); }
.tag-live {
  inset-inline-start: .75rem;
  background: linear-gradient(135deg, var(--gold-400), var(--copper-600));
  color: var(--brass-950);
}

.project-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.35rem 1.5rem; flex: 1; }
.project-card h3 { font-size: var(--fs-base); line-height: 1.5; }
.project-card .client {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.project-card .desc { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.85; }
.project-card .scope { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .75rem; }
.project-card .scope span {
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--gold-50);
  color: var(--bronze-800);
  font-size: var(--fs-xs);
}

/* شريط تقدّم السحب */
.projects-progress {
  width: min(var(--container), calc(100% - 2.5rem));
  margin: 0 auto;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.projects-progress i {
  display: block; height: 100%; width: 8%;
  border-radius: 2px;
  background: linear-gradient(to left, var(--gold-400), var(--copper-600));
  transition: width .25s var(--ease);
}

/* ==========================================================================
   شركاؤنا — شعارات مجرّدة بلا إطار (انظر .partners-grid أدناه)
   ========================================================================== */
.partners {
  --partner-gap: clamp(2rem, 4.5vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: var(--grad-pale);
  border-block: 1px solid rgba(138, 93, 34, .14);
  overflow: hidden;
}

/* ==========================================================================
   لمسات الأناقة على التوزيع العام
   ========================================================================== */
/* فاصل مزخرف بين الأقسام الفاتحة */
.rule {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to left, transparent, rgba(138,93,34,.28));
}
.rule::after { background: linear-gradient(to right, transparent, rgba(138,93,34,.28)); }
.rule i {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--grad-gold);
  border-radius: 1px;
}

/* عناوين الأقسام: توازن أدق وتدرّج خفيف على الكلمة المميّزة */
.section-head h2 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow::before { background: var(--grad-gold); }

/* الأقسام الداكنة: تدرّج بدل اللون المسطّح */
.values, .wizard-section { background-image: var(--grad-dark); }
.footer { background-image: var(--grad-dark); }

/* البطاقات: حافة داخلية فاتحة تعطي إحساس العمق */
.project-card, .info-card, .contact-form {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* الأزرار الأساسية: لمعة خفيفة تمر عند المرور */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }

/* الهيرو: تظليل خفيف ومحايد أسفل الفيديو لوضوح النص فقط، بدون أي صبغة حمراء/بنية */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.18) 32%, transparent 58%),
    radial-gradient(75% 55% at 82% 8%, rgba(239,187,85,.16), transparent 72%);
}

/* ==========================================================================
   تأثيرات عصرية حديثة
   ========================================================================== */
.site-header {
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  background-color: rgba(20, 8, 2, .35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background-color: rgba(20, 8, 2, .78); }
  .site-header.scrolled { background-color: rgba(255, 252, 243, .96); }
}

.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

/* Glass morphism على البطاقات */
.info-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(239, 187, 85, .1);
  transition: all var(--dur) var(--ease);
}

.info-card:hover {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(239, 187, 85, .3);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 93, 34, .08);
}

/* شريط التقدم الديناميكي */
#proj-progress-bar {
  background: var(--grad-gold);
  box-shadow: 0 0 20px rgba(239, 187, 85, .5);
}

/* أزرار حديثة مع تأثيرات */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,.3), transparent);
  opacity: 0;
  pointer-events: none;
}

.btn:hover::before {
  opacity: 1;
  animation: ripple .6s ease-out;
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: scale(4);
  }
}

/* حقول الإدخال حديثة */
.field input,
.field textarea,
.field select {
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(139, 93, 34, .15);
  transition: all var(--dur) ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  background: rgba(255, 255, 255, .95);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 93, 34, .1);
}

/* الأكورديون بتأثيرات حديثة */
.acc-header {
  background: linear-gradient(135deg, rgba(251, 245, 210, .4), rgba(239, 187, 85, .1));
  border: 1px solid rgba(239, 187, 85, .15);
  transition: all var(--dur) var(--ease);
}

.acc-header:hover {
  background: linear-gradient(135deg, rgba(251, 245, 210, .6), rgba(239, 187, 85, .2));
  border-color: var(--gold-400);
}

.acc-item[open] .acc-header {
  background: linear-gradient(135deg, rgba(251, 245, 210, .8), rgba(239, 187, 85, .3));
  border-color: var(--gold-400);
}

/* شريط المشاريع بتأثير الظل */
.projects-track {
  scroll-behavior: smooth;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  transition: all var(--dur) var(--ease);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(139, 93, 34, .15);
}

/* ===== شركاء النجاح — شعارات مجرّدة بلا إطار، بتأثير أنيق عند المرور ===== */
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 4.5vw, 3.25rem) clamp(2rem, 5vw, 3.75rem);
  max-width: 1080px;
  margin: 0 auto;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
}

.partner-logo img {
  max-width: 132px;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .45s var(--ease);
}

.partner-logo:hover img {
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .partner-logo img { transition: none; }
}
