/* ═══════════════════════════════════════════════════════════════════
   Jingyuan — ar.jingyuan.hk  V1.0
   نظام التصميم: «الهندسة الصناعية الحديثة في الشرق الأوسط»
   Design system : Modern Middle East Industrial Engineering Style

   Palette (تحدَّدت من مواصفات المشروع، ولا يجوز تغييرها):
     --bg      #F7F3EA   أبيض دافئ   — خلفية الصفحة
     --navy    #102A43   أزرق داكن   — الترويسة، التذييل، مناطق التقنية والقدرات
     --orange  #D9822B   برتقالي النفط — أزرار الدعوة، الأرقام الرئيسية، التواصل
     --steel   #52606D   رمادي صناعي — نص المتن

   RTL:
     الموقع يعمل بـ dir="rtl" أصلاً. كل خاصية اتجاهية تُكتب بصيغتها
     المنطقية (inline-start / inline-end) لا الفيزيائية (left / right)،
     كي تنعكس الواجهة كلها تلقائياً ولا تبقى أي كتلة «يسارية».

   Typographie arabe — قاعدتان لا تُخالَفان:
     1. letter-spacing: 0 على كل نص عربي — تباعد الأحرف يقطع الاتصال
        بين الحروف العربية ويشوّه الكلمة.
     2. text-transform غير ذي معنى للعربية (لا حالة أحرف) — لا يُستعمل.
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  /* ── الألوان الأساسية الأربعة (مواصفات المشروع) ── */
  --bg:         #F7F3EA;   /* Warm White — أبيض دافئ */
  --navy:       #102A43;   /* Deep Blue */
  --orange:     #D9822B;   /* Petroleum Orange */
  --steel:      #52606D;   /* Industrial Grey */

  /* ── مشتقات ── */
  --bg-alt:     #F1EBDD;
  --bg-soft:    #EFE7D6;
  --surface:    #FFFFFF;

  --navy-dk:    #0A1C2E;
  --navy-md:    #1B3A57;
  --navy-lt:    #E8EEF3;

  --orange-dk:  #B8671C;
  --orange-lt:  #FBEFE0;

  --ink:        var(--navy);
  --ink-dim:    var(--steel);
  --ink-sub:    #6B7785;

  --border:     #E2DACB;
  --border-hi:  #CDC2AC;

  --green:      #0B7A50;
  --green-lt:   #E7F5EF;

  --radius:     12px;
  --radius-sm:  7px;
  --radius-lg:  18px;

  --shadow-sm:  0 1px 2px rgba(16,42,67,.05), 0 1px 3px rgba(16,42,67,.06);
  --shadow:     0 2px 5px rgba(16,42,67,.05), 0 10px 28px rgba(16,42,67,.08);
  --shadow-lg:  0 6px 12px rgba(16,42,67,.06), 0 24px 56px rgba(16,42,67,.12);

  /* خطوط عربية: كوفي عناوين + Plex Sans متن */
  --head: 'Noto Kufi Arabic', 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --sans: 'IBM Plex Sans Arabic', 'Cairo', 'Noto Kufi Arabic', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;

  --wrap: 1200px;
  --nav-h: 76px;
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;          /* العربية تحتاج ارتفاع سطر أوسع من اللاتينية */
  letter-spacing: 0;          /* إلزامي للعربية */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-md); text-decoration: none; }
a:hover { color: var(--orange-dk); }

/* الكلمة الطويلة لا تكسر الحاوية: الفصل يقع عند الحاجة فقط. */
h1, h2, h3, h4 {
  font-family: var(--head);
  color: var(--navy);
  line-height: 1.45;
  margin: 0 0 .55em;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.7rem, 1.15rem + 2.1vw, 2.6rem); line-height: 1.4; }
