/* =========================================
   Custom CSS & Animations
========================================= */

/* =========================================
   Sticky Header Transition
========================================= */
/* ده الهيدر في حالته الطبيعية (فوق) */
#main-header {
    transition: all 0.4s ease-in-out;
    background-color: transparent; 
}

/* ده الكلاس اللي هيتركب أوتوماتيك لما ننزل لتحت */
.header-scrolled {
    background-color: #171717 !important; /* لون أسود فحمي فخم جداً */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important; /* ظل خفيف يفصله عن المحتوى */
    /* لو حابب الهيدر يصغر شوية في الارتفاع وهو نازل */
    padding-top: 0.5rem !important; 
    padding-bottom: 0.5rem !important;
}
/* =========================================
   Perfect Infinite Marquee Animation
========================================= *//* =========================================
   Perfect Seamless Infinite Marquee (One Track)
========================================= */
.slider-container {
    direction: ltr; 
    overflow: hidden; /* تأكيد إضافي لمنع أي مساحة خارجية */
}

.card-rtl {
    direction: rtl; 
}

.scroll-track {
    display: flex;
    width: max-content; /* بيخلي التراك ياخد عرض الـ 20 كارت كلهم */
    /* قللنا الوقت لـ 30 ثانية عشان الـ 50% مسافة أقصر، فسرعته تظبط */
    animation: infiniteScroll 30s linear infinite; 
    will-change: transform;
}

.scroll-track:hover {
    animation-play-state: paused;
}

@keyframes infiniteScroll {
    0% { transform: translate3d(0, 0, 0); }
    /* السحر هنا: بيتحرك للنص بالظبط، ولأن النصين متطابقين، الإعادة بتكون غير مرئية */
    100% { transform: translate3d(-50%, 0, 0); } 
}

/* إخفاء شريط التمرير للسلايدر مع الحفاظ على القدرة على السحب */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================
   Ultimate Bulletproof Marquee
========================================= */
.marquee-wrapper {
    display: flex;
    overflow: hidden;
    width: 100%;
    direction: ltr !important; /* إجبار الحركة من اليسار لليمين */
}

.marquee-track {
    display: flex;
    flex-shrink: 0 !important; /* منع المتصفح من ضغط القطار */
    gap: 1.5rem; /* مسافة 24 بكسل بين الكروت */
    padding-right: 1.5rem; /* نفس المسافة عشان لما القطار التاني يلحم فيه ميبقاش لازق */
    animation: scroll-left 50s linear infinite;
    will-change: transform;
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused !important; /* وقوف عند الماوس */
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* القطار بيتحرك بطوله كامل */
}

/* ================= 1. إعدادات عامة ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #0f172a; 
}

/* ================= 2. هيكل الهيرو سكشن (للموبايل افتراضياً) ================= */
.hero-section {
    padding-top: 140px; 
    padding-bottom: 80px;
    padding-right: 5%;
    padding-left: 5%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    display: flex;
    flex-direction: column; /* ترتيب رأسي للموبايل */
    gap: 60px;
    align-items: center;
    min-height: 100vh;
}

.content-column, .visual-column {
    width: 100%;
}

/* ================= 3. النصوص والتخصيص الجغرافي ================= */
.main-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
}

.description {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.geo-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(74, 222, 128, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: 500;
}

#location-text {
    color: #f1f5f9;
    transition: color 0.5s ease;
}

/* ================= 4. صندوق التشخيص الذكي والأزرار ================= */
.micro-commitment-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.instruction-header h3 {
    color: #fbd38d;
    font-size: 16px;
    margin: 0;
}

.pulsing-arrow {
    font-size: 24px;
    animation: bounceUpDown 1.5s infinite;
}

@keyframes bounceUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.appliance-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.appliance-buttons button {
    flex: 1 1 calc(50% - 12px); /* زرين في السطر للموبايل */
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 15px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
}

.appliance-buttons button:hover, 
.appliance-buttons button:active {
    background: #4ade80;
    color: #000;
    border-color: #4ade80;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 222, 128, 0.3);
}

