/* ================== المتغيرات الأساسية (الوضع الفاتح) ================== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-darker: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-inverse: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --primary-gradient: linear-gradient(135deg, #4e5dc7 0%, #724bd6 50%, #7e74c9 100%);
  --btn-gradient: linear-gradient(135deg, #707bf0 0%, #724bd6 100%);
  --border-color: rgba(114, 75, 214, 0.12);
  --accent-color: #724bd6;
  --mint-glow: #83e5d2; 
  --glow-shadow: 0 10px 25px rgba(114, 75, 214, 0.12), 0 4px 15px rgba(208, 152, 250, 0.15);
  --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(114, 75, 214, 0.02);
}

/* ================== المتغيرات الأساسية (الوضع الداكن) ================== */
body.theme-dark {
  --bg-primary: #0a0b1e;
  --bg-secondary: #131230;
  --bg-card: rgba(30, 27, 74, 0.6);
  --bg-darker: #04050d;
  --text-main: #f1f5f9;
  --text-muted: #cbd3fd;
  --text-inverse: #0f172a;
  --nav-bg: rgba(13, 12, 36, 0.9);
  --primary-gradient: linear-gradient(135deg, #3d52d9 0%, #7047eb 50%, #9e47eb 100%);
  --btn-gradient: linear-gradient(135deg, #707bf0 0%, #d098fa 100%);
  --border-color: rgba(208, 152, 250, 0.2);
  --accent-color: #83e5d2;
  --mint-glow: #83e5d2;
  --glow-shadow: 0 8px 32px rgba(114, 75, 214, 0.3);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  background-image: radial-gradient(circle at 50% 0%, #201a4e 0%, var(--bg-primary) 70%);
}

/* ================== التنسيقات العامة ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", "Poppins", sans-serif;
  scroll-behavior: smooth;
  transition: background 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body {
  background: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 0%, rgba(114, 75, 214, 0.05) 0%, rgba(208, 152, 250, 0.02) 40%, var(--bg-primary) 70%);
}

img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ================== شريط التنقل (Navigation) ================== */
.modern-nav {
  display: flex; justify-content: space-between; align-items: center; padding: 20px 8%;
  background: var(--nav-bg); border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px);
}

.logo {
  color: var(--text-main); font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(120deg, var(--text-main) 30%, var(--accent-color));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none;
}

.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { 
  text-decoration: none; color: var(--text-muted); font-weight: 600; transition: 0.3s; font-size: 15px; padding: 8px 12px; border-radius: 8px; 
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); background: rgba(114, 75, 214, 0.06); }
body.theme-dark .nav-links a:hover, body.theme-dark .nav-links a.active { color: #ffffff; background: rgba(114, 75, 214, 0.2); }

.nav-right { display: flex; align-items: center; gap: 15px; }
.theme-toggle-btn {
  background: rgba(114, 75, 214, 0.05); border: 1px solid var(--border-color); color: var(--text-main); 
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.theme-toggle-btn:hover { border-color: var(--accent-color); transform: scale(1.05); }

.menu-toggle { display: none; cursor: pointer; font-size: 24px; color: var(--text-main); }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-right { display: flex; align-items: center; gap: 15px; margin-left: auto; }
  .nav-links {
    position: absolute; top: 100%; left: -100%; flex-direction: column;
    background: var(--nav-bg); width: 100%; padding: 20px 8%; gap: 15px;
    border-bottom: 1px solid var(--border-color); transition: left 0.4s ease; backdrop-filter: blur(10px);
  }
  .nav-links.active { left: 0; }
}

/* ================== الأزرار وباقي العناصر ================== */
.join-btn {
  background: var(--btn-gradient); color: white; padding: 12px 24px;
  text-decoration: none; border-radius: 8px; font-weight: 700;
  display: inline-block; box-shadow: var(--glow-shadow); border: 1px solid rgba(255, 255, 255, 0.1);
}
.join-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(114, 75, 214, 0.2); }

.btn {
  padding: 14px 28px; border: none; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 15px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--btn-gradient); color: white; box-shadow: var(--glow-shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(114, 75, 214, 0.25); }
.btn-secondary { background: rgba(114, 75, 214, 0.04); border: 1px solid var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: rgba(114, 75, 214, 0.08); border-color: var(--accent-color); }
.info-btn { background: var(--btn-gradient); color: white; margin-top: 15px; border: none; width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-join {
  background: linear-gradient(135deg, #724bd6, #00f2fe);
  color: #fff; padding: 8px 18px; border-radius: 20px;
  font-weight: 600; font-size: 14px; text-decoration: none; transition: opacity 0.3s ease;
}
.btn-join:hover { opacity: 0.9; }

.mobile-join-item { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-join-item { display: block; margin-top: 10px; }
  .btn-join-mobile {
    display: block; background: linear-gradient(135deg, #724bd6, #00f2fe);
    color: #fff; padding: 10px; border-radius: 8px; font-weight: 600; text-decoration: none; text-align: center;
  }
}

/* الصفحة الرئيسية والبطاقات والعدادات */
.hero {
  min-height: 75vh; display: flex; align-items: center; padding: 0 8%;
  background: radial-gradient(circle at 85% 40%, rgba(208, 152, 250, 0.12) 0%, rgba(114, 75, 214, 0.04) 40%, transparent 70%);
  position: relative;
}
.hero-content { max-width: 750px; z-index: 2; }
.hero h1 {
  font-size: 52px; margin-bottom: 20px; line-height: 1.2; font-weight: 800;
  background: linear-gradient(135deg, var(--text-main) 30%, #4e5dc7 60%, var(--accent-color));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; margin-bottom: 35px; color: var(--text-muted); line-height: 1.7; }
.buttons { display: flex; gap: 15px; flex-wrap: wrap; }

.section { padding: 80px 8%; }
.section-title { font-size: 38px; margin-bottom: 15px; text-align: center; font-weight: 800; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 50px; font-size: 16px; }

.cards { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; max-width: 1100px; margin: 0 auto; }
.card {
  background: var(--bg-card); padding: 40px 30px; border-radius: 16px;
  box-shadow: var(--card-shadow); border: 1px solid var(--border-color);
  text-align: center; flex: 1 1 calc(33.333% - 20px); min-width: 280px; max-width: 340px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover {
  transform: translateY(-5px); border-color: var(--accent-color);
  box-shadow: 0 15px 35px rgba(114, 75, 214, 0.08), 0 5px 15px rgba(208, 152, 250, 0.1);
}
.card h3 { margin-bottom: 12px; font-size: 22px; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }

.stats {
  background: var(--bg-darker); display: grid; grid-template-columns: repeat(4, 1fr);
  text-align: center; padding: 60px 8%; border-top: 1px solid var(--border-color);
}
.stat h2 { color: var(--accent-color); font-size: 45px; font-weight: 800; margin-bottom: 5px; }

@media (max-width: 992px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
}
.card {
  background: var(--bg-card); 
  padding: 40px 30px; 
  border-radius: 16px;
  box-shadow: var(--card-shadow); 
  border: 1px solid var(--border-color);
  text-align: center; 
  flex: 1 1 calc(33.333% - 20px); 
  min-width: 280px; 
  max-width: 340px;
  display: flex; 
  flex-direction: column; 
  justify-content: space-between;
  
  /* --- التعديلات الجديدة للانيميشن الناعم --- */
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  max-height: 600px; /* ارتفاع تقديري يغطي محتوى البطاقة */
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-5px); 
  border-color: var(--accent-color);
  box-shadow: 0 15px 35px rgba(114, 75, 214, 0.08), 0 5px 15px rgba(208, 152, 250, 0.1);
}

/* --- كلاس الإخفاء والظهور السلس للفلترة --- */
.card.hidden {
  opacity: 0;
  transform: translateY(-15px) scale(0.96);
  visibility: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border: none;
  pointer-events: none;
}

.card h3 { margin-bottom: 12px; font-size: 22px; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }


/* ================== تواصل معنا (معدلة لتتطابق مع الثيم الفاتح والغامق) ================== */
.collaboration-banner-section {
    display: flex; justify-content: center; padding: 0 50px 60px 50px; margin-top: 40px; width: 100%;
}
.collab-banner-content {
    width: 100%; max-width: 940px; background-color: var(--bg-card); border: 1px solid var(--border-color);
    padding: 40px 50px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: var(--card-shadow);
}
.collab-text-group { text-align: left; }
.collab-text-group h3 { font-size: 1.5rem; font-weight: bold; color: var(--text-main); margin-bottom: 10px; }
.collab-text-group p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.collab-banner-content .card-action-btn {
    text-decoration: none; color: #ffffff; font-weight: 600; padding: 12px 30px; border-radius: 8px; white-space: nowrap;
    background: linear-gradient(to right, #63b3ed, #9f7aea); box-shadow: 0 4px 10px rgba(159, 122, 234, 0.3); transition: transform 0.3s ease;
}
.collab-banner-content .card-action-btn:hover { transform: translateY(-2px); }

.collaboration-banner {
    display: flex; justify-content: space-between; align-items: center; background-color: var(--bg-card); 
    border: 1px solid var(--border-color); border-radius: 12px; padding: 30px 40px; margin: 40px auto; max-width: 900px; box-shadow: var(--card-shadow);
}
.collaboration-banner .collab-text { text-align: left; }
.collaboration-banner .collab-text h3 { color: var(--text-main); font-size: 22px; margin-bottom: 8px; }
.collaboration-banner .collab-text p { color: var(--text-muted); font-size: 15px; margin: 0; }
.collaboration-banner .collab-btn {
    background: linear-gradient(to right, #63b3ed, #9f7aea); color: #ffffff; text-decoration: none; padding: 12px 30px;
    border-radius: 8px; font-weight: bold; white-space: nowrap; transition: transform 0.3s ease; border: none;
}
.collaboration-banner .collab-btn:hover { transform: scale(1.05); }

@media (max-width: 768px) {
    .collab-banner-content, .collaboration-banner { flex-direction: column; text-align: center; gap: 20px; padding: 30px 20px; }
    .collab-text-group, .collaboration-banner .collab-text { text-align: center; margin-bottom: 20px; }
}

/* ================== صفحة الأخبار والفعاليات ================== */
.visual-banner {
  background: var(--primary-gradient); color: white; padding: 50px 40px;
  text-align: center; border-radius: 16px; margin-bottom: 40px; box-shadow: var(--glow-shadow);
}
.visual-banner h2 { font-size: 32px; font-weight: 800; }

.controls-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px; gap: 20px; flex-wrap: wrap;
}

.search-box { position: relative; flex: 1; max-width: 400px; }
.search-box input {
  width: 100%; padding: 12px 40px 12px 15px; border-radius: 8px;
  border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-main); font-size: 14px; outline: none;
}
.search-box input:focus { border-color: var(--accent-color); }
.search-box i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.filter-btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 16px; border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-main); border-radius: 8px;
  cursor: pointer; font-weight: 600; transition: all 0.2s ease;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--btn-gradient); color: white; border-color: transparent; box-shadow: var(--glow-shadow);
}

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.news-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; overflow: hidden; display: flex;
  flex-direction: column; box-shadow: var(--card-shadow);
}
.news-card-header { padding: 25px 25px 10px 25px; display: flex; justify-content: space-between; align-items: center; }
.badge-tag {
  background: rgba(114, 75, 214, 0.06); color: var(--accent-color); padding: 6px 12px;
  border-radius: 6px; font-size: 12px; font-weight: 700; border: 1px solid rgba(114, 75, 214, 0.12);
}
body.theme-dark .badge-tag { background: rgba(131, 229, 210, 0.08); color: var(--mint-glow); border: 1px solid rgba(131, 229, 210, 0.15); }
.event-date { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.news-card-body { padding: 15px 25px 25px 25px; display: flex; flex-direction: column; flex-grow: 1; }
.news-card-body h3 { font-size: 20px; margin-bottom: 12px; font-weight: 700; color: var(--text-main); }
.news-card-body p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 25px; }

.register-btn {
  margin-top: auto; background: var(--btn-gradient); color: white;
  text-align: center; padding: 12px; border-radius: 8px;
  text-decoration: none; font-weight: 700; font-size: 14px;
  transition: 0.2s; box-shadow: var(--glow-shadow);
}

/* ================== صفحة من نحن (About Us & Meet Our Devs Box) ================== */
.about-top-section {
  padding: 100px 20px 40px; max-width: 1100px;
  margin: 0 auto; display: flex; flex-direction: column;
  align-items: center; gap: 50px; 
}
.about-intro { text-align: center; max-width: 800px; }
.about-intro h1 { font-size: 46px; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.about-intro h1 .gradient-text { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.about-intro p { font-size: 16px; line-height: 1.8; color: var(--text-muted); }

.mission-vision-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; width: 100%; }
.mv-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px;
  padding: 40px; box-shadow: var(--card-shadow); transition: all 0.4s ease;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(20px);
}
.mv-card:nth-child(2) { animation-delay: 0.15s; }
.mv-card:hover { transform: translateY(-8px); border-color: var(--accent-color); box-shadow: 0 12px 30px rgba(114, 75, 214, 0.12); }

.icon-wrapper {
  width: 75px; height: 75px; border-radius: 50%; background: rgba(114, 75, 214, 0.05);
  display: flex; justify-content: center; align-items: center; margin-bottom: 20px;
  color: var(--accent-color); font-size: 32px; transition: all 0.3s ease;
}
.mv-card:hover .icon-wrapper { transform: scale(1.1); background: var(--primary-gradient); color: white; box-shadow: 0 8px 20px rgba(114, 75, 214, 0.3); }
.mv-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 15px; color: var(--text-main); }
.mv-card p { color: var(--text-muted); line-height: 1.6; font-size: 15px; }

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.stats-container {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 40px; box-shadow: var(--card-shadow);
  text-align: center; max-width: 1100px; width: 90%; margin: 20px auto 50px auto;
}
.stat-box h2 {
  font-size: 46px; font-weight: 800; background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px;
}
.stat-box p { color: var(--text-muted); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.team-section-header { text-align: center; max-width: 750px; margin: 30px auto 50px auto; }
.team-badge {
  display: inline-block; padding: 6px 16px; background: rgba(114, 75, 214, 0.1);
  color: var(--accent-color); border: 1px solid rgba(16, 13, 24, 0.2);
  border-radius: 30px; font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 15px;
}
.theme-dark .team-badge { background: rgba(114, 75, 214, 0.15); }
.team-section-header h2 { font-size: 34px; font-weight: 800; color: var(--text-main); margin-bottom: 15px; }
.team-section-header p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

.team-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 40px auto 0 auto; max-width: 1200px; padding: 0 20px;
}
.team-member-card {
  text-align: center; background: var(--bg-card); border: 1px solid var(--border-color);
  padding: 25px 15px; border-radius: 16px; display: flex; flex-direction: column; align-items: center;
  transition: all 0.3s ease; box-shadow: var(--card-shadow); flex: 0 0 calc(20% - 20px); min-width: 200px;
}
.team-member-card:hover { border-color: var(--accent-color); transform: translateY(-4px); box-shadow: 0 8px 25px rgba(114, 75, 214, 0.05); }

.photo-placeholder {
  width: 110px; height: 110px; border-radius: 50%; background: rgba(114, 75, 214, 0.03);
  border: 2px dashed rgba(114, 75, 214, 0.15); margin-bottom: 20px;
  display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative;
}
.photo-placeholder img { width: 100%; height: 100%; object-fit: cover; image-rendering: -webkit-optimize-contrast; image-rendering: high-quality; -ms-interpolation-mode: bicubic; }
.team-member-card h4 { font-size: 18px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.team-member-card p { color: var(--accent-color); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* بوكس Meet Our Developers في صفحة About */
.about-dev-box {
    display: flex; align-items: center; justify-content: space-between; background-color: var(--bg-card); 
    border: 1px solid var(--border-color); border-radius: 16px; padding: 25px 35px; max-width: 600px; margin: 40px auto; cursor: pointer; transition: all 0.3s ease; box-shadow: var(--card-shadow);
}
.about-dev-box:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 8px 30px rgba(99, 179, 237, 0.2); background-color: var(--bg-secondary); }
.box-content h3 { color: var(--text-main); font-size: 1.25rem; margin-bottom: 5px; }
.box-content p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.box-arrow { color: var(--accent-color); display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; }
.about-dev-box:hover .box-arrow { transform: translateX(5px); }

/* --- مسار العضوية (Trajectory) --- */
.trajectory-container { max-width: 1100px; width: 90%; margin: 60px auto 0 auto; padding: 0; position: relative; }
.trajectory-container::before {
  content: ''; position: absolute; top: 0; left: 10%; width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent); opacity: 0.4;
}
.trajectory-header { margin-bottom: 35px; }
.trajectory-chart-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 0 40px 0; position: relative; }
.trajectory-chart-row::after {
  content: ''; position: absolute; bottom: 60px; left: 5%; width: 90%; height: 2px; background: rgba(114, 75, 214, 0.08); z-index: 1;
}