h2 { font-size: clamp(1.35rem, 1.05rem + 1.15vw, 1.9rem); }
h3 { font-size: clamp(1.05rem, .95rem + .45vw, 1.22rem); font-weight: 600; }
h4 { font-size: 1.02rem; font-weight: 600; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.3em; padding-inline-end: 0; }
li { margin-bottom: .4em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ── أدوات ─────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px; }
.sec { padding: 76px 0; }
.sec-sm { padding: 50px 0; }
.sec-alt { background: var(--bg-alt); }
.sec-navy { background: var(--navy); color: #fff; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
/* عنصر «تخطَّ إلى المحتوى»: يُخفى بالإزاحة الرأسية لا الأفقية.
   السبب: في RTL تصبح inset-inline-start:-9999px إزاحةً يمينية تُولّد
   تمريراً أفقياً في الصفحة. الإزاحة الرأسية آمنة في الاتجاهين. */
.skip-link {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 999;
  transform: translateY(-130%);
  background: var(--navy); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: transform .15s;
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* الشارة الصغيرة فوق العنوان. لا تباعد أحرف ولا تحويل حالة: النص عربي. */
.eyebrow {
  display: inline-block; font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  letter-spacing: 0; color: var(--orange-dk);
  background: var(--orange-lt); border-radius: 100px;
  padding: 6px 15px; margin-bottom: 16px;
}
.sec-navy .eyebrow { background: rgba(217,130,43,.18); color: #F0B36A; }
.lead { font-size: 1.08rem; color: var(--ink-dim); max-width: 68ch; }
.sec-head { max-width: 820px; margin-bottom: 42px; }
.sec-head.center { margin-inline: auto; }
.sec-head p { color: var(--ink-dim); margin-bottom: 0; }
.sub { color: var(--ink-sub); font-size: .93rem; line-height: 1.75; }

/* ── الأزرار ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 15.5px; font-weight: 600; line-height: 1.3;
  padding: 14px 24px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s;
  text-align: center;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--orange-dk); color: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border-hi); }
.btn-outline:hover { border-color: var(--navy); background: var(--navy-lt); color: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--orange-dk); padding-inline: 0; }
.btn-ghost::after { content: '←'; transition: transform .18s; }
.btn-ghost:hover::after { transform: translateX(-4px); }
.btn-sm { padding: 10px 17px; font-size: 14.5px; }
.btn-lg { padding: 16px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── الترويسة (RTL: الشعار يمين، التنقل وسط، الدعوة يسار) ─────────
   موقع أحادي اللغة: لا يوجد مبدّل لغة ولا أي إشارة إلى نسخة إنجليزية. */
.site-header { position: sticky; top: 0; z-index: 100; }
.nav {
  background: rgba(247,243,234,.95); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; color: var(--ink-dim); font-size: 15px; font-weight: 500;
  padding: 9px 14px; border-radius: var(--radius-sm); transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--navy); background: var(--navy-lt); }
.nav-links a.active { color: var(--navy); font-weight: 700; background: var(--navy-lt); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-links a.nav-cta {
  background: var(--orange); color: #fff; font-weight: 700; padding: 12px 20px;
  margin-inline-start: 8px; box-shadow: var(--shadow-sm);
}
.nav-links a.nav-cta:hover { background: var(--orange-dk); color: #fff; }
.nav-burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ── الواجهة الرئيسية: النص يميناً والصورة يساراً (اتجاه القراءة) ── */
.hero { background: linear-gradient(180deg, #FBF8F1 0%, var(--bg) 78%); border-bottom: 1px solid var(--border); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; padding: 70px 0 58px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--orange-dk); }
.hero-sub { font-size: 1.1rem; color: var(--ink-dim); max-width: 58ch; margin-bottom: 30px; }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.hero-figure figcaption { margin-top: 12px; font-size: 13.5px; color: var(--ink-sub); display: flex; align-items: center; gap: 8px; }
.hero-figure figcaption::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ── أرقام الشركة (شريط داكن) ──────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--navy); padding: 26px 24px; }
/* القيم مختلطة (رقم + وحدة لاتينية): «14,000 m²» و«2 μm». داخل سياق RTL
   يعيد المتصفح ترتيب الرقم والوحدة فيظهر «m² 14,000» و«μm 2».
   الحل: عزل القيمة في <bdi dir="ltr"> فيُضبط ترتيبها الداخلي، وتبقى
   محاذاتها محاذاة السياق العربي (إلى اليمين) لا يسارية.
   لا تُستعمل direction:ltr على الكتلة نفسها: فهي تقلب محاذاة النص أيضاً. */
.num { direction: ltr; unicode-bidi: isolate; }
.stat-num { font-family: var(--head); font-size: 1.75rem; font-weight: 700; color: #F0B36A; line-height: 1.25; display: block; text-align: start; }
.stat-lbl { font-size: 14px; color: rgba(255,255,255,.82); margin-top: 8px; display: block; line-height: 1.65; }

/* ── الشرائط الداكنة (تقنية / قدرات التصنيع) ──────────────────── */
.band-navy { background: var(--navy); color: #fff; }
.band-navy h2, .band-navy h3 { color: #fff; }
.band-navy .lead, .band-navy p { color: rgba(255,255,255,.84); }
.band-navy .sub { color: rgba(255,255,255,.62); }
.band-navy .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.13); }
.band-navy .card:hover { background: rgba(255,255,255,.08); border-color: rgba(217,130,43,.55); box-shadow: none; }
.band-navy .card-ico { background: rgba(217,130,43,.18); color: #F0B36A; }
.band-navy a { color: #F0B36A; }
.band-navy a:hover { color: #fff; }

/* ── الشبكات والبطاقات ─────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--border-hi); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card-ico {
  width: 44px; height: 44px; border-radius: 10px; background: var(--orange-lt); color: var(--orange-dk);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-ico svg { width: 23px; height: 23px; }
.card-plain:hover { transform: none; box-shadow: none; border-color: var(--border-hi); }

/* ── بطاقات المنتجات ───────────────────────────────────────────── */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prod-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s;
  color: inherit;
}
.prod-card:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-3px); color: inherit; }
.prod-media { aspect-ratio: 16 / 10; background: var(--bg-alt); border-bottom: 1px solid var(--border); overflow: hidden; }
.prod-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:hover .prod-media img { transform: scale(1.035); }
.prod-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.prod-series { font-size: 12.5px; color: var(--ink-sub); margin-bottom: 10px; line-height: 1.6; }
.prod-title { font-family: var(--head); font-size: 1.03rem; font-weight: 700; color: var(--navy); margin: 0 0 10px; line-height: 1.5; }
/* رمز الطراز لاتيني: يُعرض دائماً LTR داخل سياق RTL */
.prod-title .model { color: var(--orange-dk); direction: ltr; unicode-bidi: isolate; display: inline-block; }
.prod-desc { font-size: 14.5px; color: var(--ink-dim); margin: 0 0 16px; flex: 1; line-height: 1.8; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
/* المقاييس التقنية لاتينية (m³/h · μm · MPa): تبقى LTR بعزل ثنائي الاتجاه */
.chip {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--navy);
  background: var(--navy-lt); border: 1px solid #D3DEE8; border-radius: 6px; padding: 4px 9px;
  direction: ltr; unicode-bidi: isolate;
}
.chip-plain { background: var(--bg-alt); border-color: var(--border); color: var(--ink-dim); }
.prod-media-line { font-size: 13.5px; color: var(--ink-sub); padding-top: 13px; border-top: 1px solid var(--border); display: flex; gap: 7px; flex-wrap: wrap; }
.prod-media-line b { color: var(--ink-dim); font-weight: 600; }
.prod-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12.5px; color: var(--ink-dim); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 100px; padding: 3px 11px; }

/* ── شرائح المسرد: مصطلح عربي + عدّاد طرازاته ───────────────────── */
/* لا نعيد استعمال .chip هنا: فهو يحمل direction:ltr عمداً لاستيعاب
   المقاييس اللاتينية (m³/h · μm · MPa). ولو حوى عنصرين عربيين لانقلب
   ترتيبهما فصار العدّاد يمين المصطلح. وهذه الشريحة بلا direction صريح،
   فيهبط عليها اتجاه الصفحة (rtl) ويبقى المصطلح يميناً والعدّاد يساره. */
.gl-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.gl-tag { font-size: 14px; color: var(--navy); background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 100px; padding: 6px 14px; }
.gl-tag b { color: var(--orange-dk); font-weight: 700; margin-inline-start: 7px; }

/* ── الجداول ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.spec caption { text-align: start; padding: 16px 20px; font-weight: 700; font-family: var(--head); border-bottom: 1px solid var(--border); }
table.spec th, table.spec td { padding: 13px 20px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
table.spec thead th { background: var(--bg-alt); font-family: var(--head); font-size: 13.5px; font-weight: 700; color: var(--ink-dim); letter-spacing: 0; }
table.spec tbody tr:last-child td { border-bottom: 0; }
table.spec tbody tr:nth-child(even) { background: #FCFBF7; }
table.spec td:first-child { font-weight: 500; color: var(--ink-dim); width: 38%; }
/* القيم الرقمية: العزل عبر .num، والمحاذاة تبقى محاذاة الجدول (بداية السطر) */
table.spec td.val { font-family: var(--mono); font-size: 14.5px; color: var(--navy); }

/* ── قائمة التحقق ──────────────────────────────────────────────── */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-inline-start: 32px; padding-inline-end: 0; margin-bottom: 13px; }
.check-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .5em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-lt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230B7A50'%3E%3Cpath d='M6.5 11.2 3.3 8l1.1-1.1 2.1 2.1 5-5L12.6 5z'/%3E%3C/svg%3E") center/13px no-repeat;
}
.band-navy .check-list li::before { background-color: rgba(11,122,80,.35); }

/* ── شريط الصور ────────────────────────────────────────────────── */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.photo-strip figcaption { font-size: 13.5px; color: var(--ink-sub); margin-top: 9px; }
.band-navy .photo-strip img { border-color: rgba(255,255,255,.16); }
.band-navy .photo-strip figcaption { color: rgba(255,255,255,.66); }

/* ── الصورتان المتجاورتان ─────────────────────────────────────── */
.side-col { display: grid; grid-template-columns: 1.45fr .85fr; gap: 46px; align-items: start; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.side-col > *, .two-col > *, .grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ── شريط الدعوة ───────────────────────────────────────────────── */
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 48px 50px; }
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.84); margin-bottom: 0; }
.cta-band .btn-primary { background: var(--orange); color: #fff; }
.cta-band .btn-primary:hover { background: var(--orange-dk); color: #fff; }
.cta-band .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.cta-band .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.cta-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 36px; flex-wrap: wrap; }
.cta-band-inner > div:first-child { max-width: 62ch; }

/* ── النماذج ───────────────────────────────────────────────────── */
.form-layout { display: grid; grid-template-columns: 1.35fr .85fr; gap: 40px; align-items: start; }
.form-layout > * { min-width: 0; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 34px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.field .req { color: #C02626; }
.field .hint { font-size: 13px; color: var(--ink-sub); font-weight: 400; margin-inline-start: 6px; }
.input, .select, .textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--navy);
  background: #fff; border: 1px solid var(--border-hi); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .16s, box-shadow .16s; text-align: start;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-lt); }
.textarea { min-height: 130px; resize: vertical; }
/* سهم القائمة يتبع جهة النهاية: inline-end بدل right الثابتة */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%2352606D'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2352606D' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; background-size: 12px;
  padding-inline-start: 14px; padding-inline-end: 40px;
}
[dir="ltr"] .select { background-position: right 14px center; padding-inline-start: 14px; padding-inline-end: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--ink-dim); min-height: 24px; }
.consent input { width: 18px; height: 18px; margin-top: 4px; flex-shrink: 0; accent-color: var(--orange); }
/* رسائل النموذج: تُخفى بسمة hidden وحدها، ولا يجوز إضافة display:none في
   قاعدة المؤلّف — لأن قاعدة المؤلّف تتقدّم على قاعدة المتصفّح [hidden]{...}
   فيبقى العنصر مخفياً حتى بعد إزالة السمة، فتضيع رسالة الخطأ/النجاح كلياً.
   (عيب مُكتشَف ومُصلَح: كانت الرسائل تُكتب في DOM ولا تظهر أبداً.) */
