/* ================================================================
   أرشيف د. مروان عورتاني - النظام البصري العصري الاحترافي
   Modern Premium Design System v3.0
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&family=Amiri:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============ DESIGN TOKENS ============ */
:root {
  /* Brand Colors */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;
  --brand-950: #172554;

  /* Gold Accent */
  --gold-300: #fcd34d;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;

  /* Semantic Colors */
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #3b82f6;
  --secondary:     #f59e0b;
  --accent:        #06b6d4;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;

  /* Backgrounds - Light Mode */
  --bg:           #f8fafc;
  --bg-primary:   #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-tertiary:  #e2e8f0;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --bg-card:      #ffffff;

  /* Text - Light Mode */
  --text:           #0f172a;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* Borders */
  --border:       #e2e8f0;
  --border-focus: #3b82f6;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
  --shadow-2xl: 0 40px 80px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.25);
  --shadow-gold: 0 0 30px rgba(245,158,11,0.3);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0284c7 100%);
  --grad-gold: linear-gradient(135deg, #92400e 0%, #d97706 50%, #f59e0b 100%);
  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --grad-hero: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #1d4ed8 70%, #0284c7 100%);
  --grad-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --grad-mesh: radial-gradient(at 40% 20%, #dbeafe 0px, transparent 50%), radial-gradient(at 80% 0%, #eff6ff 0px, transparent 50%), radial-gradient(at 0% 50%, #f0fdf4 0px, transparent 50%);

  /* Typography */
  --font-ar: 'Cairo', 'Tajawal', sans-serif;
  --font-display: 'Amiri', 'Cairo', serif;
  --font-en: 'Inter', sans-serif;
  --font-arabic: 'Cairo', 'Tajawal', sans-serif;

  /* Spacing */
  --section-py: 100px;
  --container-max: 1320px;

  /* Border Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 40px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s var(--ease);
  --t-base: 0.3s var(--ease);
  --t-slow: 0.5s var(--ease);

  /* CSS Aliases for backward compat */
  --text-mute: var(--text-muted);
  --font-latin: var(--font-en);
  --bg-dark: #0f172a;
}

/* ============ DARK MODE ============ */
[data-theme="dark"] {
  --bg:           #0a0f1e;
  --bg-primary:   #0d1424;
  --bg-secondary: #111827;
  --bg-tertiary:  #1a2234;
  --surface:      #141d2e;
  --surface-2:    #1a2234;
  --bg-card:      #141d2e;

  --text:           #f1f5f9;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-mute:      #64748b;

  --border:       rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);

  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 25px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.3);

  --grad-surface: linear-gradient(180deg, #141d2e 0%, #0d1424 100%);
  --grad-card: linear-gradient(145deg, #141d2e 0%, #111827 100%);
  --grad-mesh: radial-gradient(at 40% 20%, rgba(30,58,138,0.3) 0px, transparent 50%),
               radial-gradient(at 80% 0%, rgba(15,23,42,0.8) 0px, transparent 50%);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

::selection { background: var(--primary); color: white; }

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-ar); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--brand-600); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-700); }

/* ============ LAYOUT ============ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-py) 0; }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 0.4s var(--ease);
  background: transparent;
}

.navbar.scrolled, .navbar--solid {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(37,99,235,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

[data-theme="dark"] .navbar.scrolled,
[data-theme="dark"] .navbar--solid {
  background: rgba(13,20,36,0.9);
  border-bottom-color: rgba(255,255,255,0.06);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

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

.brand-icon {
  width: 46px;
  height: 46px;
  background: var(--grad-primary);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.3s var(--ease-bounce);
}

.nav-brand:hover .brand-icon { transform: rotate(-10deg) scale(1.05); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--r-full);
  transition: all var(--t-fast);
  white-space: nowrap;
}

.nav-link i {
  font-size: 15px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease);
}

.nav-link:hover i, .nav-link.active i { transform: scale(1.15); }

.nav-link:hover, .nav-link.active {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
}

.nav-link.active { background: rgba(37,99,235,0.12); color: var(--primary); }

.nav-link.nav-ai {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(59,130,246,0.08));
  color: #7c3aed;
}

.nav-link.nav-ai:hover { background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(59,130,246,0.15)); }

.nav-link.nav-admin {
  background: rgba(245,158,11,0.08);
  color: var(--gold-600);
}

.nav-link.nav-admin:hover { background: rgba(245,158,11,0.15); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-icon {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 17px;
  transition: all var(--t-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.btn-icon:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-1px); }

.nav-toggle { display: none; }

/* ============ HERO SECTION ============ */
.hero {
  min-height: 100vh;
  background: var(--grad-hero);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(6,182,212,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(124,58,237,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: float-particle 8s ease-in-out infinite;
}

@keyframes float-particle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-30px) scale(1.5); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
  width: 100%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  margin-bottom: 28px;
  animation: fade-slide-up 0.6s var(--ease) both;
}