.chart-pill-group {
  display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; z-index: 2; flex: 1; padding-bottom: 35px;
}
.pill-pair { display: flex; gap: 6px; align-items: flex-end; height: 110px; margin-bottom: 25px; position: relative; }
.chart-pill-group::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-secondary);
  border: 2px solid rgba(114, 75, 214, 0.3); position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
}
.pill-label { font-size: 13px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 3; }
.pill-bar { width: 14px; border-radius: 30px; background: rgba(114, 75, 214, 0.05); border: 1px solid rgba(114, 75, 214, 0.08); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.pill-bar.teal-accent { background: rgba(131, 229, 210, 0.1); border: 1px solid rgba(131, 229, 210, 0.2); }

.chart-pill-group[data-phase="1"] .pill-bar { height: 50px; } .chart-pill-group[data-phase="1"] .pill-bar.teal-accent { height: 65px; }
.chart-pill-group[data-phase="2"] .pill-bar { height: 75px; } .chart-pill-group[data-phase="2"] .pill-bar.teal-accent { height: 55px; }
.chart-pill-group[data-phase="3"] .pill-bar { height: 60px; } .chart-pill-group[data-phase="3"] .pill-bar.teal-accent { height: 85px; }
.chart-pill-group[data-phase="4"] .pill-bar { height: 95px; } .chart-pill-group[data-phase="4"] .pill-bar.teal-accent { height: 70px; }
.chart-pill-group[data-phase="5"] .pill-bar { height: 70px; } .chart-pill-group[data-phase="5"] .pill-bar.teal-accent { height: 100px; }

.chart-pill-group:hover .pill-bar { background: rgba(114, 75, 214, 0.12); transform: translateY(-4px); }
.chart-pill-group.active::after { background: var(--accent-color); border-color: var(--bg-primary); box-shadow: 0 0 0 4px rgba(114, 75, 214, 0.12); }
.chart-pill-group.active .pill-bar { background: var(--btn-gradient); border-color: var(--accent-color); box-shadow: 0 10px 20px rgba(114, 75, 214, 0.1); }
.chart-pill-group.active .pill-bar.teal-accent { background: var(--mint-glow); border-color: var(--mint-glow); box-shadow: 0 0 12px rgba(131, 229, 210, 0.5); }
.chart-pill-group.active .pill-label { color: var(--text-main); }

.trajectory-content-panel { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 14px; padding: 35px; min-height: 220px; }
.trajectory-pane { display: none; animation: paneFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.trajectory-pane.active { display: block; }
@keyframes paneFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.pane-header-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.pane-meta { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: white; background: var(--accent-color); padding: 6px 14px; border-radius: 30px; }
.pane-title { font-size: 22px; font-weight: 800; color: var(--text-main); }
.node-desc-list { list-style: none; padding-left: 0; display: grid; gap: 14px; }
.node-desc-list li { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); position: relative; padding-left: 28px; }
.node-desc-list li strong { color: var(--text-main); font-weight: 600; }
.node-desc-list li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; color: var(--accent-color); position: absolute; left: 0; top: 2px; font-size: 12px; }

