html {
    scroll-behavior: smooth;
}

/* --- إعدادات أساسية وتجهيزية --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding-top: 95px; /* أضف هذا السطر فقط - الرقم هو ارتفاع الهيدر التقريبي */
    
    /* الخواص القديمة (موجودة من قبل) */
    font-family: 'Cairo', sans-serif;
    direction: rtl; 
    line-height: 1.6;
    background-color: #252436;
    color: #ffffff;
}

/* --- تصميم الجزء العلوي (Header) --- */
.main-header {
    /* الخواص الجديدة */
    position: fixed;    /* أهم خاصية لتثبيت العنصر */
    top: 0;             /* تثبيته في أعلى الشاشة */
    right: 0;           /* تثبيته من جهة اليمين */
    width: 100%;        /* ليأخذ عرض الشاشة بالكامل */
    z-index: 1000;      /* لضمان بقائه فوق كل العناصر الأخرى */

    /* الخواص القديمة (موجودة من قبل) */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 80px;
    background-color: #252436;
    border-bottom: 1px solid #3a3950;
    transition: padding 0.3s ease; /* لإضافة تأثير عند تغيير حجم الهيدر لاحقاً */
}

.logo a {
    text-decoration: none;
    color: #24c9a2; /* <-- لون الشعار الذي اخترته */
    font-size: 28px;
    font-weight: 700; /* خط عريض */
}

.main-nav ul {
    list-style: none; /* لإزالة النقاط من القائمة */
    display: flex;
}

.main-nav li {
    margin-right: 30px; /* مسافة بين عناصر القائمة */
}

.main-nav a {
    text-decoration: none;
    color: #ffffff; /* لون روابط القائمة */
    font-size: 18px;
    transition: color 0.3s ease; /* تأثير حركة ناعم عند مرور الماوس */
}

.main-nav a:hover {
    color: #24c9a2; /* <-- تغيير اللون عند مرور الماوس */
}

.logo img {
    height: 100px; /* يمكنك تغيير الارتفاع ليناسب حجم شعارك */
    width: auto;
}

/* --- تصميم قسم الواجهة (Hero Section) مع فيديو --- */
.hero-section {
    position: relative; /* ضروري لتثبيت العناصر الفرعية بداخله */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-align: center;
    min-height: 80vh; 
    padding: 0 40px;
    overflow: hidden; /* لإخفاء أي أجزاء من الفيديو تخرج عن الإطار */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1; /* الطبقة الخلفية */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 36, 54, 0.85); /* نفس طبقة اللون الشفافة */
    z-index: 2; /* طبقة اللون فوق الفيديو */
}

.hero-content {
    position: relative; /* لضمان بقائه في المقدمة */
    z-index: 3; /* طبقة المحتوى فوق كل شيء */
}

/* --- تصميم زر الإجراء (Call to Action Button) --- */
.cta-button {
    display: inline-block;
    background-color: #24c9a2; /* <-- لونك المميز */
    color: #252436; /* <-- لون الخلفية ليكون النص واضحاً */
    padding: 15px 35px; /* مساحة داخلية للزر */
    border-radius: 5px; /* حواف دائرية */
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: background-color 0.3s ease; /* تأثير ناعم عند التغيير */
    margin-top: 20px; /* <-- هذا هو السطر الجديد الذي تم إضافته */
}

.cta-button:hover {
    background-color: #1fb892; /* درجة أغمق قليلاً عند مرور الماوس */
}

/* --- تصميم قسم خدماتنا --- */
.services-section {
    padding: 80px 40px;
    background-color: #2c2b42; /* درجة أفتح قليلاً من الخلفية الرئيسية للتمييز */
    text-align: center;
}

.section-title {
    font-size: 38px;
    margin-bottom: 60px;
    color: #ffffff;
}

.services-container {
    display: flex;
    justify-content: center;
    gap: 30px; /* المسافة بين البطاقات */
    flex-wrap: wrap; /* للسماح للبطاقات بالنزول لسطر جديد في الشاشات الصغيرة */
}

