/* =========================================================================
   🚀 ELEVON WORKSPACE - STYLE.CSS (BENTO GRID & LUXURY CONSOLE EDITION)
   =========================================================================
   المصمم: خبير واجهات PHP + CSS للشركات التقنية
   الشركة: Elevon
   النسخة: 4.1 (نسخة محسنة الأداء - Refactored & Optimized)
   ========================================================================= */

/* 1. استيراد الخطوط */
@font-face {
    font-family: 'Thmanyah';
    src: url('thmanyahserifdisplay-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* 2. المتغيرات التصميمية الموحدة (CSS Variables) */
:root {
    --accent: #2cb2ae;
    --accent-dark: #1b7a78;
    --bg-body: #f8fafc;
    --text-main: #0c2b33;      /* Very dark teal-slate for premium readability and contrast */
    --text-muted: #4a6c75;      /* Comfortably dark slate-teal for descriptive text */
    
    /* تصميم زجاجي متقدم */
    --glass-bg: rgba(255, 255, 255, 0.88);      /* Increased opacity to 88% */
    --glass-border: rgba(255, 255, 255, 0.95);  /* Clean white border */
    --glass-glow: rgba(44, 178, 174, 0.08);
    
    /* هندسة الأبعاد والظلال */
    --radius-card: 28px;
    --radius-bento: 24px;
    --radius-btn: 14px;
    --shadow-premium: 0 10px 40px -15px rgba(31, 85, 97, 0.08);
    --shadow-float: 0 30px 60px -20px rgba(31, 85, 97, 0.15);
    --shadow-glow: 0 12px 30px -4px rgba(44, 178, 174, 0.3);
    
    /* انتقالات ناعمة وحركات */
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s ease;

    /* مصفوفة الطبقات (Z-Index Matrix) لإدارة التداخلات باحترافية */
    --z-bg-deep: -4;
    --z-bg-under: -1;
    --z-base: 1;
    --z-elevated: 10;
    --z-nav: 1000;
    --z-nav-menu: 1001;
    --z-nav-toggle: 1002;

    /* 📏 سلم قياسات الخطوط الموحد (Standardized Typography Scale) */
    --fs-tiny: 0.7rem;
    --fs-xs: 0.75rem;
    --fs-sm: 0.8rem;
    --fs-caption: 0.85rem;
    --fs-base-sm: 0.9rem;
    --fs-base: 0.95rem;
    --fs-base-lg: 1rem;
    --fs-md: 1.1rem;
    --fs-md-lg: 1.15rem;
    --fs-lg: 1.2rem;
    --fs-lg-xl: 1.3rem;
    --fs-xl: 1.4rem;
    --fs-xl-2xl: 1.6rem;
    --fs-2xl: 1.7rem;
    --fs-2xl-3xl: 1.8rem;
    --fs-3xl: 2.1rem;

    /* قياسات الخطوط المتجاوبة (Responsive Clamp typography) */
    --fs-hero-title: clamp(2.4rem, 5vw, 3.8rem);
    --fs-hero-subtitle: clamp(0.95rem, 1.8vw, 1.15rem);
    --fs-section-title: clamp(1.8rem, 4vw, 2.5rem);
    --fs-cta-title: clamp(1.8rem, 3.5vw, 2.5rem);
}

/* 3. الخطوط والاتجاهات الأساسية */
html[dir="rtl"] {
    --font-primary: 'Thmanyah', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[dir="ltr"] {
    --font-primary: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: #e8f4f4;
    background-image: 
        radial-gradient(ellipse 80% 60% at 0% 0%,   rgba(44, 178, 174, 0.38) 0px, transparent 55%),
        radial-gradient(ellipse 70% 55% at 100% 5%,  rgba(27, 122, 120, 0.28) 0px, transparent 55%),
        radial-gradient(ellipse 65% 50% at 95% 95%, rgba(59, 130, 246, 0.22) 0px, transparent 55%),
        radial-gradient(ellipse 75% 60% at 5%  95%, rgba(147, 51, 234, 0.18) 0px, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(16, 185, 129, 0.10) 0px, transparent 60%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: meshBodyGlow 18s ease infinite alternate;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb {
    background: rgba(44, 178, 174, 0.25);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 4. كرات الخلفية المحيطية المتحركة (Animated Ambient Orbs) */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-bg-deep);
    overflow: hidden;
    pointer-events: none;
}
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0;
    animation: orbFloat 0.8s ease forwards;
    will-change: transform, opacity; /* تحسين أداء الرسوميات */
}
.glow-1 {
    top: -15%;
    left: -8%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(44, 178, 174, 0.65) 0%, rgba(44, 178, 174, 0) 70%);
    animation: orbMove1 22s ease-in-out infinite alternate, orbFadeIn 1.2s ease forwards;
}
.glow-2 {
    bottom: -15%;
    right: -8%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(27, 122, 120, 0.55) 0%, rgba(27, 122, 120, 0) 70%);
    animation: orbMove2 28s ease-in-out infinite alternate, orbFadeIn 1.8s 0.3s ease forwards;
}
.glow-3 {
    top: 30%;
    left: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.30) 0%, rgba(59, 130, 246, 0) 70%);
    animation: orbMove3 18s ease-in-out infinite alternate, orbFadeIn 2s 0.6s ease forwards;
}
.glow-4 {
    top: 60%;
    right: 10%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.20) 0%, rgba(147, 51, 234, 0) 70%);
    animation: orbMove4 24s ease-in-out infinite alternate, orbFadeIn 2.2s 0.9s ease forwards;
}

