/* =====================================================================
   المركب الإقليمي — نظام تصميم "مؤسسي أبيض / 3D"
   ---------------------------------------------------------------------
   لوحة فاتحة (أبيض + أزرق + تركواز + كهرماني) مستوحاة من المواقع التعليمية،
   مع الحفاظ على العمق ثلاثي الأبعاد والحركة.
   ===================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ===================== 1. Tokens ===================== */
:root {
  --bg: #f6f8fc;
  --bg-2: #eef3fb;
  --surface: #ffffff;
  --surface-2: #f1f5fc;

  --ink: #0b1b33;
  --text: #24344d;
  --muted: #64748b;

  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --sky: #38bdf8;
  --teal: #14b8a6;
  --amber: #f59e0b;

  --line: #e3eaf5;
  --line-strong: #cfdcef;

  --glass: #ffffff;
  --glass-border: #e4ebf6;

  --radius: 26px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --shadow-1: 0 10px 24px -18px rgba(15, 40, 90, 0.45);
  --shadow-2: 0 34px 60px -40px rgba(15, 40, 90, 0.5);
  --glow-blue: 0 14px 32px -16px rgba(37, 99, 235, 0.55);

  --shell: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* ===================== 2. Reset & base ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(56, 189, 248, 0.16), transparent 62%),
    radial-gradient(800px 520px at 4% 6%, rgba(37, 99, 235, 0.1), transparent 60%),
    linear-gradient(180deg, #fbfcfe, var(--bg) 40%, #f2f6fc);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0 0 0.55em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; }

::selection {
  background: rgba(37, 99, 235, 0.18);
  color: #06214d;
}

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

/* ===================== 3. Utilities ===================== */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  position: relative;
  padding: clamp(64px, 9vw, 118px) 0;
}

.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.grad {
  background: linear-gradient(100deg, var(--blue) 0%, #0ea5c6 55%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.source-note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn--primary {
  background: linear-gradient(135deg, #3b82f6, var(--blue-deep));
  color: #fff;
  box-shadow: var(--glow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -18px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.btn--ghost:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--blue);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--blue);
}

.btn--outline:hover {
  background: rgba(37, 99, 235, 0.07);
  border-color: var(--blue);
}

.btn--sm { padding: 10px 20px; font-size: 0.9rem; }

/* ===================== 4. Chrome ===================== */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

.progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 120;
  height: 3px;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.45);
  transition: width 0.1s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 30px -26px rgba(15, 40, 90, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(150deg, var(--sky), var(--blue));
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand__mark {
  transform: perspective(400px) rotateY(-18deg) rotateX(8deg) translateZ(6px);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__name { font-weight: 800; font-size: 1.02rem; color: var(--ink); white-space: nowrap; }
.brand__tag { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.brand__tag--fr {
  margin-top: 2px;
  font-size: 0.6rem;
  direction: ltr;
  text-align: right;
  opacity: 0.75;
}

.nav { display: flex; align-items: center; gap: 2px; }

.nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 600;
  color: #33465f;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover { color: var(--blue); background: rgba(37, 99, 235, 0.07); }

.nav a.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.1);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: #3b4d66;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===================== 5. Hero ===================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 108px) 0 clamp(60px, 8vw, 96px);
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 40, 90, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 40, 90, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 18%, #000 15%, transparent 76%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 18%, #000 15%, transparent 76%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: float 16s ease-in-out infinite;
}

.orb--1 {
  width: 460px;
  height: 460px;
  top: -150px;
  inset-inline-start: -110px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.55), transparent 68%);
}

.orb--2 {
  width: 380px;
  height: 380px;
  bottom: -170px;
  inset-inline-end: -90px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.4), transparent 68%);
  animation-delay: -6s;
}

.orb--3 {
  width: 300px;
  height: 300px;
  top: 30%;
  inset-inline-end: 30%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
  animation-delay: -11s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -26px, 0) scale(1.06); }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(32px, 5vw, 70px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 14px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-pill);
  background: #fff;
  color: #1e4fa8;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.hero__title {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5.4vw, 4.1rem);
  line-height: 1.12;
}

.hero__title span { display: block; }

