/* =====================================================================
   site.css — نظام تصميم موقع لمسة اللؤلؤ (الوضع الليلي)
   مأخوذ من تطبيق لمسة اللؤلؤ: lib/core/app_theme.dart
   ===================================================================== */

/* ---------- 1. المتغيرات ---------- */
:root {
  /* الهوية */
  --navy: #163A5F;
  --navy-deep: #0F2742;
  --petrol: #009999;
  --teal: #1FB5B5;
  --teal-soft: rgba(31, 181, 181, 0.14);
  --teal-line: rgba(31, 181, 181, 0.35);
  --gold: #D4A72C;
  --gold-soft: rgba(212, 167, 44, 0.14);
  --wa: #25D366;
  --danger: #D64545;
  --sale: #FF6B67;
  --ok: #5FDC9F;

  /* السطوح */
  --bg: #0B1220;
  --surface: #121B2B;
  --surface-2: #172235;
  --surface-3: #1B273B;
  --border: #223047;
  --border-hi: #2E4260;
  --text: #E7EDF5;
  --muted: #94A3B8;
  --faint: #64748B;

  /* التدرّج الليلي (نفس روح النهاري) */
  --g-top: #0F2742;
  --g-mid: #0A5A73;
  --g-end: #0E7C7B;
  --grad: linear-gradient(135deg, var(--g-top) 0%, var(--g-mid) 62%, var(--g-end) 100%);
  --grad-btn: linear-gradient(135deg, var(--g-mid), var(--g-end));

  /* الأبعاد */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 26px; --r-2xl: 38px; --r-pill: 999px;
  --header-h: 68px;
  --container: 1200px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* أسماء قديمة تستعملها سكربتات وصفحات سابقة (ai.html و products.js) */
  --bg2: var(--surface);
  --bg3: var(--surface-2);
  --white: var(--text);
  --gray: var(--muted);
  --gray-dim: var(--faint);
  --glass: var(--surface);
  --glass-border: var(--border);
  --teal-dim: var(--teal-soft);
  --gold-dim: var(--gold-soft);
  --red: var(--danger);
  --radius: var(--r-sm);
  --radius-lg: var(--r-lg);
  --transition: 0.25s var(--ease);
}