@keyframes orbFadeIn { to { opacity: 1; } }
@keyframes orbMove1 {
    0%   { transform: translate(0, 0)    scale(1);    }
    33%  { transform: translate(4%, 8%)  scale(1.08); }
    66%  { transform: translate(-3%, 5%) scale(0.95); }
    100% { transform: translate(6%, 12%) scale(1.12); }
}
@keyframes orbMove2 {
    0%   { transform: translate(0, 0)     scale(1);    }
    33%  { transform: translate(-5%, -6%) scale(1.10); }
    66%  { transform: translate(4%, -3%)  scale(0.92); }
    100% { transform: translate(-8%, -10%) scale(1.15);}
}
@keyframes orbMove3 {
    0%   { transform: translate(0, 0)    scale(1);    }
    50%  { transform: translate(8%, -8%) scale(1.12); }
    100% { transform: translate(-6%, 6%) scale(0.90); }
}
@keyframes orbMove4 {
    0%   { transform: translate(0, 0)    scale(1);    }
    40%  { transform: translate(-4%, 5%) scale(1.08); }
    100% { transform: translate(5%, -7%) scale(0.95); }
}

@keyframes meshBodyGlow {
    0%   { background-position: 0%   0%,   100% 100%, 0%   100%, 100% 0%,   50% 50%; }
    25%  { background-position: 30%  10%,  70%  90%,  20%  80%,  80%  20%,  40% 60%; }
    50%  { background-position: 60%  30%,  40%  70%,  70%  30%,  30%  70%,  60% 40%; }
    75%  { background-position: 20%  70%,  80%  30%,  50%  60%,  50%  40%,  30% 70%; }
    100% { background-position: 100% 100%, 0%   0%,   100% 0%,   0%   100%, 50% 50%; }
}

/* 5. شريط التنقل الزجاجي (Liquid Glass Navbar) */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: var(--z-nav);
    padding: 26px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(248, 250, 252, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
}
nav.scrolled {
    padding: 16px 8%;
    background: rgba(248, 250, 252, 0.7);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 10px 40px -15px rgba(31, 85, 97, 0.06);
}