.hero__lead {
  max-width: 52ch;
  margin-bottom: 30px;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: #47586f;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.avatar-stack { display: flex; }

.avatar-stack span {
  width: 32px;
  height: 32px;
  margin-inline-start: -10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--sky), var(--blue));
}

.avatar-stack span:first-child { margin-inline-start: 0; }
.avatar-stack span:nth-child(2) { background: linear-gradient(140deg, var(--teal), #0e7490); }
.avatar-stack span:nth-child(3) { background: linear-gradient(140deg, var(--amber), #d97706); }

/* --- 3D scene --- */
.hero__stage {
  position: relative;
  perspective: 1400px;
  perspective-origin: 50% 40%;
}

.scene {
  position: relative;
  aspect-ratio: 1 / 0.98;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}

.layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.scene__card {
  position: absolute;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 24px;
  background: var(--surface-2);
  box-shadow: 0 40px 70px -40px rgba(15, 40, 90, 0.55);
}

.scene__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.scene__card--main {
  inset: 10% 8% 14% 6%;
  transform: rotateY(-12deg) rotateX(7deg) translateZ(60px);
}

.scene__card--main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 45%);
  pointer-events: none;
}

.scene__card--back {
  inset: 0 24% 34% 0;
  opacity: 0.6;
  filter: blur(1px) saturate(0.85);
  transform: rotateY(10deg) rotateX(-4deg) translateZ(-70px);
}

.scene__badge {
  position: absolute;
  bottom: 22px;
  inset-inline-start: 22px;
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 34px -22px rgba(15, 40, 90, 0.6);
  transform: translateZ(30px);
}

.scene__badge strong { font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.scene__badge span { font-size: 1.12rem; font-weight: 800; color: var(--ink); }

.scene__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 34px -22px rgba(15, 40, 90, 0.55);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.scene__chip--a {
  top: 6%;
  inset-inline-start: -6%;
  transform: translateZ(95px);
  animation: bob 7s ease-in-out infinite;
}

.scene__chip--b {
  bottom: 12%;
  inset-inline-end: -4%;
  transform: translateZ(120px);
  animation: bob 9s ease-in-out infinite reverse;
}

.scene__ring {
  position: absolute;
  inset: 4%;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  transform: rotateX(72deg) translateZ(-40px);
  animation: spin 34s linear infinite;
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes spin {
  to { transform: rotateX(72deg) rotateZ(360deg) translateZ(-40px); }
}

/* ===================== 6. Stats ===================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: clamp(44px, 6vw, 70px);
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 30px 50px -32px rgba(37, 99, 235, 0.6);
}

.stat__value {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--blue);
}

.stat__label {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
}

.stat::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--blue), var(--teal));
  opacity: 0.7;
}

/* ===================== 7. Sections & cards ===================== */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 0%), rgba(37, 99, 235, 0.09), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 17px;
  font-size: 1.5rem;
  background: linear-gradient(150deg, #eaf2ff, #e6fbf7);
  border: 1px solid #dbe7f8;
  box-shadow: inset 0 1px 0 #fff, 0 14px 24px -18px rgba(37, 99, 235, 0.7);
  transform: translateZ(28px);
}

.card h3 { margin-bottom: 8px; transform: translateZ(16px); }
.card p { margin: 0; font-size: 0.94rem; color: var(--muted); transform: translateZ(8px); }

.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s ease;
  will-change: transform;
}

.tilt.is-tilting {
  transition: transform 0.08s linear, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 40px 70px -42px rgba(37, 99, 235, 0.55);
  border-color: rgba(37, 99, 235, 0.32);
}

/* ===================== 8. News & article ===================== */
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.news-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease);
}

.news-card:hover .news-card__media img { transform: scale(1.07); }

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 24px;
  transform: translateZ(14px);
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.chip {
  padding: 3px 11px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(37, 99, 235, 0.07);
  color: #1e4fa8;
  font-size: 0.72rem;
  font-weight: 700;
}

.news-card h3 { margin-bottom: 8px; font-size: 1.06rem; }
.news-card p { margin: 0 0 16px; font-size: 0.92rem; color: var(--muted); }

