/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary: #00c6ff;  /* Cyan */
    --secondary: #0072ff; /* Blue */
    --dark-text: #1a1a2e;
    --light-text: #666;
    --metal-white: #f0f0f5; /* Robot Color */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.9);
    --gradient-text: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --shadow: 0 15px 35px rgba(0, 114, 255, 0.1);
}

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    font-family: 'Outfit', sans-serif; 
    scroll-behavior: smooth; 
    cursor: none; /* Hide default cursor */
}

body {
    background-color: #ffffff;
    color: var(--dark-text);
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, var(--primary), var(--secondary)); border-radius: 10px; }

/* Custom Cursor */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-dot { width: 8px; height: 8px; background: var(--dark-text); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--primary); transition: width 0.2s, height 0.2s; }
body.hovering .cursor-outline { width: 60px; height: 60px; background: rgba(0, 198, 255, 0.1); border-color: var(--secondary); }

/* Common Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. NAVIGATION
   ========================================= */
nav {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 1200px;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); padding: 15px 40px; border-radius: 50px;
    display: flex; justify-content: space-between; align-items: center; z-index: 1000; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: var(--glass-border);
}

.logo { font-size: 26px; font-weight: 800; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px; }

.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--dark-text); font-weight: 600; font-size: 15px; transition: 0.3s; }
.nav-links a:hover { color: var(--secondary); }
.nav-btn { background: var(--gradient-text); color: white !important; padding: 10px 25px; border-radius: 30px; box-shadow: 0 5px 15px rgba(0, 198, 255, 0.3); }

.mobile-menu { display: none; cursor: pointer; font-size: 1.5rem; }

/* =========================================
   3. HERO HEADER (LAYERS SYSTEM)
   ========================================= */
header { position: relative; height: 100vh; overflow: hidden; }

.layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transition: opacity 1s ease-in-out, visibility 1s;
}
.active-layer { opacity: 1; visibility: visible; z-index: 2; }
.hidden-layer { opacity: 0; visibility: hidden; z-index: 1; }

/* --- LAYER 1: VIDEO INTRO --- */
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(2, 12, 27, 0.4) 0%, rgba(2, 12, 27, 0.7) 100%); z-index: -1; }

.centered {
    display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center;
}
.hero-content h1 { font-size: 5rem; margin-bottom: 20px; color: white; line-height: 1.1; }
.hero-content h1 span { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: 1.2rem; color: #ddd; max-width: 600px; margin-bottom: 40px; }

.mute-btn-floating { position: absolute; bottom: 40px; left: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); color: white; z-index: 10; cursor: none; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); transition: 0.3s; }
.mute-btn-floating:hover { background: white; color: var(--secondary); }

.skip-btn-pill { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.3); color: white; padding: 12px 30px; border-radius: 50px; font-weight: 600; cursor: none; backdrop-filter: blur(5px); transition: 0.3s; }
.skip-btn-pill:hover { background: white; color: var(--secondary); }

/* --- LAYER 2: INTERACTIVE ROBOT --- */
#robotLayer { background: #fff; }
.background-mesh { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3; animation: float 10s infinite alternate; }
.blob-1 { width: 500px; height: 500px; background: var(--primary); top: -10%; left: -10%; }
.blob-2 { width: 400px; height: 400px; background: var(--secondary); bottom: -10%; right: -10%; }
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(30px, 30px); } }

.split-layout { display: flex; align-items: center; height: 100%; padding-top: 80px; }