.text-logo {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition-smooth);
}
nav.scrolled .text-logo { color: var(--text-main); }
.text-logo span { color: var(--accent); }
.img-logo {
    max-height: 42px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 40px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--fs-base);
    position: relative;
    padding: 6px 0;
    transition: var(--transition-smooth);
}
nav.scrolled .nav-links a { color: var(--text-main); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-smooth);
}
html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}
.nav-links a:hover::after,
.nav-links a.active-link::after { width: 100%; }
.nav-links a:hover { color: var(--accent); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* الأزرار الفاخرة المحدثة (بدون !important) */
.btn-nav-glow, .btn-glow {
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-base);
    padding: 11px 26px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.btn-nav-glow:hover, .btn-glow:hover {
    background: var(--accent-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(44, 178, 174, 0.4);
}
.btn-nav-glow:focus, .btn-glow:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-outline, .lang-switch {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--fs-base-sm);
    padding: 10px 22px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
nav.scrolled .btn-outline, nav.scrolled .lang-switch {
    border-color: rgba(31, 85, 97, 0.12);
    color: var(--text-main);
    background: rgba(31, 85, 97, 0.03);
}
.btn-outline:hover, .lang-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}
nav.scrolled .btn-outline:hover, nav.scrolled .lang-switch:hover {
    background: rgba(44, 178, 174, 0.1);
    border-color: var(--accent);
    color: var(--accent-dark);
}

/* همبرغر المنيو */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: var(--z-nav-toggle);
}
.hamburger span {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: var(--transition-fast);
}
nav.scrolled .hamburger span { background-color: var(--text-main); }
.hamburger.active span { background-color: var(--text-main); }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 6. قسم الهيرو غير المتماثل (Asymmetric Hero Section) */
section {
    padding: 120px 8%;
    position: relative;
}

.hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-media-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3; /* يفضل إبقاؤها محلية لتسلسل خلفية الهيرو */
}
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(at 0% 0%, rgba(44, 178, 174, 0.75) 0px, transparent 50%),
                radial-gradient(at 100% 0%, rgba(27, 122, 120, 0.7) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(12, 43, 51, 0.8) 0px, transparent 50%),
                radial-gradient(at 0% 100%, rgba(15, 41, 48, 0.85) 0px, transparent 50%);
    background-size: 220% 220%;
    animation: meshOverlayPulse 12s ease infinite alternate;
    z-index: -2;
}

@keyframes meshOverlayPulse {
    0% { background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%; }
    50% { background-position: 50% 30%, 30% 70%, 90% 10%, 10% 90%; }
    100% { background-position: 100% 100%, 0% 0%, 100% 0%, 0% 100%; }
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25vh;
    background: linear-gradient(to top, var(--bg-body) 0%, rgba(248, 250, 252, 0) 100%);
    z-index: var(--z-bg-under);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    z-index: var(--z-base);
}

.hero-text-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
}
html[dir="rtl"] .hero-text-block {
    text-align: right;
    align-items: flex-start;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: var(--fs-caption);
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.hero-title {
    font-size: var(--fs-hero-title);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
    font-size: var(--fs-hero-subtitle);
    color: rgba(255, 255, 255, 0.82);
    max-width: 620px;
    margin-bottom: 40px;
    line-height: 1.7;
    text-shadow: none;
}
.hero-actions {
    display: flex;
    gap: 16px;
}
.btn-hero-primary {
    font-size: var(--fs-base-lg);
    padding: 13px 30px;
}
.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-base-lg);
    padding: 13px 30px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}
.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-2px);
}

/* 7. لوحة الكونسول الزجاجية التفاعلية (Glassmorphic Console) */
.hero-console {
    background: rgba(6, 26, 31, 0.88);
    border: 1px solid rgba(44, 178, 174, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    text-align: start;
    transition: var(--transition-smooth);
}
.hero-console:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(44, 178, 174, 0.5);
    box-shadow: 0 35px 80px rgba(44, 178, 174, 0.22);
}

