/* =====================================================================
   نظام التصميم الموحّد — د. أنس دبلول
   يكمّل Tailwind. كل المتغيّرات مشتقة من ألوان اللوجو.
   ===================================================================== */
:root {
  /* ===== ألوان الهوية الثابتة (من اللوجو) — لا تتغيّر بين الوضعين ===== */
  --color-navy: #0B2A3F;       /* الكحلي الأساسي (للأشرطة الداكنة) */
  --color-navy-deep: #071E2D;  /* كحلي أعمق */
  --color-cyan: #079BB5;       /* التركوازي الأساسي */
  --color-aqua: #76F5FD;       /* أكوا */
  --color-cyan-soft: #54D7DF;  /* تركوازي فاتح */

  /* ===== توكنز قابلة للتبديل (Light) ===== */
  --color-bg: #F4FAFB;         /* خلفية الصفحة */
  --color-bg-alt: #EAF4F6;     /* خلفية بديلة لأقسام */
  --color-surface: #ffffff;    /* أسطح/بطاقات */
  --color-text: #0B2A3F;       /* نص أساسي */
  --color-text-muted: #51636E; /* نص ثانوي */
  --color-border: rgba(11, 42, 63, 0.08);

  /* ===== الزجاج (Liquid Glass) ===== */
  --glass-bg: rgba(255, 255, 255, 0.60);
  --glass-bg-strong: rgba(255, 255, 255, 0.80);
  --glass-border: rgba(255, 255, 255, 0.62);
  --glass-highlight: rgba(255, 255, 255, 0.72);

  /* ===== الظلال والتوهّج ===== */
  --shadow-soft: 0 10px 30px rgba(7, 155, 181, 0.08);
  --shadow-glass: 0 16px 45px rgba(8, 65, 90, 0.10);
  --shadow-hover: 0 18px 44px rgba(7, 155, 181, 0.16);
  --glow-cyan: 0 0 38px rgba(7, 155, 181, 0.25);

  /* ===== Aliases للتوافق الرجعي (مستخدمة في كل القواعد القديمة) ===== */
  --navy: var(--color-text);        /* foreground/عناوين — تتحوّل لفاتح في الدارك */
  --navy-soft: #123A55;
  --cyan: var(--color-cyan);
  --cyan-light: var(--color-cyan-soft);
  --aqua: var(--color-aqua);
  --primary: var(--color-cyan);
  --background: var(--color-bg);
  --surface: var(--color-surface);
  --surface-soft: var(--color-bg-alt);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-muted);
  --border-soft: var(--color-border);

  /* أشكال وحركة */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: .2s;
  --t-med: .35s;

  color-scheme: light;
}

/* ===================================================================== */
/* الوضع الداكن — Navy عميق (ليس أسود) + زجاج داكن + توهّج تركوازي خفيف     */
/* ===================================================================== */
[data-theme="dark"] {
  --color-bg: #0B1E2D;
  --color-bg-alt: #0E2636;
  --color-surface: #14304380;          /* سطح زجاجي داكن */
  --color-text: #EAF6F8;
  --color-text-muted: #9DB4C0;
  --color-border: rgba(255, 255, 255, 0.10);

  --glass-bg: rgba(18, 44, 62, 0.55);
  --glass-bg-strong: rgba(18, 44, 62, 0.78);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.10);

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glass: 0 16px 45px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.50);
  --glow-cyan: 0 0 38px rgba(84, 215, 223, 0.22);

  /* في الدارك: السطح المعتم للبطاقات يحتاج لون صلب بدل الشفاف للوضوح */
  --surface: #122B3D;

  color-scheme: dark;
}

html { scroll-behavior: smooth; }
body {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
[dir="ltr"] body { font-family: "Inter", "IBM Plex Sans Arabic", sans-serif; }

.material-symbols-outlined { font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; vertical-align: middle; }

/* تركيز واضح للوصولية (كيبورد فقط) */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* =====================================================================
   عناصر الأقسام (Design System: section primitives)
   ===================================================================== */
.section-container { position: relative; z-index: 1; max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan);
  background: rgba(7, 155, 181, .08);
  padding: 6px 14px; border-radius: 999px;
}
.section-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.section-heading { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.25; color: var(--navy); }
.section-description { color: var(--text-secondary); line-height: 1.8; font-size: 15.5px; }

/* =====================================================================
   الأزرار
   ===================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; border-radius: 999px; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); white-space: nowrap; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), #06869c); color: #fff; padding: 14px 30px; box-shadow: 0 8px 20px rgba(7, 155, 181, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(7, 155, 181, .38); }
.btn-secondary { background: transparent; color: var(--navy); padding: 13px 28px; border: 1.5px solid var(--border-soft); }
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--cyan); color: var(--cyan); background: rgba(7, 155, 181, .04); }

/* =====================================================================
   البطاقات والزجاج
   ===================================================================== */
