/* ========== متغيرات الألوان ========== */
:root {
  --blue: #0A57A3;
  --blue-dark: #0B1020;
  --orange: #F58A07;
  --light-blue: #2F80ED;
  --muted: #8B95A7;
  --white: #ffffff;
  --bg-light: #f5f7fb;
  --text-dark: #17202A;
  --border-color: #e0e0e0;
}

/* ========== إعدادات عامة ========== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== الهيدر والنافبار ========== */
.site-header {
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  color: var(--white);
  padding: 12px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ========== منطقة المصادقة في الـNavbar ========== */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-welcome {
  color: var(--white);
  font-weight: 600;
  padding: 0 8px;
  font-size: 14px;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* ========== الأزرار ========== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(245, 138, 7, 0.3);
}

.btn-primary:hover {
  background: #d47706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 138, 7, 0.4);
}

.btn-secondary {
  background: var(--light-blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(47, 128, 237, 0.3);
}

.btn-secondary:hover {
  background: #2669c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 128, 237, 0.4);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--blue);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 18px;
}

/* ========== قسم Hero ========== */
.hero {
  padding: 80px 32px;
  background: linear-gradient(180deg, var(--bg-light), var(--white));
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--blue-dark);
  line-height: 1.2;
}

.hero .lead {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
}

.hero-features {
  display: flex;
  gap: 24px;
  padding: 0;
  margin-top: 24px;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-features li {
  background: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 600;
  color: var(--blue);
}

/* ========== الأقسام ========== */
.categories,
.career-paths,
.featured-courses,
.faq,
.final-cta {
  padding: 60px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.categories h2,
.career-paths h2,
.featured-courses h2,
.faq h2,
.final-cta h2 {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  color: var(--blue-dark);
}

/* ========== بطاقات ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 0;
}

.card {
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--blue);
}

.card p {
  color: var(--muted);
  margin-bottom: 16px;
}

.card .btn {
  width: 100%;
}

/* ========== المسارات المهنية ========== */
.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.path-card {
  border: 1px solid var(--border-color);
  padding: 28px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--blue);
}

.path-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--blue-dark);
}

.path-card p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

/* ========== الدورات المميزة ========== */
.course-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 0;
}

.course-card {
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.course-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--blue-dark);
}

.course-card p {
  color: var(--muted);
  margin-bottom: 12px;
}

.course-card .meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* ========== الأسئلة الشائعة ========== */
.faqs {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-item strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.faq-item p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* ========== دعوة نهائية ========== */
.final-cta {
  background: linear-gradient(135deg, var(--blue), var(--light-blue));
  color: var(--white);
  text-align: center;
  border-radius: 16px;
  margin: 60px auto;
  max-width: 1200px;
}

.final-cta h2 {
  color: var(--white);
  margin-bottom: 24px;
}

/* ========== التذييل ========== */
footer.site-footer {
  background: var(--blue-dark);
  color: var(--white);
  padding: 32px;
  text-align: center;
  margin-top: 60px;
}

footer.site-footer div {
  margin-bottom: 8px;
}

/* ========== زر القائمة للموبايل ========== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1000;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  /* إظهار زر القائمة */
  .mobile-menu-toggle {
    display: flex;
  }

  /* إخفاء القائمة افتراضياً */
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    right: 0;
    width: 100%;
    background: #0B1020;
    flex-direction: column;
    text-align: center;
    gap: 0;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
  }

  /* إظهار القائمة عند التفعيل */
  .nav-links.mobile-active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-links a {
    display: block;
    width: 100%;
    color: white;
  }

  .nav-auth {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 20px;
  }

  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero .lead {
    font-size: 16px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-features {
    flex-direction: column;
    gap: 12px;
  }

  .cards,
  .course-cards,
  .paths {
    grid-template-columns: 1fr;
  }
}