/* ================== قسم الدعوة للانضمام ================== */
.cta-container {
  background: var(--primary-gradient); border-radius: 20px; padding: 60px 40px;
  text-align: center; color: white; box-shadow: var(--glow-shadow); margin: 40px auto;
  max-width: 1100px; width: 90%; position: relative; overflow: hidden;
}
.cta-container h2 { font-size: 34px; font-weight: 800; margin-bottom: 15px; }
.cta-container p { font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto 30px auto; line-height: 1.6; }
.btn-cta {
  display: inline-block; background: #ffffff; color: #724bd6; padding: 14px 36px;
  font-size: 16px; font-weight: 800; border-radius: 8px; text-decoration: none;
  transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.25); }

/* ================== صفحة التواصل ================== */
.contact-split-container {
  display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; max-width: 1100px; margin: 0 auto;
  overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--card-shadow);
}
.contact-info-panel { background: var(--primary-gradient); color: white; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.contact-info-panel h2 { font-size: 36px; font-weight: 800; margin-bottom: 20px; }
.contact-form-panel { background: var(--bg-card); padding: 60px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-color); }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px; border-radius: 8px; border: 1px solid var(--border-color);
  background: var(--bg-primary); color: var(--text-main); outline: none; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(114, 75, 214, 0.08); }