/* ---- Liquid Glass System (قابل لإعادة الاستخدام) ---- */
.glass-panel, .glass-card {
  position: relative;
  background: linear-gradient(135deg, var(--glass-bg-strong), var(--glass-bg));
  backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), inset 0 1px 0 var(--glass-highlight);
}
/* انعكاس/Highlight علوي خفيف عبر pseudo-element */
.glass-panel::before, .glass-card::before, .liquid-highlight::before {
  content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, var(--glass-highlight), transparent 42%); opacity: .55;
}
.liquid-highlight { position: relative; }
/* نسخة أقوى للعناصر المهمة */
.glass-card--strong {
  background: linear-gradient(135deg, var(--glass-bg-strong), var(--glass-bg-strong));
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow-glass), 0 0 0 1px var(--glass-border) inset, inset 0 1px 0 var(--glass-highlight);
}
/* حبّة زجاجية (للأزرار الصغيرة/الكنترولز) */
.glass-pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-bg); backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--glass-border); border-radius: 999px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-highlight);
}
/* دائرة أيقونة زجاجية */
.glass-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(7,155,181,.16), rgba(118,245,253,.06));
  border: 1px solid var(--glass-border); color: var(--cyan);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
/* توهّج تركوازي ناعم خلف عنصر */
.soft-glow { position: relative; }
.soft-glow::after {
  content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: inherit;
  background: radial-gradient(60% 60% at 50% 45%, rgba(7,155,181,.20), transparent 72%); filter: blur(8px); pointer-events: none;
}
.academic-border { border-inline-start: 4px solid var(--cyan); }

/* ---- مفتاح الوضع الداكن (Liquid Glass switch) ---- */
.theme-toggle {
  position: relative; width: 58px; height: 30px; border-radius: 999px; padding: 0; cursor: pointer; flex-shrink: 0;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.theme-toggle-track { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding-inline: 7px; }
.theme-toggle .material-symbols-outlined { font-size: 15px; line-height: 1; }
.theme-ico-sun { color: #f3b53b; }
.theme-ico-moon { color: var(--color-cyan-soft); }
.theme-toggle-thumb {
  position: absolute; top: 50%; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #ffffff, #e6f5f8);
  box-shadow: 0 2px 6px rgba(8, 50, 72, .28), 0 0 10px rgba(7, 155, 181, .45);
  transition: inset-inline-start var(--t-med) var(--ease), background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
[data-theme="dark"] .theme-toggle-thumb {
  inset-inline-start: 31px;
  background: radial-gradient(circle at 35% 30%, #1c4760, #0b1e2d);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 12px rgba(84, 215, 223, .55);
}
.theme-toggle:hover { border-color: var(--cyan); }
.theme-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); border: 1px solid var(--border-soft);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.hover-lift { transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

/* حافة متدرّجة خفيفة */
.gradient-border { position: relative; }
.gradient-border::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(7, 155, 181, .5), rgba(84, 215, 223, .15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* دائرة أيقونة */
.icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: rgba(7, 155, 181, .1); color: var(--cyan);
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}

/* شبكة بطاقات */
.cards-grid { display: grid; gap: 24px; grid-template-columns: repeat(1, 1fr); }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Variants للبطاقات ---- */
/* بطاقة قسم/خدمة قابلة للضغط بالكامل */
.service-card {
  position: relative; display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--glass-bg-strong), var(--glass-bg));
  backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: 0 6px 18px rgba(8, 50, 72, .08), inset 0 1px 0 var(--glass-highlight);
  color: var(--navy); overflow: hidden; isolation: isolate;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
/* حافة متدرّجة خفيفة دائمة (تعريف البطاقة وهي ساكنة) تتوضّح عند المرور */
.service-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--cyan), var(--aqua) 55%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .45; transition: opacity var(--t-med) var(--ease);
}
/* وميض ضوئي ينساب عبر البطاقة (shine sweep) */
.service-card::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -30%; width: 35%; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(0) skewX(-18deg); opacity: 0;
}
.service-card > * { position: relative; z-index: 1; }
.service-card:hover, .service-card:focus-visible {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-hover), 0 14px 36px rgba(7, 155, 181, .20);
  border-color: transparent;
}
.service-card:active { transform: translateY(-2px) scale(.99); }
.service-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.service-card:hover::before, .service-card:focus-visible::before { opacity: 1; }
.service-card:hover::after, .service-card:focus-visible::after { animation: card-shine .9s var(--ease); }
.service-card:hover .icon-circle, .service-card:focus-visible .icon-circle {
  background: linear-gradient(135deg, var(--cyan), var(--aqua)); color: #fff; transform: scale(1.08) rotate(-4deg);
}
.service-card .card-arrow { margin-inline-start: auto; color: var(--cyan); opacity: 0; transform: translateX(6px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
[dir="rtl"] .service-card .card-arrow { transform: translateX(-6px); }
.service-card:hover .card-arrow, .service-card:focus-visible .card-arrow { opacity: 1; transform: translateX(0); }
@keyframes card-shine {
  0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translateX(460%) skewX(-18deg); opacity: 0; }
}
[data-theme="dark"] .service-card::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); }
[data-theme="dark"] .service-card:hover, [data-theme="dark"] .service-card:focus-visible {
  box-shadow: var(--shadow-hover), 0 14px 40px rgba(84, 215, 223, .16);
}
@media (prefers-reduced-motion: reduce) {
  .service-card, .service-card:hover, .service-card:focus-visible, .service-card:active { transform: none; }
  .service-card::after { display: none; }
  .service-card:hover .icon-circle, .service-card:focus-visible .icon-circle { transform: none; }
}