.service-card {
    background-color: #252436; /* نفس لون الخلفية الأساسي */
    padding: 40px 30px;
    border-radius: 10px;
    max-width: 350px;
    border: 1px solid #3a3950;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px); /* تأثير الرفع عند مرور الماوس */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 50px;
    color: #24c9a2; /* اللون المميز للأيقونات */
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 16px;
    color: #e0e0e0;
    line-height: 1.8;
}

/* --- تصميم قسم من نحن --- */
.about-section {
    padding: 80px 40px;
    background-color: #252436; /* العودة للون الخلفية الأساسي */
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px; /* المسافة بين الصورة والنص */
    flex-wrap: wrap-reverse; /* لعكس الترتيب في الشاشات الصغيرة (النص أولاً) */
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    flex: 1; /* ليأخذ النص المساحة المتاحة */
    min-width: 320px;
}

.about-content .section-title {
    text-align: right; /* محاذاة العنوان لليمين */
    margin-bottom: 20px;
}

.about-content p {
    font-size: 18px;
    color: #e0e0e0;
    margin-bottom: 30px;
    line-height: 1.8;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    font-size: 17px;
    margin-bottom: 20px;
}

.features-list i {
    color: #24c9a2; /* اللون المميز للأيقونات */
    font-size: 20px;
    margin-left: 15px; /* مسافة يسار الأيقونة */
    margin-top: 5px;
}

.about-image {
    flex: 1; /* لتأخذ الصورة المساحة المتاحة */
    min-width: 320px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* --- تصميم قسم تواصل معنا --- */
.contact-section {
    padding: 80px 40px;
    background-color: #2c2b42; /* نفس لون قسم الخدمات */
}

.contact-section .section-title {
    text-align: center;
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 60px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 320px;
}

.contact-info h3 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 15px;
}

.contact-info p {
    color: #e0e0e0;
    line-height: 1.8;
    margin-bottom: 30px;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    font-size: 18px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.contact-info li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-info li a:hover {
    color: #24c9a2;
}


.contact-info i {
    font-size: 22px;
    color: #24c9a2;
    margin-left: 15px;
    width: 25px; /* لتوحيد المسافة */
}

/* تصميم حقول النموذج */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #3a3950;
    border-radius: 5px;
    background-color: #252436;
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #888;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background-color: #24c9a2;
    color: #252436;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.contact-form button:hover {
    background-color: #1fb892;
}

/* --- تصميم الجزء السفلي (Footer) --- */
.main-footer {
    text-align: center;
    padding: 25px;
    background-color: #1f1e2e;
    color: #aaa;
    border-top: 1px solid #3a3950;
}

/* --- تصميم قسم شركاؤنا --- */
.partners-section {
    padding: 60px 40px;
    background-color: #252436; /* العودة للون الخلفية الأساسي */
    text-align: center;
}

.partners-section .section-title {
    margin-bottom: 50px;
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px; /* المسافة بين الشعارات */
    flex-wrap: wrap; /* للسماح للشعارات بالنزول لسطر جديد */
}

.logo-item img {
    height: 50px; /* توحيد ارتفاع الشعارات */
    width: auto;
    filter: grayscale(100%) opacity(0.7); /* لجعلها رمادية وباهتة قليلاً */
    transition: all 0.3s ease;
}

.logo-item img:hover {
    filter: grayscale(0%) opacity(1); /* إظهار اللون الكامل عند مرور الماوس */
    transform: scale(1.1); /* تكبير بسيط عند مرور الماوس */
}

/* --- تصميم قسم شهادات العملاء --- */
.clients-testimonial-section {
    padding: 80px 0; /* لا نحتاج padding أفقي لأن السلايدر يأخذ العرض كاملاً */
    background-color: #2c2b42; /* لون مختلف للتمييز */
}