.console-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.console-dots {
    display: flex;
    gap: 6px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.console-tabs { display: flex; gap: 4px; }
.console-tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.console-tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}
.console-tab-btn:hover { color: #ffffff; }

.console-body {
    flex-grow: 1;
    padding: 24px;
    position: relative;
}
.console-panel {
    display: none;
    height: 100%;
    width: 100%;
    animation: fadeInConsole 0.5s ease forwards;
}
.console-panel.active { display: block; }
@keyframes fadeInConsole {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* محتوى تبويب البرمجة (IDE Mockup) */
.code-block {
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--fs-sm);
    color: #e2e8f0;
    line-height: 1.5;
    white-space: pre-wrap;
}
.code-tag { color: #f43f5e; }
.code-attr { color: #fb923c; }
.code-val { color: #34d399; }
.code-comment { color: #64748b; font-style: italic; }

/* محتوى تبويب التسويق (Marketing Chart Mockup) - تحسين أداء GPU */
.marketing-visual {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 130px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}
.chart-bar-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}
.chart-bar {
    width: 100%;
    background: linear-gradient(to top, var(--accent-dark), var(--accent));
    border-radius: 6px 6px 0 0;
    height: 100%; /* استخدام الارتفاع الكامل */
    transform: scaleY(0); /* البداية من الصفر */
    transform-origin: bottom;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(44, 178, 174, 0.2);
}
/* تحديد نسبة الارتفاع باستخدام scaleY لتحسين الأداء */
.console-panel.active .chart-bar-1 { transform: scaleY(0.3); }  /* ~40px */
.console-panel.active .chart-bar-2 { transform: scaleY(0.57); } /* ~75px */
.console-panel.active .chart-bar-3 { transform: scaleY(0.84); } /* ~110px */

.chart-val {
    font-size: var(--fs-xs);
    color: #ffffff;
    font-weight: bold;
}
.chart-label {
    font-size: var(--fs-tiny);
    color: rgba(255, 255, 255, 0.6);
}
.chart-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.metric-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
}
.metric-box span {
    display: block;
    font-size: var(--fs-tiny);
    color: rgba(255, 255, 255, 0.5);
}
.metric-box strong {
    font-size: var(--fs-base);
    color: var(--accent);
}

/* محتوى تبويب تطوير الأعمال (Business Visual) */
.business-visual {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.biz-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}
.biz-flow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: dashed rgba(255, 255, 255, 0.15);
    z-index: var(--z-base);
}
.flow-node {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: var(--fs-md);
    z-index: 2;
    transition: var(--transition-fast);
    box-shadow: 0 0 15px rgba(44, 178, 174, 0.15);
}
.flow-node:hover {
    background: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent);
}
.biz-metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* مؤشر السهم للتمرير لأسفل */
.hero-scroll-cue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    z-index: 3;
}
.hero-scroll-cue:hover { color: var(--accent); }

/* 8. قسم الإحصائيات العائم (Stats Bar) */
.stats-section {
    padding-top: 20px;
    padding-bottom: 40px;
    z-index: var(--z-elevated);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: var(--transition-smooth);
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.96);
}
.stat-icon {
    font-size: var(--fs-xl-2xl);
    color: var(--accent);
    margin-bottom: 12px;
}
.stat-number {
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}
.stat-label {
    font-size: var(--fs-base-sm);
    color: var(--text-muted);
    font-weight: 600;
}

/* 9. قسم العناوين والـ Bento Grid الفاخر (Why Elevon) */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}
.section-tag {
    font-size: var(--fs-caption);
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-main);
    letter-spacing: -1px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 60px;
    font-weight: 500;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

#about {
    margin-top: 0;
    padding-top: 80px;
    z-index: 5;
    background: transparent;
}

/* هيكلية البينتو جريد (Bento Grid Structure) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-bento);
    padding: 36px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}
.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-float);
}

.bento-large-2 {
    grid-column: span 2;
    grid-row: span 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
}
.bento-wide-2 {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.bento-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
}
html[dir="rtl"] .bento-card-info { text-align: right; }

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(44, 178, 174, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg-xl);
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}
.bento-card:hover .bento-icon {
    background: var(--accent);
    color: #ffffff;
    transform: scale(1.08);
}

.bento-card h3 {
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}
.bento-card p {
    font-size: var(--fs-base-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* عناصر تفاعلية داخل بطاقات البينتو */
.bento-visual {
    background: rgba(31, 85, 97, 0.03);
    border: 1px solid rgba(31, 85, 97, 0.06);
    border-radius: 16px;
    height: 100%;
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ذكاء اصطناعي تفاعلي في البينتو */
.ai-visual-nodes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 85%;
}
.ai-node-row {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-sm);
    color: var(--text-main);
    font-weight: 600;
    box-shadow: var(--shadow-sm); /* Defaulting to basic shadow if var not present */
    transition: var(--transition-fast);
}
.bento-card:hover .ai-node-row { transform: translateX(6px); }
html[dir="rtl"] .bento-card:hover .ai-node-row { transform: translateX(-6px); }
.ai-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    position: relative;
}
.ai-dot-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: waPulse 1.8s infinite;
}