.news-card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--blue);
}

.news-card .more::after { content: "←"; transition: transform 0.25s var(--ease); }
.news-card:hover .more::after { transform: translateX(-5px); }

.article-hero {
  position: relative;
  padding: clamp(44px, 6vw, 84px) 0 clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 400px at 80% -10%, rgba(56, 189, 248, 0.18), transparent 65%),
    linear-gradient(180deg, #ffffff, var(--bg));
}

.article-hero h1 { max-width: 24ch; }

.article-cover {
  margin-top: 30px;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  aspect-ratio: 16 / 7;
  background: var(--surface-2);
}

.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.prose {
  max-width: 74ch;
  font-size: 1.05rem;
  color: #33455f;
}

.prose h2 { margin-top: 2em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.6em; }
.prose p { margin-bottom: 1.15rem; }
.prose ul, .prose ol { padding-inline-start: 1.35em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--blue); }

.prose blockquote {
  margin: 1.7em 0;
  padding: 16px 22px;
  border-inline-start: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #f0fbf9;
  color: #2c4a52;
}

.prose table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 0.94rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.prose th,
.prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

.prose th {
  background: #eef4ff;
  color: var(--ink);
  font-weight: 700;
}

.prose tr:hover td { background: #f8fbff; }

.prose img { border-radius: var(--radius); }

/* ===================== 9. Team ===================== */
.member {
  padding: 26px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.member__photo {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 18px 30px -22px rgba(37, 99, 235, 0.8);
  transform: translateZ(26px);
}

.member__photo img { width: 100%; height: 100%; object-fit: cover; }

.member h3 { margin-bottom: 2px; font-size: 1rem; transform: translateZ(14px); }
.member__role { margin-bottom: 8px; font-size: 0.82rem; font-weight: 700; color: #0f766e; }
.member p { margin: 0; font-size: 0.87rem; color: var(--muted); }

/* ===================== 10. Gallery ===================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery__item {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: zoom-in;
  box-shadow: var(--shadow-1);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.gallery__item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 34px 54px -34px rgba(15, 40, 90, 0.55);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery__item:hover img { transform: scale(1.06); }

.gallery__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 30px 16px 13px;
  background: linear-gradient(to top, rgba(8, 25, 55, 0.85), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery__item:hover .gallery__cap { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 22, 45, 0.86);
  backdrop-filter: blur(10px);
}

.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 16px; box-shadow: var(--shadow-2); }

.lightbox__close {
  position: absolute;
  top: 22px;
  inset-inline-end: 24px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ===================== 11. Forms ===================== */
.form-wrap {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-2);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: #94a3b8; }

.field select { appearance: none; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field--check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--muted);
}

.field--check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-note { margin-top: 14px; font-size: 0.83rem; color: var(--muted); }

.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.form-status.is-visible { display: block; }
.form-status.is-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.form-status.is-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }

.contact-list { display: grid; gap: 14px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.contact-item__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #eef4ff;
  border: 1px solid #dbe7f8;
  font-size: 1.05rem;
}

.contact-item strong { display: block; font-size: 0.85rem; color: var(--ink); }
.contact-item span,
.contact-item a { font-size: 0.92rem; color: var(--muted); word-break: break-word; }
.contact-item a:hover { color: var(--blue); }

/* ===================== 12. CTA ===================== */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 66px);
  border-radius: 32px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(600px 340px at 10% 110%, rgba(20, 184, 166, 0.35), transparent 62%),
    linear-gradient(135deg, #2563eb, #1e40af 55%, #0f766e);
  box-shadow: 0 40px 70px -40px rgba(30, 64, 175, 0.7);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from var(--angle), transparent 0 72%, rgba(255, 255, 255, 0.28) 86%, transparent 100%);
  animation: rotate 16s linear infinite;
  opacity: 0.6;
}

