/* assets/css/style.css - v3.1 Fixed Tabs Color */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* لوحة الألوان الجديدة */
    --primary-navy: #002060;    /* كحلي ملكي */
    --primary-blue: #0d6efd;    /* أزرق حيوي */
    --accent-gold: #d4af37;     /* ذهبي فاخر */
    --text-dark: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* --- 1. شاشة التحميل (Preloader) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-logo {
    width: 100px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- 2. الهيدر (Header) - روابط القائمة العلوية فقط --- */
.navbar {
    background-color: var(--primary-navy);
    padding: 0.8rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* تخصيص اللون الأبيض فقط لروابط النافبار */
.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 600;
    font-size: 1rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.navbar .nav-link:hover, .navbar .nav-link.active {
    color: var(--accent-gold) !important;
}

/* --- 3. تبويبات الصفحة (Page Tabs) - تصحيح اللون --- */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    color: var(--primary-navy) !important; /* كحلي غامق للوضع العادي */
    font-weight: 700;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    background: transparent;
    transition: all 0.3s;
    margin: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--accent-gold) !important;
    background: rgba(0,0,0,0.02);
}

.nav-tabs .nav-link.active {
    color: var(--accent-gold) !important;
    border-bottom-color: var(--accent-gold);
    background: transparent;
}

/* --- 4. Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(0, 32, 96, 0.9), rgba(0, 32, 96, 0.8)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%);
    background-size: 30px 30px;
    opacity: 0.3;
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.btn-hero {
    background-color: var(--accent-gold);
    color: var(--primary-navy);
    padding: 12px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    transition: all 0.3s;
}

.btn-hero:hover {
    background-color: #fff;
    color: var(--primary-navy);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- 5. Stats Bar --- */
.stats-bar {
    background-color: var(--white);
    padding: 40px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-top: -30px;
    position: relative;
    border-radius: 15px;
    z-index: 10;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0;
}

.stat-item p {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0;
}

/* --- 6. العناوين والبطاقات --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-weight: 800;
    color: var(--primary-navy);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

.course-card {
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: transparent;
}

.course-thumb {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.badge-level {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: 30px;
    background: rgba(255,255,255,0.95);
    color: var(--primary-navy);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- 7. الفوتر --- */
footer {
    background-color: var(--primary-navy);
    color: #fff;
    padding-top: 4rem;
    padding-bottom: 2rem;
}
footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
footer a:hover { color: var(--accent-gold); }
/* --- إضافات في نهاية ملف assets/css/style.css --- */

/* جعل تغيير لون الخلفية ناعماً */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 1.5s ease, border-color 1.5s ease !important;
}

/* كلاس التمييز المؤقت (للجديد) */
.post-highlight {
    background-color: #fff9e6 !important; /* أصفر فاتح جداً وأنيق */
    border-right: 4px solid var(--accent-gold) !important;
}