/* بطاقات «مجالات وأنشطة» — نسخة مضغوطة أصغر */
#home-fields { gap: 16px; }
#home-fields .service-card { padding: 13px 16px; gap: 12px; }
#home-fields .icon-circle { width: 42px; height: 42px; border-radius: 12px; }
#home-fields .icon-circle .material-symbols-outlined { font-size: 22px; }
#home-fields h3 { font-size: 15px; line-height: 1.3; }
#home-fields p { font-size: 12px; line-height: 1.45; opacity: .8; }

/* خط فاصل أنيق بين الأقسام */
.section-divider { display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 1280px; margin-inline: auto; padding: 6px 24px; }
.section-divider span { height: 1px; flex: 0 1 90px; }
.section-divider span:first-child { background: linear-gradient(90deg, transparent, var(--border-soft)); }
.section-divider span:last-child { background: linear-gradient(90deg, var(--border-soft), transparent); }
.section-divider i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--aqua)); box-shadow: 0 0 0 4px rgba(7, 155, 181, .08); }

/* بطاقة مقال */
.article-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.article-card .media { overflow: hidden; }
.article-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.article-card:hover .media img { transform: scale(1.06); }

/* بطاقة رابط */
.link-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); color: var(--navy); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.link-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.link-card .ext { position: absolute; inset-block-start: 18px; inset-inline-end: 18px; color: var(--text-secondary); opacity: .5; transition: opacity var(--t-med) var(--ease), color var(--t-med) var(--ease); }
.link-card:hover .ext { opacity: 1; color: var(--cyan); }