.loading-text {
    color: #94a3b8;
    font-size: 16px;
    text-align: center;
    padding: 15px 0;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* حاوية أزرار الاتصال تظهر بحركة انزلاق */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 20px;
    background: rgba(74, 222, 128, 0.05);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.whatsapp-btn, .call-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.whatsapp-btn {
    background-color: #25D366;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.call-btn {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid #475569;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn:hover, .call-btn:hover {
    transform: scale(1.02);
}

/* ================= 5. المرئيات (الفيديو والشاشة الوهمية) ================= */

/* الغلاف الحاوي يضمن استقرار الشاشة فوق الفيديو */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto; 
}

/* الفيديو المقصوص */
.video-mask-container {
    width: 100%;
    height: 500px;
    background-color: #334155;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    border-radius: 15px; 
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 24px;
    font-weight: bold;
}

/* الشاشة الوهمية (تطفو خارج الفيديو قليلاً) */
.diagnostic-terminal {
    position: absolute;
    bottom: -20px; /* تخرج من الأسفل قليلاً */
    left: -10px; /* تخرج من اليسار قليلاً */
    width: 80%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-family: monospace;
    font-size: 12px;
    direction: ltr;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    z-index: 10;
}

.terminal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: #94a3b8;
    font-size: 11px;
}

.typing-text {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    margin-bottom: 5px;
    animation: typing 2s steps(30, end) forwards;
}

.delay-1 { animation-delay: 2s; }
.delay-2 { animation-delay: 4s; }

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* ================= 6. استعلام الشاشات الكبيرة (لاب توب) ================= */
@media (min-width: 992px) {
    .hero-section {
        flex-direction: row; /* ترتيب أفقي للاب توب */
        justify-content: space-between;
        align-items: center;
    }

    .content-column {
        width: 48%; /* مساحة النصوص */
        padding-left: 20px;
    }

    .visual-column {
        width: 48%; /* مساحة المرئيات */
        display: flex;
        justify-content: flex-end;
    }

    .main-title { font-size: 38px; }
    .description { font-size: 20px; }
    .appliance-buttons button { flex: 1 1 calc(33.333% - 12px); } /* 3 أزرار في السطر */

    /* تكبير غلاف الفيديو والفيديو نفسه على اللاب توب */
    .video-wrapper {
        max-width: 580px;
        margin: 0; /* إلغاء التوسيط التلقائي ليلتزم بيمين/يسار العمود */
    }

    .video-mask-container {
        height: 650px;
    }

    .diagnostic-terminal {
        font-size: 13px;
        width: 70%; /* تصغير عرض الشاشة الوهمية بالنسبة للفيديو الكبير */
    }
}

/* تنسيق الرادار الجديد */
.geo-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 23, 42, 0.6);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(74, 222, 128, 0.2);
    margin-bottom: 25px;
}

.radar-container {
    position: relative;
    width: 15px;
    height: 15px;
}

.radar-pulse {
    width: 100%;
    height: 100%;
    background-color: #4ade80;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #4ade80;
    animation: radarRipple 2s infinite;
}

@keyframes radarRipple {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); transform: scale(1); }
    100% { box-shadow: 0 0 0 15px rgba(74, 222, 128, 0); transform: scale(1.5); }
}

.radar-text-container {
    display: flex;
    flex-direction: column;
}

#location-text { color: #f1f5f9; font-size: 16px; font-weight: bold; }
#radar-updates { color: #94a3b8; font-size: 12px; transition: opacity 0.5s ease; }

.model-label {
    display: block;
    color: #fbd38d;
    font-size: 14px;
    margin-bottom: 10px;
}

.premium-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #475569;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    margin-bottom: 15px;
    outline: none;
    transition: border 0.3s ease;
}

.premium-input:focus { border-color: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.2); }

