/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    /* لون نص احترافي (كحلي غامق مريح للعين) */
    color: #1e293b; 
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    /* التدرج الجديد: من البنفسجي العميق للأزرق الملكي (نفس روح اللوجو) */
    background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
    background-attachment: fixed;
    /* إضافة نسيج ناعم للخلفية لزيادة الفخامة */
    min-height: 100vh;
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* إضاءة بنفسجية مستوحاة من طرف اللوجو */
        radial-gradient(circle at 20% 80%, rgba(109, 40, 217, 0.4) 0%, transparent 50%),
        /* إضاءة زرقاء ملكية مستوحاة من الطرف الآخر */
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.4) 0%, transparent 50%),
        /* إضاءة سماوية خفيفة للعمق */
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
    animation: particleMove 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes particleMove {
    0%, 100% { transform: scale(1) translate(0px, 0px) rotate(0deg); }
    33% { transform: scale(1.1) translate(-20px, -20px) rotate(5deg); }
    66% { transform: scale(0.9) translate(20px, 20px) rotate(-5deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    /* جعل الخلفية بيضاء ناصعة لتبرز ألوان اللوجو */
    background: #ffffff;
    /* ظل خفيف واحترافي يعطي عمقاً للموقع */
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.8rem 0; /* تقليل البادينغ قليلاً ليكون أنحف وأرقى */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    /* تغيير اللون ليتناسب مع الهوية الجديدة (كحلي غامق فخم) */
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    /* تغيير لون الأيقونة (إذا كانت موجودة) للبنفسجي الأساسي */
    color: #6d28d9;
    margin-left: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    /* لون النص العادي */
    color: #475569;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

/* تأثير الـ Hover الاحترافي */
.nav-menu a:hover {
    color: #6d28d9;
}

/* إضافة خط سفلي ناعم عند التمرير */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to left, #6d28d9, #2563eb);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    /* لون الهمبرغر من ألوان البراند */
    background: #6d28d9;
    margin: 3px 0;
    transition: 0.3s;
}

/* Language Switcher - الحل النهائي للوضوح */
.language-switcher {
    margin-right: 1rem;
    position: relative;
    z-index: 10;
}

.language-switcher select {
    /* لون كحلي شفاف جداً لضمان عدم ظهوره كأبيض سادة */
    background: rgba(15, 23, 42, 0.6) !important; 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff !important;
    /* حدود واضحة لتعطي شكل الزر */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    /* إلغاء الستايل الافتراضي للمتصفح */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
}

.language-switcher select:hover {
    background: rgba(109, 40, 217, 0.4) !important; /* وهج بنفسجي عند التمرير */
    border-color: #ffffff !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.language-switcher select option {
    background: #1e293b !important; /* لون الخيارات عند الفتح */
    color: white !important;
}

/* Hero Section - Space & Galaxy Edition */
.hero {
    /* خلفية الفضاء العميقة مع صورة مجرة عالية الجودة */
    background: #020617 url('https://images.unsplash.com/photo-1464802686167-b939a6910659?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
    color: white;
    padding: 150px 0 100px;
    display: flex;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    text-align: center; /* لضمان التوسيط الاحترافي */
}

/* طبقة السديم (Nebula) المتحركة لتعطي حياة للخلفية */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(109, 40, 217, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.3) 0%, transparent 40%);
    filter: blur(60px);
    animation: nebulaMove 15s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes nebulaMove {
    from { transform: scale(1) translate(0, 0); }
    to { transform: scale(1.2) translate(20px, 20px); }
}

.hero-content {
    max-width: 1100px; 
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center; /* سنقوم بتوسيط كل شيء ليعطي فخامة */
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff !important;
    /* توهج نيوني خفيف حول النص لزيادة الوضوح والفخامة */
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(139, 92, 246, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.hero-content p {
    font-size: 1.4rem;
    color: #ffffff !important;
    max-width: 850px;
    margin-bottom: 3rem;
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-buttons {
    display: flex;
    justify-content: center; /* توسيط الأزرار */
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

/* الأزرار كما طلبتها (بيضاء وبنفسجية واضحة جداً) */
.btn-primary {
    background: #ffffff !important;
    color: #6d28d9 !important;
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    background: #f8fafc !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px); /* تأثير زجاجي */
    color: white !important;
    border: 2px solid #ffffff !important;
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    background: white !important;
    color: #6d28d9 !important;
}

/* حركة الـ FadeIn العامة */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services {
    padding: 80px 0;
    /* خلفية هادئة جداً تميل للزرقة الباردة لتبرز الكروت البيضاء */
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    /* استبدال الأزرق القديم بوهج بنفسجي خفيف جداً */
    background: radial-gradient(circle, rgba(109, 40, 217, 0.05) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    /* كحلي غامق فخم */
    color: #0f172a;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    /* لون رمادي احترافي */
    color: #475569;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.2s forwards;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.service-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 24px;
    /* ظل أنعم وأكثر حداثة */
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* الخط العلوي صار بنفسجي ملكي */
    border-top: 5px solid #6d28d9;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    animation: cardSlideIn 0.8s ease forwards;
}

/* Animations for cards stay the same but smoother */

.service-card::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    /* تدرج هادئ جداً يظهر عند الـ Hover */
    background: linear-gradient(45deg, #6d28d9, #2563eb, #8b5cf6);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(109, 40, 217, 0.15);
    border-top-color: transparent; /* يختفي الخط ليظهر التدرج المحيط بالكامل */
}

.service-card:hover::after {
    opacity: 1;
}

/* أيقونات الخدمات داخل الكروت */
.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(109, 40, 217, 0.1);
    color: #6d28d9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--main-gradient); /* نستخدم المتجرج اللي عرفناه فوق */
    color: white;
    transform: rotateY(180deg); /* حركة قلب الأيقونة احترافية */
}

.service-card h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: #6d28d9;
}

/* Card Action Button */
.card-action {
    margin-top: 1.5rem;
    text-align: center;
}

.portfolio-btn {
    /* التدرج الأساسي الجديد: بنفسجي للأزرق */
    background: linear-gradient(45deg, #6d28d9, #2563eb);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px; /* جعلناه بيضاوي بالكامل ليكون عصرياً أكثر */
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: buttonSlideUp 0.6s ease 0.3s forwards;
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.2);
}

@keyframes buttonSlideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.portfolio-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.portfolio-btn:hover {
    transform: translateY(-5px) scale(1.05);
    /* توحيد ظل الـ Hover مع ألوان اللوجو */
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(45deg, #2563eb, #6d28d9);
}

.portfolio-btn:hover::before {
    left: 100%;
}

.portfolio-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.portfolio-btn:hover i {
    transform: translateX(-5px) scale(1.2); /* حركة الأيقونة لليسار باتجاه الكتابة */
}

.service-icon {
    width: 80px;
    height: 80px;
    /* دائرة الأيقونة صار تدرجها متناسق مع الموقع */
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.2);
}

.service-icon i {
    font-size: 2.2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b; /* كحلي غامق فخم */
    margin-bottom: 1rem;
}

.service-card p {
    color: #475569; /* رمادي غامق وواضح */
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-card li {
    padding: 0.6rem 0;
    color: #334155;
    position: relative;
    padding-right: 1.8rem;
    font-weight: 500;
}

.service-card li:before {
    content: '\f00c'; /* رمز الـ Check من FontAwesome */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: 0;
    color: #6d28d9; /* علامة الصح صارت بنفسجية لتناسب البراند */
    font-weight: 900;
}

/* About Section */
.about {
    padding: 100px 0; /* زيادة بسيطة في المساحة ليعطي راحة للعين */
    background: #ffffff;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0f172a; /* كحلي غامق جداً */
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.15rem;
    color: #475569; /* رمادي احترافي وواضح */
    margin-bottom: 2rem;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(109, 40, 217, 0.05); /* وهج بنفسجي خفيف عند التمرير */
    transform: translateX(-5px);
}

.feature i {
    /* تغيير الأخضر للبنفسجي لتوحيد الهوية */
    color: #6d28d9;
    font-size: 1.3rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem 1.5rem;
    /* خلفية متدرجة ناعمة جداً للأرقام */
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 20px;
    border: 1px solid rgba(109, 40, 217, 0.1);
    transition: all 0.4s ease;
}

.stat:hover {
    transform: translateY(-10px);
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(109, 40, 217, 0.1);
    border-color: #6d28d9;
}

.stat h3 {
    font-size: 2.8rem;
    font-weight: 800;
    /* الرقم صار بتدرج البراند */
    background: linear-gradient(45deg, #6d28d9, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    /* خلفية هادئة جداً لتبرز أيقونات التواصل */
    background: #f1f5f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a; /* كحلي غامق فخم */
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding: 15px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.1);
}

.contact-item i {
    width: 50px;
    height: 50px;
    /* التدرج الجديد للأيقونات */
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    color: white;
    border-radius: 12px; /* جعلناها مربعة بزوايا ناعمة لتصميم عصري */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.2);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.social-links a {
    width: 55px;
    height: 55px;
    /* خلفية بيضاء مع حدود ملونة */
    background: #ffffff;
    color: #6d28d9;
    border: 2px solid rgba(109, 40, 217, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* تأثير الـ Hover على روابط السوشيال ميديا */
.social-links a:hover {
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    color: white;
    transform: translateY(-8px) rotate(360deg); /* حركة دوران احترافية */
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Contact Form */
.contact-form {
    background: #ffffff;
    padding: 2.5rem; /* زيادة البادينغ لراحة أكبر */
    border-radius: 24px; /* حواف أنعم تتماشى مع كروت الخدمات */
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(109, 40, 217, 0.05); /* إطار خفيف جداً */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    /* لون إطار هادئ واحترافي */
    border: 2px solid #f1f5f9;
    background: #f8fafc; /* خلفية خفيفة للـ Inputs */
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    direction: rtl;
    color: #1e293b;
}

/* حالة التركيز (Focus) عند الكتابة */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    /* تغيير اللون للبنفسجي الملكي */
    border-color: #6d28d9;
    background: #ffffff;
    /* إضافة توهج (Glow) ناعم حول الحقل */
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
}

/* تحسين شكل النصوص التوضيحية (Placeholder) */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px; /* زيادة الطول قليلاً للرسائل الطويلة */
}

/* حركة بسيطة عند Hover على الحقول */
.form-group input:hover,
.form-group textarea:hover {
    border-color: #cbd5e1;
}

/* Footer */
.footer {
    /* لون كحلي غامق جداً يميل للسواد يعطي فخامة */
    background: #0f172a;
    color: white;
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

/* إضافة لمسة جمالية فوق الفوتر */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to left, #6d28d9, #2563eb);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    /* العناوين بنفسجي ملكي */
    color: #8b5cf6;
    font-weight: 700;
}

.footer-section p {
    /* لون نص رمادي فاتح مريح للقراءة على الخلفية الغامقة */
    color: #94a3b8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #6d28d9;
    transform: translateX(-5px); /* حركة بسيطة لليمين عند التمرير */
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    /* خط فاصل أنعم */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #64748b;
    font-size: 0.9rem;
}

/* تمييز اسم الشركة في حقوق النشر */
.footer-bottom strong {
    color: #8b5cf6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* تحسين القائمة المنزلقة لتكون عصرية */
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 60px; /* تقليلها لتناسب الهيدر الجديد */
        flex-direction: column;
        /* خلفية بيضاء مع شفافية بسيطة للموبايل */
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px); 
        width: 100%;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        /* ظل مائل للبنفسجي ليتناسب مع الهوية */
        box-shadow: 0 15px 30px rgba(109, 40, 217, 0.1);
        padding: 3rem 0;
        gap: 1.5rem; /* تقليل الفجوة لتناسب الشاشة */
    }

    .nav-menu.active {
        right: 0;
    }

    /* جعل الروابط في الموبايل أوضح وأكبر للمس */
    .nav-menu a {
        font-size: 1.2rem;
        color: #1e293b;
        display: block;
        padding: 10px 0;
    }

    .nav-menu a:hover {
        color: #6d28d9;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 2.2rem; /* تكبير بسيط للوضوح */
    }

    .hero-image i {
        font-size: 8rem;
        /* تقليل الشفافية قليلاً لتبرز في الموبايل */
        opacity: 0.4;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.9rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.8rem;
        border-radius: 20px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-image i {
        font-size: 6rem;
    }
    
    /* تصغير حجم الأزرار قليلاً للموبايلات الصغيرة جداً */
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    /* تحسين سرعة وسلاسة التصفح */
    scrollbar-gutter: stable;
}

/* تحسين شكل شريط التمرير (Scrollbar) ليتناسب مع البراند */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6d28d9, #2563eb);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4c1d95;
}

/* Loading Animation - تحسين تأثير الظهور */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    /* جعل الانتقال أكثر سلاسة (Bezier Curve) ليعطي طابعاً تقنياً */
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* إضافة تأثير "التركيز" على العناصر عند ظهورها */
.fade-in.visible:hover {
    transition: transform 0.3s ease;
}

/* Portfolio Modal */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-modal.active {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* خلفية داكنة مع تأثير ضبابي قوي للفخامة */
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 1200px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.portfolio-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    /* تدرج البراند الجديد للمودال */
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent);
}

.modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.modal-close:hover {
    background: #f43f5e; /* لون أحمر ناعم عند الإغلاق */
    transform: rotate(90deg) scale(1.1);
    border-color: transparent;
}

.modal-body {
    padding: 2.5rem;
    max-height: calc(92vh - 120px);
    overflow-y: auto;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(109, 40, 217, 0.05);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 45px rgba(109, 40, 217, 0.15);
}

.project-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.4), transparent);
}