.clients-testimonial-section .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.testimonial-slider {
       max-width: 450px; /* تحديد عرض السلايدر ليتسع لبطاقة واحدة تقريباً */
    margin: 0 auto;   /* لتوسيط السلايدر في الصفحة */
    display: flex;
    overflow-x: auto; /* يجعل المحتوى قابلاً للتمرير أفقياً */
    padding: 20px 40px; /* مسافة لكي لا تلتصق البطاقات بالحواف */
    scroll-snap-type: x mandatory; /* يجبر التمرير على التوقف عند بطاقة معينة */
    -webkit-overflow-scrolling: touch; /* لتحسين التمرير على أجهزة آبل */
    scrollbar-width: thin; /* لتصغير حجم شريط التمرير */
    scrollbar-color: #24c9a2 #252436; /* لون شريط التمرير */
}

/* تصميم شريط التمرير لمتصفحات كروم وسفاري */
.testimonial-slider::-webkit-scrollbar {
    height: 8px;
}
.testimonial-slider::-webkit-scrollbar-track {
    background: #252436;
}
.testimonial-slider::-webkit-scrollbar-thumb {
    background-color: #24c9a2;
    border-radius: 10px;
}

.testimonial-card {
    flex: 0 0 100%; /* اجعل البطاقة تأخذ 100% من عرض السلايدر */
    flex: 0 0 320px; /* عرض البطاقة (لا تتقلص، لا تنمو، العرض الأساسي 320 بكسل) */
    margin: 0 15px; /* مسافة بين البطاقات */
    scroll-snap-align: center; /* يجعل البطاقة تتوسط الشاشة عند التوقف */
    background-color: #252436;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 1px solid #3a3950;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.client-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* يجعل الشعار دائرياً */
    object-fit: cover; /* لضمان ظهور الصورة بشكل جيد */
    border: 3px solid #24c9a2;
    margin-bottom: 20px;
}

.testimonial-card blockquote {
    font-size: 16px;
    font-style: italic;
    color: #e0e0e0;
    margin-bottom: 20px;
    flex-grow: 1; /* لجعل الاقتباس يأخذ المساحة المتاحة ويوحد ارتفاع البطاقات */
}

.testimonial-card cite {
    font-size: 14px;
    color: #ffffff;
    font-style: normal;
    font-weight: 700;
}

/* --- تنسيقات تحسينات JavaScript --- */

/* 1. تنسيق حركات الظهور عند النزول */
section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
section.in-view {
    opacity: 1;
    transform: translateY(0);
}


/* 2. تنسيق زر "العودة للأعلى" */
.back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px; /* سيظهر على اليسار */
    background-color: #24c9a2;
    color: #252436;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 1001; /* ليكون فوق الهيدر */
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}


/* 3. تنسيق قائمة الجوال (Hamburger Menu) */
.hamburger-menu {
    display: none; /* إخفاؤه على الشاشات الكبيرة */
    width: 30px;
    height: 25px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* تنسيق شكل الأيقونة عند الفتح (تتحول لـ X) */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}


/* -- التجاوب مع الشاشات الصغيرة (Media Query) -- */
@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 95px; /* تحت الهيدر */
        right: 0;
        background-color: #2c2b42;
        width: 100%;
        flex-direction: column;
        align-items: center;
        max-height: 0; /* إخفاء القائمة افتراضياً */
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    .main-header {
        padding: 15px 20px; /* تقليل الهوامش الجانبية للهيدر */
    }
    .logo img {
        height: 40px; /* تصغير ارتفاع الشعار */
    }
    .main-nav {
        position: absolute;
        top: 70px; /* تحديث هذه القيمة لتناسب ارتفاع الهيدر الجديد */
        right: 0;
        background-color: #2c2b42;
        width: 100%;
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    .main-nav.active {
        max-height: 500px; /* إظهار القائمة عند الضغط */
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .main-nav li {
        margin: 0;
        width: 100%;
    }
    .main-nav a {
        padding: 20px;
        display: block;
        width: 100%;
        border-bottom: 1px solid #3a3950;
    }
    .hamburger-menu {
        display: flex; /* إظهار أيقونة الهمبرجر */
    }
}

/* --- تصميم زر تبديل اللغة --- */
.lang-switcher a {
    background-color: #2c2b42;
    border: 1px solid #24c9a2;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 700;
}
.lang-switcher a:hover {
    background-color: #24c9a2;
    color: #252436 !important; /* !important لضمان تغلب هذا اللون على غيره */
}