/* ================== الفوتر ================== */
.modern-footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-color);
  padding: 70px 40px 20px; margin-top: 80px; color: var(--text-main); box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; max-width: 1200px; margin: 0 auto 50px auto; }
.footer-brand h2 { font-size: 32px; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 18px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin-bottom: 25px; max-width: 380px; }

.social-links { display: flex; gap: 15px; }
.social-links a {
  display: flex; justify-content: center; align-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-primary); color: var(--text-main); border: 1px solid var(--border-color);
  font-size: 18px; text-decoration: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.social-links a:hover { background: var(--accent-color); color: white; border-color: var(--accent-color); transform: translateY(-5px); box-shadow: 0 8px 20px rgba(114, 75, 214, 0.3); }

.footer-links h3 { font-size: 20px; font-weight: 700; margin-bottom: 25px; color: var(--text-main); position: relative; padding-bottom: 12px; }
.footer-links h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 45px; height: 3px; background: var(--accent-color); border-radius: 2px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links ul li { margin-bottom: 15px; }
.footer-links ul li a { color: var(--text-muted); text-decoration: none; font-size: 15px; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; }
.footer-links ul li a i { font-size: 12px; color: var(--accent-color); transition: 0.3s; }
.footer-links ul li a:hover { color: var(--accent-color); transform: translateX(6px); }