.confirm-btn {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.confirm-btn:hover { background: #2563eb; }

.digital-warranty-section {
    background-color: #0b1120; /* أغمق من الهيرو لإعطاء عمق */
    padding: 80px 5%;
}

.warranty-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    background: linear-gradient(90deg, rgba(30,41,59,0.5) 0%, rgba(15,23,42,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 40px;
}

.warranty-content { flex: 1; min-width: 300px; }
.warranty-content h2 { color: #f8fafc; font-size: 28px; margin-bottom: 15px; }
.warranty-content p { color: #94a3b8; font-size: 18px; line-height: 1.7; }
.warranty-content strong { color: #fbd38d; }

.warranty-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* بطاقة الضمان الزجاجية */
.glass-card {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-family: monospace;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.status-active { color: #4ade80; font-weight: bold; }

.qr-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%234ade80" stroke-width="2" stroke-dasharray="5,5"/></svg>') center/cover;
    position: relative;
}

/* حركة الماسح الضوئي (Scanner Line) */
.scan-line {
    width: 100%;
    height: 2px;
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80;
    position: absolute;
    animation: scan 2s infinite linear alternate;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.card-details { text-align: center; color: #94a3b8; font-family: monospace; }

/* تنسيقات الحقول والنماذج (Forms) */
.premium-label {
    display: block;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 8px;
    margin-top: 15px;
}

.premium-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #475569;
    color: #fff;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.premium-input:focus { 
    border-color: #4ade80; 
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.2); 
}

/* الأزرار المرحلية */
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'Tajawal', sans-serif;
    transition: transform 0.3s ease;
}

.action-btn:hover { transform: scale(1.02); }

.final-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* شريط النجاح الأخضر */
.success-banner {
    background: rgba(16, 185, 129, 0.1);
    color: #4ade80;
    border: 1px dashed #10b981;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* تصميم شريط الخطوات */
/* تصميم شريط الخطوات (التايم لاين) */
.funnel-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 35px;
}

/* الخط الفاصل الباهت في الخلفية */
.funnel-progress::before {
    content: '';
    position: absolute;
    top: 15px; /* ليكون في منتصف الدوائر بالضبط */
    left: 15%;
    right: 15%;
    height: 2px;
    background: #334155;
    z-index: 1;
}

.funnel-progress .step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2; /* ليكون فوق الخط */
    color: #64748b;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* شكل الدائرة الباهتة (الوضع الافتراضي) */
.funnel-progress .step .circle-icon {
    width: 32px;
    height: 32px;
    background: #0f172a; /* لون الخلفية الداكن */
    border: 2px solid #334155;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    transition: all 0.4s ease;
}

/* تأثير التنوير (النيون) عندما تتفعل الخطوة */
.funnel-progress .step.active {
    color: #4ade80;
}

.funnel-progress .step.active .circle-icon {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4); /* توهج أخضر فخم */
    color: #4ade80;
}
/* حقول الإدخال الإنجليزية (الموديل والرقم) */
.ltr-input {
    font-family: monospace;
    letter-spacing: 1px;
}

/* تنسيق حقل الاختيار (Select) */
select.premium-input {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234ade80%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 12px auto;
    cursor: pointer;
}

/* واجهة الفحص المعقدة (Terminal) */
.terminal-scan-box {
    background: #0f172a; /* لون فحمي داكن جداً */
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 8px;
    margin-top: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    direction: ltr; /* التيرمينال دائماً يبدو أفضل من اليسار */
}

.terminal-header {
    background: #1e293b;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mac-dots {
    display: flex;
    gap: 6px;
}

.mac-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    color: #64748b;
    font-family: monospace;
    font-size: 11px;
}

.terminal-body {
    padding: 15px;
    font-family: monospace;
    font-size: 13px;
    text-align: right;
    direction: rtl;
    color: #94a3b8;
}

.terminal-body p {
    margin-bottom: 8px;
}

/* حركة وميض خفيفة للنقاط */
.terminal-body span {
    animation: blink 1s infinite alternate;
}

    /* الحاوية الرئيسية (معالجة مشكلة الموبايل هنا) */
    .warranty-container {
        max-width: 1200px; margin: 0 auto; 
        background: rgba(15, 23, 42, 0.6); 
        border: 1px solid rgba(255, 255, 255, 0.05); 
        border-radius: 20px; 
        padding: 50px; 
        display: flex; align-items: center; justify-content: center; gap: 40px; 
        box-sizing: border-box; /* أهم سطر لمنع خروج التصميم */
    }
    
    .warranty-text { flex: 1; min-width: 300px; text-align: right; box-sizing: border-box; }
    .warranty-visual { flex: 1; min-width: 300px; display: flex; justify-content: center; align-items: center; box-sizing: border-box; width: 100%; }

    /* استعلام شاشات الموبايل (تقليل الـ Padding وضبط المحاذاة لليمين) */
    @media (max-width: 991px) {
        .warranty-container { flex-direction: column !important; padding: 30px 15px !important; }
        .warranty-text { text-align: right !important; width: 100%; }
        /* تصغير الموبايل قليلاً على الشاشات الصغيرة جداً إن لزم الأمر */
        .css-iphone { transform: scale(0.95); margin-top: -15px; }
    }

    /* هيكل الموبايل (زيادة الارتفاع لمنع الاسكرول) */
    .css-iphone {
        width: 310px; height: 640px; /* زيادة الارتفاع هنا لـ 640 */
        background: #000; border: 4px solid #334155; border-radius: 25px; 
        position: relative; overflow: hidden;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255,255,255,0.1);
        animation: float 5s ease-in-out infinite;
    }

    .wa-app { width: 100%; height: 100%; background: #ece5dd; display: flex; flex-direction: column; position: relative; }

    .wa-status-bar { background: #054c44; color: #fff; padding: 4px 10px; display: flex; justify-content: space-between; align-items: center; font-family: sans-serif; }

    .wa-header { background: #075e54; color: #fff; padding: 10px; display: flex; justify-content: space-between; align-items: center; font-family: Arial, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 2; }
    .wa-avatar { width: 36px; height: 36px; background: #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
    .wa-name { font-size: 16px; font-weight: 600; }
    .wa-status { font-size: 12px; opacity: 0.9; font-weight: 300; }

    /* منطقة الدردشة (إلغاء الاسكرول وتقليل المسافات) */
    .wa-chat-area {
        flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; /* تقليل الـ gap لـ 8px */
        background-image: url('data:image/svg+xml,%3Csvg width="40" height="40" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h40v40H0z" fill="%23ece5dd"/%3E%3Cpath d="M20 20c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm0-3c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z" fill="%23dfd8c8" fill-opacity=".4"/%3E%3C/svg%3E');
        overflow-y: hidden; /* منع الاسكرول تماماً */
    }

    .wa-date-badge { align-self: center; background: #e1f3fb; color: #556b73; font-size: 11px; font-weight: bold; padding: 6px 12px; border-radius: 10px; margin-bottom: 2px; box-shadow: 0 1px 1px rgba(0,0,0,0.1); }

    .wa-encryption { align-self: center; background: #fef4c5; color: #66521a; font-size: 11px; padding: 6px 10px; border-radius: 8px; text-align: center; width: 85%; line-height: 1.3; box-shadow: 0 1px 1px rgba(0,0,0,0.1); margin-bottom: 2px; }

    .wa-bubble { max-width: 85%; padding: 0px 8px 8px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: #000; position: relative; box-shadow: 0 1px 1px rgba(0,0,0,0.1); display: flex; flex-direction: column; word-wrap: break-word; }
    
    .wa-received { background: #fff; align-self: flex-start; border-top-right-radius: 0; }
    .wa-received::before { content: ''; position: absolute; top: 0; right: -8px; width: 0; height: 0; border-top: 10px solid #fff; border-right: 10px solid transparent; }

    .wa-sent { background: #dcf8c6; align-self: flex-end; border-top-left-radius: 0; }
    .wa-sent::before { content: ''; position: absolute; top: 0; left: -8px; width: 0; height: 0; border-top: 10px solid #dcf8c6; border-left: 10px solid transparent; }

    .wa-sender-name { font-size: 12px; font-weight: bold; color: #128C7E; margin-bottom: 2px; }

    .wa-time { align-self: flex-end; font-size: 10px; color: #888; margin-top: 2px; display: flex; align-items: center; gap: 4px; }

    .wa-pdf-box { background: #0000000a; border-radius: 6px; padding: 8px; display: flex; gap: 10px; align-items: center; margin-top: 6px; width: 100%; box-sizing: border-box; }
    .pdf-icon-wrapper { background: #ff5252; padding: 8px; border-radius: 4px; display: flex; }
    .pdf-info { display: flex; flex-direction: column; overflow: hidden; }
    .pdf-name { font-size: 13px; font-weight: bold; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pdf-size { font-size: 11px; color: #666; margin-top: 2px; }

    /* شريط الكتابة */
    .wa-input-area { background: transparent; padding: 5px; display: flex; gap: 4px; align-items: flex-end; width: 100%; box-sizing: border-box; }
    .wa-input-pill { flex: 1; background: #fff; border-radius: 24px; padding: 8px 10px; display: flex; align-items: center; box-shadow: 0 1px 1px rgba(0,0,0,0.1); min-height: 42px; box-sizing: border-box; overflow: hidden; }
    .wa-placeholder { color: #8696a0; font-size: 15px; font-family: Arial, sans-serif; flex: 1; white-space: nowrap; overflow: hidden; text-align: right; margin-right: 10px; margin-top: 2px; }
    
    .wa-mic-btn { width: 42px; height: 42px; background: #128C7E; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.2); flex-shrink: 0; margin-bottom: 2px; }

    @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

    /* 1. إصلاح العمود عشان ياخد مساحته الإجبارية في الهيرو سكشن */
    .hero-video-column {
        flex: 1; /* بيجبر العمود ياخد المساحة المتبقية جنباً إلى جنب مع الفورم */
        min-width: 300px; /* بيمنع العمود من الانكماش والاختفاء */
        display: flex; 
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 2. إعطاء أبعاد إجبارية للمربع اللي جواه الفيديو */
    .video-wrapper {
        width: 100%; 
        min-height: 550px; /* الارتفاع الإجباري اللي هيخلي المربع يظهر */
        border-radius: 16px; 
        overflow: hidden; 
        position: relative; 
        border: 1px solid rgba(74, 222, 128, 0.15); 
        box-shadow: 0 20px 40px rgba(0,0,0,0.5);
        background-color: #0b1120; /* لون كحلي يظهر لو الفيديو بيحمل */
        flex: 1; /* بيتمدد ليملأ العمود */
    }

    .video-overlay {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
        background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15, 23, 42, 0.29) 100%);
        z-index: 2; pointer-events: none;
    }

    .hero-video {
        width: 100%; height: 100%; 
        object-fit: cover; /* بيخلي الفيديو يملأ المربع بدون ما يمط */
        position: absolute; top: 0; left: 0; 
        z-index: 1;
    }

    /* إخفاء فيديو الموبايل كوضع افتراضي */
    .mobile-video { display: none; }
    .desktop-video { display: block; }

    .live-badge {
        position: absolute; top: 20px; right: 20px; z-index: 3; 
        background: rgba(0,0,0,0.6); padding: 5px 12px; border-radius: 20px; 
        display: flex; align-items: center; gap: 6px; 
        border: 1px solid rgba(255,255,255,0.1);
    }
    .pulsing-dot { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; box-shadow: 0 0 8px #ef4444; animation: pulse 1.5s infinite; }
    .live-badge span { color: #fff; font-size: 12px; font-family: monospace; letter-spacing: 1px; }

    @keyframes pulse { 0% { transform: scale(0.95); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.5; } 100% { transform: scale(0.95); opacity: 1; } }

    /* استعلام شاشات الموبايل */
    @media (max-width: 991px) {
        .desktop-video { display: none; }
        .mobile-video { display: block; }
        .video-wrapper { min-height: 400px; margin-top: 20px; } /* تعديل الارتفاع ليتناسب مع الموبايل */
    }
/* أضف هذا الكود للـ style الخاص بالـ video-wrapper */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* ده لون الخلفية الكحلي بتاعك مع شفافية متدرجة */
    background: linear-gradient(to bottom, rgba(11, 17, 32, 0.2) 0%, rgba(11, 17, 32, 0.8) 100%);
    z-index: 2; /* الطبقة دي فوق الفيديو */
    pointer-events: none; /* عشان أي كليكات تمر من خلالها للفيديو لو حبيت */
}

/* الكود النهائي - Mobile Only */
@media (max-width: 991px) {
    .sticky-cta-mobile {
        display: block !important; 
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 10px 15px !important;
        background: rgba(11, 17, 32, 0.98) !important;
        border-top: 1px solid rgba(74, 222, 128, 0.2) !important;
        z-index: 999999 !important;
        text-align: center !important;
        backdrop-filter: blur(10px) !important;
    }

    .cta-button {
        display: block !important;
        background-color: #128C7E !important;
        color: #ffffff !important;
        text-align: center !important;
        padding: 14px 0 !important;
        border-radius: 12px !important;
        font-weight: bold !important;
        font-size: 16px !important;
        text-decoration: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }
}

/* لضمان الإخفاء التام في الشاشات الكبيرة */
@media (min-width: 992px) {
    .sticky-cta-mobile {
        display: none !important;
    }
}

/* تنسيقات مؤشر التغطية الجغرافية */
.geo-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #334155;
    margin-bottom: 15px;
    width: fit-content;
    transition: all 0.5s ease; /* انتقال ناعم للألوان */
}

/* حالة النجاح (اللون الأخضر) */
.geo-badge-container.success-state {
    background: rgba(18, 140, 126, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
}

#geo-text {
    color: #94a3b8; /* لون رمادي فاتح أثناء الفحص */
    font-size: 13px;
    font-weight: 500;
    transition: color 0.5s ease;
}

.geo-badge-container.success-state #geo-text {
    color: #4ade80; /* لون أخضر نيون بعد الفحص */
}

/* حركة الأيقونة أثناء الفحص (Scanning) */
.geo-scanning svg {
    fill: #94a3b8;
    animation: scan-pulse 1s infinite alternate;
}

/* شكل الأيقونة بعد النجاح */
.geo-badge-container.success-state #geo-icon svg {
    fill: #4ade80;
    animation: success-bounce 0.5s ease forwards;
}

@keyframes scan-pulse {
    0% { transform: translateY(0) scale(0.9); opacity: 0.5; }
    100% { transform: translateY(-3px) scale(1.1); opacity: 1; }
}

@keyframes success-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}


    /* الكود ده بيخلي أي عنصر يخرج بره حدود الشاشة "مخفي" فبيمنع الصفحة تتشد */
    html, body {
        overflow-x: hidden;
    }

     
        /* ستايل الهيكل الرئيسي لضمان العمودين */
        .smart-hero-layout {
            display: flex;
            flex-direction: column;
            gap: 40px;
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }
        
        @media (min-width: 992px) {
            .smart-hero-layout {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
            }
            .hero-text-and-form { width: 55%; }
            .hero-video-column { width: 40%; }
        }

        /* تنسيقات العناوين */
        .hero-title {
            color: #f8fafc; 
            font-size: 44px; 
            font-weight: 800; 
            margin-bottom: 15px; 
            line-height: 1.5;
            font-family: 'cairo;
        }
        .hero-subtitle {
            color: #94a3b8; 
            font-size: 18px; 
            margin-bottom: 25px; 
            line-height: 1.7;
            font-family: 'cairo;
        }

        /* تنسيقات صندوق الفورم */
        .micro-commitment-box {
            background: rgba(15, 23, 42, 0.9);
            border: 1px solid rgba(74, 222, 128, 0.15);
            border-radius: 16px;
            padding: 30px;
            width: 100%;
            box-sizing: border-box;
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }

        /* التايم لاين (شريط الخطوات) */
        .funnel-progress {
            display: flex;
            justify-content: space-between;
            position: relative;
            margin-bottom: 30px;
        }
        .funnel-progress::before {
            content: '';
            position: absolute;
            top: 15px; left: 15%; right: 15%;
            height: 2px; background: #334155; z-index: 1;
        }
        .funnel-progress .step {
            flex: 1; text-align: center; position: relative; z-index: 2;
            color: #64748b; font-size: 14px; font-weight: bold; transition: 0.3s;
        }
        .funnel-progress .step .circle-icon {
            width: 32px; height: 32px; background: #0f172a;
            border: 2px solid #334155; border-radius: 50%;
            margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
            font-size: 14px; transition: 0.4s; color: #fff;
        }
        .funnel-progress .step.active { color: #4ade80; }
        .funnel-progress .step.active .circle-icon {
            border-color: #4ade80; background: rgba(74, 222, 128, 0.1);
            box-shadow: 0 0 15px rgba(74, 222, 128, 0.4); color: #4ade80;
        }

        /* الأزرار والحقول */
        .appliance-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
        .appliance-buttons button {
            flex: 1; min-width: 100px; padding: 12px;
            background: #1e293b; color: #fff; border: 1px solid #334155;
            border-radius: 8px; cursor: pointer; transition: 0.3s;
        }
        .appliance-buttons button:hover { background: #49db7e; border-color: #3b82f6; }
        
        .premium-label { display: block; color: #94a3b8; font-size: 13px; margin: 15px 0 8px; }
        .premium-input {
            width: 100%; background: #0f172a; border: 1px solid #334155;
            color: #fff; padding: 12px; border-radius: 8px; box-sizing: border-box;
        }
        .premium-input:focus { outline: none; border-color: #4ade80; }
        .ltr-input { font-family: monospace; letter-spacing: 1px; }
        
        .action-btn {
            width: 100%; padding: 15px; border-radius: 8px; border: none;
            color: #fff; font-weight: bold; cursor: pointer; margin-top: 20px;
        }
        .action-btn { background: #3b82f6; }
        .final-btn { background: #10b981; }
        
        /* التيرمينال */
        .terminal-scan-box {
            background: #020617; border: 1px solid #334155; border-radius: 8px;
            margin-top: 20px; overflow: hidden; direction: ltr; text-align: left;
        }
        .terminal-header { background: #0f172a; padding: 8px 15px; display: flex; align-items: center; }
        .mac-dots { display: flex; gap: 6px; margin-right: 15px; }
        .mac-dots span { width: 10px; height: 10px; border-radius: 50%; }
        .mac-dots .red { background: #ff5f56; } .mac-dots .yellow { background: #ffbd2e; } .mac-dots .green { background: #27c93f; }
        .terminal-body { padding: 15px; font-family: monospace; font-size: 13px; color: #94a3b8; }
   
   /* ----------------------------------- */
        /* تأثير الأشعة السينية (X-Ray Reveal) */
        /* ----------------------------------- */
        .xray-wrapper {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
            height: 100%;
            min-height: 520px;
            display: flex;
            flex-direction: column;
        }

        .xray-header {
            background: #0f172a;
            padding: 15px;
            color: #94a3b8;
            font-family: monospace;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .pulsing-dot {
            width: 10px; height: 10px; background: #ef4444; border-radius: 50%;
            animation: pulse-red 1.5s infinite;
        }
        @keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } }

        .xray-frame {
            position: relative;
            flex: 1;
            background: #1e293b;
            overflow: hidden;
        }

        /* شكل الجهاز من الخارج (محاكاة CSS لغسالة/ثلاجة) */
        .device-outer {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: #334155;
            display: flex; align-items: center; justify-content: center;
        }
        .device-shape {
            width: 200px; height: 300px; border: 4px solid #475569; border-radius: 20px;
            background: #1e293b; position: relative;
        }
        /* باب الغسالة الخارجي */
        .device-shape::after {
            content: ''; position: absolute; top: 50px; left: 50px;
            width: 100px; height: 100px; border: 8px solid #475569; border-radius: 50%;
        }

        /* شكل الأشعة السينية من الداخل (Blueprint & Circuits) */
        .device-inner {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: #020617;
            /* عمل شبكة هندسية */
            background-image: linear-gradient(rgba(74, 222, 128, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(74, 222, 128, 0.1) 1px, transparent 1px);
            background-size: 20px 20px;
            display: flex; align-items: center; justify-content: center;
            /* سحر إخفاء الجزء اللي فوق الليزر */
            clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0% 100%);
            animation: xray-reveal 4s infinite alternate ease-in-out;
        }

        .circuit-board {
            width: 180px; height: 280px; border: 2px dashed #4ade80; border-radius: 15px;
            background: radial-gradient(circle, rgba(74,222,128,0.2) 0%, transparent 70%);
            position: relative;
        }
        /* موتور داخلي مضيء */
        .circuit-board::after {
            content: '⚙️'; font-size: 40px; position: absolute; top: 75px; left: 65px;
            animation: spin 3s infinite linear; text-shadow: 0 0 15px #4ade80;
        }

        /* خط الليزر */
        .scanner-laser {
            position: absolute; left: 0; width: 100%; height: 3px;
            background: #4ade80; box-shadow: 0 0 20px 5px rgba(74, 222, 128, 0.5);
            animation: scan-line 4s infinite alternate ease-in-out;
        }

        .xray-footer { background: #0f172a; padding: 15px; border-top: 1px solid rgba(74, 222, 128, 0.2); }
        .status-bar { width: 100%; height: 4px; background: #334155; border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
        .status-fill { width: 30%; height: 100%; background: #4ade80; animation: loading-bar 2s infinite alternate; }
        .xray-footer p { color: #4ade80; font-family: monospace; font-size: 12px; margin: 0; }

        /* الأنيميشن (الحركة) */
        @keyframes scan-line { 0% { top: 10%; } 100% { top: 90%; } }
        @keyframes xray-reveal { 0% { clip-path: polygon(0 10%, 100% 10%, 100% 100%, 0% 100%); } 100% { clip-path: polygon(0 90%, 100% 90%, 100% 100%, 0% 100%); } }
        @keyframes spin { 100% { transform: rotate(360deg); } }
        @keyframes loading-bar { 0% { width: 10%; } 100% { width: 90%; } }

           /* هيكل الموبايل */
    .css-iphone {
        width: 260px;
        height: 520px;
        background: #020617;
        border: 8px solid #1e293b;
        border-radius: 40px;
        position: relative;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255,255,255,0.1);
        transform: translateY(0);
        animation: float 4s ease-in-out infinite;
    }

    /* النوتش (الجزيرة الديناميكية) */
    .iphone-notch {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 20px;
        background: #000;
        border-radius: 20px;
        z-index: 10;
    }

    /* الشاشة */
    .iphone-screen {
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        border-radius: 32px;
        overflow: hidden;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    /* شريط الحالة العلوي للموبايل */
    .iphone-header {
        display: flex;
        justify-content: space-between;
        padding: 12px 20px;
        color: #fff;
        font-family: sans-serif;
    }

    .iphone-icons { display: flex; gap: 5px; align-items: center; }
    .battery { width: 18px; height: 8px; border: 1px solid #fff; border-radius: 3px; position: relative; }
    .battery::after { content: ''; position: absolute; top: 1px; left: 1px; width: 12px; height: 4px; background: #fff; }
    
    /* رسالة الواتساب */
    .whatsapp-notification {
        margin: auto 15px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 15px;
        padding: 12px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        animation: slideUpFade 1s ease-out forwards;
        animation-delay: 1s;
        opacity: 0;
        transform: translateY(20px);
    }

    .wa-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .wa-icon { background: #25D366; border-radius: 5px; padding: 3px; font-size: 10px; }
    .wa-title { font-size: 12px; font-weight: bold; color: #333; flex: 1; }
    .wa-time { font-size: 10px; color: #888; }

    .wa-body {
        font-size: 13px;
        color: #444;
        line-height: 1.5;
        direction: rtl;
    }

    /* أنيميشن طفو الموبايل */
    @keyframes float {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-10px); }
        100% { transform: translateY(0px); }
    }
    
    /* أنيميشن ظهور الرسالة */
    @keyframes slideUpFade {
        to { opacity: 1; transform: translateY(0); }
    }

    /* تجاوب الشاشات الصغيرة (الموبايل) */
    @media (max-width: 768px) {
        .css-iphone { margin: 30px auto 0; }
    }
   /* إصلاح ألوان الأسئلة الشائعة في الوضع الليلي */
.faq-btn:focus, 
.faq-item.active .faq-btn {
    background-color: transparent !important;
}
.faq-item.active {
    border-color: #4ade80 !important; /* بيخلي الإطار ينور أخضر لما السؤال يفتح */
}
.faq-item.active h3 {
    color: #4ade80 !important; /* بيخلي عنوان السؤال أخضر وهو مفتوح */
}
.faq-icon {
    transition: transform 0.4s ease;
}
.faq-item.active .faq-icon {
    transform: rotate(180deg); /* بيلف السهم لفوق لما يفتح */
    color: #0b1120 !important;
}
.faq-item.active .w-10 {
    background-color: #4ade80 !important; /* بيخلي دايرة السهم خضرا */
}

window.addEventListener('scroll', function() {
    const stickyCta = document.getElementById('sticky-cta');
    const heroHeight = document.getElementById('hero')?.offsetHeight || 600; // ارتفاع الهيرو
    
    if (window.scrollY > heroHeight) {
        stickyCta.classList.remove('hidden');
        stickyCta.classList.add('flex');
    } else {
        stickyCta.classList.add('hidden');
        stickyCta.classList.remove('flex');
    }
});

@keyframes shimmer {
    100% { transform: translateX(100%); }
}