/* الألوان الرئيسية */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #f39c12;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f1c40f;
  --info-color: #3498db;
  --gray-color: #95a5a6;
  --white-color: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* إعادة ضبط عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
  direction: rtl;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

/* الحاويات */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 80px 0;
}

/* شريط التنقل */
.navbar {
  background-color: var(--white-color);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 15px 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.logo span {
  color: var(--secondary-color);
}

.nav-menu {
  display: flex;
}

.nav-item {
  margin-left: 20px;
}

.nav-link {
  color: var(--dark-color);
  font-weight: 500;
  padding: 10px;
  border-radius: 5px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.nav-btn {
  background-color: var(--secondary-color);
  color: var(--white-color);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
}

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

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

/* القسم الرئيسي */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white-color);
  padding: 150px 0 100px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 24px;
  margin-bottom: 30px;
  font-weight: 300;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn {
  padding: 15px 30px;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 16px;
}

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

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

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

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

/* قسم المستويات */
.levels {
  background-color: var(--white-color);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 36px;
  font-weight: 700;
  color: var(--dark-color);
}

.section-subtitle {
  text-align: center;
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--gray-color);
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.level-card {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.level-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.level-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white-color);
  padding: 20px;
  text-align: center;
}

.level-title {
  font-size: 24px;
  margin-bottom: 10px;
}

.level-code {
  font-size: 36px;
  font-weight: 700;
}

.level-body {
  padding: 20px;
}

.level-description {
  margin-bottom: 20px;
  color: var(--gray-color);
}

.level-btn {
  display: block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 10px;
  text-align: center;
  border-radius: 5px;
  transition: var(--transition);
}

.level-btn:hover {
  background-color: var(--secondary-color);
  color: var(--white-color);
}

/* قسم المهارات */
.skills {
  background-color: var(--light-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.skill-card {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.skill-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.skill-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.skill-description {
  color: var(--gray-color);
  margin-bottom: 20px;
}

/* قسم الميزات */
.features {
  background-color: var(--white-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  padding: 30px;
  text-align: center;
  transition: var(--transition);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.feature-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.feature-description {
  color: var(--gray-color);
}

/* قسم الاختبار */
.test-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white-color);
  text-align: center;
  padding: 100px 0;
}

.test-title {
  font-size: 36px;
  margin-bottom: 20px;
}

.test-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* قسم الشهادات */
.testimonials {
  background-color: var(--light-color);
}

.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-card {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
  margin: 20px;
  text-align: center;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.testimonial-author {
  font-weight: 700;
  color: var(--primary-color);
}

/* قسم التسجيل */
.register {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white-color);
  text-align: center;
  padding: 100px 0;
}

.register-title {
  font-size: 36px;
  margin-bottom: 20px;
}

.register-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* تذييل الصفحة */
.footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 50px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--light-color);
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  padding-right: 5px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

.footer-bottom {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* نماذج */
.form-container {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
  max-width: 500px;
  margin: 0 auto;
}

.form-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: var(--dark-color);
}

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

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.form-btn:hover {
  background-color: var(--secondary-color);
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--gray-color);
}

/* لوحة التحكم */
.dashboard {
  padding-top: 80px;
}

.dashboard-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
}

.sidebar {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px;
  height: calc(100vh - 100px);
  position: sticky;
  top: 80px;
}

.user-info {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.user-level {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 14px;
}

.sidebar-menu {
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-color);
}

.sidebar-link {
  display: block;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.sidebar-link i {
  margin-left: 10px;
}

.main-content {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-title {
  font-size: 24px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--light-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.stat-label {
  color: var(--gray-color);
}

.progress-container {
  margin-bottom: 30px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.progress-title {
  font-size: 18px;
  font-weight: 700;
}

.progress-bar {
  height: 10px;
  background-color: var(--light-color);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 5px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  color: var(--gray-color);
  font-size: 14px;
}

/* صفحة الدرس */
.lesson-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.lesson-content {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.lesson-header {
  margin-bottom: 30px;
}

.lesson-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.lesson-meta {
  display: flex;
  gap: 20px;
  color: var(--gray-color);
  margin-bottom: 20px;
}

.lesson-meta span i {
  margin-left: 5px;
}

.lesson-description {
  color: var(--gray-color);
  margin-bottom: 30px;
}

.lesson-section {
  margin-bottom: 30px;
}

.lesson-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.lesson-text {
  line-height: 1.8;
  margin-bottom: 20px;
}

.lesson-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.lesson-audio {
  width: 100%;
  margin-bottom: 20px;
}

.lesson-video {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.lesson-sidebar {
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.lesson-progress {
  margin-bottom: 20px;
}

.lesson-progress-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.lesson-modules {
  margin-bottom: 20px;
}

.lesson-modules-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.module-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  transition: var(--transition);
}

.module-item:hover {
  background-color: var(--light-color);
}

.module-item.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.module-item i {
  margin-left: 10px;
}

.module-item.completed i {
  color: var(--success-color);
}

/* صفحة الاختبار */
.test-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.test-header {
  text-align: center;
  margin-bottom: 30px;
}

.test-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.test-description {
  color: var(--gray-color);
  margin-bottom: 20px;
}

.test-info {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: var(--light-color);
  border-radius: 5px;
  margin-bottom: 30px;
}

.test-info span i {
  margin-left: 5px;
}

.question-container {
  margin-bottom: 30px;
}

.question-number {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.question-text {
  font-size: 18px;
  margin-bottom: 20px;
}

.options-list {
  display: grid;
  gap: 10px;
}

.option-item {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  background-color: var(--light-color);
}

.option-item.selected {
  background-color: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}

.test-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* التجاوب مع الشاشات المختلفة */
@media (max-width: 992px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    height: auto;
    position: static;
  }
  
  .lesson-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background-color: var(--white-color);
    flex-direction: column;
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-item {
    margin: 10px 0;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .hero-btns {
    flex-direction: column;
    gap: 10px;
  }
  
  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 28px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