.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 { margin-bottom: 12px; color: #fff; }
.cta-band p { max-width: 56ch; margin: 0 auto 26px; color: rgba(255, 255, 255, 0.88); }
.cta-band .hero__actions { justify-content: center; margin-bottom: 0; }
.cta-band .btn--ghost { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); color: #fff; box-shadow: none; }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

@keyframes rotate {
  to { --angle: 360deg; }
}

/* ===================== 13. Footer ===================== */
.site-footer {
  margin-top: clamp(50px, 7vw, 90px);
  padding: clamp(48px, 6vw, 72px) 0 0;
  background: #0b1b33;
  color: #c7d4e8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 34px;
  padding-bottom: 42px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__tag { color: #8ea3c2; }
.footer-brand .brand__mark { box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.8); }

.site-footer h4 {
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: #fff;
}

.site-footer p { font-size: 0.89rem; color: #9fb2cf; }

.site-footer a { font-size: 0.89rem; color: #9fb2cf; transition: color 0.2s ease; }
.site-footer a:hover { color: #7dd3fc; }

.footer-links { display: grid; gap: 10px; }

.socials { display: flex; gap: 10px; margin-top: 18px; }

.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

.socials a:hover {
  transform: translateY(-3px);
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #8ea3c2;
}

/* ===================== 14. Search ===================== */
.search {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(60px, 12vh, 140px) 20px 20px;
}

.search[hidden] { display: none; }

.search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 51, 0.45);
  backdrop-filter: blur(6px);
}

.search__panel {
  position: relative;
  width: min(640px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 50px 100px -40px rgba(11, 27, 51, 0.55);
  animation: pop 0.22s var(--ease);
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.search__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.search__bar input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}

.search__bar input:focus { outline: none; }

.search__results {
  overflow-y: auto;
  padding: 8px;
}

.search__item {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.search__item:hover,
.search__item.is-active {
  background: #eef4ff;
}

.search__item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.95rem;
  color: var(--ink);
}

.search__item span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search__type {
  display: inline-block;
  margin-inline-end: 8px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: #e8f7f4;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.search__empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.search__hint {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ===================== 15. Inner page hero ===================== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(760px 420px at 50% -20%, rgba(56, 189, 248, 0.22), transparent 68%),
    radial-gradient(600px 300px at 85% 100%, rgba(20, 184, 166, 0.12), transparent 70%),
    #fff;
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.04rem;
}

.page-hero .eyebrow { justify-content: center; }

/* ===================== 16. Motion ===================== */
[data-reveal] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

[data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

.skeleton {
  min-height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #eef3fb 20%, #f9fbff 40%, #eef3fb 60%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

@supports (view-transition-name: none) {
  @view-transition { navigation: auto; }
}

/* ===================== 16a. Language switch & LTR ===================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
}

.lang-switch a {
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch a:hover { color: var(--blue); background: rgba(37, 99, 235, 0.08); }

.lang-switch a.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.9);
}

html[dir="ltr"] .brand__tag--fr { text-align: left; }

html[dir="ltr"] .news-card .more::after { content: "→"; }
html[dir="ltr"] .news-card:hover .more::after { transform: translateX(5px); }

html[dir="ltr"] .eyebrow::before {
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

html[dir="ltr"] .hero__title { line-height: 1.1; }


/* شعار حقيقي داخل الهيدر/الفوتر */
.brand__mark--logo {
  background: #fff;
  padding: 3px;
  box-shadow: 0 10px 22px -14px rgba(15, 40, 90, 0.55);
}

.brand__mark--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.brand__mark--logo::after { display: none; }

/* إخفاء بصري فقط — لقارئات الشاشة */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* حالة التركيز داخل نافذة البحث */
.search__panel:focus { outline: none; }

@media (max-width: 620px) {
  .lang-switch a { padding: 5px 7px; font-size: 0.68rem; }
}

/* ===================== 17. Responsive ===================== */
@media (max-width: 1080px) {
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 24px 40px -30px rgba(15, 40, 90, 0.45);
  }
  .nav-open .nav { display: flex; }
  .nav a { padding: 13px 14px; border-radius: 12px; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stage { max-width: 560px; margin-inline: auto; order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .brand__tag--fr { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .scene__chip { font-size: 0.76rem; padding: 8px 12px; }
  .scene__chip--a { inset-inline-start: 0; }
  .scene__chip--b { inset-inline-end: 0; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; translate: none; }
  .layer { transform: none !important; }
}
