/* تنسيق عام للصفحة */
@font-face {
    font-family: 'Amiri';
    src: url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
}

body {
    font-family: 'Amiri', Arial, sans-serif;
    direction: rtl;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

/* رأس الصفحة */
.header {
    background-color: #1a3c6e;
    color: white;
    padding: 15px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.university-info {
    text-align: center;
    margin-bottom: 10px;
}

.university-info h1 {
    font-size: 24px;
    margin: 0;
}

.university-info h2 {
    font-size: 18px;
    margin: 5px 0;
    font-weight: normal;
}

/* محتوى الصفحة */
.content {
    padding: 20px;
}

h1, h2, h3 {
    color: #1a3c6e;
}

h1 {
    font-size: 24px;
    border-bottom: 2px solid #1a3c6e;
    padding-bottom: 10px;
    margin-top: 20px;
}

h2 {
    font-size: 20px;
    margin-top: 15px;
}

p {
    text-align: justify;
    margin-bottom: 15px;
}

/* أزرار التنقل */
.navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
}

.nav-button {
    background-color: #1a3c6e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Amiri', Arial, sans-serif;
    font-size: 16px;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #0d2b5a;
}

.nav-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* عناصر تفاعلية */
.interactive-element {
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.quiz-container {
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.quiz-question {
    font-weight: bold;
    margin-bottom: 10px;
}

.quiz-options {
    margin-bottom: 15px;
}

.quiz-option {
    display: block;
    margin: 5px 0;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quiz-option:hover {
    background-color: #e9f5ff;
}

.quiz-option.selected {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.quiz-option.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.quiz-option.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 3px;
    display: none;
}

.feedback.correct {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.feedback.incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.check-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Amiri', Arial, sans-serif;
}

.check-button:hover {
    background-color: #218838;
}

/* عناصر تفاعلية إضافية */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #1a3c6e;
    top: 0;
    bottom: 0;
    right: 50%;
    margin-right: -3px;
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid #1a3c6e;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    right: 0;
}

.right {
    right: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid #f0f7ff;
    border-width: 10px 10px 10px 0;
    border-color: transparent #f0f7ff transparent transparent;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid #f0f7ff;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #f0f7ff;
}

.right::after {
    right: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: #f0f7ff;
    position: relative;
    border-radius: 6px;
}

.timeline-year {
    font-weight: bold;
    color: #1a3c6e;
}

/* تنسيق للأجهزة المحمولة */
@media screen and (max-width: 600px) {
    .timeline::after {
        right: 31px;
    }
    
    .timeline-container {
        width: 100%;
        padding-right: 70px;
        padding-left: 25px;
    }
    
    .timeline-container::before {
        right: 60px;
        border: medium solid #f0f7ff;
        border-width: 10px 10px 10px 0;
        border-color: transparent #f0f7ff transparent transparent;
    }
    
    .left::after, .right::after {
        right: 22px;
    }
    
    .right {
        right: 0%;
    }
}

/* عنصر الملاحظات */
.note {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.note-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 10px;
}

/* عنصر المعلومات الإضافية */
.info-box {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.info-title {
    font-weight: bold;
    color: #0c5460;
    margin-bottom: 10px;
}

/* عنصر الاقتباس */
blockquote {
    background-color: #f8f9fa;
    border-right: 4px solid #1a3c6e;
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
}

/* عنصر الصورة */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.image-caption {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* عنصر الفيديو */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* نسبة 16:9 */
    height: 0;
    overflow: hidden;
    margin: 20px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* عنصر التقدم */
.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin: 10px 0;
}

.progress-bar {
    height: 20px;
    background-color: #1a3c6e;
    border-radius: 5px;
    width: 0;
    transition: width 0.5s;
}

/* عنصر الفلاش كارد */
.flashcard {
    perspective: 1000px;
    margin: 20px 0;
    height: 200px;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard:hover .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.flashcard-front {
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    color: #333;
}

.flashcard-back {
    background-color: #1a3c6e;
    color: white;
    transform: rotateY(180deg);
}

/* عنصر السحب والإفلات */
.drag-container {
    margin: 20px 0;
}

.drag-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.drag-item {
    padding: 8px 15px;
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 3px;
    cursor: move;
    user-select: none;
}

.drop-targets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drop-target {
    padding: 10px;
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 3px;
    min-height: 40px;
}

.drop-target.highlight {
    border-color: #1a3c6e;
    background-color: #e9f5ff;
}

/* عنصر الصح والخطأ */
.true-false {
    margin: 20px 0;
}

.true-false-question {
    font-weight: bold;
    margin-bottom: 10px;
}

.true-false-options {
    display: flex;
    gap: 10px;
}

.true-false-option {
    padding: 8px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.true-false-option:hover {
    background-color: #e9f5ff;
}

.true-false-option.selected {
    background-color: #d4edda;
    border-color: #c3e6cb;
}
