﻿/* المتغيرات (SaaS Light/Glass Theme المطور) */
:root {
    --bg-color: #f8fafc; /* خلفية فاتحة نقية */
    --text-primary: #0f172a; /* نص داكن للقراءة */
    --text-secondary: #475569; /* نص رمادي للتفاصيل */
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --gradient-hover: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
    --glass-bg: rgba(255, 255, 255, 0.75); /* زجاج أبيض شفاف */
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 1);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 20px 40px -10px rgba(139, 92, 246, 0.25);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-primary); 
    line-height: 1.7; 
    overflow-x: hidden; 
    scroll-behavior: smooth; 
}

/* 🌟 شريط التمرير المخصص للموقع (Custom Scrollbar) 🌟 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #0ea5e9, #8b5cf6); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0284c7, #7c3aed); }

/* إجبار بعض النصوص على الظهور بشكل سليم في الثيم الفاتح */
.text-white { color: var(--text-primary) !important; }
.text-light { color: var(--text-secondary) !important; }

/* 🌟 تحسين الشعار ليكون ناعم ودائري 🌟 */
.smooth-logo-circle { 
    border-radius: 50%;
    object-fit: cover;
    background-color: transparent; 
    border: 2px solid rgba(139, 92, 246, 0.15); 
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2), inset 0 0 15px rgba(255,255,255,0.8);
    transition: var(--transition-smooth);
}

/* الفيديو الخلفي */
.video-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; overflow: hidden; background-color: #e2e8f0; }
#bg-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; transform: scale(1.05); transition: filter 1s ease; }

/* التعتيم (أصبح أبيض ضبابي للثيم الفاتح) */
.video-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(248, 250, 252, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: -1; transition: opacity 1s ease; }
.video-overlay.hidden { opacity: 0; pointer-events: none; }

/* شاشة البداية التفاعلية */
.intro-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 50; transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease; gap: 40px; background: rgba(255,255,255,0.3); backdrop-filter: blur(5px); }
.intro-screen.slide-up { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.intro-logo img { height: 180px; width: 180px; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 10px 25px rgba(139,92,246,0.3)); }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }

/* زر الاستكشاف (لون فاتح) */
.explore-btn { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(139, 92, 246, 0.4); color: #8b5cf6; padding: 18px 45px; border-radius: 50px; font-size: 1.3rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 15px; transition: var(--transition-smooth); box-shadow: 0 10px 30px rgba(139,92,246,0.25); }
.explore-btn:hover { background: #fff; transform: scale(1.05); border-color: #8b5cf6; box-shadow: 0 15px 40px rgba(139,92,246,0.4); color: #7c3aed; }
.explore-btn i { animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(5px); } 60% { transform: translateY(3px); } }

/* المحتوى الرئيسي */
.main-content-hidden { opacity: 0; transform: translateY(50px); transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.23, 1, 0.32, 1); pointer-events: none; min-height: 100vh; display: flex; flex-direction: column; }
.main-content-hidden.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.content-wrapper { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 30px 20px; flex: 1; }

/* شريط التنقل الذكي الفاتح */
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 70px; padding: 10px 40px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border-radius: 60px; border: 1px solid rgba(139,92,246,0.15); box-shadow: var(--shadow-soft); position: sticky; top: 20px; z-index: 100; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, box-shadow 0.4s ease; }
.main-header.nav-hidden { transform: translateY(-150%); opacity: 0; pointer-events: none; }
.main-header:hover { box-shadow: 0 15px 35px rgba(139,92,246,0.15); border-color: rgba(139, 92, 246, 0.3); }
.nav-logo { height: 60px; width: 60px; transition: var(--transition-smooth); border-width: 1px; }
.nav-logo:hover { transform: scale(1.1) rotate(-5deg); box-shadow: 0 0 25px rgba(139, 92, 246, 0.3); }
nav ul { list-style: none; display: flex; gap: 30px; margin: 0; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 800; font-size: 1.05rem; transition: var(--transition-smooth); display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; }
.nav-link:hover { color: #8b5cf6; background: rgba(139, 92, 246, 0.08); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(139, 92, 246, 0.1); }

/* البطاقات الزجاجية الفاتحة */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight); border-radius: 32px; box-shadow: var(--shadow-soft); padding: 50px; transition: var(--transition-smooth); position: relative; overflow: hidden; }

/* القسم الرئيسي (Hero) */
.hero { text-align: center; margin-bottom: 120px; perspective: 1200px; }
.main-card { display: inline-block; max-width: 900px; transform-style: preserve-3d; background: rgba(255, 255, 255, 0.9); }
.glow-effect { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(255,255,255,0) 70%); pointer-events: none; z-index: -1; }

