@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap');

:root {
    --primary: #00A3FF;       
    --primary-dark: #0066FF;  
    --secondary: #0F172A;     
    --surface: #FFFFFF;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    --shadow-glow: 0 10px 30px -5px rgba(0, 163, 255, 0.4);
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-light);
    color: var(--secondary);
    overflow-x: hidden;
    line-height: 1.7;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 { font-weight: 800; letter-spacing: -0.5px; }

.text-gradient {
    background: linear-gradient(135deg, var(--secondary) 20%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.nav-link { font-weight: 700; color: var(--secondary) !important; margin: 0 10px; }
.nav-link:hover, .nav-link.active { color: var(--primary) !important; }

/* --- Hero Section & Code Window (FIXED) --- */
.hero-section {
    padding: 140px 0 80px;
    background: radial-gradient(circle at 10% 10%, #F0F9FF 0%, transparent 40%);
}

/* إصلاح جذري لمشكلة الكود المقلوب */
.code-window {
    direction: ltr !important; /* يجبر الاتجاه يسار-يمين */
    text-align: left !important; /* يجبر المحاذاة لليسار */
    background: #1E293B;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s;
}

.code-window:hover { transform: perspective(1000px) rotateY(0); }

.window-header {
    background: #0F172A;
    padding: 12px 15px;
    display: flex; gap: 8px; border-bottom: 1px solid #334155;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #EF4444; } .dot.yellow { background: #F59E0B; } .dot.green { background: #10B981; }

.window-body { padding: 20px; font-size: 14px; color: #E2E8F0; line-height: 1.6; }
.keyword { color: #C678DD; } .string { color: #98C379; } .func { color: #61AFEF; }

/* --- Buttons --- */
.btn-primary-glow {
    background: var(--primary);
    color: white;
    border: none; padding: 12px 35px;
    border-radius: 50px; font-weight: 700;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-primary-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -10px rgba(0, 163, 255, 0.6);
    color: white;
}

/* --- Ticker (FIXED) --- */
.tech-ticker-wrap {
    overflow: hidden;
    background: white;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    direction: ltr !important; /* هام جداً: يعزل الشريط عن اتجاه الموقع العربي */
}

.tech-ticker {
    display: flex; /* لترتيب العناصر بجانب بعض */
    width: max-content; /* يسمح للعناصر بأخذ مساحتها كاملة */
    gap: 0; 
    animation: ticker 30s linear infinite;
}

.tech-item {
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    padding: 0 50px; /* زيادة المسافة بين العناصر */
    font-size: 1.2rem; font-weight: 700; color: #64748B;
    white-space: nowrap; /* يمنع نزول الكلام لسطر جديد */
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* التحرك لليسار */
}

/* --- Cards (FIXED) --- */
.service-card {
    background: var(--surface);
    border: 1px solid var(--border-color); /* حدود واضحة */
    border-radius: 16px;
    padding: 35px 25px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    z-index: 1;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 60px; height: 60px;
    background: #F0F9FF; color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 20px;
    transition: all 0.3s;
}

.service-card:hover .service-icon { background: var(--primary); color: white; }

/* --- Stats Alignment --- */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stat-item h2 { font-size: 2.5rem; margin-bottom: 5px; }

/* --- Floating WhatsApp --- */
.floating-wa {
    position: fixed;
    bottom: 30px; left: 30px;
    width: 60px; height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: transform 0.3s;
    text-decoration: none;
}
.floating-wa:hover { transform: scale(1.1); color: white; }