/* Mobile Title Spacing Fix - تقليل المسافة بين Prime والنص المتحرك في الموبايل */

/* تقليل المسافة العامة في شاشات الموبايل */
@media screen and (max-width: 768px) {
    .home__title {
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    .home__title br {
        line-height: 0.3 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #prime-coler {
        margin-bottom: -0.5rem !important;
        display: block !important;
    }
    
    .typing-text {
        margin-top: -0.8rem !important;
        display: block !important;
        line-height: 1.2 !important;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media screen and (max-width: 480px) {
    .home__title {
        line-height: 1.0 !important;
    }
    
    .home__title br {
        line-height: 0.2 !important;
    }
    
    #prime-coler {
        margin-bottom: -0.7rem !important;
    }
    
    .typing-text {
        margin-top: -1rem !important;
        line-height: 1.1 !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media screen and (max-width: 360px) {
    .home__title {
        line-height: 0.9 !important;
    }
    
    #prime-coler {
        margin-bottom: -0.8rem !important;
    }
    
    .typing-text {
        margin-top: -1.2rem !important;
        line-height: 1.0 !important;
    }
}

/* إصلاحات خاصة للنسخة العربية */
@media screen and (max-width: 768px) {
    body.rtl .home__title,
    [dir='rtl'] .home__title {
        line-height: 1.0 !important;
    }
    
    body.rtl #prime-coler,
    [dir='rtl'] #prime-coler {
        margin-bottom: -0.6rem !important;
    }
    
    body.rtl .typing-text,
    [dir='rtl'] .typing-text {
        margin-top: -0.9rem !important;
        text-align: center !important;
    }
}

/* إصلاحات خاصة للنسخة الإنجليزية */
@media screen and (max-width: 768px) {
    html:not([dir='rtl']) .home__title {
        line-height: 1.0 !important;
    }
    
    html:not([dir='rtl']) #prime-coler {
        margin-bottom: -0.5rem !important;
    }
    
    html:not([dir='rtl']) .typing-text {
        margin-top: -0.8rem !important;
        text-align: left !important;
    }
}

/* تحسين إضافي للمسافات في الوضع الأفقي للموبايل */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .home__title {
        line-height: 0.9 !important;
        margin-bottom: 0.5rem !important;
    }
    
    #prime-coler {
        margin-bottom: -0.9rem !important;
    }
    
    .typing-text {
        margin-top: -1.3rem !important;
    }
}

/* إصلاح للشاشات العريضة الصغيرة (مثل iPhone في الوضع الأفقي) */
@media screen and (max-width: 896px) and (max-height: 414px) {
    .home__title {
        line-height: 0.8 !important;
    }
    
    #prime-coler {
        margin-bottom: -1rem !important;
        font-size: 2.2rem !important;
    }
    
    .typing-text {
        margin-top: -1.4rem !important;
        font-size: 1.6rem !important;
    }
}

/* تحسين خاص للأجهزة الصغيرة مثل iPhone SE */
@media screen and (max-width: 375px) and (max-height: 667px) {
    .home__title {
        line-height: 0.85 !important;
    }
    
    #prime-coler {
        font-size: 2.5rem !important;
        margin-bottom: -0.9rem !important;
    }
    
    .typing-text {
        font-size: 1.8rem !important;
        margin-top: -1.1rem !important;
    }
}

/* تحسين للأجهزة الكبيرة نسبياً في الموبايل */
@media screen and (min-width: 414px) and (max-width: 768px) {
    #prime-coler {
        font-size: 3rem !important;
        margin-bottom: -0.4rem !important;
    }
    
    .typing-text {
        font-size: 2.2rem !important;
        margin-top: -0.6rem !important;
    }
}

/* إصلاح خاص للتابلت الصغير */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .home__title {
        line-height: 1.1 !important;
    }
    
    #prime-coler {
        margin-bottom: -0.3rem !important;
    }
    
    .typing-text {
        margin-top: -0.5rem !important;
    }
}