/* بطاقة بحث/إنتاج */
.publication-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border-soft); border-inline-start: 4px solid var(--cyan); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-soft); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.publication-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* بطاقة مقرر */
.course-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 16px 20px; box-shadow: var(--shadow-soft); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* بطاقة شهادة/معرض */
.gallery-card, .certificate-card { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-soft); cursor: zoom-in; background: var(--surface-soft); }
.gallery-card img, .certificate-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.gallery-card:hover img, .certificate-card:hover img { transform: scale(1.07); }
.gallery-card::after, .certificate-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 42, 63, .35), transparent 55%); opacity: 0; transition: opacity var(--t-med) var(--ease); }
.gallery-card:hover::after, .certificate-card:hover::after { opacity: 1; }
.gallery-card .zoom-ico, .certificate-card .zoom-ico { position: absolute; inset-block-end: 12px; inset-inline-end: 12px; color: #fff; opacity: 0; transform: translateY(6px); transition: all var(--t-med) var(--ease); z-index: 1; }
.gallery-card:hover .zoom-ico, .certificate-card:hover .zoom-ico { opacity: 1; transform: translateY(0); }

/* بطاقة إحصائية */
.stats-bar { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(120deg,#079BB5 0%,#0B2A3F 100%); box-shadow: 0 16px 36px rgba(8,50,72,.20); }
.stats-bar::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); }
.stat-card { text-align: center; padding: 16px 12px; transition: background var(--t-med) var(--ease); }
.stat-card:hover { background: rgba(255,255,255,.06); }
.stat-ico { color: #54D7DF; font-size: 20px; opacity: .9; }
.stat-card .num { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; line-height: 1.1; margin-top: 4px; }
.stat-label { color: rgba(255,255,255,.78); font-size: 12.5px; margin-top: 2px; }
@media (min-width: 768px) {
  .stat-card { padding: 20px 14px; }
  .stat-card:not(:last-child) { border-inline-end: 1px solid rgba(255,255,255,.12); }
}

/* =====================================================================
   Page Hero موحّد للصفحات الداخلية
   ===================================================================== */
.page-hero {
  position: relative; overflow: hidden;
  background-color: var(--navy);
  background-image: url("../img/micro-pattern.svg?v=27"), linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  background-repeat: repeat, no-repeat;
  background-size: 360px 360px, cover;
  background-position: center, center;
  color: #fff; padding: 30px 0 28px;
  animation: micro-drift 80s linear infinite; /* تعويم بطيء لكائنات الخلفية */
}
@keyframes micro-drift { from { background-position: 0 0, center; } to { background-position: 360px 360px, center; } }
.page-hero::before { /* وهج تركوازي خفيف — aurora ينساح ببطء */
  content: ""; position: absolute; inset-inline-end: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 155, 181, .45), transparent 70%); filter: blur(20px);
  animation: aurora-a 17s ease-in-out infinite alternate;
}
.page-hero::after { /* شكل زخرفي ناعم — aurora ينساح ببطء */
  content: ""; position: absolute; inset-inline-start: -80px; bottom: -140px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(84, 215, 223, .22), transparent 70%); filter: blur(20px);
  animation: aurora-b 22s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  to { transform: translate3d(-44px, 34px, 0) scale(1.16); opacity: .68; }
}
@keyframes aurora-b {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .8; }
  to { transform: translate3d(52px, -30px, 0) scale(1.22); opacity: 1; }
}
.page-hero > .section-container { position: relative; z-index: 1; }
.page-hero .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .65); margin-bottom: 10px; }
.page-hero .breadcrumb a { color: rgba(255, 255, 255, .65); transition: color var(--t-fast); }
.page-hero .breadcrumb a:hover { color: var(--aqua); }
.page-hero .breadcrumb .material-symbols-outlined { font-size: 16px; }
.page-hero-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 10px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: var(--aqua); backdrop-filter: blur(6px);
}
.page-hero-icon .material-symbols-outlined { font-size: 24px; }
.page-hero h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.25; }
.page-hero .lead { color: rgba(255, 255, 255, .82); max-width: 560px; line-height: 1.6; margin-top: 7px; font-size: 14.5px; }

/* =====================================================================
   أشكال زخرفية متحركة (خفيفة جداً)
   ===================================================================== */
.deco { position: absolute; border-radius: 50%; filter: blur(36px); pointer-events: none; z-index: 0; }
.deco-cyan { background: rgba(7, 155, 181, .18); }
.deco-aqua { background: rgba(84, 215, 223, .16); }
.floating { animation: floaty 9s ease-in-out infinite; }
.floating-slow { animation: floaty 13s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

/* =====================================================================
   Scroll Reveal + Stagger + اتجاهي
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[dir="ltr"] .reveal-right { transform: translateX(-40px); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[dir="ltr"] .reveal-left { transform: translateX(40px); }
.reveal-right.is-visible, .reveal-left.is-visible { opacity: 1; transform: none; }
/* تتابع للأبناء داخل حاوية .stagger */
.stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .19s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .33s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .40s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: .47s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: .54s; }

/* =====================================================================
   Header / Navbar
   ===================================================================== */
/* الهيدر العائم (Floating Glass Island) — منفصل عن الحواف، زجاجي بحواف دائرية */
.header-float { padding-top: 14px; padding-inline: 16px; transition: padding-top var(--t-med) var(--ease); pointer-events: none; }
.header-float > * { pointer-events: auto; }
@media (min-width: 1024px) { .header-float { padding-inline: 24px; } }
.header-island {
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-highlight);
  transition: background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-radius var(--t-med) var(--ease);
}
#site-header header nav { transition: height var(--t-med) var(--ease); }
/* عند التمرير: جزيرة أقصر + زجاج أوضح + ظل أعمق + هامش علوي أقل */
#site-header header.scrolled.header-float { padding-top: 8px; }
#site-header header.scrolled .header-island {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 10px 30px rgba(11, 42, 63, .14), inset 0 1px 0 var(--glass-highlight);
  border-radius: 16px;
}
#site-header header.scrolled nav { height: 52px; }