/* درع الأمان السيبراني */
.security-visual-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px dashed var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinCircle 12s linear infinite;
}
.security-visual-icon {
    font-size: var(--fs-2xl-3xl);
    color: var(--accent);
    animation: pulseShield 2s infinite alternate ease-in-out;
}
@keyframes spinCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulseShield {
    from { transform: scale(0.9); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* رسم بياني للتسويق - تحسين أداء GPU */
.marketing-visual-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 80px;
    width: 80%;
    border-bottom: 2px solid rgba(31, 85, 97, 0.1);
}
.chart-bar-bento {
    flex-grow: 1;
    background: linear-gradient(to top, var(--accent-dark), var(--accent));
    border-radius: 4px 4px 0 0;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover .chart-bar-bento-1 { transform: scaleY(0.43); } /* 35px / 80px */
.bento-card:hover .chart-bar-bento-2 { transform: scaleY(0.75); } /* 60px / 80px */
.bento-card:hover .chart-bar-bento-3 { transform: scaleY(0.56); } /* 45px / 80px */
.bento-card:hover .chart-bar-bento-4 { transform: scaleY(0.93); } /* 75px / 80px */

/* تأثير الخط الجراديانت السفلي */
.bento-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}
html[dir="rtl"] .bento-line { transform-origin: right; }
.bento-card:hover .bento-line { transform: scaleX(1); }

/* شبكات موحدة للأقسام المشتركة */
.services-grid, .portfolio-grid, .team-grid {
    display: grid;
    gap: 35px;
    max-width: 1300px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* 🚀 10. قسم الخدمات (Services) - التصميم الزجاجي المتقدم الجديد 🚀 */
.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-bento);
    padding: 40px 30px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    z-index: var(--z-base);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

/* الكرة الضوئية المزينة داخل كرت الخدمة */
.service-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(44, 178, 174, 0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: var(--z-bg-under);
    transition: var(--transition-smooth);
}
html[dir="ltr"] .service-card::before {
    right: auto;
    left: -60px;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(44, 178, 174, 0.15);
}
.service-card:hover::before {
    transform: scale(1.5);
    background: radial-gradient(circle, rgba(44, 178, 174, 0.22) 0%, rgba(255,255,255,0) 70%);
}

.service-img-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    background: rgba(31, 85, 97, 0.04);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(31, 85, 97, 0.05);
}
.service-card:hover .service-img-wrapper {
    background: rgba(44, 178, 174, 0.1);
    border-color: rgba(44, 178, 174, 0.3);
    transform: scale(1.05) rotate(-5deg);
}
.service-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}
.service-card h3 {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}
.service-card:hover h3 {
    color: var(--accent-dark);
}
.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.05rem;
    flex-grow: 1;
}

/* 11. قسم شركاء النجاح (Success Partners) */
.partners-section {
    overflow: hidden;
    padding-bottom: 60px;
}
.partners-wrapper {
    max-width: 100%;
    position: relative;
    display: flex;
    overflow: hidden;
    user-select: none;
    padding: 20px 0;
}
.partners-track {
    display: flex;
    gap: 50px;
    flex-shrink: 0;
    animation: infiniteScroll 25s linear infinite;
}
@keyframes infiniteScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}
html[dir="rtl"] .partners-track { animation: infiniteScrollRTL 25s linear infinite; }
@keyframes infiniteScrollRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.333%); }
}
.partners-wrapper:hover .partners-track { animation-play-state: paused; }
.partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 60px;
    opacity: 0.55;
    transition: var(--transition-smooth);
}
.partner-link:hover {
    opacity: 1;
    transform: scale(1.05);
}
.partner-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: var(--transition-smooth);
}
.partner-link:hover .partner-img { filter: grayscale(0%); }

