/* =========================================================================
   ملف الستاين الرئيسي والموحد للمنصة التعليمية
   المطور: أبانوب فرج
   التوافق: متجاوب بالكامل مع كافة الشاشات والموبايل (Mobile-Friendly)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    --primary-color: #1a1a1a;       /* الأسود الفخم للشعار - يتغير ديناميكياً */
    --secondary-color: #c5a880;     /* الذهبي الراقٍ للشعار - يتغير ديناميكياً */
    --bg-light: #f8fafc;            /* خلفية مريحة ومودرن للأوف وايت */
    --text-main: #1e293b;           /* لون النصوص الأساسية داكن وواضح */
    --text-muted: #64748b;          /* لون النصوص الفرعية */
    --main-font: 'Cairo', sans-serif;
}

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

body {
    font-family: var(--main-font);
    direction: rtl;
    text-align: right;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* منع التمدد الأفقي العشوائي على الموبايل */
}

/* إجبار حقول الإدخال والأزرار على قراءة خط Cairo الاحترافي */
input, textarea, select, button {
    font-family: var(--main-font) !important;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* =========================================================================
   🎛️ تنسيقات وتجاوب صفحات الفرونت إند (الرئيسية والكورسات)
   ========================================================================= */

/* قسم البانر الرئيسي المتجاوب (Hero Section) */
.hero-section {
    display: flex;
    min-height: 550px;
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
    align-items: center;
}

@media (max-width: 991px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 120px; /* ترك مساحة للهيدر العائم */
    }
}

/* كروت الكورسات الذكية - شبكة متجاوبة تلقائياً مع الشاشة */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr; /* كرت واحد مريح في الشاشات الصغيرة جداً */
    }
}

.course-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(197, 168, 128, 0.15);
}

/* =========================================================================
   🔒 ستايل صفحة تفاصيل الكورس وجدول المنهج المحمي
   ========================================================================= */
.course-details-container {
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 35px;
}

@media (max-width: 991px) {
    .course-details-container {
        flex-direction: column; /* نزول الكرت الجانبي لأسفل الوصف في الموبايل */
    }
}

.lesson-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

/* استبدال الأيقونات بـ تأثيرات 3D للأقفال والتشغيل */
.status-icon-3d {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* =========================================================================
   🌍 ستايل الفوتر المحمي والمتجاوب الشامل (Footer)
   ========================================================================= */
.site-footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 60px 5% 30px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 80px;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-col p, .footer-col a {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: #ffffff;
}

.copyrights {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid #2d3748;
    padding-top: 25px;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* =========================================================================
   🟢 أيقونة واتساب ثلاثية الأبعاد عائمة لخدمة العملاء (3D WhatsApp Widget)
   ========================================================================= */
.whatsapp-3d-float {
    position: fixed;
    bottom: 30px;
    left: 30px; /* يسار الشاشة لتجنب تداخل السايد بار */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: transform 0.3s ease;
    animation: floatAnimation 3s ease-in-out infinite;
}

.whatsapp-3d-float img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.whatsapp-3d-float:hover {
    transform: scale(1.1) rotate(10deg);
}

/* حركة التموج والطفو ثلاثية الأبعاد اللطيفة للزر */
@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}