.nav-link { position: relative; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--text-secondary); padding: 4px 2px; background: none; border: none; cursor: pointer; transition: color var(--t-fast) ease; }
@media (min-width: 1280px) { .nav-link { font-size: 16px; } }
.nav-link:hover { color: var(--cyan); }
.nav-link::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -8px; height: 2px; background: var(--cyan); border-radius: 2px; transition: left .25s var(--ease), right .25s var(--ease); }
.nav-link:hover::after, .nav-link.is-active::after { left: 0; right: 0; }
.nav-link.is-active { color: var(--cyan); font-weight: 700; }

/* قائمة "المزيد" المنسدلة */
.nav-menu {
  position: absolute; top: 100%; inset-inline-end: 0; min-width: 220px;
  margin-top: 12px; padding: 8px;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 14px 34px rgba(11, 42, 63, .14);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility var(--t-fast); z-index: 60;
}
.nav-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-more:hover .nav-menu, .nav-more:focus-within .nav-menu, .nav-more.open-click .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Drawer للموبايل/التابلت */
.drawer-overlay { position: fixed; inset: 0; background: rgba(11, 42, 63, .45); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity var(--t-med) ease, visibility var(--t-med); z-index: 70; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; display: flex; flex-direction: column; width: 320px; max-width: 85vw; background: #fff; transform: translateX(100%); transition: transform var(--t-med) var(--ease); box-shadow: -10px 0 40px rgba(11, 42, 63, .15); z-index: 80; }
[dir="ltr"] .drawer { transform: translateX(-100%); box-shadow: 10px 0 40px rgba(11, 42, 63, .15); }
.drawer.open { transform: translateX(0); }

/* =====================================================================
   زر العودة للأعلى
   ===================================================================== */
.to-top { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), #06869c); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(7, 155, 181, .35); opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease), visibility var(--t-med); z-index: 60; cursor: pointer; border: none; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(7, 155, 181, .45); }

/* =====================================================================
   Skeleton (تحميل تدريجي للصور)
   ===================================================================== */
.skeleton { background: linear-gradient(100deg, #e7eff1 30%, #f3f8f9 50%, #e7eff1 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* =====================================================================
   معرض الصور: تبويبات فلترة + Masonry
   ===================================================================== */
.filter-tab { padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-soft); cursor: pointer; transition: color var(--t-fast) ease, border-color var(--t-fast) ease, background var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.filter-tab:hover { color: var(--cyan); border-color: var(--cyan); }
.filter-tab.active { background: linear-gradient(135deg, var(--cyan), #06869c); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(7, 155, 181, .28); }

/* شبكة موحّدة (بديل multi-column) — تتجنّب باگ اختفاء الصور عند المرور بالماوس */
.gallery-masonry { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 1024px) { .gallery-masonry { grid-template-columns: repeat(3, 1fr); } }
.gallery-masonry .gallery-card { aspect-ratio: 4 / 3; }
.gallery-masonry .gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-masonry .gallery-card.skeleton { min-height: 0; }

/* أغلفة مجلة «كل المختبرات» — تصميم غلاف بدل أيقونة PDF */
.mag-cover { display: block; text-decoration: none; }
.mag-cover-bg { position: relative; display: flex; flex-direction: column; aspect-ratio: 3 / 4; border-radius: 14px; padding: 16px 14px; color: #fff; overflow: hidden; box-shadow: var(--shadow-soft); border-inline-start: 5px solid rgba(255, 255, 255, .38); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.mag-cover:hover .mag-cover-bg { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(7, 42, 63, .30); }
.mag-cover-ico { position: absolute; inset-block-end: -16px; inset-inline-start: -12px; font-size: 104px; opacity: .14; line-height: 1; }
.mag-cover-name { font-size: 12px; font-weight: 700; letter-spacing: .3px; opacity: .92; }
.mag-cover-vol { margin-top: auto; display: flex; flex-direction: column; line-height: 1; z-index: 1; }
.mag-cover-vol small { font-size: 12px; opacity: .85; margin-bottom: 3px; }
.mag-cover-vol b { font-size: 40px; font-weight: 800; }
.mag-cover-foot { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .20); padding: 3px 8px; border-radius: 999px; }
.mag-cover-foot .material-symbols-outlined { font-size: 15px; }

/* ===== شاشة التحميل (Splash): صورة الدكتور + أشواك فيروس تدور حولها + الاسم ===== */
body::before { content: ""; position: fixed; inset: 0; z-index: 9998; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%); transition: opacity .55s ease, visibility .55s ease; }
#splash { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; transition: opacity .55s ease, visibility .55s ease; }
.splash-badge { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.splash-ring { position: absolute; inset: 0; width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(84,215,223,0) 0deg, rgba(84,215,223,.12) 80deg, #54D7DF 300deg, #9af6fb 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  animation: virus-spin 1.3s linear infinite; }
.splash-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px rgba(11,42,63,.35), 0 0 26px rgba(84, 215, 223, .30); }
.splash-name { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
body.loaded::before, body.loaded #splash { opacity: 0; visibility: hidden; }
@keyframes virus-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .page-hero { animation: none; }
  .splash-ring { animation: none; }
}

/* =====================================================================
   Lightbox
   ===================================================================== */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(11, 42, 63, .92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 20px; inset-inline-end: 24px; color: #fff; cursor: pointer; }

/* =====================================================================
   Hero Slider (عرض الواجهة المتحرك)
   ===================================================================== */
.hero-slider { position: relative; overflow: hidden; isolation: isolate; }
/* خلفية بعمق متحرّك: كتل ضبابية تطفو ببطء */
.hero-slider::before {
  content: ""; position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 48% at 18% 28%, rgba(7, 155, 181, .10), transparent 70%),
    radial-gradient(34% 44% at 84% 66%, rgba(84, 215, 223, .12), transparent 70%);
  animation: hero-drift 20s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -16px, 0) scale(1.06); }
}
[data-theme="dark"] .hero-slider::before {
  background:
    radial-gradient(38% 48% at 18% 28%, rgba(7, 155, 181, .16), transparent 70%),
    radial-gradient(34% 44% at 84% 66%, rgba(84, 215, 223, .14), transparent 70%);
}
/* لمسة توهّج radial خفيفة لإضافة عمق دون ازدحام */
.hero-slider::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset-inline-end: -6%; top: 4%; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(118, 245, 253, .12), transparent 70%); filter: blur(10px);
}
[data-theme="dark"] .hero-slider::after { background: radial-gradient(circle, rgba(84, 215, 223, .12), transparent 70%); }
/* الخلفية المتبدّلة (طبقتان للانتقال السلس) */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease);
  background: linear-gradient(160deg, #F2FBFC 0%, #E4F4F6 55%, #F2FBFC 100%); }
.hero-bg-layer.is-active { opacity: 1; }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
  padding-block: 28px 88px; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; padding-block: 44px 120px; }
}