.hero-badge i { color: var(--gold-400); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: white;
  line-height: 1.25;
  margin-bottom: 12px;
  animation: fade-slide-up 0.6s 0.1s var(--ease) both;
}

.hero-title-sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fade-slide-up 0.6s 0.2s var(--ease) both;
}

.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
  animation: fade-slide-up 0.6s 0.3s var(--ease) both;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 44px;
  animation: fade-slide-up 0.6s 0.4s var(--ease) both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.hero-stat-num span { color: var(--gold-400); }

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fade-slide-up 0.6s 0.5s var(--ease) both;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  transition: all var(--t-base);
  border: none;
}

.btn-hero-primary {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

.btn-hero-outline {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}

.btn-hero-outline:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }

/* ===== HERO PHOTO CARD — Ultra Premium ===== */
.hero-photo-wrap {
  position: relative;
  animation: fade-slide-left 0.9s 0.3s var(--ease) both;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fade-slide-left {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-photo-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 32px;
  padding: 36px 28px 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.08) inset;
}

/* Rotating glow ring behind card */
.hero-photo-card::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px; right: -80px; bottom: -80px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(99,179,237,0.12) 60deg,
    rgba(139,92,246,0.1) 120deg,
    transparent 180deg,
    rgba(37,99,235,0.1) 240deg,
    transparent 360deg
  );
  animation: rotate-slow 12s linear infinite;
  z-index: 0;
  border-radius: 50%;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== HERO AVATAR — Prominent Photo ===== */
.hero-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  margin: 0 auto 22px;
  position: relative;
  z-index: 2;
}

/* Glowing animated ring around avatar */
.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #2563eb,
    #06b6d4,
    #7c3aed,
    #f59e0b,
    #2563eb
  );
  animation: spin-ring 4s linear infinite;
  z-index: -1;
  opacity: 0.85;
}

.hero-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #2563eb,
    #06b6d4,
    #7c3aed,
    #f59e0b,
    #2563eb
  );
  animation: spin-ring 4s linear infinite;
  filter: blur(8px);
  z-index: -2;
  opacity: 0.5;
}

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.95);
  box-shadow:
    0 0 0 2px rgba(37,99,235,0.4),
    0 24px 64px rgba(0,0,0,0.45);
  display: block;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.hero-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: white;
  border: 5px solid rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
}

/* Online indicator dot */
.hero-avatar-online {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border-radius: 50%;
  border: 3px solid white;
  z-index: 3;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.3);
  animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

.hero-card-name {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
  letter-spacing: -0.01em;
}

.hero-card-title {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  line-height: 1.55;
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.hero-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}

.hero-card-tag:hover {
  background: rgba(255,255,255,0.18);
  color: white;
}

.hero-card-tag i { font-size: 10px; color: var(--gold-400); }

/* Floating Badges */
.hero-float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow:
    0 16px 48px rgba(0,0,0,0.2),
    0 4px 16px rgba(0,0,0,0.1),
    0 0 0 1px rgba(37,99,235,0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  z-index: 10;
  animation: float-badge 3.5s ease-in-out infinite;
  min-width: 160px;
}

[data-theme="dark"] .hero-float-badge {
  background: rgba(20,29,46,0.95);
  border: 1px solid rgba(100,130,220,0.2);
  color: white;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-10px) rotate(1deg); }
}

.hero-float-badge.badge-left {
  right: -28px;
  top: 20px;
  animation-delay: 0.4s;
}

.hero-float-badge.badge-bottom {
  left: -28px;
  bottom: 20px;
  animation-delay: 1.2s;
}

