@import url('./language-switcher.css');
/* ===== متغيرات الألوان ===== */
:root {
    /* الألوان الرئيسية - محدثة حسب طلب العميل */
    --primary-purple: #6A0DAD;
    --primary-purple-dark: #4B0082;
    --primary-purple-light: #8B5CF6;
    --primary-purple-lighter: #E9D8FD;
    
    /* اللون الذهبي - محدث حسب طلب العميل */
    --gold: #FFD700;
    --gold-light: #FFA500;
    --gold-dark: #B8860B;
    --gold-lighter: #FFF8DC;
    
    /* الألوان الأساسية */
    --white: #FFFFFF;
    --white-off: #F7FAFC;
    --gray-light: #E2E8F0;
    --gray: #A0AEC0;
    --gray-dark: #4A5568;
    --dark-purple: #2D3748;
    
    /* ألوان إضافية */
    --success: #48BB78;
    --warning: #ED8936;
    --error: #F56565;
    --info: #4299E1;
    
    /* الظلال - محدثة حسب طلب العميل */
    --shadow-sm: 0 1px 2px 0 rgba(106, 13, 173, 0.05);
    --shadow: 0 1px 3px 0 rgba(106, 13, 173, 0.1), 0 1px 2px 0 rgba(106, 13, 173, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(106, 13, 173, 0.1), 0 2px 4px -1px rgba(106, 13, 173, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(106, 13, 173, 0.1), 0 4px 6px -2px rgba(106, 13, 173, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(106, 13, 173, 0.1), 0 10px 10px -5px rgba(106, 13, 173, 0.04);
    --shadow-gold: 0 2px 10px rgba(255, 215, 0, 0.3);
    
    /* الانتقالات */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== إعدادات عامة ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-purple);
    background-color: var(--white);
}

/* RTL Support */
[dir="rtl"] body {
    direction: rtl;
}

[dir="ltr"] body {
    direction: ltr;
}

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

/* ===== الهيدر العصري المحسن ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}


/* الهيدر الرئيسي */
.main-header {
    background: linear-gradient(135deg, 
        rgba(106, 13, 173, 0.95) 0%, 
        rgba(75, 0, 130, 0.98) 25%, 
        rgba(106, 13, 173, 0.95) 50%, 
        rgba(139, 92, 246, 0.92) 75%, 
        rgba(106, 13, 173, 0.95) 100%);
    border-bottom: 3px solid transparent;
    background-clip: padding-box;
    border-image: linear-gradient(90deg, 
        rgba(106, 13, 173, 0.8) 0%, 
        rgba(139, 92, 246, 1) 50%, 
        rgba(106, 13, 173, 0.8) 100%) 1;
    box-shadow: 
        0 8px 32px rgba(106, 13, 173, 0.4),
        0 4px 16px rgba(106, 13, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

/* الخلفية التقنية مع الأشكال المجردة */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(106, 13, 173, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(106, 13, 173, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(106, 13, 173, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(106, 13, 173, 0.05) 50%, transparent 70%);
    animation: techGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(106, 13, 173, 0.15), 
        rgba(139, 92, 246, 0.2), 
        rgba(106, 13, 173, 0.15), 
        transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.header:hover::before {
    animation-duration: 2s;
}

.header:hover::after {
    animation-duration: 1.5s;
}

.header.scrolled {
    background: rgba(126, 34, 206, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(106, 13, 173, 0.1);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

/* RTL Support for Navigation */
[dir="rtl"] .nav-container {
    flex-direction: row;
}

[dir="ltr"] .nav-container {
    flex-direction: row;
}

/* اللوجو العصري في الجهة اليمنى */
.nav-logo {
    order: 2; /* نقل اللوجو إلى اليمين */
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 16px;
    border-radius: 15px;
    background: rgba(106, 13, 173, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(106, 13, 173, 0.2);
}

.nav-logo a:hover {
    color: var(--primary-purple);
    transform: scale(1.05) translateY(-2px);
    background: rgba(106, 13, 173, 0.2);
    box-shadow: 
        0 8px 25px rgba(106, 13, 173, 0.3),
        0 4px 12px rgba(106, 13, 173, 0.2);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 50%, var(--primary-purple-lighter) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-purple-light));
    transition: width 0.3s ease;
}

.nav-logo a:hover .logo-text::after {
    width: 100%;
}

.logo-img {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    margin-left: 12px;
    border: 3px solid var(--primary-purple);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(106, 13, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo-img:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 
        0 8px 25px rgba(106, 13, 173, 0.5),
        0 0 30px rgba(106, 13, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* RTL Support for Logo in Desktop */
[dir="rtl"] .logo-img {
    margin-left: 0;
    margin-right: 10px;
}

[dir="ltr"] .logo-img {
    margin-left: 10px;
    margin-right: 0;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(106, 13, 173, 0.3);
    letter-spacing: 1px;
}


/* شريط التنقل */
.nav-menu {
    display: flex;
    align-items: center;
    order: 2; /* ترتيب القائمة بعد اللوجو */
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* RTL Support for Navigation List */
[dir="rtl"] .nav-list {
    flex-direction: row;
}

[dir="ltr"] .nav-list {
    flex-direction: row;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--primary-purple);
    background: rgba(106, 13, 173, 0.15);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(106, 13, 173, 0.3),
        0 4px 12px rgba(106, 13, 173, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(106, 13, 173, 0.3);
}

.nav-link i {
    margin-left: 0.5rem;
    font-size: 1.1rem;
    color: var(--primary-purple);
    transition: all 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-purple-light);
    text-shadow: 0 0 10px var(--primary-purple);
}

/* RTL Support for Navigation Links */
[dir="rtl"] .nav-link i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="ltr"] .nav-link i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* User Info Styles */
.user-info {
    margin: 0 1rem;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: var(--transition);
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    object-fit: cover;
}

.user-name {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* RTL Support for User Info */
[dir="rtl"] .user-avatar {
    flex-direction: row-reverse;
}

[dir="ltr"] .user-avatar {
    flex-direction: row;
}

.nav-link.active {
    color: var(--primary-purple);
    background: rgba(106, 13, 173, 0.2);
    box-shadow: 
        0 6px 20px rgba(106, 13, 173, 0.4),
        0 2px 8px rgba(106, 13, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(106, 13, 173, 0.5);
    transform: translateY(-2px);
}

.nav-link.active i {
    color: var(--primary-purple-light);
    text-shadow: 0 0 8px rgba(106, 13, 173, 0.8);
}

.nav-link.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--dark-purple);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.4),
        0 2px 8px rgba(255, 215, 0, 0.2);
    border: 2px solid var(--gold-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.nav-link.btn-primary:hover::before {
    left: 100%;
}

.nav-link.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.5),
        0 4px 12px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.nav-link.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* زر تسجيل الدخول */
.nav-link.login-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(106, 13, 173, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link.login-btn:hover {
    background: rgba(106, 13, 173, 0.2);
    color: var(--primary-purple);
    border-color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== قسم Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-purple-lighter) 0%, var(--white) 100%);
    padding: .5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%236B46C1" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23D69E2E" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--dark-purple);
    margin-bottom: 3rem;
    line-height: 1.4;
}

.hero-content .highlight {
    color: var(--primary-purple);
    text-shadow: 0 2px 4px rgba(106, 13, 173, 0.1);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--dark-purple);
    box-shadow: var(--shadow-gold);
    border: 2px solid var(--gold-dark);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-purple);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-purple);
}

.btn-secondary:hover {
    background: var(--primary-purple-light);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-purple);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.hero-image {
    text-align: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--primary-purple);
}

/* ===== قسم الإحصائيات ===== */
.stats {
    background: var(--primary-purple-gradient);
    border-top: 2px solid var(--primary-purple);
    border-bottom: 2px solid var(--primary-purple);
    padding: 4rem 0;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 2px solid var(--primary-purple);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-purple-light);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-purple-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 500;
}

/* ===== قسم الكورسات ===== */
.courses-section {
    padding: 6rem 0;
    background-color: var(--white-off);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-purple-dark);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    border-radius: 2px;
}

.section-description {
    font-size: 1.25rem;
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-gold);
    border: 2px solid var(--primary-purple);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.4);
    border-color: var(--gold-dark);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 70, 193, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.course-card:hover .course-overlay {
    opacity: 1;
}