/* ---- النص ---- */
.hero-text { position: relative; }
.hero-text-inner > * { transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease); }
.hero-text-inner.is-out > * { opacity: 0; transform: translateY(12px); filter: blur(4px); }
/* Stagger خفيف عند الدخول */
.hero-text-inner .hero-title { transition-delay: .05s; }
.hero-text-inner .hero-desc { transition-delay: .10s; }
.hero-text-inner .hero-cta { transition-delay: .15s; }
.hero-badge { margin-bottom: 14px; }
.hero-title { color: var(--navy); font-weight: 700; line-height: 1.2;
  font-size: clamp(24px, 3.1vw, 36px); margin-bottom: 14px; }
.hero-desc { color: var(--text-secondary); font-size: 16px; line-height: 1.7; max-width: 34rem; margin-bottom: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* أدوات التحكم — أسفل الصور، موسّطة */
.hero-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.hero-arrow { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--navy); background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .68); box-shadow: 0 6px 18px rgba(7, 50, 72, .10);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) ease, color var(--t-fast) ease; }
.hero-arrow:hover { background: var(--cyan); color: #fff; transform: translateY(-2px); }
.hero-dots { display: flex; align-items: center; gap: 7px; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; padding: 0; cursor: pointer;
  background: rgba(11, 42, 63, .18); border: none;
  transition: width var(--t-med) var(--ease), background var(--t-med) ease; }
.hero-dot:hover { background: rgba(7, 155, 181, .5); }
.hero-dot.is-active { width: 22px; background: var(--cyan); }
/* مؤشّر تقدّم التشغيل التلقائي */
.hero-progress { width: 130px; height: 3px; margin: 16px auto 0; border-radius: 999px;
  background: rgba(11, 42, 63, .12); overflow: hidden; }
.hero-progress i { display: block; height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--aqua)); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .hero-progress i { transform-origin: right; }
.hero-progress i.run { animation: hero-prog 6000ms linear forwards; }
@keyframes hero-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
[data-theme="dark"] .hero-progress { background: rgba(255, 255, 255, .12); }

/* ---- الوسائط (الصورة) ---- */
.hero-media { position: relative; perspective: 1000px; }
/* المسرح: يحوي الإطار + التوهّج + البطاقة (مرجع تموضع البطاقة) */
.hero-stage { position: relative; max-width: 320px; margin-inline: auto;
  transform-style: preserve-3d; transition: transform .3s var(--ease); will-change: transform; }
.hero-glow { position: absolute; inset: -16px; border-radius: 38px; z-index: 0;
  background: radial-gradient(60% 60% at 50% 40%, rgba(7, 155, 181, .18), transparent 70%); filter: blur(8px); }
