/* --- General Styles & Variables --- */
:root {
    --primary-color: #0d9488;
    --secondary-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color-dark-bg: #d1d5db; /* لون نص فاتح للخلفيات الداكنة */
    --heading-color-dark-bg: #f9fafb; /* لون عناوين فاتح للخلفيات الداكنة */
}

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

/* --- 1. كود الخلفية الصحيح --- */
body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--text-color-dark-bg); /* تغيير لون النص الافتراضي ليتناسب مع الخلفية */
    background-image: url('https://i.ibb.co/q314YqCc/Gemini-Generated-Image-5vgl895vgl895vgl.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #111827; /* لون داكن احتياطي */
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

/* --- 2. تعديل ألوان العناوين والنصوص --- */
h1, h2, h3, h4 { 
    color: var(--heading-color-dark-bg); /* تغيير لون العناوين الرئيسي */
    line-height: 1.3; 
    margin-bottom: 15px; 
    font-weight: 700; 
}
h1 { font-size: 3.2rem; }
h2 { font-size: 2.5rem; text-align: center; }
p { margin-bottom: 10px; }
a { text-decoration: none; color: var(--primary-color); }
.section-subtitle { text-align: center; max-width: 650px; margin: -10px auto 50px auto; font-size: 1.1rem; color: var(--text-color-dark-bg); }
.cta-button { display: inline-block; background-color: var(--secondary-color); color: var(--dark-color); padding: 14px 32px; border-radius: 8px; font-weight: 700; transition: transform 0.2s, box-shadow 0.2s; text-align: center; border: none; cursor: pointer; }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

/* --- Header --- */
.header { 
    background-color: rgba(23, 37, 51, 0.8); /* خلفية داكنة شبه شفافة */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 700; color: var(--secondary-color); }
.nav a { color: #fff; margin: 0 15px; font-weight: 700; transition: color 0.2s; }
.nav a:hover { color: var(--secondary-color); }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-cta { padding: 10px 22px; }

/* --- 3. جعل خلفيات الأقسام شفافة --- */
.hero, .use-cases, .features, .pricing, .faq { /* Screenshots و Demo سيتم التعامل معهما بشكل خاص */
    background-color: transparent;
}

.hero { text-align: center; padding: 60px 0; }
.hero h1 { max-width: 800px; margin: 0 auto 15px auto; }
.hero .subtitle { font-size: 1.25rem; max-width: 650px; margin: 0 auto 35px auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

/* --- 4. تعديل الكروت لتظهر بشكل زجاجي (Glassmorphism) --- */
.feature-item, .pricing-plan, .faq-item {
    background-color: rgba(31, 41, 55, 0.6); /* لون داكن شبه شفاف */
    backdrop-filter: blur(15px);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-item:hover, .pricing-plan:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.feature-item i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; display: block; }
.feature-item h3 { font-size: 1.25rem; }

/* --- Pricing Section --- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; align-items: flex-start; }
.pricing-plan { text-align: center; display: flex; flex-direction: column; height: 100%; }
.pricing-plan.popular { border: 2px solid var(--primary-color); }
.popular-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background-color: var(--primary-color); color: #fff; padding: 6px 15px; font-size: 0.8rem; border-radius: 20px; font-weight: 700; }
.price { font-size: 3.5rem; font-weight: 700; color: #fff; margin: 20px 0; }
.price span { font-size: 1.1rem; font-weight: 400; color: var(--text-color-dark-bg); }
.price-discount { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.original-price { font-size: 1.5rem; text-decoration: line-through; color: var(--text-color-dark-bg); }
.plan-features { 
    list-style: none; 
    margin-bottom: 30px; 
    /* التعديل: لمحاذاة النص في المنتصف */
    text-align: center; 
    flex-grow: 1;  }
.plan-features li { margin-bottom: 12px; }
.plan-note { font-size: 0.8rem; color: var(--text-color-dark-bg); margin-top: 20px; }

/* --- FAQ Section --- */
.faq .container { max-width: 800px; }
.faq h2 { margin-bottom: 40px; }

/* --- Footer --- */
.footer { 
    background-color: rgba(17, 24, 39, 0.8); 
    color: #a0aec0; 
    text-align: center; 
    padding: 40px 0; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    width: 100%; 
}
.contact-title { color: #fff; font-weight: 700; margin-bottom: 15px; font-size: 1.1rem; }
.social-links { margin-bottom: 20px; display: flex; justify-content: center; align-items: center; gap: 25px; }
.social-icon { color: #fff; font-size: 1.6rem; transition: color 0.2s; }
.social-icon:hover { color: var(--primary-color); }
.footer .copyright { margin: 0; font-size: 0.9rem; }
.footer a { color: #fff; }

/* --- Language Selector Styles --- */
.language-selector { position: relative; z-index: 1001; }
.language-button { background: none; border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; padding: 8px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-family: 'Cairo', sans-serif; font-weight: 700; }
.language-button:hover { background-color: rgba(255, 255, 255, 0.1); }
.language-button .fa-chevron-down { font-size: 0.8em; transition: transform 0.2s; }
.language-selector.open .fa-chevron-down { transform: rotate(180deg); }
.language-dropdown { display: none; position: absolute; top: calc(100% + 10px); right: 0; background-color: #1f2937; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); list-style: none; padding: 5px; min-width: 150px; max-height: 300px; overflow-y: auto; }
[dir="ltr"] .language-dropdown { right: auto; left: 0; }
.language-selector.open .language-dropdown { display: block; }
.language-dropdown a { display: block; padding: 8px 12px; color: #fff; border-radius: 6px; font-size: 0.9rem; }
.language-dropdown a:hover { background-color: var(--primary-color); }

/* --- Screenshots Section --- */
.screenshot-title { text-align: right; margin-top: 40px; margin-bottom: 20px; font-size: 1.5rem; padding-right: 10px; border-right: 4px solid var(--primary-color); }
.scroll-container { overflow-x: auto; white-space: nowrap; padding: 20px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--primary-color) #374151; }
.scroll-container::-webkit-scrollbar { height: 8px; }
.scroll-container::-webkit-scrollbar-track { background: #374151; border-radius: 10px; }
.scroll-container::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 10px; }
.image-track { display: flex; gap: 20px; }
.screenshot-img { display: inline-block; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid rgba(255,255,255,0.1); }
.screenshot-img:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.screenshot-img.mobile { height: 450px; width: auto; }
.screenshot-img.desktop { height: 300px; width: auto; }

/* --- Footer Links --- */
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 25px; }
.footer-links a { color: #a0aec0; font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

/* --- Responsive Design --- */
@media (max-width: 992px) { 
    .pricing-grid { grid-template-columns: 1fr 1fr; } 
    .content-card {
        padding: 30px; /* تقليل البادينج على الشاشات الأصغر */
    }
}
@media (max-width: 768px) { 
    h1 { font-size: 2.5rem; } 
    h2 { font-size: 2rem; } 
    .header .container { justify-content: space-between; } 
    .nav, .header-cta { display: none; } 
    .pricing-grid { grid-template-columns: 1fr; }
    .content-card {
        padding: 20px; /* تقليل البادينج أكثر على الشاشات الصغيرة جدًا */
    }
}

/* ------------------------------------------- */
/* --- الجزء المضاف للإصلاحات الأخيرة (التحديث 7) --- */
/* ------------------------------------------- */

/* --- 1. إصلاح أيقونة الصح في قسم الأسعار --- */
.plan-features li i.fa-check {
    color: var(--primary-color);
}
[dir="rtl"] .plan-features li i.fa-check {
    margin-left: 10px;
}
[dir="ltr"] .plan-features li i.fa-check {
    margin-right: 10px;
    margin-left: 0;
}

/* --- 2. توسيط محتوى وزر قسم التجربة الحية --- */
.demo .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* توسيط أفقي */
    text-align: center; /* للتأكد من توسيط النصوص أيضًا */
}
/* التأكد من توسيط زر الـ CTA داخل البطاقات */
.content-card .cta-button {
    margin-left: auto;
    margin-right: auto;
    display: block; /* لتمكين الهوامش التلقائية */
    margin-top: 25px; /* لإضافة مسافة أعلى الزر */
}
/* التأكد من توسيط العنوان والوصف داخل بطاقة Demo */
.demo .content-card h2,
.demo .content-card .section-subtitle {
    text-align: center;
}

/* --- 3. تصميم البطاقة الجديدة لقسمي التجربة واللقطات (امتداد كامل العرض مع الخلفية الزجاجية) --- */
/* --- 3. تصميم البطاقة الجديدة لقسمي التجربة واللقطات (مطابق للفوتر) --- */
.full-width-card-section {
    background-color: rgba(17, 24, 39, 0.8); /* نفس لون وشفافية الفوتر تمامًا */
    /* تم حذف خاصية backdrop-filter: blur() لجعل المظهر مطابقًا */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 80px 0;
}

/* نجعل الـ .content-card الداخلي مجرد حاوية للمحتوى بدون خلفية */
.full-width-card-section .content-card {
    background-color: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
/* تعديل عرض الـ section-subtitle داخل البطاقات */
.content-card .section-subtitle {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 4. إضافة فاصل بين الأقسام الزجاجية ذات العرض الكامل --- */
.full-width-card-section + .full-width-card-section {
    margin-top: 30px;
}
/* --- Popup Styles --- */
.popup-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    position: relative;
    background-color: rgba(31, 41, 55, 0.85); /* Glassmorphism effect */
    backdrop-filter: blur(15px);
    margin: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    color: var(--text-color-dark-bg);
    animation: fadeIn 0.3s ease-in-out;
}

.popup-content h2 {
    color: var(--heading-color-dark-bg);
    margin-top: 0;
    margin-bottom: 15px;
}

.popup-content p {
    line-height: 1.8;
    font-size: 1.1rem;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
/* Adjust spacing for the new full-width note section */
#pricing {
    padding-bottom: 20px; /* تقليل المسافة أسفل خطط الأسعار */
}

.full-width-note-section {
    padding: 0 20px 60px 20px; /* مسافات للقسم الجديد */
}

/* Note for large communities (Modified for new position) */
.pricing-note-large {
    max-width: 1000px;
    margin: 0 auto; /* إزالة المسافة العلوية وتوسيط أفقي */
    text-align: center;
    background-color: rgba(31, 41, 55, 0.7);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color-dark-bg);
    line-height: 1.9;
    letter-spacing: 0.5px;
}

.pricing-note-large p {
    margin-bottom: 15px;
}

.pricing-note-large p:last-child {
    margin-bottom: 0;
}

/* أضف هذا في نهاية ملف الـ CSS */

.pricing-grid.two-columns {
    display: flex;
    justify-content: center; /* توسيط الكروت */
    gap: 40px; /* مسافة بين الكارتين */
    flex-wrap: wrap;
    max-width: 900px; 
    margin: 50px auto 0 auto;
}

.pricing-grid.two-columns .pricing-plan {
    flex: 1;
    min-width: 300px; /* أدنى عرض للكارت لضمان عدم صغره جداً في الموبايل */
    max-width: 450px; /* أقصى عرض للكارت */
    width: 100%;
}

/* تنسيق للنص الفرعي تحت السعر */
.plan-subtitle {
    font-size: 0.95rem;
    color: var(--text-color-dark-bg);
    opacity: 0.8;
    margin-bottom: 20px;
    font-weight: 400;
}

@media (max-width: 768px) {
    .pricing-grid.two-columns {
        flex-direction: column;
        align-items: center;
    }
}

/* --- FAQ Accordion Styles --- */

/* نلغي البادينج والتوسيط القديم من العنصر الأب */
.faq-item {
    padding: 0;
    text-align: right; /* إعادة تعيين المحاذاة */
    margin-bottom: 15px; /* مسافة بين كل سؤال */
    overflow: hidden; /* مهم لإخفاء المحتوى عند الإغلاق */
}

[dir="ltr"] .faq-item {
    text-align: left;
}

/* تصميم زر السؤال */
.faq-question {
    background-color: transparent;
    border: none;
    width: 100%;
    padding: 20px 25px; /* بادينج داخلي للزر */
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color-dark-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right; /* للغة العربية */
}

[dir="ltr"] .faq-question {
    text-align: left;
}

/* تصميم نص السؤال لضمان المرونة */
.faq-question span {
    flex: 1;
    padding-left: 15px;
}
[dir="ltr"] .faq-question span {
    padding-left: 0;
    padding-right: 15px;
}

/* تصميم أيقونة السهم */
.faq-question .fas {
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* حاوية الإجابة (مخفية افتراضيًا) */
.faq-answer {
    max-height: 0; /* هذا هو السحر: الارتفاع صفر يعني مخفي */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out; /* حركة ناعمة */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* خط فاصل */
    background-color: rgba(0, 0, 0, 0.1); /* خلفية أغمق قليلاً للإجابة */
}

/* المحتوى الفعلي للإجابة */
.faq-answer-content {
    padding: 25px;
}

/* عند النقر (إضافة كلاس .active) */
.faq-item.active .faq-question .fas {
    transform: rotate(180deg); /* تدوير السهم */
}

.faq-item.active .faq-answer {
    max-height: 1500px; /* رقم كبير كافي لإظهار أي محتوى */
}

/* تنسيق القوائم داخل الأجوبة لتظهر بشكل أفضل */
.faq-answer-content ul,
.faq-answer-content ol {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-right: 20px; /* للغة العربية */
}

[dir="ltr"] .faq-answer-content ul,
[dir="ltr"] .faq-answer-content ol {
    margin-right: 0;
    margin-left: 20px;
}

.faq-answer-content p,
.faq-answer-content li {
    color: var(--text-color-dark-bg);
}    
    /* ========================================================== */
/* تحسينات الهواتف المحمولة (Mobile Optimizations) - التصحيح  */
/* ========================================================== */

@media (max-width: 768px) {
    
    /* 1. ضبط الحاوية لمرونة أفضل */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 2. تحسين قسم البطل (Hero Section) */
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    /* 3. تطبيق عرض عمودين على بطاقات الميزات وحالات الاستخدام */
    .features-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    
    /* 4. تنسيق عناصر البطاقة وإظهار النصوص */
    .features-grid .feature-item {
        padding: 15px 10px;
        text-align: center;
        /* حجم الخط الأصغر للمحتوى العام للبطاقة */
        font-size: 0.85rem; 
    }
    
    .features-grid .feature-item i {
        font-size: 2rem; /* تصغير حجم الأيقونات أكثر قليلاً */
        margin-bottom: 8px;
    }
    
    .features-grid .feature-item h3 {
        font-size: 1rem; /* تصغير حجم عنوان البطاقة */
        margin-bottom: 5px; /* تقليل المسافة أسفل العنوان */
    }
    
    .features-grid .feature-item p {
        /* **الأهم:** إظهار الوصف مع تقليل حجم خطه */
        display: block !important; 
        font-size: 0.8rem; /* حجم خط صغير جداً للوصف ليتناسب */
        line-height: 1.4; /* تقليل التباعد بين الأسطر */
    }
    
    /* 5. تحسين قسم الأسعار */
    .pricing-grid.two-columns {
        grid-template-columns: 1fr;
    }
    
    /* 6. تحسين قسم الأسئلة الشائعة (FAQ) */
    .faq-item .faq-question {
        padding: 15px 10px;
        font-size: 1rem;
    }
    
    /* 7. تحسين التذييل (Footer) */
    .footer .container {
        text-align: center;
        flex-direction: column;
    }
    
    .footer .footer-links, .footer .social-links {
        margin-bottom: 15px;
    }
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px; /* مسافة بسيطة بين علامة الصح والنص */
}

.plan-features li i {
    font-size: 16px;
    min-width: 20px; /* تأكد أن الأيقونة لا تسبب انكسار */
}
/* تنسيق بطاقة تجربة التطبيق الجديدة */
.demo-card {
    background: rgba(255, 255, 255, 0.05); /* خلفية شفافة */
    backdrop-filter: blur(15px); /* تأثير الزجاج */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin: 40px auto; /* توسيط البطاقة مع مسافة علوية وسفلية */
    max-width: 700px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeIn 1s ease-out; /* حركة دخول جذابة */
}

.demo-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color); /* استخدام اللون الذهبي للفت الانتباه */
}

.demo-card p {
    font-size: 1rem;
    margin-bottom: 25px;
    color: var(--text-color-dark-bg);
}

.demo-btn {
    background-color: var(--primary-color) !important; /* لون مختلف لزر التجربة */
    color: white !important;
}

/* حركة بسيطة للفت الانتباه */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* إخفاء قسم demo القديم إذا لم تقم بحذفه */
#demo { display: none; }