/* Text Side */
.text-side { flex: 1; padding-left: 50px; opacity: 0; transform: translateX(-50px); transition: 1s ease 0.5s; }
.text-side.animate { opacity: 1; transform: translateX(0); }
.text-side h1 { font-size: 4rem; margin-bottom: 20px; line-height: 1.1; }
.text-side p { font-size: 1.2rem; color: #555; max-width: 500px; margin-bottom: 30px; }
.gradient-text { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-btns { display: flex; gap: 15px; }
.cta-btn { padding: 15px 35px; background: var(--gradient-text); color: white; border-radius: 30px; text-decoration: none; font-weight: bold; transition: 0.3s; border: none; }
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 198, 255, 0.3); }
.outline-btn { padding: 15px 35px; border: 2px solid #eee; color: var(--secondary); border-radius: 30px; text-decoration: none; font-weight: bold; transition: 0.3s; background: transparent; }
.outline-btn:hover { border-color: var(--secondary); background: #f8fbff; }

/* Robot Side */
.robot-side { flex: 1; display: flex; justify-content: center; opacity: 0; transform: translateY(50px); transition: 1s ease 0.8s; }
.robot-side.animate { opacity: 1; transform: translateY(0); }
.robot-wrapper { position: relative; transform: scale(0.9); }

/* --- ROBOT PARTS (White Version) --- */
.head { width: 160px; height: 120px; background: var(--metal-white); border: 2px solid #ddd; border-radius: 35px; position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.antenna { position: absolute; top: -30px; width: 4px; height: 30px; background: #ddd; left: 50%; }
.antenna-tip { position: absolute; top: -10px; left: -6px; width: 16px; height: 16px; background: var(--primary); border-radius: 50%; animation: blink 2s infinite; }
.visor { width: 120px; height: 50px; background: #222; border-radius: 15px; margin-top: 25px; display: flex; justify-content: space-around; align-items: center; }
.eye { width: 30px; height: 30px; background: #fff; border-radius: 50%; position: relative; overflow: hidden; }
.pupil { width: 10px; height: 10px; background: var(--secondary); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: 0.1s; }
.mouth { width: 30px; height: 4px; background: #ccc; margin-top: 15px; border-radius: 2px; }
.mouth.talking { animation: talk 0.2s infinite alternate; background: var(--secondary); height: 8px; }

.chest { width: 180px; height: 130px; background: #fff; border: 2px solid #ddd; border-radius: 30px 30px 40px 40px; margin: 0 auto; z-index: 2; position: relative; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 20px rgba(0,0,0,0.03); }
.arm { position: absolute; top: 140px; width: 35px; height: 100px; background: var(--metal-white); border: 2px solid #ddd; border-radius: 20px; transform-origin: top center; transition: 0.5s; }
.arm.left { left: -40px; transform: rotate(10deg); } .arm.right { right: -40px; transform: rotate(-10deg); }
.shoulder { position: absolute; top: 130px; width: 45px; height: 45px; background: var(--primary); border-radius: 50%; z-index: 1; }
.shoulder.left { left: -30px; } .shoulder.right { right: -30px; }
.waist { width: 80px; height: 30px; background: #333; margin: 0 auto; }
.hand { width: 35px; height: 25px; background: #ddd; position: absolute; bottom: -15px; border-radius: 0 0 10px 10px; }

/* Robot Animations */
@keyframes talk { 0% { width: 20px; } 100% { width: 40px; } }
@keyframes blink { 0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--primary); } 50% { opacity: 0.5; } }
.wave-hand { animation: wave 1.5s infinite ease-in-out; }
@keyframes wave { 0% { transform: rotate(10deg); } 50% { transform: rotate(150deg); } 100% { transform: rotate(10deg); } }
.scared-robot { animation: shake 0.5s infinite; }
@keyframes shake { 0% { transform: translate(1px, 1px) rotate(0deg); } 10% { transform: translate(-1px, -2px) rotate(-1deg); } 100% { transform: translate(1px, -2px) rotate(-1deg); } }

/* =========================================
   4. REST OF SECTIONS (FIXED STYLES)
   ========================================= */

/* Common Section Padding */
section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 15px; }
.section-header p { color: var(--light-text); font-size: 1.1rem; }

/* --- STATS SECTION --- */
.stats-section {
    background: linear-gradient(135deg, #f9fbfd 0%, #fff 100%);
    padding: 60px 0;
    border-radius: 30px;
    margin: 50px 0;
    text-align: center;
    box-shadow: var(--shadow);
}
.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}
.stat-item { text-align: center; min-width: 150px; }
.stat-item h3 { font-size: 3rem; color: var(--primary); margin: 0; display: inline-block; }
.stat-item .symbol { font-size: 2rem; color: var(--secondary); }
.stat-item p { font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }

/* --- SERVICES SECTION (GRID FIX) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-card {
    background: var(--glass-bg);
    padding: 40px;
    border-radius: 30px;
    border: var(--glass-border);
    box-shadow: var(--shadow);
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}
.service-card:hover { transform: translateY(-10px); background: white; }
.icon-box {
    width: 70px; height: 70px;
    background: rgba(0, 198, 255, 0.1);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 25px;
    transition: 0.4s;
}
.icon-box i { font-size: 28px; color: var(--primary); }
.service-card:hover .icon-box { background: var(--gradient-text); }
.service-card:hover .icon-box i { color: white; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.service-card ul { list-style: none; margin-top: 20px; }
.service-card ul li { color: #666; margin-bottom: 8px; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.service-card ul li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary); font-size: 0.8rem; }

/* --- PROCESS SECTION --- */
.process-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}
.step { flex: 1; text-align: center; position: relative; min-width: 250px; padding: 20px; }
.step-num { font-size: 4rem; font-weight: 800; color: rgba(0,0,0,0.05); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); z-index: -1; }
.step-icon {
    width: 80px; height: 80px; margin: 0 auto 20px;
    background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); color: var(--secondary); font-size: 1.5rem;
}
.step h4 { font-size: 1.4rem; margin-bottom: 10px; }
.step p { font-size: 0.95rem; color: #777; padding: 0 10px; }

/* --- CONTACT SECTION --- */
.contact-box {
    background: white;
    border-radius: 40px;
    padding: 60px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}
.contact-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--gradient-text); }

.contact-form { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.input-group { display: flex; gap: 20px; }
input, textarea {
    width: 100%; padding: 15px 20px;
    border-radius: 15px; border: 1px solid #eee;
    background: #f9f9f9; font-size: 1rem;
    outline: none; transition: 0.3s;
}
input:focus, textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 5px 15px rgba(0,198,255,0.1); }
.submit-btn { width: 100%; padding: 15px; background: var(--gradient-text); color: white; border: none; border-radius: 15px; font-weight: bold; font-size: 1.1rem; cursor: none; transition: 0.3s; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 114, 255, 0.2); }

/* --- FOOTER --- */
footer { text-align: center; padding: 40px; color: #888; border-top: 1px solid #eee; margin-top: 50px; background: #fff; }

/* =========================================
   5. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    .split-layout { flex-direction: column; text-align: center; padding-top: 120px; }
    .text-side { padding: 0; margin-bottom: 40px; }
    .robot-side { transform: scale(0.8); margin-bottom: 50px; }
    
    h1 { font-size: 3rem; }
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    
    .input-group { flex-direction: column; }
    .process-steps { flex-direction: column; }
    
    .hero-content h1 { font-size: 3.5rem; }
}
/* --- 1. تعديل الناف بار (Alignment Fix) --- */
nav {
    /* ... (نفس الخصائص القديمة) ... */
    display: flex; 
    justify-content: space-between; 
    align-items: center; /* ده بيسنطر اللوجو مع الزراير عمودياً */
}

.nav-right {
    display: flex;
    align-items: center; /* ده بيسنطر الكلام مع الزرار الأزرق */
    gap: 30px;
}

.nav-links { 
    display: flex; 
    gap: 30px; 
    margin: 0; /* شيلنا أي هوامش زيادة */
}

/* للموبايل: نخفي اليمين كله */
@media (max-width: 768px) {
    .nav-right { display: none; }
}
/* تنسيق فيديو الروبوت الجديد */
.ai-avatar-video {
    width: 100%;
    max-width: 500px; /* أقصى عرض عشان ميكبرش أوي */
    height: auto;
    border-radius: 20px; /* حواف ناعمة */
    /* تأثير ظل أزرق خفيف عشان يدي إحساس مستقبلي */
    filter: drop-shadow(0 10px 30px rgba(0, 198, 255, 0.3));
    /* أنيميشن بسيط يخليه "يطفو" زي الروبوت القديم */
    animation: floatVideo 6s ease-in-out infinite;
}

/* حركة الطفو للفيديو */
@keyframes floatVideo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* تعديل بسيط للكونتينر عشان يسنتر الفيديو */
.robot-side {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
}
/* --- STATS SECTION (تم الإصلاح) --- */
.stats-section {
    background: linear-gradient(135deg, #f9fbfd 0%, #fff 100%);
    padding: 60px 0;
    border-radius: 30px;
    margin: 50px auto; /* auto عشان يتوسط */
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 114, 255, 0.1);
    width: 100%;
    position: relative;
    z-index: 5; /* عشان يظهر فوق الخلفية */
}

.stats-grid {
    display: flex; /* ترتيب بجانب بعض */
    justify-content: space-around; /* توزيع المسافات بالتساوي */
    align-items: center;
    flex-wrap: wrap; /* عشان الموبايل */
    gap: 40px;
}

.stat-item {
    text-align: center;
    min-width: 200px; /* عرض ثابت عشان ميتعوجش */
    padding: 20px;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary);
    margin: 0;
    display: inline-block;
    font-weight: 800;
}

.stat-item .symbol {
    font-size: 2rem;
    color: var(--secondary);
    font-weight: bold;
}

.stat-item p {
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    font-size: 0.9rem;
}
/* تنسيق الفيديو عشان يشيل الأسود ويبان مجسم */
.ai-avatar-video {
    width: 100%;
    max-width: 600px; /* حجم مناسب عشان ميبقاش عريض أوي */
    height: auto;
    
    /* السطر ده هو اللي هيشيل الخلفية السوداء */
    /* بيخلي اللون الأسود شفاف وبيحافظ على الألوان الفاتحة */
    mix-blend-mode: screen; 
    
    /* عشان تمنع أي حد يضغط عليه أو يوقف الفيديو */
    pointer-events: none; 
    user-select: none;

    /* تظبيط مكان الفيديو */
    display: block;
    margin: 0 auto;
    
    /* لو حاسس ان الفيديو باهت شوية ممكن تزود السطوع والتباين */
    filter: brightness(1.1) contrast(1.1);
}

/* عشان نضمن ان الحاوية مش بتعمل مشاكل */
.robot-side {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
    overflow: visible; /* عشان لو الفيديو فيه أجزاء طايرة متتقطعش */
}
.ai-avatar-video {
    width: 100%;
    max-width: 650px; /* كبرناه سنة عشان يبان */
    height: auto;
    
    /* دي السطر السحري اللي بيشيل الخلفية السوداء */
    mix-blend-mode: screen; 
    
    /* بنشيل أي حدود أو خلفيات ممكن تكون مأثرة */
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none; /* مهم جداً تشيل الضل لو كان موجود */
    
    /* منع التفاعل عشان محدش يوقفه */
    pointer-events: none; 
    user-select: none;
    
    /* تحسين الألوان عشان متكونش باهتة بعد إزالة الخلفية */
    filter: brightness(1.1) contrast(1.2);
}

/* تأكيد إن الكونتينر ملوش خلفية */
.robot-side {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
/* إجبار الفيديو والكونتينر إنهم يكونوا من غير خلفية */
.robot-side, 
.ai-avatar-video {
    background-color: transparent !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* تنسيق الفيديو مع التأكد من تفعيل الدمج */
.ai-avatar-video {
    width: 100%;
    max-width: 650px;
    height: auto;
    
    /* الخاصية دي هي الحل - lighten أحياناً بتبقى أقوى من screen في إخفاء الأسود */
    mix-blend-mode: screen !important; 
    
    /* تحسين عشان الحواف متكونش حادة */
    filter: contrast(1.2) brightness(1.1);
    
    pointer-events: none;
}
/* 1. تنظيف الحاوية عشان ميكونش ليها لون */
.robot-side {
    background: transparent !important;
    background-color: rgba(0,0,0,0) !important;
    box-shadow: none !important;
    border: none !important;
    /* مهم جداً: عشان الدمج يشتغل مع خلفية الموقع */
    isolation: auto !important; 
    z-index: 10; /* عشان يظهر فوق */
}

/* 2. إخفاء اللون الأسود من الفيديو */
.ai-avatar-video {
    width: 100%;
    max-width: 650px;
    height: auto;
    
    /* دي الخاصية اللي بتشيل الأسود */
    mix-blend-mode: screen !important;
    
    /* لو لسه ظاهر، جرب تغير screen لـ lighten */
    /* mix-blend-mode: lighten !important; */

    /* التأكد إن الفيديو نفسه ملوش خلفية */
    background: transparent !important;
    
    /* منع التفاعل */
    pointer-events: none;
    user-select: none;
    
    /* تلميع الألوان عشان متبهتش بعد الدمج */
    filter: brightness(1.2) contrast(1.1);
}
#robotCanvas {
    width: 100%;
    max-width: 600px; /* حجم الروبوت */
    height: auto;
    display: block;
    margin: 0 auto;
    
    /* تأثيرات عشان يبان مجسم */
    filter: drop-shadow(0 10px 20px rgba(0, 198, 255, 0.2));
    pointer-events: none; /* منع التفاعل */
}

.robot-side {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: transparent !important;
}