.hero-frame { position: relative; z-index: 1; border-radius: 26px; padding: 5px;
  background: #fff; box-shadow: 0 16px 40px rgba(7, 50, 72, .14); }
/* حلقة توهّج متدرّجة دوّارة حول الإطار */
.hero-frame::before {
  content: ""; position: absolute; inset: -7px; border-radius: 32px; z-index: -1;
  background: conic-gradient(from 0deg, var(--cyan), var(--aqua), transparent 38%, var(--cyan));
  filter: blur(13px); opacity: .45; animation: hero-ring 9s linear infinite;
}
@keyframes hero-ring { to { transform: rotate(360deg); } }
.hero-frame-inner { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transform: scale(1.04); transition: opacity .75s var(--ease); }
.hero-img.is-active { opacity: 1; animation: hero-kenburns 16s ease-in-out infinite alternate; }
@keyframes hero-kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(1.5%, -2%, 0); }
}

/* بطاقة زجاجية متداخلة (تتموضع أسفل الإطار فقط، لا تتداخل مع المصغّرات) */
.hero-card { position: absolute; z-index: 3; inset-block-end: -16px; inset-inline-start: -10px;
  max-width: 215px; display: flex; align-items: center; gap: 10px;
  border-radius: 15px; padding: 9px 12px;
  background: rgba(255, 255, 255, .62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 12px 32px rgba(7, 50, 72, .14); }
.hero-card .icon-circle { width: 36px; height: 36px; }
.hero-card .icon-circle .material-symbols-outlined { font-size: 20px; }
.hero-card-t { font-weight: 700; color: var(--navy); font-size: 13px; line-height: 1.3; }
.hero-card-s { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* صور مصغّرة */
.hero-thumbs { display: flex; gap: 10px; justify-content: center; margin-top: 30px; }
.hero-thumb { width: 50px; height: 50px; border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0;
  border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 6px 16px rgba(7, 50, 72, .12);
  opacity: .6; transform: translateY(0); transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease), border-color var(--t-med) ease, box-shadow var(--t-med) ease; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-thumb:hover { opacity: .9; transform: translateY(-3px); }
.hero-thumb.is-active { opacity: 1; border-color: var(--cyan); box-shadow: 0 8px 20px rgba(7, 155, 181, .3); }
@media (min-width: 1024px) { .hero-thumb { width: 56px; height: 56px; } }

/* =====================================================================
   الوضع الداكن — تجاوزات المكوّنات (utilities ثابتة اللون + chrome)
   ===================================================================== */
[data-theme="dark"] .bg-background { background-color: var(--color-bg) !important; }
[data-theme="dark"] .bg-white { background-color: var(--color-surface); }
[data-theme="dark"] .text-on-surface { color: var(--color-text); }
[data-theme="dark"] .text-on-surface-variant { color: var(--color-text-muted); }
[data-theme="dark"] .text-navy { color: var(--color-text); }
[data-theme="dark"] .text-text-charcoal { color: var(--color-text); }

/* الجزيرة الزجاجية العائمة في الدارك */
[data-theme="dark"] #site-header .header-island { background: rgba(14, 34, 48, 0.62); border-color: rgba(255, 255, 255, 0.10); }
[data-theme="dark"] #site-header header.scrolled .header-island { background: rgba(11, 28, 40, 0.82); }
/* فاصل الهيدر + أزرار الأكشن */
[data-theme="dark"] #site-header .bg-\[\#e0eaec\] { background: rgba(255, 255, 255, 0.12); }

/* الدراور (القائمة الجانبية) */
[data-theme="dark"] .drawer { background: var(--color-bg-alt); }
[data-theme="dark"] .drawer .border-\[\#e6eef0\] { border-color: rgba(255, 255, 255, 0.08); }

/* الهيرو في الدارك: خلفية داكنة + إطار/بطاقة/أسهم زجاجية داكنة */
[data-theme="dark"] .hero-bg-layer { background: linear-gradient(160deg, #0B1E2D 0%, #0E2636 55%, #0B1E2D 100%) !important; }
[data-theme="dark"] .hero-frame { background: #102A3C; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .hero-card { background: rgba(18, 44, 62, 0.62); border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .hero-arrow { background: rgba(18, 44, 62, 0.55); border-color: rgba(255, 255, 255, 0.12); color: var(--color-text); }
[data-theme="dark"] .hero-thumb { border-color: rgba(255, 255, 255, 0.14); }

/* الأقسام ذات التدرّج الفاتح (نُعيد تلوينها في الدارك) */
[data-theme="dark"] .section-tint { background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg)) !important; }

/* حقول النماذج (صفحة تواصل) */
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background-color: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
}

/* fallback عند عدم دعم backdrop-filter: أسطح أوضح */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-panel, .glass-card, .glass-pill, .hero-card, .hero-arrow { background: var(--glass-bg-strong); }
}

/* الفوتر: تدرّج كحلي ناعم بدل اللون المسطّح */
#site-footer footer { background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-deep) 100%) !important; }

/* =====================================================================
   أشكال خلفية راقية (Orbs / Dotted) — pseudo & utilities خفيفة
   ===================================================================== */
.deco-soft { background: radial-gradient(circle, rgba(7,155,181,.10), transparent 70%); }
.dotted-bg { position: relative; }
.dotted-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(rgba(7,155,181,.10) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask: radial-gradient(60% 60% at 50% 40%, #000, transparent 75%);
  mask: radial-gradient(60% 60% at 50% 40%, #000, transparent 75%);
}
[data-theme="dark"] .dotted-bg::before { background-image: radial-gradient(rgba(118,245,253,.10) 1px, transparent 1.4px); }

/* =====================================================================
   Reveal — أسماء إضافية (aliases) لنظام الظهور عند التمرير
   ===================================================================== */
.reveal-up, .reveal-scale, .reveal-on-scroll, .stagger-item { opacity: 0; transition: opacity .6s var(--ease), transform .6s var(--ease); will-change: opacity, transform; }
.reveal-up { transform: translateY(28px); }
.reveal-scale { transform: scale(.94); }
.reveal-on-scroll { transform: translateY(22px); }
.reveal-up.is-visible, .reveal-scale.is-visible, .reveal-on-scroll.is-visible, .stagger-item.is-visible { opacity: 1; transform: none; }

/* =====================================================================
   تقليل الحركة (Accessibility)
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-right, .reveal-left, .stagger > *,
  .reveal-up, .reveal-scale, .reveal-on-scroll, .stagger-item { opacity: 1 !important; transform: none !important; }
  /* Hero: إظهار النص والصورة فوراً بلا حركة */
  .hero-text-inner > * { opacity: 1 !important; transform: none !important; }
  .hero-img.is-active { transform: none !important; }
  .hero-bg-layer, .hero-img { transition: none !important; }
}

/* ===== Tabs (أقسام فرعية داخل الصفحة) ===== */
.tabs { width: 100%; }
.tab-list {
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
  padding: 6px; margin-bottom: 28px; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft); backdrop-filter: blur(10px) saturate(140%);
  scrollbar-width: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px; border: 0;
  font-family: inherit; font-weight: 700; font-size: 14px;
  color: var(--text-secondary); background: transparent;
  transition: color .2s, background .2s;
}
.tab:hover { color: var(--cyan); }
.tab[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--navy));
  box-shadow: 0 6px 16px rgba(7,155,181,.28);
}
.tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.tab-panel.is-active { animation: tab-fade .35s ease both; }
@keyframes tab-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tab-panel.is-active { animation: none; }
}
[data-theme="dark"] .tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--cyan), var(--color-navy-deep, #06141f));
}