/* 12. قسم معرض الأعمال (Portfolio Section) */
.port-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: block;
    text-decoration: none;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
}
.port-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-float);
    border-color: var(--accent);
}
.port-img-wrapper {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}
.port-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.port-item:hover .port-img-wrapper img { transform: scale(1.06); }
.port-overlay {
    padding: 24px;
    background: #ffffff;
    transition: var(--transition-smooth);
}
.port-item:hover .port-overlay { background: rgba(255, 255, 255, 0.96); }
.port-info {
    display: flex;
    flex-direction: column;
}
.port-category {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.port-overlay h3 {
    font-size: var(--fs-md-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}
.port-cta {
    font-size: var(--fs-caption);
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.port-item:hover .port-cta {
    color: var(--accent);
    gap: 8px;
}

/* 13. قسم الدعوة للبدء (CTA Section) */
#start-project {
    display: flex;
    justify-content: center;
    padding: 80px 8%;
}
.cta-box {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.cta-bg-shape {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    transform: rotate(30deg);
    pointer-events: none;
}
.cta-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
}
.cta-box h2 {
    color: #ffffff;
    font-size: var(--fs-cta-title);
    font-weight: 800;
    margin-bottom: 16px;
}
.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--fs-base-lg);
    line-height: 1.7;
    margin-bottom: 32px;
}
.btn-cta {
    background: #ffffff;
    color: var(--accent-dark);
    font-size: var(--fs-base-lg);
    font-weight: 700;
    padding: 14px 36px;
    border-radius: var(--radius-btn);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
}
.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

/* 14. قسم الفريق (Team Section) */
.team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 40px 24px;
    text-align: center;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.75);
}
.team-img-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 80%);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
    overflow: hidden;
}
.team-card:hover .team-img-ring {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    transform: scale(1.05);
}
.team-img-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    filter: grayscale(100%);
    transition: var(--transition-smooth);
}
.team-card:hover img { filter: grayscale(0%); }
.team-card h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.team-role {
    font-size: var(--fs-caption);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
}
.team-brief {
    font-size: var(--fs-caption);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    border-top: 1px solid rgba(31, 85, 97, 0.08);
    padding-top: 12px;
}
.team-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(31, 85, 97, 0.05);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: var(--fs-base);
    border: 1px solid rgba(31, 85, 97, 0.08);
    transition: var(--transition-smooth);
}
.team-social-btn:hover {
    background: #0077b5;
    color: #ffffff;
    border-color: #0077b5;
    transform: translateY(-2px);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(31, 85, 97, 0.04);
    color: var(--text-main);
    font-weight: 600;
    font-size: var(--fs-base);
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(31, 85, 97, 0.08);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.btn-view-all:hover {
    background: var(--text-main);
    color: #ffffff;
    transform: translateY(-2px);
}

/* 15. ويدجت الذكاء الاصطناعي (AI Chat Widget) */
.ai-chat-header {
    padding: 16px 20px;
    background: rgba(12, 43, 51, 0.5);
    border-bottom: 1px solid rgba(44, 178, 174, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: var(--fs-base-sm);
}
.ai-chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
}
.ai-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: var(--fs-base-lg);
    transition: var(--transition-fast);
}
.ai-chat-close:hover { color: #ffffff; }
.ai-chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-chat-body::-webkit-scrollbar { width: 6px; }
.ai-chat-body::-webkit-scrollbar-thumb {
    background: rgba(44, 178, 174, 0.25);
    border-radius: 3px;
}
.ai-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: var(--fs-caption);
    line-height: 1.5;
}
.ai-message-received {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.ai-message-sent {
    background: var(--accent);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.ai-chat-footer {
    padding: 12px 16px;
    background: rgba(12, 43, 51, 0.6);
    border-top: 1px solid rgba(44, 178, 174, 0.15);
    display: flex;
    gap: 10px;
    align-items: center;
}
.ai-chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(44, 178, 174, 0.15);
    padding: 10px 16px;
    border-radius: 12px;
    color: #ffffff;
    font-size: var(--fs-caption);
    outline: none;
    transition: var(--transition-fast);
}
.ai-chat-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}
.ai-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.ai-chat-send:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

/* مؤشر الكتابة (Typing Indicator) */
.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
}
.typing-indicator span {
    font-size: 1.6rem;
    line-height: 0;
    color: rgba(255, 255, 255, 0.7);
    animation: typingBlink 1.4s infinite both;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }

@keyframes typingBlink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

/* 16. تأثيرات الظهور التدريجي (Scroll Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* 17. التجاوب ومرونة العرض (Responsive Design) */