[hidden] { display: none !important; }
.form-error { background: #FDECEC; border: 1px solid #F3C6C6; color: #8E2020; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14.5px; margin-bottom: 18px; }
.form-error.is-invalid { border-color: #C02626; }
.form-success { background: var(--green-lt); border: 1px solid #BFE5D4; border-radius: var(--radius); padding: 26px 28px; }
.form-success h3 { color: var(--green); margin-bottom: .4em; }
.form-success p { color: var(--ink-dim); font-size: 14.5px; }
.input.is-invalid, .textarea.is-invalid { border-color: #C02626; box-shadow: 0 0 0 3px #F8DEDE; }
/* حقل المصيدة (honeypot) — يُخفى بالتقصيص لا بإزاحة سالبة، لنفس سبب
   .skip-link أعلاه: الإزاحة السالبة تنعكس يميناً في RTL وتوسّع الصفحة. */
.hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* ── التذييل ───────────────────────────────────────────────────── */
.footer { background: var(--navy); color: rgba(255,255,255,.8); }
.footer h3 { color: #fff; font-size: 14px; margin: 0 0 15px; font-weight: 700; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 58px 24px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand img { height: 44px; width: auto; margin-bottom: 16px; background: #fff; padding: 7px 11px; border-radius: 8px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,.66); max-width: 36ch; line-height: 1.8; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer a { color: rgba(255,255,255,.8); font-size: 14.5px; display: inline-block; padding: 3px 0; }
.footer a:hover { color: #F0B36A; }
.footer-contact dt { font-size: 12.5px; color: rgba(255,255,255,.55); margin-bottom: 2px; }
.footer-contact dd { margin: 0 0 14px; font-size: 14.5px; color: rgba(255,255,255,.8); line-height: 1.7; }
/* القيم اللاتينية (هاتف/بريد/واتساب) تُعزل بـ <bdi dir="ltr"> عند التوليد،
   فلا حاجة لقلب اتجاه الخلية — وبذلك تبقى محاذاتها يمنى كما محاذاة التسمية. */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); max-width: var(--wrap); margin: 0 auto;
  padding: 20px 24px 34px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13.5px; color: rgba(255,255,255,.6);
}
.footer-bottom a { display: inline-block; padding: 3px 0; color: rgba(255,255,255,.8); }
.footer-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-tags span { font-size: 12px; color: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.18); border-radius: 5px; padding: 3px 9px; }

/* ── أزرار عائمة: تُثبَّت في الجهة المقابلة لاتجاه النص ───────── */
.fab-stack {
  position: fixed; inset-inline-start: 20px; inset-inline-end: auto; bottom: 20px; z-index: 92;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  pointer-events: none;
}
.fab-stack > * { pointer-events: auto; }
.fab {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid transparent; border-radius: 100px; padding: 12px 18px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; line-height: 1.3;
  box-shadow: var(--shadow-lg); cursor: pointer; text-decoration: none;
  transition: background-color .18s ease, transform .18s ease;
}
.fab svg { width: 20px; height: 20px; flex: 0 0 auto; }
.fab:hover { transform: translateY(-2px); }
.fab-ask { background: var(--orange); color: #fff; }
.fab-ask:hover { background: var(--orange-dk); color: #fff; }
.fab-wa { background: var(--green); color: #fff; }
.fab-wa:hover { background: #095F3E; color: #fff; }
.fab-clearance { height: 0; }
@media (max-width: 940px) { .fab-clearance { height: 128px; } }

/* ── نافذة الاستشارة السريعة ─────────────────────────────────────
   تعتمد <dialog> الأصلية (showModal) فتوفّر حبس التركيز، وإغلاقاً بمفتاح
   Escape، وطبقة ::backdrop — بلا أي مكتبة خارجية. كل المواضع منطقية
   (inline-end) لا فيزيائية، فينعكس التخطيط تلقائياً في سياق RTL:
   زرّ الإغلاق ينتقل إلى أعلى اليسار، والحشو الداخلي يُحسب من جهة النهاية. */
.qa {
  border: none; padding: 0; margin: auto; background: transparent;
  width: calc(100% - 32px); max-width: 520px;
  max-height: calc(100vh - 32px); border-radius: var(--radius-lg);
}
.qa::backdrop { background: rgba(16,42,67,.52); }
.qa-inner {
  position: relative; background: #fff; border-radius: var(--radius-lg);
  padding: 30px 30px 26px; overflow-y: auto; max-height: calc(100vh - 32px);
}
.qa h2 { font-size: 1.35rem; margin: 0 0 8px; padding-inline-end: 40px; }
.qa-lead { font-size: 14.5px; color: var(--ink-dim); margin: 0 0 20px; }
.qa-close {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; background: #fff;
  color: var(--ink-dim); font-size: 22px; line-height: 1; cursor: pointer;
}
.qa-close:hover { background: var(--bg-soft); color: var(--ink); }
.qa .textarea { min-height: 104px; }
.qa-alt { font-size: 13.5px; color: var(--ink-sub); margin: 16px 0 0; }
.qa .mini { margin-top: 12px; }
@media (max-width: 480px) { .qa-inner { padding: 26px 20px 22px; } }

/* ── الاستجابة ─────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 940px) {
  :root { --nav-h: 68px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: absolute; inset-inline: 0; top: var(--nav-h); display: none;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 10px 16px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .nav-links a.nav-cta { margin: 10px 0 0; text-align: center; }
  .nav-inner { position: relative; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 48px; }
  .hero-figure { order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .two-col, .side-col, .form-layout { grid-template-columns: 1fr; gap: 30px; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 36px 28px; }
  .sec { padding: 54px 0; }
}
@media (max-width: 680px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  /* الشريط على الجوال: شعار + زر القائمة فقط (لا مبدّل لغة في موقع أحادي اللغة). */
  .nav-logo img { height: 38px; }
  .nav-inner { padding: 0 18px; gap: 12px; }
  .sec { padding: 46px 0; }
  .stats { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4, .prod-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 24px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 18px 24px; }
  .footer-bottom { padding: 18px 18px 28px; }
  .photo-strip { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .fab-stack { inset-inline-start: 14px; }
  .fab { padding: 11px 15px; font-size: 13.5px; gap: 8px; }
  .fab svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .nav, .footer, .fab-stack, .btn { display: none !important; }
  body { font-size: 12pt; }
}

/* ── أدوات مسافات ─────────────────────────────────────────────── */
.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}
.mt-28{margin-top:28px}.mt-34{margin-top:34px}.mt-44{margin-top:44px}
.mb-22{margin-bottom:22px}.mb-26{margin-bottom:26px}.mb-34{margin-bottom:34px}
.m-0{margin:0}.mx-auto{margin-inline:auto}.center-x{justify-content:center}
.chips-block{margin:18px 0}.prose{max-width:80ch}

/* ═══════════════════════════════════════════════════════════════════
   مكوّنات الصفحات الداخلية (المرحلة الثالثة)
   ملاحظة RTL: كل الهوامش تُكتب بصيغة منطقية، والمحاذاة بـ text-align:start.
   ═══════════════════════════════════════════════════════════════════ */

/* ── مسار التنقّل (Breadcrumb) ─────────────────────────────────── */
.crumbs { padding: 16px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-sub); }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: '‹'; color: var(--border-hi); font-size: 15px; }
.crumbs a { color: var(--ink-sub); }
.crumbs a:hover { color: var(--orange-dk); }
.crumbs [aria-current] { color: var(--navy); font-weight: 600; }

/* ── ترويسة الصفحة الداخلية ─────────────────────────────────────── */
.page-head { background: var(--navy); color: #fff; padding: 34px 0 44px; margin-bottom: 0; }
.page-head h1 { color: #fff; margin: 6px 0 14px; max-width: 26ch; }
.page-head .lead { color: rgba(255,255,255,.84); max-width: 72ch; margin: 0; }
.page-head .eyebrow { color: #F0B36A; }
.page-head .eyebrow::before { background: #F0B36A; }
.crumbs.on-navy { padding: 18px 0 0; }
.crumbs.on-navy ol, .crumbs.on-navy a { color: rgba(255,255,255,.62); }
.crumbs.on-navy [aria-current] { color: #fff; }

/* ── شريط مؤشّرات المنتج ───────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 26px 0 0; }
.kpi { background: #fff; padding: 18px 20px; }
.kpi-num { display: block; font-family: var(--head); font-size: 1.25rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.kpi-lbl { display: block; font-size: 13.5px; color: var(--ink-sub); margin-top: 6px; line-height: 1.6; }
.kpi-num.ltr, .ltr { direction: ltr; unicode-bidi: isolate; }

/* ── مرشّح التصنيفات في صفحة المنتجات ───────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.filter-btn { font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink-dim); background: #fff; border: 1px solid var(--border-hi); border-radius: 100px; padding: 9px 17px; cursor: pointer; transition: background-color .16s, color .16s, border-color .16s; }
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── كتلة تصنيف داخل صفحة المنتجات ─────────────────────────────── */
.cat-block { padding: 46px 0 8px; }
.cat-block + .cat-block { border-top: 1px solid var(--border); }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 24px; }
.cat-head h2 { margin: 0; font-size: 1.5rem; }
.cat-count { font-size: 13.5px; color: var(--ink-sub); }
.cat-desc { flex-basis: 100%; color: var(--ink-dim); margin: 4px 0 0; max-width: 74ch; }

/* ── شبكة الطرازات المرتبطة ────────────────────────────────────── */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 24px; }
.rel-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; transition: border-color .16s, box-shadow .16s, transform .16s; }
.rel-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow); transform: translateY(-2px); }
.rel-card .model { display: block; font-family: var(--head); font-weight: 700; color: var(--orange-dk); font-size: 15px; }
.rel-card strong { display: block; color: var(--navy); font-size: 15.5px; line-height: 1.55; margin: 6px 0 8px; }
.rel-card p { margin: 0; font-size: 14px; color: var(--ink-sub); line-height: 1.7; }

/* ── قائمة الخطوات / المراحل ───────────────────────────────────── */
.steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step { background: #fff; padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start; }
.step-n { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--orange-lt); color: var(--orange-dk); font-family: var(--head); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.step h3 { margin: 4px 0 0; font-size: 1.05rem; }
.step p { margin: 0; color: var(--ink-dim); font-size: 15px; line-height: 1.8; }
.step-time { font-family: var(--mono); font-size: 12.5px; color: var(--orange-dk); background: var(--orange-lt); border-radius: 100px; padding: 3px 10px; display: inline-block; }

/* ── الأسئلة المتكرّرة (details/summary) ───────────────────────── */
.faq { margin-top: 24px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--navy); font-size: 16px; line-height: 1.65; list-style: none; display: flex; gap: 14px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+'; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-lt); color: var(--navy); font-family: var(--head); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-top: 2px; }
.faq details[open] summary::before { content: '–'; background: var(--orange); color: #fff; }
.faq details[open] summary { color: var(--orange-dk); }
.faq .faq-a { padding: 0 22px 20px 58px; color: var(--ink-dim); line-height: 1.85; margin: 0; }
@media (max-width: 680px) { .faq .faq-a { padding-inline-start: 22px; } }

/* ── معرض صور المنتج ───────────────────────────────────────────── */
.gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 20px; }
.gal figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gal img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.gal figcaption { font-size: 13px; color: var(--ink-sub); padding: 10px 14px; line-height: 1.6; }

/* ── صندوق ملاحظة / حدود التطبيق ───────────────────────────────── */
.note-box { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; background: var(--orange-lt); border: 1px solid #EBD3B4; border-radius: var(--radius); padding: 20px 22px; margin-top: 26px; }
.note-box .nb-ico { width: 26px; height: 26px; color: var(--orange-dk); }
.note-box h3 { margin: 2px 0 6px; font-size: 1rem; color: var(--orange-dk); }
.note-box p { margin: 0; color: #6B4A1F; line-height: 1.85; grid-column: 2; }

/* ── نص طويل منظّم ─────────────────────────────────────────────── */
.prose h2 { margin-top: 46px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { line-height: 1.9; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 8px; }
.prose .note-box { margin-top: 22px; }

/* ── بطاقات معلومات التواصل ────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 22px; }
.info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.info-card .card-ico { margin-bottom: 12px; }
.info-card dt { font-size: 12.5px; color: var(--ink-sub); }
.info-card dd { margin: 2px 0 12px; font-size: 15px; color: var(--navy); line-height: 1.7; }
.info-card dd:last-child { margin-bottom: 0; }

/* ── رقائق مرساة للتنقّل داخل الصفحة ───────────────────────────── */
.anchor-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.anchor-nav a { font-size: 14px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--border-hi); border-radius: 100px; padding: 8px 15px; }
.anchor-nav a:hover { border-color: var(--orange); color: var(--orange-dk); }

/* ── شريط علوي ثانوي للتصنيفات ─────────────────────────────────── */
.subnav { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.subnav .wrap { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 10px; padding-bottom: 10px; }
.subnav a { font-size: 14.5px; color: var(--ink-dim); padding: 7px 13px; border-radius: 100px; }
.subnav a:hover { background: #fff; color: var(--navy); }

/* ── نص صغير ───────────────────────────────────────────────────── */
.mini { font-size: 13.5px; color: var(--ink-sub); line-height: 1.75; }

/* ── مخفيّ بصرياً، مقروء لقارئات الشاشة ────────────────────────── */
/* يُستعمل لـ <caption> في الجداول: الوصف ضروري لقارئ الشاشة ولا يُكرَّر
   بصرياً لأنّ العنوان المرئي فوق الجدول يقوم بالمهمة. */
.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; }