.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 25px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.footer-bottom p { color: var(--text-muted); font-size: 14px; }
.footer-bottom-links { display: flex; gap: 25px; }
.footer-bottom-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: 0.3s; }
.footer-bottom-links a:hover { color: var(--accent-color); }

/* ================== الـ Modal والمطورين ================== */
.team-link { color: var(--accent-color); font-weight: bold; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; transition: color 0.3s ease; }
.team-link:hover { color: var(--text-main); }

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUpModal { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.team-modal-overlay {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); align-items: center; justify-content: center;
    animation: fadeInOverlay 0.3s ease-out forwards;
}
.team-modal-content {
    background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 40px; width: 90%; max-width: 900px; max-height: 85vh; overflow-y: auto; position: relative;
    box-shadow: var(--card-shadow); animation: scaleUpModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.close-modal-btn {
    position: absolute; top: 20px; right: 30px; color: #ff4d4d; font-size: 45px; font-weight: bold; cursor: pointer; line-height: 1;
}
.dev-card {
    background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 25px 15px; text-align: center;
}
/* شبكة بطاقات المطورين داخل المودال */
.dev-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* زر أو أيقونة اللينكد إن لكل مطور */
.dev-linkedin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(114, 75, 214, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    margin-top: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.dev-linkedin-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* التجاوب على الموبايل: جعل كل بطاقتين جنب بعض */
@media (max-width: 768px) {
    .dev-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* كل اثنين جنب بعض */
        gap: 12px;
    }
    
    .dev-card {
        padding: 15px 10px !important;
    }
    
    .dev-img {
        width: 75px !important;
        height: 75px !important;
        margin-bottom: 10px !important;
    }
    
    .dev-card h4 {
        font-size: 14px !important;
    }
    
    .dev-card p {
        font-size: 11px !important;
    }
}
.dev-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 3px solid var(--accent-color); }

