
.ai-hero-page {
    /* صورة بتعبر عن الداتا والذكاء الاصطناعي مدمجة مع لون كحلي قاتم */
    background: linear-gradient(135deg, rgba(5, 10, 20, 0.95), rgba(13, 20, 36, 0.8)), 
                url('https://images.unsplash.com/photo-1620712943543-bcc4688e7485?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* =========================================
   AI GRID & LASER SCANNER CARDS
========================================= */
.ai-grid {
    display: grid;
    /* كروت متساوية في شبكة */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.ai-card {
    position: relative;
    background: rgba(13, 20, 36, 0.6); /* زجاجي داكن */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden; /* مهم جداً عشان الليزر ميخرجش بره الكارت */
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    
    /* رسم شبكة نقطية دقيقة جداً داخل الكارت لتعطي إيحاء رقمي */
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 15px 15px;
}

.ai-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 87, 34, 0.3);
    box-shadow: 0 20px 50px rgba(255, 87, 34, 0.15);
}

/* =========================================
   تأثير الماسح الضوئي (LASER SCANNER EFFECT)
========================================= */
.laser-scanner {
    position: absolute;
    top: -100%; /* يبدأ من فوق الكارت (مخفي) */
    left: 0;
    width: 100%;
    height: 3px; /* سمك خط الليزر */
    background: var(--accent-orange);
    box-shadow: 0 0 15px var(--accent-orange), 
                0 0 30px var(--accent-orange), 
                0 30px 50px rgba(255, 87, 34, 0.2); /* ضوء مسحوب لتحت */
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* تفعيل الأنيميشن لما الماوس يقف على الكارت */
.ai-card:hover .laser-scanner {
    opacity: 1;
    animation: scanAnimation 2s ease-in-out infinite alternate;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    100% { top: 100%; } /* يمسح الكارت للآخر وينزل ويطلع */
}

/* =========================================
   AI CARD CONTENT
========================================= */
.ai-card-content {
    position: relative;
    z-index: 2; /* لضمان إن النص فوق خط الليزر */
}

.ai-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%; /* شكل دائري للأيقونات هنا لكسر الملل */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    transition: all 0.4s ease;
}

/* تأثير النبض الخاص بالأيقونة (كأن الـ AI بيتنفس) */
.ai-icon::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 1px solid var(--accent-orange);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.ai-card:hover .ai-icon::after {
    opacity: 0.5;
    transform: scale(1.1);
    animation: iconPulse 1.5s infinite;
}

@keyframes iconPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.ai-icon i {
    font-size: 2.5rem;
    color: #e2e8f0;
    transition: all 0.4s ease;
}

.ai-card:hover .ai-icon {
    background: rgba(255, 87, 34, 0.1);
}

.ai-card:hover .ai-icon i {
    color: var(--accent-orange);
}

.ai-card h3 {
    font-size: 1.6rem;
    color: var(--pure-white);
    margin-bottom: 15px;
}

/* تظبيط الموبايل للذكاء الاصطناعي */
@media (max-width: 768px) {
    .ai-grid {
        grid-template-columns: 1fr;
    }
    .ai-card {
        padding: 30px 20px;
    }
}

/* =========================================
   AI IMPACT STATS (قسم الأرقام)
========================================= */
.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.ai-stat-box {
    position: relative;
    background: rgba(13, 20, 36, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.ai-stat-box:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 87, 34, 0.3);
}

/* توهج داخلي للرقم */
.stat-glow {
    position: absolute;
    top: -50px; left: 50%;
    transform: translateX(-50%);
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,87,34,0.2) 0%, transparent 70%);
    z-index: 0;
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--pure-white);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 5px 20px rgba(255,87,34,0.4); /* إضاءة برتقالية خلف الرقم */
}

.stat-title {
    color: var(--accent-orange);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.stat-desc {
    display: block;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
} 

/* =========================================
   INTERACTIVE IMAGE ACCORDION (معرض الصور المتمدد)
========================================= */
.accordion-container {
    display: flex;
    width: 100%;
    height: 500px; /* ارتفاع المعرض بالكامل */
    gap: 15px; /* المسافة بين الصور */
}

/* الكارت الواحد (Panel) */
.accordion-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px; 
    flex: 1; 
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

 /* التمدد عند مرور الماوس فقط */
.accordion-panel:hover {
    flex: 4; /* الكارت بياخد مساحة أكبر 4 مرات من الباقي عند التمرير فقط */
    border-color: var(--accent-orange);
    box-shadow: 0 15px 40px rgba(255, 87, 34, 0.3);
}

/* إضافة تنسيق للبانل النشطة (اختياري، لو حابة تديها لون مختلف لما تفتح) */
.accordion-panel.active-panel {
    border-color: var(--accent-orange);
    box-shadow: 0 15px 40px rgba(255, 87, 34, 0.3);
}
/* طبقة تعتيم على الصورة عشان الكلام يبان */
.panel-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* تدرج لوني كحلي قاتم للشفاف */
    background: linear-gradient(to top, rgba(5, 10, 20, 0.95) 0%, rgba(5, 10, 20, 0.3) 100%);
    transition: all 0.5s ease;
}

