:root {
    --primary: #007aff;
    --primary-dark: #0056b3;
    --dark: #0a192f;
    --dark-alt: #112240;
    --text-main: #ccd6f6;
    --text-dim: #8892b0;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Cairo', sans-serif; 
    background-color: var(--dark); 
    color: var(--text-main); 
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }
.section { padding: 100px 0; }
.bg-dark-alt { background-color: var(--dark-alt); }
.text-center { text-align: center; }

/* Navigation */
.main-nav { 
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000;
    border-bottom: 1px solid var(--glass);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { font-weight: 800; font-size: 1.5rem; color: var(--white); }
.logo span { color: var(--primary); }
.menu-icon {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}
.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-right: 30px; }
.nav-links a { 
    color: var(--text-main); 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 600;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--primary); }
.lang-switch { 
    background: transparent; 
    color: var(--primary); 
    border: 1px solid var(--primary); 
    padding: 5px 15px; 
    border-radius: 4px; 
    cursor: pointer;
    font-weight: bold;
}
.lang-switch:hover { background: rgba(0, 122, 255, 0.1); }

/* Hero Section */
.hero-section { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.badge { 
    display: inline-block; 
    color: var(--primary); 
    background: rgba(0, 122, 255, 0.1); 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    margin-bottom: 20px;
    font-weight: 700;
}
.hero-text h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--white); line-height: 1.1; margin-bottom: 10px; }
.hero-text h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); color: var(--text-dim); margin-bottom: 25px; }
.hero-text p { max-width: 540px; margin-bottom: 40px; font-size: 1.1rem; color: var(--text-dim); }

.social-hero { margin-bottom: 35px; }
.social-hero a { color: var(--text-main); font-size: 1.7rem; margin-left: 25px; transition: 0.3s; }
.social-hero a:hover { color: var(--primary); transform: translateY(-3px); }

.hero-btns { display: flex; gap: 20px; }
.btn { 
    padding: 15px 35px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: 700; 
    transition: 0.3s;
    font-size: 1rem;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(0, 122, 255, 0.1); }

.hero-avatar { position: relative; display: flex; justify-content: center; }
.hero-avatar img { 
    width: 100%; 
    max-width: 380px; 
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; 
    border: 4px solid var(--primary);
    z-index: 2;
}
.avatar-glow {
    position: absolute;
    width: 100%; height: 100%;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 1;
}

/* Sections Header */
.section-header { margin-bottom: 60px; text-align: center; }
.section-header h2 { font-size: 2.2rem; color: var(--white); margin-bottom: 15px; }
.underline { width: 80px; height: 4px; background: var(--primary); margin: 0 auto; border-radius: 2px; }

/* Experience Cards */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.exp-card { 
    background: var(--dark-alt); 
    padding: 40px; 
    border-radius: 8px; 
    transition: 0.3s; 
    border: 1px solid transparent;
	text-align: center;
	align-items: center;
}
.exp-card:hover { transform: translateY(-10px); border-color: var(--primary); background: #172a45; }
.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* تحسين القائمة للهواتف */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }

.nav-links {
        /* بدلاً من display: none نستخدم الخصائص التالية للتحريك */
        display: flex; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-alt);
        padding: 0; /* سنغير الـ padding عند التفعيل */
        gap: 0;
        
        /* حالة الإخفاء الافتراضية */
        max-height: 0; /* إخفاء الارتفاع */
        overflow: hidden; /* إخفاء المحتوى الخارج عن الارتفاع */
        opacity: 0; /* شفافية كاملة */
        transform: translateY(-10px); /* إزاحة بسيطة للأعلى */
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* حركة ناعمة */
        border-bottom: 0px solid var(--primary);
    }

    .nav-links.active {
        /* حالة الظهور عند إضافة كلاس active */
        max-height: 400px; /* نعطي قيمة كافية لمحتويات القائمة */
        opacity: 1;
        transform: translateY(0); /* العودة لمكانه الطبيعي */
        padding: 20px 0;
        border-bottom: 2px solid var(--primary);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
        opacity: 0;
        transition: 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1; /* ظهور الروابط تدريجياً */
    }    
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-avatar { order: -1; }
    
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-avatar { order: -1; }
    .hero-btns { justify-content: center; }
}
.exp-card h3 { color: var(--white); margin-bottom: 15px; font-size: 1.3rem; }
.exp-card p { color: var(--text-dim); font-size: 1rem; }

/* Academy Banner */
.academy-banner { 
    background: linear-gradient(135deg, var(--primary), #003a75); 
    padding: 60px; 
    border-radius: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    color: var(--white);
}
.academy-content { max-width: 600px; }
.academy-content h2 { font-size: 2.5rem; margin-bottom: 20px; }
.academy-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.academy-icon i { font-size: 8rem; opacity: 0.2; }

/* YouTube Grid */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.v-card { 
    background: var(--dark-alt); 
    border-radius: 8px; 
    overflow: hidden; 
    text-decoration: none; 
    transition: 0.3s;
}
.v-card:hover { transform: scale(1.03); }
.v-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.v-card h4 { padding: 20px; color: var(--text-main); font-size: 1rem; }

/* Footer */
.main-footer { padding: 80px 0 40px; border-top: 1px solid var(--glass); }
.footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; }
.footer-brand h3 { font-size: 1.8rem; margin-bottom: 10px; color: var(--white); }
.footer-brand h3 span { color: var(--primary); }
.footer-links a { color: var(--text-main); font-size: 1.5rem; margin-right: 20px; transition: 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.9rem; padding-top: 30px; border-top: 1px solid var(--glass); }

/* Responsive */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text p { margin: 0 auto 40px; }
    .hero-btns { justify-content: center; }
    .social-hero { justify-content: center; }
    .hero-avatar { order: -1; }
    .academy-banner { flex-direction: column; text-align: center; padding: 40px; }
    .academy-icon { display: none; }
}

@media (max-width: 768px) {
    /* إصلاح مباشر لظهور التذييل */
    .main-footer {
        display: block; /* إجبار العنصر على الظهور */
        visibility: visible;
        opacity: 1;
        padding: 40px 0;
        position: relative;
        clear: both;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
        margin-top: 15px;
    }
}