/* style.css - الأنماط المشتركة لجميع دروس جافا */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --light-color: #ecf0f1;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* الهيدر الموحد */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 0;
    text-align: center;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-content h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: white;
}

.header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.week-indicator {
    background-color: var(--secondary-color);
    color: white;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* التنقل السريع الموحد */
.quick-nav {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* المحتوى الرئيسي الموحد */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border-right: 5px solid var(--secondary-color);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-number {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 20px;
    flex-shrink: 0;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* محتوى القسم الموحد */
.section-content {
    padding: 0 10px;
}

.topic {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-right: 4px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.topic:hover {
    background-color: #e9ecef;
    transform: translateX(-5px);
}

.topic-title {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: block;
}

.topic-content {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.topic-content ul {
    list-style-type: none;
    padding-right: 0;
    margin: 15px 0;
}

.topic-content li {
    margin-bottom: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border-right: 3px solid #e0e0e0;
}

/* الأمثلة البرمجية الموحدة */
.code-example {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    border-right: 4px solid var(--secondary-color);
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
}

.code-example .keyword {
    color: #63b3ed;
}

.code-example .string {
    color: #68d391;
}

.code-example .comment {
    color: #a0aec0;
}

.code-example .function {
    color: #fbb6ce;
}

.code-example .variable {
    color: #f6ad55;
}

.code-example .type {
    color: #90cdf4;
}

/* المهام والواجبات الموحدة */
.assignments {
    background-color: #e8f4fc;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
    border-right: 4px solid #3498db;
}

.assignments h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.task-list {
    list-style-type: none;
}

.task-list li {
    background-color: white;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-right: 4px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.task-list li:hover {
    background-color: #e9ecef;
    transform: translateX(-5px);
}

/* الفوتر الموحد */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.footer-item {
    text-align: center;
    min-width: 200px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.footer-item h4 {
    margin-bottom: 10px;
    color: #ecf0f1;
    font-size: 1.1rem;
}

.footer-item p {
    color: #bdc3c7;
}

/* تأثيرات إضافية موحدة */
.highlight {
    background-color: #fff3cd;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
}

.definition, .note, .warning {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-right: 4px solid;
}

.definition {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

.definition strong {
    color: var(--primary-color);
}

.note {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.warning {
    background-color: #ffebee;
    border-color: #f44336;
}

/* التجاوب الموحد */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .nav-links {
        gap: 8px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .topic {
        padding: 15px;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}