.course-content {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    color: var(--primary-purple-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.course-title a {
    color: var(--primary-purple-dark);
    text-decoration: none;
    transition: var(--transition);
}

.course-title a:hover {
    color: var(--primary-purple);
}

.course-description {
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.course-instructor,
.course-duration,
.course-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    align-items: center;
}

.stars i {
    color: var(--gray-light);
    font-size: 0.9rem;
    min-width: 14px;
    text-align: center;
}

.stars i.filled {
    color: var(--primary-purple);
}

.rating-text {
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.85rem;
}

/* تحسينات التجاوب للنجوم */
@media (max-width: 768px) {
    .stars {
        gap: 1px;
    }
    
    .stars i {
        font-size: 0.8rem;
        min-width: 12px;
    }
    
    .rating-text {
        font-size: 0.8rem;
    }
    
    /* تحسينات إضافية للنجوم في البطاقات */
    .course-card .stars,
    .event-card .stars,
    .story-item .stars {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stars {
        gap: 0.5px;
    }
    
    .stars i {
        font-size: 0.75rem;
        min-width: 10px;
    }
    
    .rating-text {
        font-size: 0.75rem;
    }
    
    /* تحسينات إضافية للشاشات الصغيرة */
    .course-card .stars,
    .event-card .stars,
    .story-item .stars {
        gap: 0.25px;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1200px) {
    .stars i {
        font-size: 1rem;
        min-width: 16px;
    }
    
    .rating-text {
        font-size: 0.9rem;
    }
}

.course-price {
    text-align: right;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-purple);
}

.section-footer {
    text-align: center;
}

/* ===== قسم الفريق ===== */
.team-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-purple-lighter) 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-purple);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple);
}