.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; background: rgba(139, 92, 246, 0.15); color: #7c3aed; border-radius: 30px; font-size: 0.95rem; font-weight: 800; margin-bottom: 25px; border: 1px solid rgba(139, 92, 246, 0.3); }
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; color: transparent; font-size: 5rem; font-weight: 900; margin-bottom: 20px; letter-spacing: -2px; line-height: 1.1; filter: drop-shadow(0 4px 8px rgba(139,92,246,0.2)); }
.subtitle { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 45px; max-width: 750px; margin-left: auto; margin-right: auto; line-height: 1.8; font-weight: 600; }

/* الأزرار المطورة */
.action-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 36px; border-radius: 30px; text-decoration: none; font-weight: 800; font-size: 1.1rem; transition: var(--transition-smooth); cursor: pointer; border: none; outline: none; position: relative; overflow: hidden; z-index: 1; }
.btn::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: 0.5s; z-index: -1;}
.btn:hover::before { left: 100%; }

.btn-primary { background: var(--gradient-primary); color: white; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.35); }
.btn-primary:hover { background: var(--gradient-hover); transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 35px rgba(139, 92, 246, 0.5); }
.btn-secondary { background: white; color: var(--text-primary); border: 2px solid #e2e8f0; box-shadow: var(--shadow-soft); }
.btn-secondary:hover { transform: translateY(-5px); border-color: #0f172a; color: #0f172a; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }

.discord-btn:hover { background: #5865F2; border-color: #5865F2; color: #fff; box-shadow: 0 15px 35px rgba(88, 101, 242, 0.4); }
.tiktok-btn:hover { border-color: #ff0050; background: #000; color: #fff; box-shadow: 0 15px 35px rgba(255, 0, 80, 0.3); }

.pulse-glow { animation: pulse-glowing 2s infinite; }
@keyframes pulse-glowing { 
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); } 
    70% { box-shadow: 0 0 0 20px rgba(139, 92, 246, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); } 
}

/* تنسيق العناوين للأقسام */
.section-header { text-align: center; margin-bottom: 50px; }
.sub-heading { display: inline-block; font-size: 1rem; font-weight: 800; color: #7c3aed; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; background: rgba(139,92,246,0.1); padding: 5px 15px; border-radius: 20px; border: 1px solid rgba(139,92,246,0.2); }
.section-title { font-size: 3rem; font-weight: 900; margin-bottom: 15px; color: var(--text-primary); }
.section-subtitle { font-size: 1.15rem; font-weight: 600; max-width: 600px; margin: 0 auto; color: var(--text-secondary); }

/* كروت الأقسام */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 120px; justify-content: center; }
.dept-card { text-align: center; padding: 45px 30px; cursor: pointer; border: 2px solid transparent; background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)) padding-box, linear-gradient(135deg, rgba(255,255,255,1), rgba(255,255,255,0.5)) border-box; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease; }
.dept-card:hover { transform: translateY(-15px) scale(1.02); box-shadow: var(--shadow-strong); border-color: rgba(139, 92, 246, 0.5); }

@media (min-width: 1024px) {
    .staff-card { grid-column: span 2; max-width: 600px; justify-self: center; width: 100%; }
}