.accordion-panel:hover .panel-overlay, .accordion-panel.active-panel .panel-overlay {
    background: linear-gradient(to top, rgba(5, 10, 20, 0.95) 0%, rgba(5, 10, 20, 0.6) 100%);
}

/* محتوى الكارت (الأيقونة + النص) */
.panel-content {
    position: absolute;
    bottom: 30px;
    left: 30px; /* لليسار في الـ RTL */
    right: 30px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

/* الأيقونة اللي بتفضل ظاهرة دايماً */
.panel-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* يمنع الأيقونة إنها تصغر */
    transition: all 0.5s ease;
}

.panel-icon i {
    font-size: 1.8rem;
    color: var(--pure-white);
    transition: color 0.4s ease;
}

/* تلوين الأيقونة في الكارت النشط */
.accordion-panel:hover .panel-icon, .accordion-panel.active-panel .panel-icon {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    box-shadow: 0 0 20px var(--accent-orange);
}

/* الجزء الخاص بالنص اللي بيختفي ويظهر */
.panel-text {
    opacity: 0; /* مخفي في الوضع العادي */
    visibility: hidden;
    transform: translateY(20px); /* نازل لتحت شوية */
    transition: all 0.4s ease 0.2s; /* تأخير بسيط عشان يظهر بعد التمدد */
    white-space: nowrap; /* لمنع تكسر النص أثناء الحركة */
}

/* إظهار النص عند التمدد */
.accordion-panel:hover .panel-text, .accordion-panel.active-panel .panel-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    white-space: normal; /* السماح للنص بالنزول لسطر جديد براحته */
}

.step-num {
    font-size: 3rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    line-height: 1;
    margin-bottom: 10px;
}

.accordion-panel:hover .step-num, .accordion-panel.active-panel .step-num {
    -webkit-text-stroke: 1px var(--accent-orange);
    color: rgba(255, 87, 34, 0.1);
}

.panel-text h3 {
    color: var(--pure-white);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.panel-text p {
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
    max-width: 400px; /* لضمان عدم امتداد النص بشكل مبالغ فيه */
}

/* =========================================
   التجاوب مع الموبايل (Responsive)
========================================= */
@media (max-width: 900px) {
    .accordion-container {
        flex-direction: column; /* الكروت تحت بعض في الموبايل */
        /* height: auto; */
        height: 640px;
    }
    .accordion-panel {
        height: 120px; /* ارتفاع ثابت للكارت المنكمش في الموبايل */
    }
    .accordion-panel:hover, .accordion-panel.active-panel {
        height: 300px; /* الارتفاع لما يتفرد في الموبايل */
    }
    .panel-content {
        flex-direction: column;
        align-items: flex-start;
        bottom: 20px;
        right: 20px;
    }
    .panel-text p {
        font-size: 0.9rem;
        white-space: normal;
    }
    .ai-accordion-process{
        padding: px !important;
    }
}

/* =========================================
   CTA BANNER (نهاية الصفحة)
========================================= */
.cta-banner {
    /* background: linear-gradient(135deg, var(--accent-orange), #d84315); */
    /* border-radius: 20px; */
    border: 1px solid #d84315;
    border-radius: 101px 0px 100px 0px;
    -webkit-border-radius: 101px 0px 100px 0px;
    -moz-border-radius: 101px 0px 100px 0px;
    padding: 60px 40px;
    text-align: center;
    color: var(--pure-white);
    margin-bottom: 80px;
    /* box-shadow: 0 20px 50px var(--accent-glow); */
    width: 1200px;
    margin: 0 auto 80px;
}

.cta-banner h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px #d84315;
    color: #d84315;
}

.cta-banner p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
    /* color: #d84315; */
    color: rgba(255, 255, 255, 0.9);
}

/* تعديل الزرار ليناسب الخلفية البرتقالية */
.cta-banner .btn-primary {
    background: #d84315;
    color: var(--pure-white);
    box-shadow: 0 10px 20px #d84315;
}

.cta-banner .btn-primary:hover {
    background: var(--pure-white);
    color: var(--accent-orange);
}

/* =========================================
   RESPONSIVE (الموبايل)
========================================= */
@media (max-width: 768px) {
    .cta-banner h2 { font-size: 2rem; }
}

.category-header{
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: anchor-center;
}
 
.category-header p {
    color: #e2e8f0; 
    font-size: 1.15rem;
    font-weight: 400;
    margin: 15px 0 0 0;
    /* display: inline-flex; */
    align-items: center;
    padding: 8px 25px;
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px; 
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    width: fit-content;

}

.category-header p:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 87, 34, 0.5); 
    transform: translateX(-5px); 
}

/* النقطة المضيئة (Pulse Dot) قبل النص */
.category-header p::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    margin-left: 12px; 
    box-shadow: 0 0 10px var(--accent-orange);
    animation: pulseDot 2s infinite;
}