.hero-float-badge i {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.hero-float-badge.badge-left i {
  background: rgba(245,158,11,0.12);
  color: var(--gold-500);
}

.hero-float-badge.badge-bottom i {
  background: rgba(37,99,235,0.1);
  color: var(--primary);
}

.hero-float-badge div > div:first-child {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1px;
}

.hero-float-badge div > div:last-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

[data-theme="dark"] .hero-float-badge div > div:last-child { color: white; }
[data-theme="dark"] .hero-float-badge div > div:first-child { color: rgba(255,255,255,0.45); }

/* ============ SCROLL INDICATOR ============ */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  z-index: 5;
  animation: bounce-slow 2s ease-in-out infinite;
}

@keyframes bounce-slow { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

/* ============ SECTION HEADERS ============ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.18);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}

.section-eyebrow i {
  width: 26px;
  height: 26px;
  background: rgba(37,99,235,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.25;
}

.section-title span { color: var(--primary); }

.section-desc {
  font-size: 16.5px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all var(--t-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37,99,235,0.2);
}

.card-premium {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.card-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-base);
}

.card-premium:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.card-premium:hover::before { opacity: 1; }

/* ============ ACHIEVEMENT CARDS ============ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.ach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 20px;
}

.ach-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 0;
}

.ach-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: transparent; }
.ach-card:hover::after { opacity: 0.03; }
.ach-card:hover .ach-icon { background: var(--grad-primary); color: white; box-shadow: var(--shadow-glow); }

.ach-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: all var(--t-base);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.5);
  border: 1px solid rgba(37,99,235,0.15);
}

.ach-body { flex: 1; position: relative; z-index: 1; }

.ach-year {
  display: inline-block;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ach-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.4; }

.ach-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

.ach-impact {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--success);
  font-weight: 600;
}

/* ============ STATS CARDS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c, var(--grad-primary));
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  color: var(--primary);
  transition: all var(--t-base);
  box-shadow: 0 4px 14px rgba(37,99,235,0.18), inset 0 1px 0 rgba(255,255,255,0.4);
  border: 1px solid rgba(37,99,235,0.12);
}

.stat-card:hover .stat-icon { background: var(--grad-primary); color: white; }

.stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ============ TIMELINE ============ */
.timeline { position: relative; padding: 20px 0; }

.timeline::before {
  content: '';
  position: absolute;
  right: 28px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--primary), var(--accent), transparent);
}

.timeline-item {
  display: flex;
  gap: 28px;
  padding-right: 68px;
  position: relative;
  margin-bottom: 36px;
}

.timeline-dot {
  position: absolute;
  right: 17px;
  top: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-glow);
  z-index: 2;
  transition: transform var(--t-base);
}

.timeline-item:hover .timeline-dot { transform: scale(1.3); }

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  flex: 1;
  transition: all var(--t-base);
}

.timeline-item:hover .timeline-card { border-color: rgba(37,99,235,0.3); box-shadow: var(--shadow-md); }

.timeline-year {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad-primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.timeline-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.timeline-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* ============ QUOTE CARDS ============ */
.quote-card {
  background: var(--grad-primary);
  border-radius: var(--r-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  color: white;
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  right: 30px;
  font-size: 200px;
  font-family: Georgia, serif;
  color: rgba(255,255,255,0.07);
  line-height: 1;
  pointer-events: none;
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: white;
  line-height: 1.7;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.quote-author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}

.quote-author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.quote-author-name { font-size: 15px; font-weight: 700; color: white; }
.quote-author-ctx { font-size: 12.5px; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* ============ MEDIA CARDS ============ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-base);
}

.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.media-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.media-card:hover .media-thumb img { transform: scale(1.05); }

.media-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  color: white;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity var(--t-base);
}

.media-card:hover .media-play-btn { opacity: 1; }

.media-play-btn i {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform var(--t-base);
}

.media-card:hover .media-play-btn i { transform: scale(1.1); }

.media-body { padding: 20px; }
.media-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.media-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.media-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }

/* ============ PAGE HERO ============ */
.page-hero {
  background: var(--grad-hero);
  padding: 120px 0 70px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,0.3) 0%, transparent 60%);
}

.page-hero-content { position: relative; z-index: 2; text-align: center; color: white; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.95);
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
}

.page-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto;
}

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-tab {
  padding: 9px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============ SEARCH ============ */
.search-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto 40px;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 54px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 15px;
  color: var(--text);
  font-family: var(--font-ar);
  transition: all var(--t-base);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1), var(--shadow-md);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font-ar);
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.4); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover { background: var(--primary); color: white; }

.btn-ghost {
  background: rgba(37,99,235,0.06);
  color: var(--primary);
}

