/*=============== SMALL SCREENS SECTIONS FIX ===============*/
/* إصلاح عرض الأقسام في الشاشات الصغيرة */

/* ضمان عرض جميع الأقسام في الشاشات الصغيرة */
@media screen and (max-width: 1023px) {
    
    /* إصلاح قسم المشاريع */
    .projects.section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 3rem 0 2rem !important;
    }
    
    .projects__container {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .project-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* إصلاح قسم المؤسس (Value) */
    .value.section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 3rem 0 2rem !important;
    }
    
    .value__container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .value__images,
    .value__content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    /* إصلاح قسم الشركاء */
    .section#partners {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 3rem 0 2rem !important;
    }
    
    .About__container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 1rem !important;
    }
    
    .swiper-wrapper {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .About__card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 280px !important;
    }
    
    /* إصلاح قسم الأخبار والإعلام */
    .media-news.section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 3rem 0 2rem !important;
    }
    
    .news-slider {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 1rem !important;
    }
    
    .news-slide {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* إصلاحات للشاشات الصغيرة جداً */
@media screen and (max-width: 768px) {
    
    /* تحسين قسم المشاريع */
    .projects.section {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .projects__container {
        gap: 1.5rem !important;
        padding: 0 0.75rem !important;
    }
    
    .project-card {
        padding: 1.5rem !important;
        border-radius: 1rem !important;
    }
    
    .project-card__image {
        height: 200px !important;
        border-radius: 0.75rem !important;
    }
    
    .project-card__title {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .project-card__description {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    .project-card__button {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* تحسين قسم المؤسس */
    .value.section {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .value__container {
        gap: 1.5rem !important;
        padding: 0 0.75rem !important;
    }
    
    .value__images {
        order: 1 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .value__content {
        order: 2 !important;
        text-align: center !important;
    }
    
    .value__img {
        width: 200px !important;
        height: 240px !important;
        margin: 0 auto !important;
    }
    
    .value__orbe {
        width: 216px !important;
        height: 256px !important;
        margin: 0 auto !important;
    }
    
    .value__img-caption {
        font-size: 0.875rem !important;
        margin-top: 0.5rem !important;
    }
    
    .value__data .section__title {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .value__description {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .value__accordion-item {
        margin-bottom: 1rem !important;
    }
    
    .value__accordion-title {
        font-size: 1rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.875rem !important;
        padding: 1rem 1.5rem 0 1.5rem !important;
    }
    
    /* تحسين قسم الشركاء */
    .section#partners {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .About__container {
        padding: 0 0.75rem !important;
    }
    
    .About__card {
        min-width: 250px !important;
        padding: 1.5rem !important;
    }
    
    .About__img {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 1rem !important;
    }
    
    .About__title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .About__description {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* تحسين قسم الأخبار والإعلام */
    .media-news.section {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .news-slider {
        padding: 0 0.75rem !important;
    }
    
    .news-slide__title {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .news-slide__description {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
    }
    
    .news-slide__meta {
        font-size: 0.813rem !important;
        margin-bottom: 1rem !important;
    }
}

/* إصلاحات للشاشات الصغيرة جداً جداً */
@media screen and (max-width: 480px) {
    
    /* تحسين قسم المشاريع */
    .projects.section {
        padding: 2rem 0 1rem !important;
    }
    
    .projects__container {
        gap: 1.25rem !important;
        padding: 0 0.5rem !important;
    }
    
    .project-card {
        padding: 1.25rem !important;
    }
    
    .project-card__image {
        height: 180px !important;
    }
    
    .project-card__title {
        font-size: 1.125rem !important;
    }
    
    .project-card__description {
        font-size: 0.813rem !important;
    }
    
    .project-card__button {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.813rem !important;
    }
    
    /* تحسين قسم المؤسس */
    .value.section {
        padding: 2rem 0 1rem !important;
    }
    
    .value__container {
        gap: 1.25rem !important;
        padding: 0 0.5rem !important;
    }
    
    .value__img {
        width: 180px !important;
        height: 220px !important;
    }
    
    .value__orbe {
        width: 196px !important;
        height: 236px !important;
    }
    
    .value__img-caption {
        font-size: 0.813rem !important;
    }
    
    .value__data .section__title {
        font-size: 1.5rem !important;
    }
    
    .value__description {
        font-size: 0.813rem !important;
    }
    
    .value__accordion-title {
        font-size: 0.938rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.813rem !important;
        padding: 0.875rem 1.25rem 0 1.25rem !important;
    }
    
    /* تحسين قسم الشركاء */
    .section#partners {
        padding: 2rem 0 1rem !important;
    }
    
    .About__container {
        padding: 0 0.5rem !important;
    }
    
    .About__card {
        min-width: 220px !important;
        padding: 1.25rem !important;
    }
    
    .About__img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .About__title {
        font-size: 0.938rem !important;
    }
    
    .About__description {
        font-size: 0.813rem !important;
    }
    
    /* تحسين قسم الأخبار والإعلام */
    .media-news.section {
        padding: 2rem 0 1rem !important;
    }
    
    .news-slider {
        padding: 0 0.5rem !important;
    }
    
    .news-slide__title {
        font-size: 1.125rem !important;
    }
    
    .news-slide__description {
        font-size: 0.813rem !important;
    }
    
    .news-slide__meta {
        font-size: 0.75rem !important;
    }
}

/* إصلاحات للشاشات الصغيرة جداً جداً جداً */
@media screen and (max-width: 360px) {
    
    /* تحسين قسم المشاريع */
    .projects.section {
        padding: 1.5rem 0 0.75rem !important;
    }
    
    .projects__container {
        gap: 1rem !important;
        padding: 0 0.25rem !important;
    }
    
    .project-card {
        padding: 1rem !important;
    }
    
    .project-card__image {
        height: 160px !important;
    }
    
    .project-card__title {
        font-size: 1rem !important;
    }
    
    .project-card__description {
        font-size: 0.75rem !important;
    }
    
    .project-card__button {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
    }
    
    /* تحسين قسم المؤسس */
    .value.section {
        padding: 1.5rem 0 0.75rem !important;
    }
    
    .value__container {
        gap: 1rem !important;
        padding: 0 0.25rem !important;
    }
    
    .value__img {
        width: 160px !important;
        height: 200px !important;
    }
    
    .value__orbe {
        width: 176px !important;
        height: 216px !important;
    }
    
    .value__img-caption {
        font-size: 0.75rem !important;
    }
    
    .value__data .section__title {
        font-size: 1.25rem !important;
    }
    
    .value__description {
        font-size: 0.75rem !important;
    }
    
    .value__accordion-title {
        font-size: 0.875rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.75rem !important;
        padding: 0.75rem 1rem 0 1rem !important;
    }
    
    /* تحسين قسم الشركاء */
    .section#partners {
        padding: 1.5rem 0 0.75rem !important;
    }
    
    .About__container {
        padding: 0 0.25rem !important;
    }
    
    .About__card {
        min-width: 200px !important;
        padding: 1rem !important;
    }
    
    .About__img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .About__title {
        font-size: 0.875rem !important;
    }
    
    .About__description {
        font-size: 0.75rem !important;
    }
    
    /* تحسين قسم الأخبار والإعلام */
    .media-news.section {
        padding: 1.5rem 0 0.75rem !important;
    }
    
    .news-slider {
        padding: 0 0.25rem !important;
    }
    
    .news-slide__title {
        font-size: 1rem !important;
    }
    
    .news-slide__description {
        font-size: 0.75rem !important;
    }
    
    .news-slide__meta {
        font-size: 0.688rem !important;
    }
}

/* إصلاحات عامة لضمان عرض جميع الأقسام */
@media screen and (max-width: 1023px) {
    
    /* إزالة أي إخفاء محتمل */
    .section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* ضمان عرض العناوين */
    .section__subtitle,
    .section__title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center !important;
    }
    
    /* إصلاح أي مشاكل في الـ z-index */
    .section {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* إصلاح أي مشاكل في الـ overflow */
    .section {
        overflow: visible !important;
    }
    
    /* إصلاح أي مشاكل في الـ height */
    .section {
        height: auto !important;
        min-height: auto !important;
    }
}

/* إصلاحات RTL للشاشات الصغيرة */
@media screen and (max-width: 1023px) {
    
    body.rtl .projects__container,
    body[dir="rtl"] .projects__container {
        text-align: right !important;
    }
    
    body.rtl .value__content,
    body[dir="rtl"] .value__content {
        text-align: right !important;
    }
    
    body.rtl .About__container,
    body[dir="rtl"] .About__container {
        direction: rtl !important;
    }
    
    body.rtl .news-slider,
    body[dir="rtl"] .news-slider {
        direction: rtl !important;
    }
}

/* تحسينات الأداء للشاشات الصغيرة */
@media screen and (max-width: 1023px) {
    
    .section {
        will-change: auto !important;
        transform: none !important;
    }
    
    .project-card,
    .About__card,
    .news-slide {
        will-change: auto !important;
        transform: none !important;
    }
    
    /* تحسين الخطوط للشاشات الصغيرة */
    .section {
        font-family: 'Cairo', 'Poppins', sans-serif !important;
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
}

/* إصلاح مشكلة التداخل مع الهيدر */
@media screen and (max-width: 1023px) {
    
    .section:first-of-type {
        margin-top: 0 !important;
        padding-top: 4rem !important;
    }
    
    .projects.section {
        margin-top: 0 !important;
    }
}

/* إصلاح مشكلة المسافات بين الأقسام */
@media screen and (max-width: 1023px) {
    
    .section + .section {
        margin-top: 0 !important;
    }
    
    .section {
        margin-bottom: 0 !important;
    }
}

/* تحسينات إضافية لقسم المؤسس (Founder) في الموبايل - التوسيط الكامل */
@media screen and (max-width: 1023px) {
    
    /* ضمان التوسيط الكامل لقسم المؤسس */
    .value.section {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .value__container {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .value__images {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto 1.5rem !important;
    }
    
    .value__img {
        display: block !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
    
    .value__content {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 95% !important;
        margin: 0 auto !important;
    }
    
    .value__data {
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .value__data .section__title {
        text-align: center !important;
        margin: 0 auto 1rem !important;
        width: 100% !important;
    }
    
    .value__description {
        text-align: center !important;
        margin: 0 auto 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .value__accordion {
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .value__accordion-item {
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .value__accordion-title {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 0.5rem !important;
    }
    
    .value__accordion-description {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
}

/* تحسينات خاصة للشاشات الصغيرة جداً */
@media screen and (max-width: 768px) {
    
    .value.section {
        padding: 1.5rem 0.5rem !important;
    }
    
    .value__container {
        padding: 0 0.5rem !important;
        gap: 1rem !important;
    }
    
    .value__content {
        padding: 1.25rem !important;
        margin: 0 auto !important;
        max-width: 95% !important;
    }
    
    .value__img {
        max-width: 200px !important;
        width: 200px !important;
        height: auto !important;
    }
    
    .value__data .section__title {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }
    
    .value__description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .value__accordion-item {
        padding: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .value__accordion-title {
        font-size: 1rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.85rem !important;
        padding: 0.75rem !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً جداً */
@media screen and (max-width: 480px) {
    
    .value.section {
        padding: 1.25rem 0.25rem !important;
    }
    
    .value__container {
        padding: 0 0.25rem !important;
        gap: 0.75rem !important;
    }
    
    .value__content {
        padding: 1rem !important;
        margin: 0 auto !important;
        max-width: 98% !important;
    }
    
    .value__img {
        max-width: 180px !important;
        width: 180px !important;
    }
    
    .value__data .section__title {
        font-size: 1.4rem !important;
        padding: 0 0.5rem !important;
    }
    
    .value__description {
        font-size: 0.85rem !important;
        padding: 0 0.5rem !important;
    }
    
    .value__accordion-item {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .value__accordion-title {
        font-size: 0.95rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً جداً جداً */
@media screen and (max-width: 360px) {
    
    .value.section {
        padding: 1rem 0.2rem !important;
    }
    
    .value__container {
        padding: 0 0.2rem !important;
        gap: 0.5rem !important;
    }
    
    .value__content {
        padding: 0.8rem !important;
        margin: 0 auto !important;
        max-width: 98% !important;
    }
    
    .value__img {
        max-width: 160px !important;
        width: 160px !important;
    }
    
    .value__data .section__title {
        font-size: 1.2rem !important;
        padding: 0 0.25rem !important;
    }
    
    .value__description {
        font-size: 0.8rem !important;
        padding: 0 0.25rem !important;
    }
    
    .value__accordion-item {
        padding: 0.6rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .value__accordion-title {
        font-size: 0.9rem !important;
    }
    
    .value__accordion-description {
        font-size: 0.75rem !important;
        padding: 0.4rem !important;
    }
}

/* تحسينات RTL خاصة لقسم المؤسس */
@media screen and (max-width: 1023px) {
    
    body.rtl .value.section,
    body[dir="rtl"] .value.section {
        text-align: center !important;
    }
    
    body.rtl .value__container,
    body[dir="rtl"] .value__container {
        text-align: center !important;
        direction: ltr !important; /* للحفاظ على ترتيب العناصر */
    }
    
    body.rtl .value__content,
    body[dir="rtl"] .value__content {
        text-align: center !important;
        direction: rtl !important; /* للنصوص العربية */
    }
    
    body.rtl .value__data,
    body[dir="rtl"] .value__data {
        text-align: center !important;
    }
    
    body.rtl .value__data .section__title,
    body[dir="rtl"] .value__data .section__title {
        text-align: center !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
    }
    
    body.rtl .value__description,
    body[dir="rtl"] .value__description {
        text-align: center !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
    }
    
    body.rtl .value__accordion-title,
    body[dir="rtl"] .value__accordion-title {
        text-align: center !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
    }
    
    body.rtl .value__accordion-description,
    body[dir="rtl"] .value__accordion-description {
        text-align: center !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
    }
}