/* تجاوب العناوين على الموبايل */
@media (max-width: 768px) {
    .category-header h2 { font-size: 1.8rem; }
    .category-header p {
        font-size: 1rem;
        padding: 6px 18px;
    }
}
/* =========================================
   NEW AI INTERACTIVE HERO (شاشة الذكاء الاصطناعي)
========================================= */
.ai-interactive-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
    /* خلفية متدرجة خفيفة بدل الصورة لتبريز الشاشة الزجاجية */
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 87, 34, 0.08), transparent 50%),
                      radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.08), transparent 50%);
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
    /* padding: 100px 0 60px 0;  */
}

/* التخطيط المنقسم (نص يمين، شاشة يسار) */
.hero-split-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* مساحة أكبر للنص شوية */
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============ 1. تنسيق النصوص (الجزء الأيمن) ============ */
.tech-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 25px;
}
.tech-badge span {
    color: var(--accent-orange);
    margin-left: 10px;
    font-size: 0.8rem;
    animation: blinkDot 1s infinite; /* نقطة بتنور وتطفي */
}
@keyframes blinkDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-text-content h1 {
    font-size: 4rem;
    color: var(--pure-white);
    margin-bottom: 20px;
    line-height: 1.3;
}
.hero-text-content p {
    font-size: 1.25rem;
    color: #a0aec0;
    line-height: 1.8;
    margin-bottom: 35px;
    max-width: 90%;
}
.hero-actions {
    display: flex;
    gap: 20px;
}
/* زرار ثانوي مفرغ */
.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: 0.3s ease;
}
.btn-outline:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 87, 34, 0.05);
}

/* ============ 2. الشاشة التفاعلية (الجزء الأيسر) ============ */
.hero-visual-content {
    position: relative;
    padding: 20px; /* مساحة للكرات المضيئة */
}

/* تصميم الشاشة الزجاجية 3D */
.ai-terminal-glass {
    background: rgba(13, 20, 36, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(255, 87, 34, 0.15);
    position: relative;
    z-index: 2;
    /* إعطاء الشاشة لفة 3D شيك جداً */
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}
/* لما الماوس يقف عليها تتعدل وتبقى مواجهة للعميل */
.ai-terminal-glass:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* رأس الشاشة (زراير القفل والتكبير) */
.terminal-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.terminal-header .dot {
    width: 12px; height: 12px; border-radius: 50%; margin-left: 8px;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-header .title {
    margin-right: 15px; color: #64748b; font-family: monospace; font-size: 0.95rem;
}

/* جسم الشاشة (الكود اللي بيتكتب) */
.terminal-body {
    padding: 40px 30px;
    font-family: 'Courier New', Courier, monospace; /* خط المبرمجين */
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 2.2;
    min-height: 280px;
}
/* إخفاء النص في البداية لعمل أنيميشن الكتابة */
.terminal-body p {
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    width: 0;
}

/* أنيميشن الكتابة متتابع (كل سطر بعد التاني) */
.typing-text-1 { animation: typingAI 2s steps(40, end) forwards; }
.typing-text-2 { animation: typingAI 2s steps(40, end) 2s forwards; }
.typing-text-3 { animation: typingAI 2s steps(40, end) 4s forwards; color: var(--accent-orange) !important; font-weight: bold; }
.typing-text-4 { animation: typingAI 2s steps(40, end) 6s forwards; color: #27c93f !important; }

@keyframes typingAI {
    from { width: 0 }
    to { width: 100% }
}

/* خط مسح الليزر داخل الشاشة */
.terminal-scanner {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(255, 87, 34, 0.4);
    box-shadow: 0 0 15px var(--accent-orange);
    animation: scanTerminal 4s linear infinite;
    pointer-events: none;
}
@keyframes scanTerminal {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* كرات مضيئة عائمة في الخلفية (بتعطي عمق 3D للتصميم) */
.glow-orb {
    position: absolute; border-radius: 50%; filter: blur(70px); z-index: 1;
}
.orb-1 {
    width: 250px; height: 250px; background: var(--accent-orange);
    top: -50px; right: -50px; opacity: 0.25;
    animation: floatOrb 6s infinite alternate;
}
.orb-2 {
    width: 300px; height: 300px; background: #3b82f6;
    bottom: -50px; left: -50px; opacity: 0.15;
    animation: floatOrb 8s infinite alternate-reverse;
}
@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* ============ 3. التجاوب مع الموبايل ============ */
@media (max-width: 992px) {
    .hero-split-layout {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 40px;
    }
    .tech-badge { margin: 0 auto 20px; }
    .hero-text-content h1 { font-size: 3rem; }
    .hero-text-content p { margin: 0 auto 30px; }
    .hero-actions { justify-content: center; }
    .ai-terminal-glass { transform: none; margin-top: 40px; }
    .terminal-body { font-size: 0.9rem; padding: 25px 20px; }
}
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-orange);
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 10px 20px var(--accent-glow);
    transition: 0.3s;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px var(--accent-glow);
}
@media (max-width: 768px) {
    .cta-banner {
        width: fit-content;
        margin: 0 20px 10px 20px;
    }
}