.btn-ghost:hover { background: rgba(37,99,235,0.12); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ============ TAGS ============ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.15);
}

.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-blue { background: rgba(37,99,235,0.1); color: var(--primary); }
.badge-green { background: rgba(16,185,129,0.1); color: #059669; }
.badge-gold { background: rgba(245,158,11,0.1); color: var(--gold-600); }
.badge-red { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-purple { background: rgba(124,58,237,0.1); color: #7c3aed; }

/* ============ PUBLICATION CARD ============ */
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all var(--t-base);
  display: flex;
  gap: 20px;
}

.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,235,0.2); }

.pub-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--t-base);
  box-shadow: 0 4px 12px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.4);
  border: 1px solid rgba(37,99,235,0.1);
}

.pub-card:hover .pub-icon { background: var(--grad-primary); color: white; }

.pub-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.pub-abstract { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-muted); }

/* ============ DOCUMENT CARD ============ */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--t-base);
}

.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(37,99,235,0.2); }

.doc-icon {
  width: 56px;
  height: 64px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(239,68,68,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.doc-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.doc-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.doc-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ ADMIN LAYOUT ============ */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 72px;
}

.admin-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding-bottom: 20px;
}

.admin-sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.admin-logo-text { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-logo-sub { font-size: 11px; color: var(--text-muted); }

.admin-nav-section { padding: 16px 0 4px; }

.admin-nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 20px 8px;
  letter-spacing: 1px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  border-right: 3px solid transparent;
  transition: all var(--t-fast);
  cursor: pointer;
}

.admin-nav-link i {
  width: 36px;
  height: 36px;
  text-align: center;
  font-size: 17px;
  background: rgba(37,99,235,0.06);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast);
  color: var(--text-muted);
}
.admin-nav-link:hover {
  background: rgba(37,99,235,0.06);
  color: var(--primary);
}
.admin-nav-link:hover i {
  background: rgba(37,99,235,0.12);
  color: var(--primary);
}
.admin-nav-link.active {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  border-right-color: var(--primary);
}
.admin-nav-link.active i {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 3px 10px rgba(37,99,235,0.35);
}

.admin-content { padding: 32px; background: var(--bg); min-height: calc(100vh - 72px); }

.admin-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page-title { font-size: 22px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 10px; }
.admin-page-title i { color: var(--primary); }
.admin-breadcrumb { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c, var(--grad-primary));
}

.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.admin-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.3s var(--ease);
}

.admin-stat-card:hover .admin-stat-icon { transform: scale(1.1) rotate(-5deg); }
.admin-stat-num { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; margin: 12px 0 6px; }
.admin-stat-label { font-size: 13px; color: var(--text-muted); }
.admin-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }

/* Admin Table */
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-table-title { font-size: 16px; font-weight: 700; color: var(--text); }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: right;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--bg-secondary); }

.action-btns { display: flex; gap: 6px; }

.btn-edit {
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
  border: 1px solid rgba(59,130,246,0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-ar);
  display: flex; align-items: center; gap: 4px;
}

.btn-del {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-ar);
  display: flex; align-items: center; gap: 4px;
}

.btn-edit:hover { background: #3b82f6; color: white; border-color: #3b82f6; }
.btn-del:hover { background: #ef4444; color: white; border-color: #ef4444; }

.btn-add {
  background: var(--grad-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font-ar);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-add:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-xl);
  padding: 64px 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-mesh);
  opacity: 0;
  transition: opacity var(--t-base);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(37,99,235,0.03);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.upload-zone:hover::before, .upload-zone.drag-over::before { opacity: 1; }

.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(37,99,235,0.05);
}

.upload-icon {
  width: 88px;
  height: 88px;
  background: rgba(37,99,235,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  margin: 0 auto 20px;
  transition: all var(--t-base);
  position: relative;
  z-index: 1;
}

.upload-zone:hover .upload-icon { background: var(--grad-primary); color: white; transform: scale(1.08); }

.upload-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; position: relative; z-index: 1; }
.upload-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; position: relative; z-index: 1; }
.upload-types { display: flex; gap: 8px; justify-content: center; position: relative; z-index: 1; }
.upload-type-badge {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.2);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s var(--ease);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  animation: slide-up 0.3s var(--ease-bounce);
}

@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 18px; font-weight: 700; color: var(--text); }