.member-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-purple);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple-dark);
    margin-bottom: 0.5rem;
}

.member-badge {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.member-rank {
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.member-points {
    color: var(--gray-dark);
    font-weight: 500;
}

/* ===== قسم الفعاليات ===== */
.events-section {
    padding: 6rem 0;
    background-color: var(--white);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-purple);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple);
}

.event-image {
    position: relative;
    height: 200px;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-purple);
    color: var(--primary-purple-dark);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    border: 3px solid var(--white);
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.event-date .month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.event-content {
    padding: 1.5rem;
}

.event-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-purple-dark);
    margin-bottom: 1rem;
}

.event-description {
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.event-location,
.event-time,
.event-participants {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.event-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-purple);
}

.event-price .free {
    color: var(--success);
}

/* ===== قسم قصص النجاح ===== */
.stories-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-purple-lighter) 0%, var(--white) 100%);
}

.stories-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.story-item {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-purple);
    transition: var(--transition);
}

.story-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple);
}

.story-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 1.5rem;
}

.story-rating i {
    color: var(--primary-purple);
    font-size: 1.1rem;
}

.story-text {
    font-size: 1.1rem;
    color: var(--gray-dark);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-purple);
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-purple-dark);
    margin-bottom: 0.25rem;
}

.author-job {
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.author-company {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== قسم النشرة البريدية ===== */
.newsletter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-purple-light);
}

.newsletter-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    width: 100%;
    gap: 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    border: 2px solid transparent;
    transition: var(--transition);
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
}

.newsletter-form .btn {
    padding: 1rem 2rem;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    color: var(--primary-purple-dark);
    font-weight: 600;
    border: 2px solid transparent;
    transition: var(--transition);
}