.icon-wrapper { width: 80px; height: 80px; background: var(--gradient-primary); border-radius: 24px; display: flex; justify-content: center; align-items: center; margin: 0 auto 30px auto; color: white; font-size: 2.2rem; box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3); transition: var(--transition-smooth); }
.dept-card:hover .icon-wrapper { transform: scale(1.15) rotate(10deg); border-radius: 30px; box-shadow: 0 15px 30px rgba(139, 92, 246, 0.5); }
.dept-card:hover .icon-wrapper i { animation: gentlePulse 1.5s infinite alternate; }
@keyframes gentlePulse { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

.dept-card h3 { font-size: 1.6rem; margin-bottom: 15px; font-weight: 800; color: var(--text-primary); }
.dept-card p { font-size: 1.05rem; margin-bottom: 25px; font-weight: 600; color: var(--text-secondary); }
.click-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 800; color: #8b5cf6; opacity: 0; transform: translateY(15px); transition: var(--transition-smooth); background: rgba(139, 92, 246, 0.1); padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(139, 92, 246, 0.2); }
.dept-card:hover .click-hint { opacity: 1; transform: translateY(0); background: var(--gradient-primary); border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(139,92,246,0.3); }

/* 🌟 النافذة المنبثقة (Modal) المحسنة للكمبيوتر وللقراءة 🌟 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: var(--transition-smooth); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { 
    max-width: 850px; /* تم زيادة العرض للكمبيوتر لتظهر الشروط براحة */
    width: 95%; 
    max-height: 90vh; /* منع خروج النافذة عن الشاشة */
    overflow-y: auto; /* إضافة سكرول داخلي أنيق عند طول المحتوى */
    background: #ffffff; 
    transform: scale(0.9) translateY(40px); 
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); 
    padding: 50px; 
    border-radius: 32px; 
    position: relative; 
    text-align: right; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); 
    border: 1px solid rgba(139,92,246,0.3); 
}
/* تخصيص شكل السكرول داخل النافذة المنبثقة */
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: transparent; margin: 20px 0; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.4); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.8); }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.close-btn { position: absolute; top: 25px; left: 25px; background: #f1f5f9; border: none; width: 45px; height: 45px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--text-secondary); transition: var(--transition-smooth); display: flex; justify-content: center; align-items: center; }
.close-btn:hover { background: #ef4444; color: white; transform: rotate(90deg) scale(1.1); box-shadow: 0 0 15px rgba(239,68,68,0.3); }

.modal-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 2px dashed #e2e8f0; }
.modal-header h3 { font-size: 2.2rem; font-weight: 900; color: var(--text-primary); }
.modal-header .modal-icon { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 18px; display: flex; justify-content: center; align-items: center; color: white; font-size: 1.8rem; box-shadow: 0 8px 16px rgba(139,92,246,0.3); }

.modal-desc { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 30px; line-height: 1.8; font-weight: 600; }

.skills-section { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 24px; padding: 30px; margin-bottom: 35px; position: relative; overflow: hidden; }
.skills-section::before { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: var(--gradient-primary); }
.skills-section h4 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-primary); font-weight: 800; display: flex; align-items: center; gap: 12px; }
.skills-section h4 i { color: #f59e0b; }
.skills-list { list-style: none; padding-right: 15px; }
.skills-list li { position: relative; padding-right: 35px; margin-bottom: 20px; font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); line-height: 1.8; }
.skills-list li::before { content: '\f058'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; right: 0; top: 5px; color: #0ea5e9; font-size: 1.3rem; }

/* 🌟 الحل النهائي لمشكلة الكلمة البيضاء (جعلها كبسولة/بادج أنيق) 🌟 */
.skills-list li strong { 
    color: #7c3aed !important; /* فرض اللون البنفسجي لكسر كود الـ JS */
    background: rgba(139, 92, 246, 0.1); /* خلفية كبسولة خفيفة */
    padding: 2px 12px; 
    border-radius: 10px; 
    margin-left: 8px; 
    font-weight: 800; 
    border: 1px solid rgba(139, 92, 246, 0.2); 
    display: inline-block; 
    margin-bottom: 5px;
}

.join-dept-btn { width: 100%; padding: 20px; font-size: 1.2rem; }

/* قسم التقديم */
.join-us { text-align: center; margin-bottom: 80px; }
.apply-card { max-width: 950px; margin: 0 auto; padding: 60px 40px; background: rgba(255,255,255,0.9); }
.apply-toggle-btn { margin-top: 10px; }
.toggle-icon { transition: transform 0.4s ease; }
.toggle-icon.rotated { transform: rotate(180deg); }

.apply-content-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s cubic-bezier(0.4, 0, 0.2, 1); margin-top: 0; }
.apply-content-wrapper.open { grid-template-rows: 1fr; margin-top: 50px; }
.apply-content { overflow: hidden; }
.images-grid { display: flex; flex-direction: column; gap: 40px; align-items: center; padding: 10px; }
.apply-img { max-width: 100%; border-radius: 28px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); border: 4px solid white; transition: var(--transition-smooth); }
.apply-img:hover { transform: scale(1.02) translateY(-5px); box-shadow: 0 30px 60px -15px rgba(139, 92, 246, 0.25); border-color: rgba(139,92,246,0.3); }

/* الفوتر الفاتح */
footer { padding: 0 0 50px 0; margin-top: auto; }
.footer-card { text-align: center; max-width: 1200px; margin: 0 auto; padding: 40px; border-radius: 40px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); box-shadow: var(--shadow-soft); }
.footer-logo { height: 65px; width: 65px; margin-bottom: 25px; transition: var(--transition-smooth); filter: grayscale(100%) opacity(0.5); }
.footer-logo:hover { filter: grayscale(0%) opacity(1) drop-shadow(0 4px 12px rgba(139,92,246,0.5)); transform: scale(1.1); }
.footer-socials { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.footer-socials a { width: 50px; height: 50px; background: #f1f5f9; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--text-secondary); font-size: 1.3rem; transition: var(--transition-smooth); text-decoration: none; }
.footer-socials a:hover { background: var(--gradient-primary); color: white; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(139,92,246,0.3); }
.footer-card p { color: var(--text-secondary) !important; font-size: 1rem; font-weight: 700; }

/* شاشات الموبايل */
@media (max-width: 768px) {
    .main-header { flex-direction: column; gap: 15px; border-radius: 30px; padding: 15px 20px; position: relative; top: 0; }
    .nav-logo { height: 50px; width: 50px; }
    .nav-link { font-size: 0.95rem; padding: 6px 12px; }
    .gradient-text { font-size: 3.5rem; }
    .action-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .glass-card { padding: 40px 20px; }
    
    /* ضبط النافذة المنبثقة للموبايل */
    .modal-content { padding: 30px 20px; width: 95%; max-height: 85vh; }
    .modal-header h3 { font-size: 1.8rem; }
    .skills-list li { font-size: 1rem; }
    .skills-list li strong { display: block; margin-left: 0; margin-bottom: 8px; width: fit-content;}
}