.modal-close {
  width: 36px; height: 36px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}

.modal-close:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

.modal-body { padding: 24px 28px; }
.modal-footer { padding: 16px 28px 24px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); }

/* Forms */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-ar);
  transition: all var(--t-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-textarea { resize: vertical; min-height: 100px; }

/* Notification */
.notif-container { position: fixed; top: 90px; left: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }

.notif {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  animation: slide-in-right 0.3s var(--ease-bounce);
  font-size: 14px;
  font-weight: 600;
}

@keyframes slide-in-right { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.notif-success { border-right: 3px solid #10b981; }
.notif-success i { color: #10b981; }
.notif-error { border-right: 3px solid #ef4444; }
.notif-error i { color: #ef4444; }
.notif-info { border-right: 3px solid var(--primary); }
.notif-info i { color: var(--primary); }

/* Progress bars */
.progress-bar { background: var(--bg-secondary); border-radius: var(--r-full); height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad-primary); border-radius: var(--r-full); transition: width 0.4s var(--ease); }

/* ============ AI CHAT ============ */
.ai-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}

.ai-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 28px;
}

.ai-chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.ai-chat-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-avatar {
  width: 48px;
  height: 48px;
  background: var(--grad-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.ai-messages {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ai-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fade-slide-up 0.3s var(--ease);
}

.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.ai-msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ai-msg.bot .ai-msg-avatar {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.ai-msg.user .ai-msg-avatar {
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06));
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.15);
}

.ai-msg-bubble {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.7;
}

.ai-msg.bot .ai-msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px 16px 16px 16px;
}

.ai-msg.user .ai-msg-bubble {
  background: var(--grad-primary);
  color: white;
  border-radius: 16px 4px 16px 16px;
}

.ai-input-wrap {
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.ai-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.ai-textarea {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-ar);
  resize: none;
  min-height: 52px;
  max-height: 120px;
  overflow-y: auto;
  transition: all var(--t-fast);
}

.ai-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.ai-send-btn {
  width: 52px;
  height: 52px;
  background: var(--grad-primary);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-base);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  flex-shrink: 0;
}

.ai-send-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Quick prompts */
.quick-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.quick-prompt {
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-ar);
}

.quick-prompt:hover { background: rgba(37,99,235,0.06); color: var(--primary); border-color: rgba(37,99,235,0.3); }

/* Info Box */
.info-box {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-box i { color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-dark, #0f172a);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand { }

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

.footer-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.footer-logo-name { font-size: 16px; font-weight: 700; color: white; }
.footer-logo-sub { font-size: 11px; color: rgba(255,255,255,0.4); }
.footer-desc { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 280px; }

.footer-col-title { font-size: 14px; font-weight: 700; color: white; margin-bottom: 16px; }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,0.5); transition: color var(--t-fast); display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.35); transition: color var(--t-fast); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ============ ANIMATIONS ============ */
@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-slide-left {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-aos].aos-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-left"] { transform: translateX(40px); }
[data-aos="fade-left"].aos-visible { transform: translateX(0); }
[data-aos="fade-right"] { transform: translateX(-40px); }
[data-aos="fade-right"].aos-visible { transform: translateX(0); }
[data-aos="zoom-in"] { transform: scale(0.85); }
[data-aos="zoom-in"].aos-visible { transform: scale(1); }

/* Stagger delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Dividers */
.divider { height: 1px; background: var(--border); margin: 32px 0; }

/* Gradient text */
.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .hero-inner { grid-template-columns: 1fr 360px; gap: 48px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > *:last-child { grid-column: span 3; display: none; }
}