@media (min-width: 1400px) {
    section { padding: 130px 10%; }
    nav { padding: 26px 10%; }
    nav.scrolled { padding: 16px 10%; }
}

/* الأجهزة اللوحية والتابلت */
@media (max-width: 992px) {
    nav { padding: 20px 5%; }
    nav.scrolled { padding: 14px 5%; }
    .nav-content { gap: 24px; }
    .nav-links { gap: 20px; }
    
    .hero {
        height: auto;
        padding-top: 140px;
        padding-bottom: 60px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-text-block, html[dir="rtl"] .hero-text-block {
        align-items: center;
        text-align: center;
    }
    .hero-subtitle { margin: 0 auto 40px; }
    .hero-actions { justify-content: center; }
    .hero-console {
        max-width: 550px;
        margin: 0 auto;
        aspect-ratio: auto;
        min-height: 380px;
    }
    
    .stats-grid, .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .bento-large-2, .bento-wide-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* تطبيق DRY Principle وتوحيد الشبكات */
    .services-grid, 
    .portfolio-grid, 
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* قائمة الموبايل المنبثقة */
@media (max-width: 1024px) {
    .hamburger { display: flex; }
    .nav-content {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(248, 250, 252, 0.96);
        border-left: 1px solid var(--glass-border);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        align-items: stretch;
        padding: 90px 40px 40px;
        gap: 36px;
        box-shadow: -10px 0 40px rgba(31, 85, 97, 0.1);
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: var(--z-nav-menu);
    }
    html[dir="ltr"] .nav-content {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid var(--glass-border);
        box-shadow: 10px 0 40px rgba(31, 85, 97, 0.1);
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .nav-content.active { right: 0; }
    html[dir="ltr"] .nav-content.active { left: 0; }
    
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 24px;
    }
    .nav-links a {
        color: var(--text-main);
        font-size: var(--fs-md);
        width: 100%;
        border-bottom: 1px solid rgba(31, 85, 97, 0.08);
        padding-bottom: 12px;
    }
    .nav-links a::after { display: none; }
    
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .btn-outline, .lang-switch, .btn-nav-glow, .btn-glow {
        justify-content: center;
        width: 100%;
    }
}

/* ═══ الموبايل والهواتف الصغيرة (max-width: 600px) ═══ */
@media (max-width: 600px) {
    section { padding: 60px 18px; }
    #about { padding-top: 40px; }

    /* توحيد جميع الشبكات لتكون بعمود واحد */
    .services-grid, 
    .portfolio-grid, 
    .team-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .service-num { font-size: 2.5rem; }

    /* شبكة بينتو وإحصاءات */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .bento-large-2, .bento-wide-2 {
        grid-column: span 1;
        grid-row: span 1;
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* أزرار الهيرو */
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }

    /* CTA */
    .cta-box { padding: 36px 18px; }

    /* أزرار عائمة وكونسول AI */
    .floating-wa, .floating-ai {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    .floating-wa { bottom: 20px; right: 16px; }
    html[dir="rtl"] .floating-wa { right: auto; left: 16px; }
    .floating-ai { bottom: 20px; left: 16px; }
    html[dir="rtl"] .floating-ai { left: auto; right: 16px; }

    .ai-chat-widget, html[dir="rtl"] .ai-chat-widget {
        width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        bottom: 84px;
        height: 420px;
        border-radius: 18px;
    }
}

/* =========================================================================
   18. تنسيق الفوتر المباشر (Deployed Footer Layout & Logo Size Fix)
   ========================================================================= */
.footer-main {
    padding: 60px 8% 40px;
    background: rgba(248, 250, 252, 0.6);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    z-index: 5;
}
.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(44, 178, 174, 0.15) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: var(--z-bg-under);
    pointer-events: none;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.footer-top, html[dir="rtl"] .footer-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
html[dir="rtl"] .footer-top { text-align: right; }
.footer-top { text-align: start; }

.footer-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
}
.footer-about {
    font-size: var(--fs-base);
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.6;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(31, 85, 97, 0.08);
}
html[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
.footer-bottom .copyright {
    font-size: var(--fs-caption);
    color: var(--text-muted);
}