/* ==========================================================================
   1. الخطوط والمتغيرات العامة (Variables & Fonts)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');
/* خط للنسخة الإنجليزية */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    /* ألوان هوية Growthtech */
    --primary: #8C2127; 
    --primary-hover: #6a181d;
    --secondary: #111827; 
    --bg-light: #f3f5f9; 
    --text-body: #6b7280;
    --text-heading: #1f2937;
    --white: #ffffff;
    
    /* تأثيرات الظلال والحركة (Mitech Style) */
    --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 50px rgba(140, 33, 39, 0.15);
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ==========================================================================
   2. الإعدادات الأساسية (Base Reset)
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Cairo', sans-serif; 
}

body { 
    background-color: var(--white); 
    color: var(--text-body); 
    line-height: 1.8; 
    overflow-x: hidden;
}

a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* ==========================================================================
   3. شريط التنقل والقوائم (Top Bar & Navbar)
   ========================================================================== */
.top-bar { 
    background-color: var(--secondary); 
    color: #9ca3af; 
    font-size: 0.85rem; 
    padding: 10px 0; 
}
.top-bar .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.top-info span { margin-left: 20px; }
.top-links a { color: #9ca3af; margin: 0 5px; transition: var(--transition); }
.top-links a:hover { color: var(--white); }

.navbar { 
    background: var(--white); 
    box-shadow: 0 2px 20px rgba(0,0,0,0.03); 
    position: sticky; 
    top: 0; 
    z-index: 999; 
}
.navbar .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 90px; 
}

/* تنسيق اللوجو ليكون واضحاً جداً */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img.main-logo {
    height: 90px;        
    width: auto;         
    max-width: 250px;    
    object-fit: contain; 
    image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 768px) {
    .logo img.main-logo {
        height: 45px;
    }
}

/* القائمة الرئيسية المنسدلة */
.nav-menu { display: flex; gap: 30px; align-items: center; }
.nav-menu > li { position: relative; padding: 30px 0; }
.nav-menu a { 
    color: var(--text-heading); 
    font-weight: 700; 
    font-size: 1.05rem; 
    transition: var(--transition); 
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }

/* تصميم Dropdown */
.dropdown-menu {
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: var(--white);
    min-width: 280px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px; 
    border-top: 3px solid var(--primary);
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(15px);
    transition: var(--transition); 
    display: flex; 
    flex-direction: column; 
    z-index: 1000;
}
.nav-menu li:hover .dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.dropdown-menu a { 
    padding: 15px 20px; 
    border-bottom: 1px solid #f1f5f9; 
    font-size: 0.95rem; 
    display: block; 
}
.dropdown-menu a:hover { 
    background: var(--bg-light); 
    padding-right: 25px; 
    color: var(--primary);
}

/* ==========================================================================
   4. الأزرار (Buttons)
   ========================================================================== */
.btn { 
    display: inline-block; 
    padding: 15px 35px; 
    border-radius: 5px; 
    font-weight: 700; 
    font-size: 1rem; 
    transition: var(--transition); 
    border: none; 
    cursor: pointer; 
    text-align: center;
}
.btn-primary { 
    background-color: var(--primary); 
    color: var(--white); 
    box-shadow: 0 10px 30px rgba(140, 33, 39, 0.2); 
}
.btn-primary:hover { 
    background-color: var(--secondary); 
    color: var(--white); 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px rgba(17, 24, 39, 0.2);
}
.btn-outline { 
    background-color: transparent; 
    border: 2px solid #e5e7eb; 
    color: var(--text-heading); 
}
.btn-outline:hover { 
    border-color: var(--primary); 
    color: var(--primary); 
}

/* ==========================================================================
   5. الترويسات العلوية (Hero & Page Headers)
   ========================================================================== */
.hero { 
    background-color: var(--bg-light); 
    padding: 100px 0; 
    position: relative; 
}
.hero-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 50px; 
}
.hero-content { flex: 1; z-index: 2; }
.hero-content h5 { 
    color: var(--primary); 
    font-size: 1.1rem; 
    margin-bottom: 15px; 
    font-weight: 700; 
}
.hero-content h1 { 
    font-size: 3.5rem; 
    color: var(--secondary); 
    line-height: 1.2; 
    margin-bottom: 25px; 
    font-weight: 800; 
}
.hero-image { flex: 1; z-index: 2; }

.page-header { 
    background: linear-gradient(135deg, var(--secondary), var(--primary-hover)); 
    padding: 100px 0; 
    color: var(--white); 
    text-align: center; 
}
.page-header h1 { font-size: 3rem; margin-bottom: 20px; font-weight: 800; }
.page-header p { font-size: 1.2rem; max-width: 800px; margin: 0 auto; color: #cbd5e1; }

/* ==========================================================================
   6. التنسيقات العامة والمساعدة (Utilities)
   ========================================================================== */
.section-padding { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--secondary); color: var(--white); }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }

.section-title { text-align: center; margin-bottom: 60px; }
.section-title h5 { color: var(--primary); font-size: 1rem; margin-bottom: 10px; font-weight: bold; }
.section-title h2 { color: var(--secondary); font-size: 2.5rem; font-weight: 800; }

/* ==========================================================================
   7. تخطيطات المحتوى (Content Layouts)
   ========================================================================== */
.split-section, .content-block, .tech-grid { 
    display: flex; 
    gap: 50px; 
    align-items: center; 
    margin-bottom: 80px; 
}
.split-section:last-child, .content-block:last-child { margin-bottom: 0; }

.split-section:nth-child(even), .content-block:nth-child(even) { 
    flex-direction: row-reverse; 
}

.split-text, .content-text, .tech-text { flex: 1; }
.split-text h2, .content-text h2, .tech-text h2 { 
    color: var(--secondary); 
    font-size: 2.2rem; 
    margin-bottom: 20px; 
    font-weight: 800; 
}

.split-img, .content-image, .tech-img { 
    flex: 1; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
}

/* ==========================================================================
   8. شبكات الكروت والخدمات (Grids & Cards)
   ========================================================================== */
.cards-grid, .features-grid, .services-grid, .service-features { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.card, .service-card, .feature-card { 
    background: var(--white); 
    padding: 40px 30px; 
    border-radius: 8px; 
    box-shadow: var(--shadow-soft); 
    transition: var(--transition); 
    border-bottom: 3px solid transparent; 
}
.card:hover, .service-card:hover, .feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-hover); 
    border-bottom-color: var(--primary); 
}

.card-icon, .service-icon, .feature-icon { 
    font-size: 2.5rem; 
    color: var(--primary); 
    margin-bottom: 20px; 
    display: inline-block;
}

.card h3, .service-card h3, .feature-card h3 {
    color: var(--text-heading); 
    margin-bottom: 15px; 
    font-size: 1.4rem;
}

/* ==========================================================================
   9. القوائم (Lists)
   ========================================================================== */
.check-list li { 
    margin-bottom: 15px; 
    font-size: 1.1rem; 
    color: var(--text-heading); 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
}
.check-list li::before, .content-text ul li::before { 
    content: '✔'; 
    color: var(--primary); 
    margin-left: 10px; 
    font-size: 1.2rem; 
}

.content-text ul { list-style: none; margin-top: 20px; }
.content-text ul li { 
    margin-bottom: 15px; 
    display: flex; 
    align-items: flex-start; 
    gap: 10px; 
    font-size: 1.1rem; 
    color: var(--text-heading); 
    font-weight: 600; 
}

.sec-list { list-style: none; margin-top: 20px; }
.sec-list li { 
    margin-bottom: 20px; 
    background: var(--bg-light); 
    padding: 20px; 
    border-radius: 8px; 
    border-right: 4px solid var(--primary); 
}
.sec-list h4 { color: var(--secondary); font-size: 1.2rem; margin-bottom: 5px; }

/* ==========================================================================
   10. قسم منهجية العمل (Process Section)
   ========================================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.process-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border-bottom: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.process-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.process-num {
    font-size: 4rem;
    font-weight: 900;
    color: #e5e7eb;
    line-height: 1;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition);
}

.process-card:hover .process-num {
    color: rgba(140, 33, 39, 0.1);
    transform: scale(1.1);
}

.process-card h3 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.process-card p {
    color: var(--text-body);
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   11. اللافتات ونموذج الاتصال (Banners & Forms)
   ========================================================================== */
.cta-banner { 
    background: var(--primary); 
    border-radius: 15px; 
    padding: 60px; 
    text-align: center; 
    color: var(--white); 
    margin: 50px 0; 
}
.cta-banner h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--white); }