.newsletter-form .btn:hover {
    transform: translateY(-2px);
    border-color: var(--white);
    box-shadow: var(--shadow-lg);
}

/* ===== الفوتر ===== */
.footer {
    background: var(--primary-purple-gradient);
    border-top: 2px solid var(--primary-purple);
    color: var(--white);
    padding: 0 0 2rem;
}

.footer-wave {
    position: relative;
    width: 100%;
    height: 120px;
    margin-bottom: -2px;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 120px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0 0.5rem;
}

.footer-brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
}

.footer-social-title {
    text-align: left;
    color: var(--white);
    opacity: 0.9;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem 0 2rem;
}

.footer-social .social-link {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-purple);
    color: var(--primary-purple-dark);
    border: 2px solid var(--primary-purple);
    transition: var(--transition);
    font-size: 1.25rem;
}

.footer-social .social-link:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--primary-purple-dark);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.4);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 2px;
}

.footer-description {
    color: var(--gray-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-purple);
    color: var(--primary-purple-dark);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--primary-purple);
}

.social-link:hover {
    transform: scale(1.2);
    background: var(--primary-purple-dark);
    box-shadow: 0 0 20px var(--primary-purple);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-purple);
    text-shadow: 0 0 8px var(--primary-purple);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.contact-item i {
    color: var(--primary-purple);
    width: 20px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 1rem 0 0;
}

.footer-inline-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.footer-inline-links a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-inline-links a:hover { color: var(--gold); }

.footer-copy { color: var(--white); opacity: 0.95; }