/* ---------- 2. الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; letter-spacing: 0; }
::selection { background: rgba(31, 181, 181, 0.3); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 2px solid var(--bg); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 88px; }
.section-tight { padding-block: 56px; }
main { display: block; }

/* ---------- 3. عناوين الأقسام ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal); font-size: 0.82rem; font-weight: 600; margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--gold)); }
html[dir="rtl"] .eyebrow::before { background: linear-gradient(270deg, var(--teal), var(--gold)); }
.sec-title { font-size: clamp(1.55rem, 2.6vw, 2.15rem); color: var(--text); }
.sec-sub { color: var(--muted); margin-top: 8px; max-width: 620px; font-size: 1rem; }
.sec-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 600; font-size: 0.92rem;
  padding: 8px 4px; white-space: nowrap;
}
.sec-link svg { transition: transform 0.2s; }
html[dir="rtl"] .sec-link svg, html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sec-link:hover svg { transform: translateX(4px); }
html[dir="rtl"] .sec-link:hover svg { transform: scaleX(-1) translateX(4px); }

/* ---------- 4. الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 12px 24px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; white-space: nowrap;
  border: 1.2px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary, .btn-teal { background: var(--grad-btn); color: #fff; box-shadow: 0 8px 22px rgba(14, 124, 123, 0.32); }
.btn-primary:hover, .btn-teal:hover { box-shadow: 0 10px 28px rgba(14, 124, 123, 0.5); transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost, .btn-outline { border-color: var(--border-hi); color: var(--text); background: transparent; }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn-light { background: #fff; color: var(--g-mid); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.btn-light:hover { transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(37, 211, 102, 0.28); }
.btn-wa:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-gold { background: var(--gold-soft); border-color: rgba(212, 167, 44, 0.45); color: var(--gold); }
.btn-gold:hover { background: rgba(212, 167, 44, 0.22); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.8rem; font-weight: 500; white-space: nowrap;
  transition: 0.2s;
}
a.chip:hover, button.chip:hover { color: var(--text); border-color: var(--teal); background: var(--teal-soft); }
.chip-teal { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.chip-gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip-ok { background: rgba(30, 158, 106, 0.14); color: var(--ok); border-color: transparent; }
.chip-no { background: rgba(214, 69, 69, 0.14); color: #ff8d8a; border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-pad { padding: 24px; }
.icon-box {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-soft); color: var(--teal);
}
.icon-box.gold { background: var(--gold-soft); color: var(--gold); }
.icon-box.wa { background: rgba(37, 211, 102, 0.14); color: var(--wa); }

/* ---------- 5. الشريط العلوي ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--grad);
  transition: box-shadow 0.3s, background 0.3s;
}
.site-header.scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand-logo { height: 40px; width: auto; }
.brand-siemens { height: 30px; width: auto; background: #fff; border-radius: 8px; padding: 5px 10px; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 10px; }
.nav > a, .nav-drop > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--r-pill);
  color: rgba(255, 255, 255, 0.86); font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav > a:hover, .nav-drop > a:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, 0.2); color: #fff; font-weight: 600; }
.nav-drop { position: relative; }
.nav-drop .caret { transition: transform 0.2s; opacity: 0.8; }
.nav-drop:hover .caret, .nav-drop:focus-within .caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 270px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 8px; box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: 0.2s var(--ease);
}
.nav-menu::before { content: ''; position: absolute; inset-inline: 0; top: -12px; height: 12px; }
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); font-size: 0.9rem; }
.nav-menu a:hover { background: var(--surface-2); }
.nav-menu .icon-box { width: 36px; height: 36px; border-radius: 10px; }
.nav-menu small { display: block; color: var(--muted); font-size: 0.74rem; line-height: 1.4; }

.header-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.header-search { position: relative; width: 260px; transition: width 0.3s var(--ease); }
.header-search:focus-within { width: 330px; }
.header-search input {
  width: 100%; height: 42px;
  padding-inline: 42px 16px;
  background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill); color: #fff; font-size: 0.88rem; outline: none;
  transition: background 0.2s, border-color 0.2s;
}
.header-search input::placeholder { color: rgba(255, 255, 255, 0.7); }
.header-search input:focus { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.5); }
.header-search > svg { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.8); pointer-events: none; }
.lang-btn {
  height: 42px; min-width: 52px; padding: 0 14px;
  border: 1.2px solid rgba(255, 255, 255, 0.35); border-radius: var(--r-pill);
  color: #fff; font-weight: 700; font-size: 0.85rem; transition: background 0.2s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.15); }
.header-wa { height: 42px; min-height: 42px; padding: 0 16px; font-size: 0.86rem; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; color: #fff; align-items: center; justify-content: center; }
.menu-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* القائمة الجانبية للجوال */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.6); backdrop-filter: blur(3px); z-index: 1100; opacity: 0; visibility: hidden; transition: 0.25s; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 1101;
  width: min(360px, 88vw); background: var(--surface); border-inline-start: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s var(--ease);
}
html[dir="rtl"] .drawer { transform: translateX(-100%); }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--grad); }
.drawer-head img { height: 34px; }
.drawer-close { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: rgba(255, 255, 255, 0.15); }
.drawer-body { padding: 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.drawer-search { position: relative; margin-bottom: 10px; }
.drawer-search input { width: 100%; height: 48px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); padding-inline: 44px 16px; outline: none; }
.drawer-search input:focus { border-color: var(--teal); }
.drawer-search > svg { position: absolute; inset-inline-start: 16px; top: 24px; transform: translateY(-50%); color: var(--muted); }
.drawer-search .search-results { position: static; margin-top: 8px; box-shadow: none; }
.drawer-body > a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); font-weight: 500; }
.drawer-body > a:hover, .drawer-body > a.active { background: var(--surface-2); color: var(--teal); }
.drawer-body > a svg { color: var(--muted); }
.drawer-label { color: var(--faint); font-size: 0.75rem; font-weight: 600; padding: 12px 14px 4px; }
.drawer-foot { padding: 16px 18px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.drawer-foot .lang-btn { border-color: var(--border-hi); }
.drawer-foot .btn { flex: 1; }

/* ---------- 6. نتائج البحث الحي ---------- */
.search-results {
  position: absolute; top: calc(100% + 10px); inset-inline: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  max-height: 440px; overflow-y: auto; display: none; text-align: start;
}
.search-results.visible { display: block; }
.header-search .search-results { width: 420px; inset-inline: auto 0; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover, .sr-item:focus-visible, .sr-item.kb { background: var(--surface-2); outline: none; }
.sr-thumb { width: 48px; height: 48px; flex-shrink: 0; background: #fff; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sr-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sr-model { font-weight: 700; color: var(--teal); font-size: 0.9rem; direction: ltr; unicode-bidi: plaintext; text-align: start; }
.sr-desc { color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-cat { color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.7rem; white-space: nowrap; }
.search-results mark { background: rgba(31, 181, 181, 0.24); color: #fff; border-radius: 3px; padding: 0 2px; }
.sr-state { padding: 22px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.sr-state .spin { margin-inline-end: 8px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-hi); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 7. الهيرو (الرئيسية) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 72px) 0 120px;
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  background: var(--g-top);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url('../images/slide-company.jpg') center / cover no-repeat; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.15) 0%, rgba(11, 18, 32, 0.0) 40%, rgba(11, 18, 32, 0.75) 100%),
    linear-gradient(var(--hero-dir, 270deg), rgba(15, 39, 66, 0.97) 0%, rgba(15, 39, 66, 0.86) 42%, rgba(10, 90, 115, 0.35) 75%, rgba(14, 124, 123, 0.15) 100%);
}
html[dir="ltr"] .hero { --hero-dir: 90deg; }
.hero-inner { max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 8px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 0.85rem; font-weight: 500; backdrop-filter: blur(6px);
}
html[dir="rtl"] .hero-badge { padding: 7px 8px 7px 16px; }
.hero-badge img { height: 22px; background: #fff; border-radius: 6px; padding: 3px 8px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); color: #fff; margin: 22px 0 16px; line-height: 1.22; }
.hero h1 em { font-style: normal; color: #7FE3E3; }
.hero-lead { color: rgba(231, 237, 245, 0.85); font-size: clamp(1rem, 1.5vw, 1.12rem); max-width: 560px; }
.hero-search { position: relative; margin-top: 30px; max-width: 600px; }
.hero-search-box {
  display: flex; align-items: center; gap: 10px;
  height: 62px; padding-inline: 22px 8px;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: var(--r-pill);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search-box:focus-within { border-color: var(--teal); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 0 4px var(--teal-soft); }
.hero-search-box > svg { color: var(--muted); flex-shrink: 0; }
.hero-search-box input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); font-size: 1rem; }
.hero-search-box input::placeholder { color: var(--muted); }
.hero-search-box input::-webkit-search-cancel-button { display: none; }
.hero-search-box .btn { min-height: 46px; padding: 10px 22px; }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.hero-tags span { color: rgba(231, 237, 245, 0.65); font-size: 0.82rem; margin-inline-end: 4px; }
.hero-tags button {
  padding: 5px 13px; border-radius: var(--r-pill); font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
  transition: background 0.2s; direction: ltr;
}
.hero-tags button:hover { background: rgba(255, 255, 255, 0.18); }

/* الاختصارات فوق حافة الهيرو */
.quick { position: relative; z-index: 3; margin-top: -64px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px; min-height: 92px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--teal-line); }
.quick-card b { display: block; font-size: 0.98rem; color: var(--text); }
.quick-card small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.45; margin-top: 2px; }

/* ---------- 8. الأرقام ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; position: relative; }
.stat + .stat::before { content: ''; position: absolute; inset-inline-start: 0; top: 24px; bottom: 24px; width: 1px; background: var(--border); }
.stat-n { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: var(--text); line-height: 1.1; direction: ltr; unicode-bidi: isolate; }
.stat-n span { color: var(--teal); }
.stat-l { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }

/* ---------- 9. بطاقات الأقسام (بنسبة صور الأقسام 3424×1248) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cat {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 3424 / 1248; min-height: 190px;
  border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface);
}
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.7s var(--ease); }
.cat::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 14, 26, 0.94) 0%, rgba(8, 14, 26, 0.55) 45%, rgba(8, 14, 26, 0.05) 100%); }
.cat:hover img { transform: scale(1.05); }
.cat:hover { border-color: var(--teal-line); }
.cat-body { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cat h3 { color: #fff; font-size: 1.28rem; }
.cat p { color: rgba(231, 237, 245, 0.75); font-size: 0.84rem; margin-top: 3px; direction: ltr; unicode-bidi: plaintext; text-align: start; }
.cat-count { position: absolute; top: 18px; inset-inline-start: 18px; background: rgba(11, 18, 32, 0.6); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); }
.cat-go {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
  backdrop-filter: blur(6px); transition: background 0.25s, transform 0.25s;
}
.cat:hover .cat-go { background: var(--teal); border-color: var(--teal); }
html[dir="rtl"] .cat-go svg { transform: scaleX(-1); }

/* ---------- 10. بطاقة المنتج المربعة ---------- */
.products-grid-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 16px; }
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--teal-line); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
.pcard-img { position: relative; margin: 10px 10px 0; aspect-ratio: 1 / 1; background: #fff; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform 0.45s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-ph { color: #b9c4d2; }
.pcard-badge { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; background: #E53935; color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); direction: ltr; }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 4px; flex: 1; }
.pcard-model { font-weight: 700; font-size: 0.93rem; color: var(--teal); direction: ltr; unicode-bidi: plaintext; text-align: start; word-break: break-word; }
html[dir="rtl"] .pcard-model { text-align: right; }
.pcard-name { font-size: 0.82rem; color: var(--text); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.55em; }
.pcard-price { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-top: 2px; }
.pcard-price .old { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: 0.78rem; margin-inline-start: 6px; }
.pcard-price.sale { color: var(--sale); }
.pcard-price.ask { color: var(--gold); font-weight: 600; font-size: 0.8rem; }
.pcard-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.76rem; margin-top: 4px; }
.pcard-hint svg:last-child { margin-inline-start: auto; }
html[dir="rtl"] .pcard-hint svg:last-child { transform: scaleX(-1); }
.pcard:hover .pcard-hint { color: var(--teal); }
.pcard-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.pcard-link:focus-visible { outline-offset: -3px; }
.pcard-cta { position: relative; z-index: 2; margin: 8px 12px 12px; min-height: 42px; padding: 8px 14px; font-size: 0.85rem; }
.pcard-skel, .skel { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.pcard-skel { height: 340px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* شريط أفقي للمنتجات */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 4px 2px 18px; scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail-nav { display: flex; gap: 8px; }
.rail-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-hi); color: var(--text); display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.rail-btn:hover { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
html[dir="rtl"] .rail-btn svg { transform: scaleX(-1); }

/* ---------- 11. الطلب بثلاث خطوات ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 26px; }
.step-n {
  position: absolute; top: 22px; inset-inline-end: 22px;
  font-size: 2.6rem; font-weight: 700; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px var(--border-hi);
}
.step h3 { font-size: 1.08rem; margin: 18px 0 6px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- 12. الشهادات ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cert { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.cert-top { display: flex; align-items: center; gap: 14px; }
.cert-top b { display: block; font-size: 1.06rem; direction: ltr; unicode-bidi: plaintext; text-align: start; }
.cert-top small { color: var(--muted); font-size: 0.82rem; }
.cert-rows { display: grid; gap: 0; }
.cert-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.cert-row:last-child { border-bottom: 0; }
.cert-row > span:first-child { color: var(--muted); }
.cert-row > span:last-child { font-weight: 500; text-align: end; }
.cert .btn { margin-top: auto; }

/* ---------- 13. المزايا ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { display: flex; gap: 16px; padding: 22px; }
.feat h3 { font-size: 1rem; margin-bottom: 4px; }
.feat p { color: var(--muted); font-size: 0.88rem; line-height: 1.65; }

/* ---------- 14. شريط الدعوة ---------- */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--grad); border-radius: var(--r-xl);
  padding: 52px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta::before, .cta::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.cta::before { width: 280px; height: 280px; top: -120px; inset-inline-end: -60px; }
.cta::after { width: 180px; height: 180px; bottom: -90px; inset-inline-start: 30%; }
.cta h2 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.cta p { color: rgba(255, 255, 255, 0.82); margin-top: 6px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 15. التذييل ---------- */
.site-footer { margin-top: 32px; background: var(--g-top); border-radius: var(--r-2xl) var(--r-2xl) 0 0; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-brand img.logo { height: 44px; margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 330px; }
.footer-siemens { height: 30px; background: #fff; border-radius: 8px; padding: 5px 10px; margin-top: 18px; }
.footer-col h4 { font-size: 0.92rem; color: var(--text); margin-bottom: 16px; }
.footer-col nav { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col p { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--teal); }
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact a, .footer-contact p { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact svg { flex-shrink: 0; margin-top: 4px; color: var(--teal); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--muted); transition: 0.2s; }
.socials a:hover { color: #fff; border-color: var(--teal); background: var(--teal-soft); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 20px 0 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 0.8rem; }

/* ---------- 16. زر الأعلى + واتساب العائم + شريط الجوال ---------- */
.to-top {
  position: fixed; bottom: 26px; inset-inline-end: 24px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-hi); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.25s;
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--teal); }
.fab-wa {
  position: fixed; bottom: 26px; inset-inline-start: 24px; z-index: 900;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 20px 0 16px; border-radius: var(--r-pill);
  background: var(--wa); color: #fff; font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35); transition: transform 0.2s;
}
html[dir="rtl"] .fab-wa { padding: 0 16px 0 20px; }
.fab-wa:hover { transform: translateY(-2px); }
.tabbar { display: none; }

/* ---------- 17. رأس الصفحات الداخلية ---------- */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--grad);
  padding: calc(var(--header-h) + 44px) 0 64px;
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
}
.page-head::before, .page-head::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.page-head::before { width: 340px; height: 340px; top: -160px; inset-inline-start: -80px; }
.page-head::after { width: 220px; height: 220px; bottom: -120px; inset-inline-end: 12%; }
.page-head h1, .level-title { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; unicode-bidi: plaintext; }
.page-head p, .level-subtitle { color: rgba(255, 255, 255, 0.82); margin-top: 8px; max-width: 640px; }
.page-head.has-overlap { padding-bottom: 96px; }
.overlap { position: relative; z-index: 2; margin-top: -56px; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: 0.85rem; }
.breadcrumb-item { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.75); cursor: pointer; unicode-bidi: plaintext; }
.breadcrumb-item:hover { color: #fff; }
.breadcrumb-item.active { color: #fff; font-weight: 600; cursor: default; }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.45); }

/* ---------- 18. صفحة المنتجات (التصفح الهرمي) ---------- */
.drill-search-bar { display: none; margin-top: 22px; }
.drill-search-bar.visible { display: block; }
.drill-search-wrap { position: relative; max-width: 560px; }
.drill-search-input {
  width: 100%; height: 54px; padding-inline: 48px 20px;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: var(--r-pill);
  color: var(--text); outline: none; font-size: 0.95rem;
}
.drill-search-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.drill-search-wrap svg { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.cat-chips a { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.cat-chips a:hover, .cat-chips a.on { background: #fff; color: var(--g-mid); border-color: #fff; }

#drill-content { padding-top: 36px; min-height: 40vh; }
.drill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding-bottom: 20px; }
.drill-grid:has(.drill-cat-card) { grid-template-columns: repeat(2, 1fr); }
.drill-cat-card {
  position: relative; overflow: hidden; isolation: isolate; cursor: pointer;
  aspect-ratio: 3424 / 1248; min-height: 180px;
  border-radius: var(--r-xl); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.drill-cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.7s var(--ease); }
.drill-cat-card:hover img { transform: scale(1.05); }
.drill-cat-card:hover { border-color: var(--teal-line); }
.drill-cat-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 14, 26, 0.94) 0%, rgba(8, 14, 26, 0.5) 50%, rgba(8, 14, 26, 0.05) 100%); }
.drill-cat-content { padding: 22px 24px; }
.drill-cat-content h3 { color: #fff; font-size: 1.25rem; }
.drill-cat-content p { color: rgba(231, 237, 245, 0.75); font-size: 0.84rem; margin: 2px 0 12px; }
.drill-cat-count { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.76rem; backdrop-filter: blur(6px); }

.drill-sub-card {
  display: flex; flex-direction: column; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.drill-sub-card:hover { transform: translateY(-3px); border-color: var(--teal-line); }
.drill-sub-img-wrap { height: 180px !important; margin: 10px 10px 0; border-radius: var(--r-md); background: #fff !important; overflow: hidden; }
.drill-sub-img-wrap img { padding: 18px !important; transition: transform 0.45s var(--ease); }
.drill-sub-card:hover .drill-sub-img-wrap img { transform: scale(1.05); }
.drill-sub-card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.drill-sub-card > .drill-sub-card-title { padding: 20px 18px 0; }
.drill-sub-card > .drill-sub-card-count, .drill-sub-card > .drill-sub-card-arrow { padding-inline: 18px; }
.drill-sub-card > .drill-sub-card-arrow { padding-bottom: 18px; }
.drill-sub-card-title { font-weight: 700; font-size: 1rem; color: var(--text); unicode-bidi: plaintext; text-align: start; }
.drill-sub-card-count { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; }
.drill-sub-card-arrow { margin-top: auto; padding-top: 6px; color: var(--teal); font-size: 0.84rem; font-weight: 600; }
.drill-products-section { padding-bottom: 20px; }
.drill-products-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; }
.drill-products-topbar strong { color: var(--teal) !important; }
.drill-empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.drill-empty svg { margin-inline: auto; }

.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.page-btn { min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; transition: 0.2s; }
.page-btn:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.page-btn.active { background: var(--grad-btn); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- 19. صفحة المنتج ---------- */
.pd-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
.pd-media {
  position: sticky; top: calc(var(--header-h) + 20px);
  aspect-ratio: 1 / 1; background: #fff; border-radius: var(--r-xl); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}
.pd-media img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.pd-media .pcard-badge { top: 16px; inset-inline-start: 16px; font-size: 0.85rem; padding: 5px 12px; }
.pd-info { display: flex; flex-direction: column; gap: 18px; }
.pd-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; }
.pd-model { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; direction: ltr; unicode-bidi: plaintext; text-align: start; word-break: break-word; }
html[dir="rtl"] .pd-model { text-align: right; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pd-chip { font-size: 0.78rem; padding: 5px 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); unicode-bidi: plaintext; }
.pd-chip.ok { color: var(--ok); background: rgba(30, 158, 106, 0.14); border-color: transparent; }
.pd-chip.no { color: #ff8d8a; background: rgba(214, 69, 69, 0.14); border-color: transparent; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: 1.6rem; font-weight: 700; }
.pd-price .old { color: var(--muted); text-decoration: line-through; font-size: 1rem; font-weight: 400; }
.pd-price.sale { color: var(--sale); }
.pd-price.ask { color: var(--gold); font-size: 1.05rem; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pd-actions .btn { flex: 1 1 200px; min-height: 54px; }
.pd-h { font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.pd-h::before { content: ''; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(var(--teal), var(--gold)); }
.pd-desc { color: var(--muted); line-height: 1.9; white-space: pre-line; }
.pd-specs { width: 100%; border-collapse: collapse; }
.pd-specs th, .pd-specs td { padding: 12px 4px; text-align: start; font-size: 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.pd-specs tr:last-child > * { border-bottom: 0; }
.pd-specs th { color: var(--muted); font-weight: 500; width: 38%; padding-inline-end: 16px; }
.pd-specs td { font-weight: 500; unicode-bidi: plaintext; }
.pd-ds { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; transition: border-color 0.2s, background 0.2s; }
.pd-ds:hover { border-color: var(--teal-line); background: var(--surface-2); }
.pd-ds-ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(214, 69, 69, 0.14); color: #ff8d8a; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-ds b { display: block; font-size: 0.95rem; }
.pd-ds small { color: var(--muted); font-size: 0.78rem; }
.pd-ds > svg:last-child { margin-inline-start: auto; color: var(--muted); }
html[dir="rtl"] .pd-ds > svg:last-child { transform: scaleX(-1); }
.pd-related { margin-top: 56px; }
.pd-related h2 { font-size: 1.3rem; margin-bottom: 18px; }
.pd-empty { text-align: center; padding: 100px 20px; color: var(--muted); }
.pd-toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 22px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.86rem; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 2000; }
.pd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 20. من نحن / تواصل ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.prose p { color: var(--muted); line-height: 1.95; margin-top: 14px; font-size: 1.02rem; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mini-stat { padding: 24px; text-align: center; }
.mini-stat b { display: block; font-size: 2.2rem; line-height: 1.1; color: var(--teal); direction: ltr; }
.mini-stat b.gold { color: var(--gold); }
.mini-stat span { color: var(--muted); font-size: 0.86rem; }
.info-card { padding: 8px 26px; max-width: 760px; }
.info-card .cert-row { padding: 14px 0; font-size: 0.92rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; transition: border-color 0.2s, transform 0.2s; }
a.contact-item:hover { border-color: var(--teal-line); transform: translateY(-2px); }
.contact-item small { display: block; color: var(--muted); font-size: 0.8rem; }
.contact-item b { display: block; font-size: 1rem; font-weight: 600; }
.contact-item > svg:last-child { margin-inline-start: auto; color: var(--faint); }
html[dir="rtl"] .contact-item > svg:last-child { transform: scaleX(-1); }
.map-card { overflow: hidden; padding: 0; }
.map-card iframe { width: 100%; height: 340px; border: 0; filter: invert(0.9) hue-rotate(180deg) saturate(0.7) brightness(0.95); }
.map-foot { padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.map-foot p { flex: 1; min-width: 180px; color: var(--muted); font-size: 0.9rem; }
.hours { padding: 22px 24px; display: flex; align-items: center; gap: 16px; }
.hours b { display: block; }
.hours small { color: var(--muted); }

/* ---------- 21. 404 ---------- */
.err { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; text-align: center; padding: calc(var(--header-h) + 40px) 20px 60px; }
.err-n { font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--teal), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err h1 { font-size: 1.5rem; margin: 10px 0 8px; }
.err p { color: var(--muted); max-width: 440px; margin-inline: auto; }
.err-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- 22. الحركة ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; } .d2 { transition-delay: 0.16s; } .d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 23. الشاشات المتوسطة ---------- */
@media (max-width: 1180px) {
  .header-search { width: 200px; }
  .header-search:focus-within { width: 260px; }
  .header-wa span { display: none; }
  .header-wa { width: 42px; padding: 0; }
  .nav > a, .nav-drop > a { padding: 8px 11px; }
}
@media (max-width: 1024px) {
  :root { --gutter: 20px; }
  .nav, .header-search, .brand-siemens { display: none; }
  .menu-btn { display: inline-flex; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-media { position: relative; top: 0; max-width: 480px; width: 100%; margin-inline: auto; }
  .split { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- 24. الجوال ---------- */
@media (max-width: 768px) {
  :root { --header-h: 62px; --gutter: 16px; }
  body { font-size: 15px; padding-bottom: 72px; }
  .section { padding-block: 56px; }
  .section-tight { padding-block: 40px; }
  .sec-head { margin-bottom: 22px; }
  .brand-logo { height: 34px; }
  .header-wa { display: none; }
  .lang-btn { height: 38px; min-width: 46px; }

  .hero { padding: calc(var(--header-h) + 36px) 0 96px; border-radius: 0 0 30px 30px; }
  .hero::before { background: linear-gradient(180deg, rgba(15, 39, 66, 0.82) 0%, rgba(15, 39, 66, 0.9) 60%, rgba(11, 18, 32, 0.96) 100%); }
  .hero-badge { font-size: 0.78rem; }
  .hero-search-box { height: 56px; padding-inline: 18px 6px; }
  .hero-search-box .btn { display: none; }
  .hero-search-box { padding-inline: 18px; }
  .quick { margin-top: -52px; }
  .quick-grid { gap: 10px; }
  .quick-card { flex-direction: column; text-align: center; gap: 8px; padding: 16px 10px; min-height: 0; }
  .quick-card .icon-box { width: 42px; height: 42px; }
  .quick-card small { display: none; }
  .quick-card b { font-size: 0.86rem; }

  .stat { padding: 20px 12px; }
  .cat-grid, .drill-grid:has(.drill-cat-card) { grid-template-columns: 1fr; gap: 14px; }
  .cat, .drill-cat-card { min-height: 150px; border-radius: var(--r-lg); }
  .cat-body { padding: 16px 18px; }
  .cat h3 { font-size: 1.1rem; }
  .cat-go { width: 40px; height: 40px; }

  .products-grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .pcard-body { padding: 10px 11px 2px; }
  .pcard-cta { margin: 6px 10px 10px; min-height: 40px; font-size: 0.8rem; padding: 6px 10px; }
  .pcard-hint span { display: none; }
  .rail { grid-auto-columns: 46%; gap: 12px; }
  .rail-nav { display: none; }

  .steps, .cert-grid, .feat-grid, .contact-grid { grid-template-columns: 1fr; }
  .cta { padding: 36px 24px; border-radius: var(--r-lg); }
  .cta-actions, .cta-actions .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .site-footer { margin-top: 56px; border-radius: 30px 30px 0 0; padding-top: 44px; }

  .page-head { padding: calc(var(--header-h) + 28px) 0 48px; border-radius: 0 0 30px 30px; }
  .page-head.has-overlap { padding-bottom: 80px; }
  .drill-sub-img-wrap { height: 140px !important; }
  .drill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .drill-sub-card-body { padding: 12px 12px 14px; }
  .drill-sub-card-title { font-size: 0.9rem; }
  .pd-card { padding: 20px; border-radius: var(--r-lg); }
  .pd-actions .btn { flex-basis: 100%; }
  .map-card iframe { height: 260px; }

  /* شريط سفلي مثل التطبيق */
  .fab-wa, .to-top { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; inset-inline: 0; z-index: 950;
    height: 66px; padding-bottom: env(safe-area-inset-bottom);
    background: rgba(18, 27, 43, 0.92); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 0.7rem; font-weight: 500; position: relative; }
  .tabbar a.active { color: var(--teal); }
  .tabbar a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--teal); }
  .tabbar a.wa { color: var(--wa); }
}
@media (max-width: 380px) {
  .products-grid-main { grid-template-columns: 1fr !important; }
  .drill-grid { grid-template-columns: 1fr; }
  .rail { grid-auto-columns: 70%; }
}

/* غلاف حقول البحث */
.header-search-in, .drawer-search > div { position: relative; }
.header-search-in > svg { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.8); pointer-events: none; }
.drawer-search > div > svg { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.hero-search .search-results { top: calc(62px + 10px); }

/* الشريط العلوي: تزاحم العروض بين 1025 و 1360 */
@media (max-width: 1360px) {
  .brand-siemens { display: none; }
  .header-search { width: 220px; }
  .header-search:focus-within { width: 280px; }
}
@media (max-width: 1280px) {
  .header-wa span { display: none; }
  .header-wa { width: 42px; padding: 0; }
}
.rail { scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.sr-only:focus { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: auto; height: auto; clip: auto; overflow: visible; z-index: 3000; background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 999px; }
html { overflow-x: clip; }
.cat-body > div { min-width: 0; }
@media (max-width: 768px) { .cat p { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 768px) {
  .steps, .feat-grid, .cert-grid { gap: 12px; }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding: 18px; align-items: start; }
  .step .icon-box { grid-row: span 2; }
  .step h3 { margin: 2px 0 2px; font-size: 1rem; }
  .step p { font-size: 0.86rem; }
  .step-n { top: 14px; inset-inline-end: 16px; font-size: 1.8rem; }
  .feat { padding: 16px; gap: 14px; }
  .feat .icon-box { width: 42px; height: 42px; }
  .cert { padding: 20px; }
}
html[dir="rtl"] .pd-specs td, html[dir="rtl"] .cert-row > span:last-child { text-align: right; } html[dir="ltr"] .pd-specs td { text-align: left; } .pd-specs td { unicode-bidi: isolate; }
html[dir="rtl"] .cert-row > span:last-child { text-align: left; }
.site-header .btn-wa, .drawer .btn-wa { background: var(--wa); color: #fff; border: 0; box-shadow: 0 8px 22px rgba(37, 211, 102, 0.28); }
.pcard-skel, .skel { background: linear-gradient(90deg, var(--surface) 20%, var(--surface-3) 50%, var(--surface) 80%); background-size: 200% 100%; border: 1px solid var(--border); }

/* =====================================================================
   v9: شعار سيمنز الأصلي (بدون مربع أبيض) + شريط علوي داكن تحت الشعارات
   ===================================================================== */
.site-header { background: linear-gradient(90deg, #0B1E35 0%, #0F2742 38%, #0A5A73 78%, #0E7C7B 100%); }
html[dir="rtl"] .site-header { background: linear-gradient(270deg, #0B1E35 0%, #0F2742 38%, #0A5A73 78%, #0E7C7B 100%); }
.brand-siemens, .footer-siemens, .hero-badge img {
  background: none !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none;
}
.brand-siemens { height: 44px; opacity: 0.95; padding-inline-start: 16px !important; border-inline-start: 1px solid rgba(31, 181, 181, 0.35); }
.footer-siemens { height: 40px; margin-top: 20px; opacity: 0.9; }
.hero-badge img { height: 20px; }
.hero-badge { padding: 7px 16px; }

/* زر واتساب العائم: أيقونة فقط */
.fab-wa { width: 58px; height: 58px; padding: 0 !important; justify-content: center; border-radius: 50%; }
.fab-wa:hover { transform: translateY(-2px) scale(1.04); }
.footer-sub { margin-top: 22px; }

/* =====================================================================
   السلايدر الرئيسي (أسلوب siemens.com): تلاشٍ وتكبير خفيف، إيقاف/تشغيل،
   ومؤشرات خطية تمتلئ مع الوقت وتنتقل مع كل شريحة
   ===================================================================== */
.hs {
  --hs-dur: 6.5s;
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(560px, 82vh, 760px);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  background: var(--g-top);
}
.hs-track { position: absolute; inset: 0; }
.hs-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0s 0.9s; }
.hs-slide.active { opacity: 1; visibility: visible; transition: opacity 0.9s var(--ease), visibility 0s; z-index: 1; }
.hs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7.5s linear; }
.hs-slide.active .hs-img { transform: scale(1); }
.hs-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.45) 0%, rgba(11, 18, 32, 0) 30%, rgba(11, 18, 32, 0) 55%, rgba(11, 18, 32, 0.85) 100%),
    linear-gradient(var(--shade-dir, 270deg), rgba(11, 22, 40, 0.94) 0%, rgba(15, 39, 66, 0.78) 38%, rgba(15, 39, 66, 0.2) 70%, rgba(15, 39, 66, 0) 100%);
}
html[dir="ltr"] .hs { --shade-dir: 90deg; }
.hs-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-top: var(--header-h); padding-bottom: 150px;
}
.hs-content > * { max-width: 620px; }
.hs-tag {
  display: inline-flex; padding: 6px 16px; border-radius: var(--r-pill);
  background: rgba(31, 181, 181, 0.18); color: #8FEAEA; font-size: 0.85rem; font-weight: 600;
  border: 1px solid rgba(31, 181, 181, 0.35); backdrop-filter: blur(6px);
}
.hs-title { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.2; margin: 18px 0 14px; unicode-bidi: plaintext; }
.hs-sub { color: rgba(231, 237, 245, 0.85); font-size: clamp(1rem, 1.4vw, 1.12rem); unicode-bidi: plaintext; }
.hs-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
/* دخول النص مع كل شريحة */
.hs-slide .hs-tag, .hs-slide .hs-title, .hs-slide .hs-sub, .hs-slide .hs-actions { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.hs-slide.active .hs-tag { opacity: 1; transform: none; transition-delay: 0.25s; }
.hs-slide.active .hs-title { opacity: 1; transform: none; transition-delay: 0.35s; }
.hs-slide.active .hs-sub { opacity: 1; transform: none; transition-delay: 0.45s; }
.hs-slide.active .hs-actions { opacity: 1; transform: none; transition-delay: 0.55s; }

/* شريط التحكم */
.hs-bar { position: absolute; z-index: 3; inset-inline: 0; bottom: 96px; display: flex; align-items: center; gap: 18px; }
.hs-play, .hs-arrow {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(11, 18, 32, 0.45); border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px); transition: background 0.2s, border-color 0.2s;
}
.hs-play:hover, .hs-arrow:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.6); }
.hs-play .i-play, .hs.paused .hs-play .i-pause { display: none; }
.hs.paused .hs-play .i-play { display: block; }
.hs-dots { display: flex; align-items: center; gap: 8px; }
.hs-dot { position: relative; width: 44px; height: 24px; display: flex; align-items: center; transition: width 0.35s var(--ease); }
.hs-dot::before { content: ''; position: absolute; inset-inline: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); transition: background 0.2s; }
.hs-dot:hover::before { background: rgba(255, 255, 255, 0.6); }
.hs-fill { position: absolute; inset-inline-start: 0; top: 50%; height: 3px; margin-top: -1.5px; width: 0; border-radius: 3px; background: #fff; }
.hs-dot.active { width: 72px; }
.hs-dot.active .hs-fill { animation: hsFill var(--hs-dur) linear forwards; }
.hs.paused .hs-dot.active .hs-fill { animation-play-state: paused; }
.hs.static .hs-dot.active .hs-fill { animation: none; width: 100%; }
.hs-dot.done .hs-fill { width: 100%; }
@keyframes hsFill { from { width: 0; } to { width: 100%; } }
.hs-count { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; letter-spacing: 1px; margin-inline-start: 4px; }
.hs-count b { color: #fff; font-weight: 700; }
.hs-arrows { display: flex; gap: 8px; margin-inline-start: auto; }
html[dir="rtl"] .hs-arrow svg { transform: scaleX(-1); }

@media (max-width: 768px) {
  .hs { height: clamp(560px, 86vh, 700px); border-radius: 0 0 30px 30px; }
  .hs-shade { background: linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(15, 39, 66, 0.55) 35%, rgba(11, 22, 40, 0.94) 75%, rgba(11, 18, 32, 0.98) 100%); }
  .hs-content { justify-content: flex-end; padding-bottom: 150px; }
  .hs-title { font-size: clamp(1.7rem, 7.4vw, 2.2rem); }
  .hs-sub { font-size: 0.95rem; }
  .hs-actions .btn { min-height: 48px; padding: 10px 20px; font-size: 0.92rem; }
  .hs-bar { bottom: 80px; gap: 12px; }
  .hs-arrows, .hs-count { display: none; }
  .hs-dot { width: 26px; }
  .hs-dot.active { width: 48px; }
  .hs-play { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-img, .hs-slide.active .hs-img { transform: none; transition: none; }
}
@media (min-width: 1025px) { .brand-siemens { display: block; } }
@media (min-width: 1025px) and (max-width: 1200px) { .brand-siemens { height: 36px; } .header-search { width: 180px; } .nav > a, .nav-drop > a { padding: 8px 10px; } }

/* v9.1: بطاقات الاختصارات تحت السلايدر أصغر وتتداخل معه أقل */
.quick { margin-top: -38px; }
.quick-grid { gap: 12px; }
.quick-card { min-height: 0; padding: 12px 14px; gap: 12px; border-radius: var(--r-md); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.quick-card .icon-box { width: 38px; height: 38px; border-radius: 11px; }
.quick-card .icon-box svg { width: 19px; height: 19px; }
.quick-card b { font-size: 0.9rem; }
.quick-card small { font-size: 0.74rem; margin-top: 0; }
.hs-bar { bottom: 66px; }
.hs-content { padding-bottom: 120px; }
@media (max-width: 768px) {
  .quick { margin-top: -28px; }
  .quick-grid { gap: 8px; }
  .quick-card { padding: 10px 6px; gap: 6px; }
  .quick-card .icon-box { width: 34px; height: 34px; }
  .quick-card b { font-size: 0.8rem; }
  .hs-bar { bottom: 50px; }
  .hs-content { padding-bottom: 104px; }
}