@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 220px 1fr; }
  .ai-layout { grid-template-columns: 280px 1fr; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo-wrap { display: none; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  :root { --section-py: 70px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 72px; right: 0; left: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px; gap: 4px; box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-sidebar { display: none; }
  .ai-messages { padding: 20px; }
  .ai-input-wrap { padding: 16px 20px; }
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > *:first-child { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .admin-content { padding: 20px; }
  .hero-content { padding: 100px 0 60px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.6rem; }
  .achievements-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .btn-hero { padding: 12px 20px; font-size: 13.5px; }
}

/* ============ LOADING SPINNER ============ */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(37,99,235,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Typing indicator */
.typing-dots span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing { 0%,80%,100%{transform:scale(0.8);opacity:0.5} 40%{transform:scale(1);opacity:1} }

/* File upload items */
.upload-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.upload-item-icon { font-size: 24px; flex-shrink: 0; }
.upload-item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.upload-item-size { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.upload-item-progress { flex: 1; }
.upload-item-status { font-size: 12px; font-weight: 600; }
.upload-item-status.done { color: var(--success); }
.upload-item-status.loading { color: var(--primary); }

/* Expertise tags */
.expertise-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.12);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-fast);
}

.expertise-tag:hover { background: var(--primary); color: white; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 700;
}

.status-completed { background: rgba(16,185,129,0.1); color: #059669; }
.status-ongoing { background: rgba(37,99,235,0.1); color: var(--primary); }
.status-planned { background: rgba(245,158,11,0.1); color: var(--gold-600); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 48px; height: 48px;
  background: var(--grad-primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
  transition: all var(--t-base);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.back-to-top.show { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(37,99,235,0.5); }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(6,182,212,0.05));
  border: 1px solid rgba(37,99,235,0.15);
  border-right: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: 20px 24px;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Link underline hover */
.link-hover {
  color: var(--primary);
  position: relative;
  font-weight: 600;
}

.link-hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0; left: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--t-base);
  transform-origin: left;
}

.link-hover:hover::after { transform: scaleX(1); }

/* Swiper-like slick override */
.slick-cards { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.slick-cards::-webkit-scrollbar { height: 4px; }
.slick-card { flex-shrink: 0; scroll-snap-align: start; }

/* ================================================================
   صفحات داخلية - Page Hero & Inner Pages Premium Design
   ================================================================ */

/* Page Hero */
.page-hero {
  background: var(--grad-hero);
  padding: 120px 0 70px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg), transparent);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.page-hero-content h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  margin: 16px 0 14px;
  line-height: 1.2;
}

.page-hero-content p {
  font-size: 18px;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Page Content Area */
.page-content { padding: 60px 0 100px; }

/* Section Badge */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.1);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--r-full);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header .section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-header .section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font-ar);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filter-btn i {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.05);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

/* ================================================================
   Achievements Grid - صفحة الإنجازات
   ================================================================ */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.achievement-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-base);
}

.achievement-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37,99,235,0.2);
}

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

.ach-icon-wrap {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.achievement-card:hover .ach-icon-wrap {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 12px 32px rgba(37,99,235,0.5);
}

.ach-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37,99,235,0.08);
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  margin-bottom: 10px;
}

.ach-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.ach-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.ach-impact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(16,185,129,0.08);
  border-radius: var(--r-md);
}

.ach-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ach-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  border: 1px solid var(--border);
}

.ach-institution {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ================================================================
   Timeline Full - الجدول الزمني الكامل
   ================================================================ */

.timeline-full {
  position: relative;
  padding: 20px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 60px 1fr;
  gap: 0;
  margin-bottom: 30px;
  position: relative;
}

.tl-side-year {
  text-align: center;
  padding-top: 8px;
}

.tl-year-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.tl-month {
  font-size: 11px;
  color: var(--text-muted);
}

.tl-connector-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tl-dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  z-index: 1;
  transition: transform 0.3s var(--ease);
}

.timeline-item:hover .tl-dot { transform: scale(1.15); }

.dot-high {
  background: var(--grad-primary);
  box-shadow: 0 6px 20px rgba(37,99,235,0.5), 0 0 0 4px rgba(37,99,235,0.15);
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.dot-medium {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

.tl-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, var(--primary), transparent);
  opacity: 0.3;
  margin: 4px 0;
}

.tl-body {
  padding: 0 0 0 20px;
  padding-bottom: 20px;
}

.tl-category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  margin-bottom: 8px;
}

.tl-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tl-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.tl-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  transition: gap var(--t-fast);
}

.tl-source:hover { gap: 10px; }

.timeline-item.important .tl-body {
  background: linear-gradient(135deg, rgba(37,99,235,0.03), transparent);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  border: 1px solid rgba(37,99,235,0.1);
}