/* ===== التصميم المتجاوب المحسن ===== */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-list {
        gap: 1.8rem;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-image img {
        max-width: 400px;
        height: auto;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stories-slider {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .nav-container {
        padding: 0 20px;
    }
    
    
    
    .nav-list {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--primary-purple-gradient);
        border-bottom: 2px solid var(--primary-purple);
        box-shadow: var(--shadow-gold);
    }
    
    
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 15px;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-logo {
        flex: 1;
    }
    
    .nav-logo a {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--white);
    }
    
    .logo-img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        margin-left: 10px;
    }

    /* RTL Support for Logo */
    [dir="rtl"] .logo-img {
        margin-left: 0;
        margin-right: 10px;
    }

    [dir="ltr"] .logo-img {
        margin-left: 10px;
        margin-right: 0;
    }
    
    .logo-text {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--white);
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
    }
    
    .nav-toggle .bar {
        width: 25px;
        height: 3px;
        background-color: var(--white);
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--primary-purple-gradient);
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }

    /* RTL Support for Mobile Menu */
    [dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
        transition: right 0.3s ease;
    }

    [dir="rtl"] .nav-menu.active {
        right: 0;
    }

    [dir="ltr"] .nav-menu {
        left: -100%;
        right: auto;
        transition: left 0.3s ease;
    }

    [dir="ltr"] .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
        list-style: none;
    }
    
    .nav-item {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        display: flex;
        align-items: center;
        padding: 1.2rem 2rem;
        color: var(--white);
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: calc(100% - 4rem);
        margin: 0.5rem 2rem;
        border-radius: 12px;
        text-align: right;
        position: relative;
        overflow: hidden;
    }
    
    .nav-link:hover {
        background: rgba(106, 13, 173, 0.15);
        color: var(--primary-purple);
        transform: translateX(-5px) scale(1.02);
        box-shadow: 
            0 8px 25px rgba(106, 13, 173, 0.3),
            0 4px 12px rgba(106, 13, 173, 0.2);
        border-color: rgba(106, 13, 173, 0.3);
    }
    
    .nav-link.btn-primary {
        background: var(--gold);
        color: var(--dark-purple);
        margin: 1rem 2rem;
        border-radius: 25px;
        text-align: center;
        font-weight: bold;
    }
    
    .nav-link.btn-primary:hover {
        background: var(--gold-dark);
        color: var(--white);
    }

    /* User Info in Mobile */
    .user-info {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .user-avatar {
        padding: 1rem 2rem;
        background: transparent;
        border-radius: 0;
        justify-content: center;
    }

    .user-avatar:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .avatar-img {
        width: 40px;
        height: 40px;
    }

    .user-name {
        font-size: 1.1rem;
    }
    
    body {
        padding-top: 60px;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(106, 13, 173, 0.1);
        backdrop-filter: blur(5px);
        z-index: -1;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        padding-top: 2rem;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
    }
    
    .nav-link.btn-primary {
        background: var(--gold);
        color: var(--dark-purple);
        font-weight: 600;
        margin-top: 1rem;
    }
    
    .nav-link.btn-primary:hover {
        background: var(--gold-dark);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
        color: var(--white);
    }
    
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
    }
    
    .logo-text {
        font-size: 1.3rem;
        font-weight: 800;
    }
    
    .logo-img {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        border: 2px solid var(--primary-purple);
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-image img {
        max-width: 300px;
    }
    
    .stats {
        padding: 3rem 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .courses-section,
    .team-section,
    .events-section,
    .stories-section {
        padding: 3rem 0;
    }
    
    .courses-grid,
    .team-grid,
    .events-grid,
    .stories-slider {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .course-card,
    .event-card,
    .team-member {
        margin-bottom: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }

    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .footer-social-title { text-align: center; }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-img {
        width: 30px;
        height: 30px;
    }
    
    .nav-toggle .bar {
        width: 20px;
        height: 2px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .course-card,
    .event-card,
    .team-member {
        margin-bottom: 1.5rem;
    }
    
    .course-content,
    .event-content,
    .member-info {
        padding: 1rem;
    }
    
    .course-title,
    .event-title,
    .member-name {
        font-size: 1.2rem;
    }
    
    .footer {
        padding: 2rem 0;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .newsletter-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .course-meta,
    .event-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .course-meta > div,
    .event-meta > div {
        font-size: 0.8rem;
    }
    
    .stats-grid,
    .courses-grid,
    .team-grid,
    .events-grid,
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }
}

/* تحسينات للأجهزة الصغيرة جداً */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle .bar {
        width: 20px;
        height: 2px;
    }
    
    .stats-grid,
    .courses-grid,
    .team-grid,
    .events-grid,
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 0.6rem;
    }
}

/* تحسينات للشاشات الصغيرة جداً (300px وأقل) */
@media (max-width: 300px) {
    .container {
        padding: 0 5px;
    }
    
    .nav-container {
        padding: 0 5px;
        gap: 10px;
    }
    
    .logo-text {
        font-size: 0.9rem;
        display: none; /* إخفاء النص في الشاشات الصغيرة جداً */
    }
    
    .logo-img {
        width: 25px;
        height: 25px;
        margin-left: 5px;
    }
    
    /* RTL Support for Logo in Extra Small Screens */
    [dir="rtl"] .logo-img {
        margin-left: 0;
        margin-right: 5px;
    }
    
    [dir="ltr"] .logo-img {
        margin-left: 5px;
        margin-right: 0;
    }
    
    .nav-toggle .bar {
        width: 18px;
        height: 2px;
    }
    
    /* تحسينات إضافية للهيدر في الشاشات الصغيرة جداً */
    .main-header {
        min-height: 50px;
    }
    
    .navbar {
        padding: 0.3rem 0;
    }
    
    .nav-container {
        height: 50px;
        align-items: center;
    }
    
    .nav-menu {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    body {
        padding-top: 50px;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        margin: 0.3rem 1.5rem;
        width: calc(100% - 3rem);
    }
    
    .nav-link.btn-primary {
        margin: 0.5rem 1.5rem;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .user-avatar {
        padding: 0.8rem 1.5rem;
    }
    
    .avatar-img {
        width: 35px;
        height: 35px;
    }
    
    .user-name {
        font-size: 1rem;
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-container {
        padding: 0 0.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        width: 100%;
        max-width: 200px;
    }
    
    .btn-large {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .stats {
        padding: 2rem 0;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .courses-section,
    .team-section,
    .events-section,
    .stories-section {
        padding: 2rem 0;
    }
    
    .course-card,
    .event-card,
    .team-member,
    .story-item {
        margin-bottom: 1rem;
    }
    
    .course-content,
    .event-content,
    .member-info {
        padding: 0.8rem;
    }
    
    .course-title,
    .event-title,
    .member-name {
        font-size: 1rem;
    }
    
    .course-description,
    .event-description {
        font-size: 0.85rem;
    }
    
    .course-meta,
    .event-meta {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .course-meta > div,
    .event-meta > div {
        font-size: 0.75rem;
    }
    
    .course-price,
    .event-price {
        font-size: 1rem;
    }
    
    .newsletter-title {
        font-size: 1.3rem;
    }
    
    .newsletter-description {
        font-size: 0.85rem;
    }
    
    .newsletter-form input[type="email"] {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .newsletter-form .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .footer-inline-links {
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    
    .footer-inline-links a {
        font-size: 0.8rem;
    }
    
    .footer-copy {
        font-size: 0.8rem;
    }
    
    .stats-grid,
    .courses-grid,
    .team-grid,
    .events-grid,
    .stories-slider {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
    
    /* تحسينات إضافية للنجوم في الشاشات الصغيرة جداً */
    .stars {
        gap: 0.25px;
    }
    
    .stars i {
        font-size: 0.7rem;
        min-width: 8px;
    }
    
    .rating-text {
        font-size: 0.7rem;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-description {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* تحسينات للطباعة */
@media print {
    .header,
    .hero-buttons,
    .btn,
    .footer {
        display: none;
    }
    
    .hero-content h1,
    .section-title {
        color: var(--primary-purple-dark);
    }
    
    .course-card,
    .event-card,
    .team-member {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* ===== الأنيميشنز التقنية للهيدر ===== */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes techGlow {
    0% { 
        opacity: 0.3;
        transform: scale(1);
    }
    100% { 
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(-50%) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-60%) rotate(180deg) scale(1.1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ===== الأشكال التقنية المجردة ===== */
.tech-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.tech-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 180, 0, 0.1), rgba(106, 13, 173, 0.08));
    animation: float 8s ease-in-out infinite;
}

.tech-shape-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: linear-gradient(45deg, rgba(255, 180, 0, 0.12), rgba(106, 13, 173, 0.1));
}

.tech-shape-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.15), rgba(255, 180, 0, 0.08));
}

.tech-shape-3 {
    width: 35px;
    height: 35px;
    top: 40%;
    left: 70%;
    animation-delay: 4s;
    background: linear-gradient(225deg, rgba(255, 180, 0, 0.1), rgba(139, 92, 246, 0.12));
    border-radius: 50% 20% 50% 20%;
}

.tech-shape-4 {
    width: 25px;
    height: 25px;
    top: 80%;
    left: 30%;
    animation-delay: 6s;
    background: linear-gradient(315deg, rgba(106, 13, 173, 0.15), rgba(255, 180, 0, 0.08));
    border-radius: 40% 60% 40% 60%;
}

/* تأثيرات إضافية للأشكال */
.header:hover .tech-shape-1 {
    animation-duration: 4s;
    transform: scale(1.2);
}

.header:hover .tech-shape-2 {
    animation-duration: 6s;
    transform: rotate(180deg) scale(1.1);
}

.header:hover .tech-shape-3 {
    animation-duration: 5s;
    transform: scale(1.3) rotate(-90deg);
}

.header:hover .tech-shape-4 {
    animation-duration: 7s;
    transform: scale(1.4) rotate(180deg);
}

/* تضمين ملف مبدل اللغات (تم نقل @import إلى أعلى الملف وفق المعايير) */