.project-info {
    padding: 1.8rem;
}

.project-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.tech-tag {
    /* التدرج الجديد لتاغات التكنولوجيا */
    background: linear-gradient(45deg, #6d28d9, #4f46e5);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.2);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(109, 40, 217, 0.3);
}

/* Loading Animation for Modal */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        /* حركة أكثر مرونة وسلاسة */
        transform: translateY(30px) scale(0.95);
        filter: blur(5px); /* إضافة تغبيش بسيط يختفي مع الظهور */
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.project-card {
    /* تغيير الـ ease لـ cubic-bezier ليعطي شعور الـ Premium */
    animation: modalSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0; /* لضمان عدم ظهور الكرت قبل بدء الأنميشن */
}

/* ترتيب ظهور الكروت بشكل تتابعي أنيق */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

/* لمسة إضافية: لمعة خفيفة عند اكتمال الظهور */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: 0.7s;
}

.project-card:hover::after {
    left: 125%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px; /* زيادة العرض قليلاً ليكون مريحاً أكثر في التعامل */
}

::-webkit-scrollbar-track {
    /* خلفية هادئة جداً تتناسب مع ألوان الموقع */
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    /* التدرج الجديد من البنفسجي إلى الأزرق الملكي */
    background: linear-gradient(180deg, #6d28d9, #2563eb);
    border-radius: 10px;
    /* إضافة حدود شفافة حول الثمب ليعطي شعوراً بأنه "طافٍ" */
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    /* تغميق الألوان عند التمرير ليعطي استجابة بصرية */
    background: linear-gradient(180deg, #4c1d95, #1d4ed8);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 95vh;
        /* حواف أنعم تتناسب مع الستايل الجديد */
        border-radius: 20px;
    }

    .modal-header {
        /* تدرج الألوان الجديد في الهيدر للموبايل */
        padding: 1.2rem 1.5rem;
        background: linear-gradient(135deg, #6d28d9, #2563eb);
    }

    .modal-title {
        /* تصغير الخط ليناسب الشاشات الصغيرة مع الحفاظ على القوة */
        font-size: 1.4rem;
        font-weight: 800;
    }

    .modal-body {
        padding: 1.2rem;
        background: #f8fafc; /* لون خلفية مريح للعين */
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* زيادة المسافة قليلاً ليعطي "نفس" بين المشاريع */
    }

    .project-image {
        /* ارتفاع مثالي للصور على الموبايل */
        height: 180px;
    }

    .project-info h3 {
        font-size: 1.2rem;
    }
    
    /* جعل أزرار الإغلاق أسهل للمس في الموبايل */
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}
/* تنسيق زر مشاهدة المشروع - MB Smart System */
.preview-btn-site {
    display: inline-block;
    padding: 12px 35px; /* زيادة بسيطة في الحجم ليكون أسهل للنقر */
    /* التدرج الجديد المتناسق مع الهوية التقنية */
    background: linear-gradient(90deg, #6d28d9 0%, #2563eb 100%);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px; /* تكبير الخط قليلاً للوضوح */
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.2);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.preview-btn-site:hover {
    transform: translateY(-5px) scale(1.05);
    /* توهج أزرق ملكي عند التمرير */
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    opacity: 1; /* إلغاء الـ opacity ليبقى اللون قوياً */
}

/* إضافة تأثير اللمعة المتحركة داخل الزر */
.preview-btn-site::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.preview-btn-site:hover::before {
    left: 100%;
}