.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
    align-items: center;
}
.contact-form { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: var(--shadow-soft); 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.contact-form input, .contact-form textarea { 
    padding: 15px; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    font-size: 1rem; 
    width: 100%; 
    outline: none; 
    transition: var(--transition); 
    font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(140, 33, 39, 0.1);
}

/* ==========================================================================
   12. التذييل (Footer)
   ========================================================================== */
footer { 
    background: var(--secondary); 
    padding: 40px 0; 
    color: #9ca3af; 
    text-align: center; 
    margin-top: auto;
}

/* ==========================================================================
   13. التجاوب مع الشاشات (Responsive)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-wrapper, .split-section, .content-block, .tech-grid, .contact-grid { 
        flex-direction: column !important; 
        text-align: center; 
    }
    .split-text h2, .content-text h2, .tech-text h2 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .page-header h1 { font-size: 2.2rem; }
    .nav-menu { gap: 15px; }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .navbar .container { flex-direction: column; height: auto; padding: 15px 20px; gap: 15px; }
    .nav-menu { flex-wrap: wrap; justify-content: center; }
    .nav-menu > li { padding: 10px 0; }
    
    .dropdown-menu {
        position: relative;
        top: 0;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
    }
    .nav-menu li:hover .dropdown-menu { display: flex; }

    .hero-actions { display: flex; flex-direction: column; gap: 15px; }
    .btn { width: 100%; }
    
    .section-padding { padding: 60px 0; }
    .cta-banner { padding: 40px 20px; }
    .cta-banner h2 { font-size: 1.8rem; }
}

/* ==========================================================================
   14. التوافق مع اللغة الإنجليزية LTR (English Support)
   ========================================================================== */
html[lang="en"] {
    direction: ltr;
}

/* التعديل هنا: استخدمنا body بدلاً من * لكي لا نكسر خطوط الأيقونات */
html[lang="en"] body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    text-align: left;
}

/* عكس اتجاه الهوامش في الشريط العلوي */
html[lang="en"] .top-info span { margin-left: 0; margin-right: 20px; }
html[lang="en"] .top-info i { margin-left: 0; margin-right: 5px; }

/* عكس اتجاه القائمة المنسدلة */
html[lang="en"] .dropdown-menu { 
    right: auto; 
    left: 0; 
    text-align: left; 
}
html[lang="en"] .dropdown-menu a:hover { 
    padding-right: 20px; 
    padding-left: 25px; 
}

/* عكس اتجاه القوائم النقطية */
html[lang="en"] .check-list li::before, 
html[lang="en"] .content-text ul li::before {
    margin-left: 0; 
    margin-right: 10px;
}

/* تعديل القوائم الجانبية الملونة في صفحة تواصل معنا و LMS */
html[lang="en"] .sec-list li {
    border-right: none;
    border-left: 4px solid var(--primary);
}

/* تعديلات للفوتر وأيقونات التواصل */
html[lang="en"] footer { text-align: left; }
html[lang="en"] footer .fa-map-marker-alt,
html[lang="en"] footer .fa-phone,
html[lang="en"] footer .fa-envelope {
    margin-left: 0 !important;
    margin-right: 10px;
}

@media (max-width: 992px) {
    html[lang="en"] .split-section { text-align: center; }
    html[lang="en"] .check-list li { justify-content: center; text-align: center; }
}

/* ... الأكواد السابقة ... */

/* ==========================================================================
   تنسيق قائمة الموبايل (Mobile Menu Styles)
   ========================================================================== */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
        font-size: 25px;
        color: var(--secondary);
        cursor: pointer;
        order: 2; /* ترتيب الزر بجانب اللوجو */
    }

    .nav-menu {
        position: fixed;
        top: 90px;
        right: -100%; /* مخفية خارج الشاشة */
        width: 100%;
        height: calc(100vh - 90px);
        background: var(--white);
        flex-direction: column;
        gap: 0 !important;
        transition: var(--transition);
        z-index: 998;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        overflow-y: auto;
    }

    /* النسخة الإنجليزية تفتح من اليسار */
    html[lang="en"] .nav-menu {
        right: auto;
        left: -100%;
    }

    .nav-menu.active {
        right: 0;
    }
    
    html[lang="en"] .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 0 !important;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-menu li a {
        display: block;
        padding: 20px 30px;
        width: 100%;
    }

    /* تعديل الـ Dropdown في الموبايل */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f9fafb;
        display: block; /* تظهر العناصر تحت بعضها في الموبايل */
        padding-right: 20px;
    }
    
    html[lang="en"] .dropdown-menu {
        padding-right: 0;
        padding-left: 20px;
    }

    .navbar .btn-primary {
        display: none; /* إخفاء الزر الكبير في الموبايل */
    }
}

/* ==========================================================================
   حل مشكلة أيقونة الواتساب (الإصلاح النهائي)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366; /* لون واتساب الرسمي */
    color: #FFF !important;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999; /* لضمان الظهور فوق الفوتر وكل شيء */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* تحديد الموقع حسب اتجاه الصفحة لمنع تداخلها مع النصوص */
html[dir="rtl"] .whatsapp-float {
    left: 30px;
}

html[dir="ltr"] .whatsapp-float {
    right: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* زر واتساب كـ Button داخل الصفحة */
.btn-whatsapp {
    background-color: #25d366;
    color: white !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
}