/* ================================================================
   Projects Grid - صفحة المشاريع
   ================================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37,99,235,0.2);
}

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.proj-icon {
  width: 58px;
  height: 58px;
  background: var(--grad-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.3s var(--ease);
}

.project-card:hover .proj-icon { transform: scale(1.1) rotate(-5deg); }

.proj-years {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.proj-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.proj-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.proj-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.proj-meta-item i { color: var(--primary); width: 16px; }

.proj-impact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
  padding: 10px 14px;
  background: rgba(16,185,129,0.08);
  border-radius: var(--r-md);
}

.proj-impact i { margin-top: 2px; flex-shrink: 0; }

.proj-partners {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
}

.status-completed { background: rgba(16,185,129,0.12); color: #059669; }
.status-ongoing { background: rgba(245,158,11,0.12); color: #d97706; }
.status-planned { background: rgba(100,116,139,0.12); color: #475569; }

/* ================================================================
   Publications List - صفحة المنشورات
   ================================================================ */

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.publication-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 28px 28px 28px 28px;
  border: 1px solid var(--border);
  display: flex;
  gap: 24px;
  transition: all var(--t-base);
  position: relative;
}

.publication-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37,99,235,0.2);
}

.pub-type-indicator {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: white;
}

.pub-type-journal { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.pub-type-conference { background: linear-gradient(135deg, #92400e, #d97706); }
.pub-type-report { background: linear-gradient(135deg, #065f46, #10b981); }
.pub-type-book { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.pub-type-chapter { background: linear-gradient(135deg, #164e63, #06b6d4); }
.pub-type-thesis { background: linear-gradient(135deg, #881337, #e11d48); }

.pub-content { flex: 1; }

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.pub-year {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pub-type-badge {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
}

.pub-citations {
  background: rgba(245,158,11,0.1);
  color: #d97706;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pub-featured {
  background: rgba(245,158,11,0.1);
  color: #d97706;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pub-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.pub-title-en {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-en);
  margin-bottom: 12px;
  font-style: italic;
}

.pub-abstract {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.pub-journal {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--r-md);
}

.pub-authors {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ================================================================
   Media Gallery - معرض الوسائط
   ================================================================ */

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.gallery-item {
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--t-base);
}

.gallery-item.featured {
  grid-column: span 2;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}

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

.gallery-item:hover .gallery-thumb img { transform: scale(1.05); }

.thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  font-size: 48px;
  color: var(--text-muted);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-base);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-play {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 22px;
  transition: transform var(--t-base);
}

.gallery-play:hover { transform: scale(1.1); }

.gallery-type-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
}

.gallery-info {
  padding: 20px;
}

.gallery-year {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  background: rgba(37,99,235,0.08);
  padding: 2px 8px;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: 8px;
}

.gallery-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.gallery-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.gallery-source {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* External Resource Cards */
.external-resources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: all var(--t-base);
  cursor: pointer;
}

.resource-card:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
  background: rgba(37,99,235,0.02);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(37,99,235,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.resource-info { flex: 1; }

.resource-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.resource-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.resource-arrow {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform var(--t-fast);
}

.resource-card:hover .resource-arrow { transform: translateX(-4px); }

/* ================================================================
   Archive Page - صفحة الأرشيف
   ================================================================ */

.archive-search-bar {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 30px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 16px;
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.search-input-main {
  width: 100%;
  padding: 12px 48px 12px 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 15px;
  transition: all var(--t-fast);
}

.search-input-main:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.search-clear {
  position: absolute;
  left: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.filter-select {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 14px;
  cursor: pointer;
  min-width: 140px;
}

.filter-select:focus { outline: none; border-color: var(--primary); }

/* Archive Stats */
.archive-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  justify-content: center;
}

.archive-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all var(--t-fast);
}

.archive-stat i { color: var(--primary); }
.archive-stat span { color: var(--primary); font-size: 16px; }
.archive-stat:hover { border-color: var(--primary); background: rgba(37,99,235,0.04); }

/* Archive Section */
.archive-section { margin-bottom: 48px; }

.archive-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.archive-section-title i {
  color: var(--primary);
  font-size: 18px;
}

/* Document Cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all var(--t-base);
}

.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
}

.doc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.doc-info { flex: 1; }

.doc-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  margin-bottom: 6px;
}

.doc-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.doc-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.doc-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.doc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* Archive List Items */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}

.archive-item:hover {
  border-color: rgba(37,99,235,0.2);
  box-shadow: var(--shadow-sm);
  background: rgba(37,99,235,0.02);
}

.archive-item .ai-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37,99,235,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
}

.archive-item .ai-content { flex: 1; }

.archive-item .ai-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.archive-item .ai-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37,99,235,0.08);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.archive-item .ai-cat {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
}

.archive-item .ai-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.archive-item .ai-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.proj-beneficiaries {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.no-results i {
  font-size: 60px;
  color: var(--text-muted);
  opacity: 0.4;
}

.no-results h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.no-results p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ================================================================
   Footer Mini - فوتر بسيط
   ================================================================ */

.footer-mini {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-mini p {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-mini a {
  color: var(--primary);
  font-weight: 600;
}

/* AI Float Button */
.ai-float-btn {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(124,58,237,0.45), 0 0 0 4px rgba(124,58,237,0.15);
  transition: all var(--t-base);
  z-index: 500;
  border: 3px solid rgba(255,255,255,0.25);
}

.ai-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(124,58,237,0.5);
}

/* ================================================================
   Buttons
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-ar);
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}

.btn-disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ================================================================
   AI Page - صفحة المساعد الذكي
   ================================================================ */

.ai-page-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}

.ai-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.ai-sidebar-header {
  padding: 30px 24px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(37,99,235,0.06));
}

.ai-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(124,58,237,0.3);
}

.ai-sidebar-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.ai-sidebar-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.ai-sidebar-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.ai-sidebar-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-suggest-btn {
  text-align: right;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-ar);
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
}

.ai-suggest-btn:hover {
  border-color: #7c3aed;
  color: #7c3aed;
  background: rgba(124,58,237,0.05);
  transform: translateX(-3px);
}

.quick-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-fact i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.1);
}

.ai-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.source-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.05);
}

/* AI Main Chat */
.ai-main {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  height: calc(100vh - 72px);
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ai-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(124,58,237,0.4), inset 0 1px 0 rgba(255,255,255,0.2);\n}

.ai-status-dot {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.ai-header-info { flex: 1; }

.ai-header-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.ai-status {
  font-size: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.ai-status i { font-size: 8px; }

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.05);
}

/* Messages */
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.ai-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: msgFadeIn 0.3s var(--ease);
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.bot-message { align-self: flex-start; }
.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}

