/* خلفية الموقع */
body {
  background: linear-gradient(135deg, #e0f7fa, #e1bee7);
  font-family: 'Cairo', sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* رأس الصفحة */
.header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 32px;
  color: #0077b6;
  margin-bottom: 10px;
}

.header p {
  font-size: 18px;
  color: #555;
}

/* كروت اختيار المحاكي */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}

.card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  padding: 30px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.4s; }

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

.card-icon {
  font-size: 48px;
  color: #00b4d8;
  margin-bottom: 10px;
}

.card h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #023e8a;
}

.card p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555;
}

/* زر "ابدأ الآن" بشكل كرت */
.card button {
  background-color: #ffffff;
  color: #0077b6;
  border: 2px solid #0077b6;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.card button:hover {
  background-color: #0077b6;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* تذييل الصفحة */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  font-size: 14px;
  color: #888;
}

/* صفحة الأسئلة */
.quiz-container {
  background-color: #ffffff;
  color: #333;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  max-width: 800px;
  width: 90%;
  margin: 40px auto;
}

#section-title {
  font-size: 24px;
  margin-bottom: 10px;
  color: #0077b6;
  text-align: center;
}

#timer {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
  color: #e74c3c;
  font-weight: bold;
}

#question-text {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: bold;
}

#answers label {
  display: block;
  margin: 15px 0;
  padding: 10px;
  background-color: #f0f9ff;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#answers label:hover {
  background-color: #d0eaff;
}

/* أزرار التنقل */
.navigation {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.navigation button {
  background-color: #0077b6;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.navigation button:hover {
  background-color: #005f8f;
}

/* زر إنهاء الامتحان */
#end-exam {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
  display: none;
}

#end-exam:hover {
  background-color: #c0392b;
}
/* ... (بقية ملف style.css) ... */

/* تنسيق خاص بالصور الهندسية والرسوم البيانية داخل صندوق السؤال */
#question-box img {
    max-width: 100%; /* تضمن أن الصورة لا تتجاوز عرض حاويتها */
    height: auto;    /* تحافظ على نسبة أبعاد الصورة */
    display: block;  /* تضع الصورة في سطر منفصل */
    margin: 15px auto; /* توسيط الصورة وإضافة هوامش */
    border: 1px solid #ccc; /* إضافة إطار خفيف للوضوح */
    border-radius: 8px; /* حواف دائرية بسيطة */
}

/* دعم الموبايل */
@media (max-width: 600px) {
  .card-grid {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
  }

  .navigation {
    flex-direction: column;
    align-items: center;
  }
}