/* ================== Media Queries ================== */
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(3, 1fr); justify-content: center; } }
@media (max-width: 992px) { 
    .stats { grid-template-columns: 1fr 1fr; gap: 30px; }
    .trajectory-chart-row { flex-wrap: wrap; justify-content: center; } 
    .stats-container { grid-template-columns: repeat(2, 1fr); } 
    .contact-split-container { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 900px) { .dev-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
  .menu-toggle { display: block; }
  .nav-right { display: flex; align-items: center; gap: 15px; margin-left: auto; }
  .nav-links {
    position: absolute; top: 100%; left: -100%; flex-direction: column;
    background: var(--nav-bg); width: 100%; padding: 20px 8%; gap: 15px;
    border-bottom: 1px solid var(--border-color); transition: left 0.4s ease; backdrop-filter: blur(10px);
  }
  .nav-links.active { left: 0; }
  .desktop-only { display: none !important; }
  .mobile-join-item { display: block; margin-top: 15px; text-align: center; }
  .mission-vision-container { grid-template-columns: 1fr; }
  .about-top-section { padding-top: 80px; gap: 40px; }
  .team-grid { gap: 12px; padding: 0 10px; }
  .team-member-card { flex: 0 0 calc(50% - 10px) !important; min-width: unset; padding: 15px 10px; }
  .trajectory-chart-row::after { display: none; }
  .chart-pill-group { flex: unset; width: 30%; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; } 
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) { .dev-cards-grid { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .stats-container { grid-template-columns: 1fr; } .cta-container { padding: 40px 20px; } }

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes scaleDownModal {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.9) translateY(20px); }
}

/* عندما يتم إضافة كلاس closing يتم تطبيق حركة الخروج */
.team-modal-overlay.closing {
  animation: fadeOutOverlay 0.3s ease-out forwards;
}

.team-modal-overlay.closing .team-modal-content {
  animation: scaleDownModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