.user-avatar {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-content { align-items: flex-end; }

.message-text {
  background: var(--surface);
  border-radius: 16px;
  border-radius: 0 16px 16px 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.user-message .message-text {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  border-radius: 16px 0 16px 16px;
}

.message-text p { margin-bottom: 8px; }
.message-text p:last-child { margin-bottom: 0; }
.message-text ul { padding-right: 20px; margin: 8px 0; }
.message-text li { margin-bottom: 5px; }
.message-text strong { font-weight: 700; }
.message-text h3, .message-text h2 { font-size: 16px; font-weight: 700; margin: 10px 0 6px; }

.message-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Typing Indicator */
.ai-typing-indicator {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0 24px;
  margin-bottom: 8px;
}

.typing-dots {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.3s; }
.typing-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* AI Input */
.ai-input-area {
  padding: 16px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.ai-input-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  transition: border-color var(--t-fast);
  margin-bottom: 10px;
}

.ai-input-wrap:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.ai-textarea {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--text);
  resize: none;
  outline: none;
  line-height: 1.6;
  max-height: 120px;
  min-height: 40px;
}

.ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-base);
  flex-shrink: 0;
}

.ai-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ai-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

/* ================================================================
   Admin Layout - لوحة التحكم
   ================================================================ */

.admin-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.admin-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.admin-topbar-actions {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Admin Notifications */
.notification {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #1e293b;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 320px;
  box-shadow: var(--shadow-xl);
}

.notification.show { transform: translateY(0); opacity: 1; }
.notification.success { background: #059669; }
.notification.error { background: #ef4444; }
.notification.info { background: var(--primary); }

/* Responsive - صفحات داخلية */
@media (max-width: 1024px) {
  .ai-page-layout {
    grid-template-columns: 280px 1fr;
  }

  .gallery-item.featured { grid-column: span 1; }
}

@media (max-width: 768px) {
  .page-hero { padding: 100px 0 50px; }
  .page-hero-content h1 { font-size: 26px; }

  .ai-page-layout {
    grid-template-columns: 1fr;
  }

  .ai-sidebar {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 70px 44px 1fr;
  }

  .publication-card {
    flex-direction: column;
  }

  .archive-search-bar {
    flex-direction: column;
    gap: 12px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .media-gallery {
    grid-template-columns: 1fr;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 7px 14px; font-size: 13px; }
  .archive-stats { gap: 8px; }
  .archive-stat { padding: 8px 14px; font-size: 13px; }
}