/* ===== Header dropdown (أقسام فرعية) ===== */
.has-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 2px; }
.nav-caret { transition: transform .2s; }
.has-dropdown:hover .nav-caret, .has-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: 100%; inset-inline-start: 50%; transform: translateX(50%) translateY(8px);
  min-width: 220px; padding: 8px; margin-top: 6px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 16px; box-shadow: var(--shadow-hover);
  backdrop-filter: blur(16px) saturate(160%);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; z-index: 60;
}
html[dir="ltr"] .nav-dropdown { transform: translateX(-50%) translateY(8px); }
/* جسر شفاف يمنع الاختفاء عند تحريك الماوس */
.nav-dropdown::before { content: ""; position: absolute; top: -10px; inset-inline: 0; height: 12px; }
.has-dropdown:hover .nav-dropdown, .has-dropdown.open .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateX(50%) translateY(0);
}
html[dir="ltr"] .has-dropdown:hover .nav-dropdown, html[dir="ltr"] .has-dropdown.open .nav-dropdown {
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: block; padding: 9px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-dropdown-item:hover { background: rgba(7,155,181,.10); color: var(--cyan); }

/* ===== Drawer accordion ===== */
.drawer-acc-body { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.drawer-acc.open .drawer-acc-body { max-height: 420px; }
.drawer-acc-caret { transition: transform .2s; }
.drawer-acc.open .drawer-acc-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown, .drawer-acc-body { transition: none; }
}
