/* تنسيقات خاصة للموبايل */

/* تعديل حجم العناوين الرئيسية للأقسام لتكون مناسبة لمختلف الشاشات */
@media (max-width: 1200px) {
    .section-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.95rem;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.2rem;
    }

    .section-header {
        margin-bottom: 30px;
    }
}

/* إخفاء الصورة افتراضيًا في جميع الشاشات */
.mobile-hero-image {
    display: none;
    width: 100%;
    height: auto;
    margin: 15px auto 20px;
    max-width: 100%;
    /* إزالة الحدود والظلال */
    border: none;
    box-shadow: none;
}

/* إظهار الصورة في الشاشات الصغيرة فقط */
@media (max-width: 768px) {

    /* تعديل مساحة التباعد في قسم الهيرو للشاشات الصغيرة */
    .hero .container {
        padding-left: 0;
        padding-right: 0;
        overflow-x: visible;
    }

    /* تنسيق العنوان والعنوان الفرعي */
    .hero-content .title,
    .hero-content .subtitle {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* تصغير حجم العنوان الفرعي في الهواتف ليظهر في سطر واحد */
    .hero-content .subtitle {
        font-size: 0.95rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* تنسيق العنوان الجديد الشريف */
    .hero-content .centered-title {
        font-size: 2rem;
        padding: 0 16px;
        margin-bottom: 10px;
    }

    /* تعديلات الصورة لتأخذ عرض الشاشة بالكامل */
    .mobile-hero-image {
        display: block;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-width: 100vw;
        border-radius: 0;
        position: relative;
        margin-top: 20px;
        margin-bottom: 20px;
        background-color: #121212;
        /* لون خلفية مطابق للموقع */
        border: none;
        outline: none;
        box-shadow: none;
        display: block;
        padding: 0;
        object-fit: cover;
        object-position: center;
    }

    /* تعديل الحاوية لمنع الحدود والهوامش غير المرغوبة */
    .hero {
        background-color: #121212;
    }

    /* إضافة مساحة للمحتوى بعد الصورة */
    .hero-content p {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* تنسيق أزرار الدعوة للعمل */
    .cta-buttons {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* تقليل حجم الأزرار للهواتف الصغيرة */
    .btn {
        font-size: 0.55rem;
        padding: 2px 6px;
        line-height: 1.2;
        min-height: auto;
        height: auto;
        transform: scale(0.95);
    }

    /* تغيير نص زر اكتشف خدماتنا إلى شاهد الفيديو */
    .mobile-text {
        display: inline;
    }

    .desktop-text {
        display: none;
    }

    /* أنماط النافذة المنبثقة للفيديو */
    .video-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        transform-style: preserve-3d;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .video-modal.active {
        display: block;
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        will-change: backdrop-filter;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .modal-content {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: transparent;
        overflow: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }

    /* تحسين شكل أيقونات البطاقات في الشاشات الصغيرة */
    @media (max-width: 767px) {
        .service-icon {
            width: 60px;
            height: 60px;
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            transform: rotate(0deg) !important;
            box-shadow: 0 5px 15px rgba(58, 88, 254, 0.2);
        }

        .service-icon i {
            font-size: 24px;
            color: white;
        }

        .service-content {
            padding-top: 30px;
            transform: translateY(-25px);
        }
    }

    .modal-close {
        position: absolute;
        top: 20px;
        right: 20px;
        color: white;
        cursor: pointer;
        z-index: 10;
        background-color: rgba(0, 0, 0, 0.5);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .modal-close:hover {
        background-color: rgba(0, 0, 0, 0.8);
        transform: scale(1.1);
    }

    .modal-video-container {
        width: 80%;
        /* من الملف القديم */
        position: relative;
        border-radius: 15px;
        /* من الملف القديم */
        overflow: hidden;
        box-shadow: none;
        margin: 0 auto;
        /* توسيط أفقي */
        background-color: transparent;
        max-width: 280px;
        /* من الملف القديم */
    }

    .modal-video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        background-color: #000;
    }

    .modal-video-container video {
        width: 100%;
        height: auto;
        border-radius: 15px;
        /* من الملف القديم */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        /* من الملف القديم */
        display: block;
        background-color: transparent;
    }

    /* إزالة أي تنسيقات افتراضية للفيديو */
    .modal-video-container video:focus {
        outline: none;
    }

    /* إخفاء جميع عناصر التحكم الافتراضية في الفيديو */
    .modal-video-container video::-webkit-media-controls {
        display: none !important;
    }

    /* زر تشغيل الفيديو في المنتصف */
    .video-play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 60px;
        height: 60px;
        background-color: rgba(58, 88, 254, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .video-play-button i {
        color: white;
        font-size: 22px;
        margin-left: 4px;
        /* لمركزة الأيقونة بشكل صحيح */
    }

    .video-play-button:hover {
        transform: translate(-50%, -50%) scale(1.1);
        background-color: rgba(58, 88, 254, 1);
    }

    /* إخفاء زر التشغيل عند تشغيل الفيديو */
    .video-play-button.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .contact-btn {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        width: 160px;
        /* تحديد عرض ثابت للزر */
        padding: 10px 20px;
        background: var(--gradient-primary);
        color: #fff;
        border-radius: 50px;
        font-size: 16px;
        text-align: center;
        box-shadow: none;
    }

    /* إزالة تأثير الإضاءة المتحركة */
    .contact-btn::before {
        display: none;
    }

    .contact-btn:hover {
        transform: translateY(-2px) translateX(-50%);
        box-shadow: none;
    }
}

/* تنسيقات نقاط التنقل للتعليقات */
/* إخفاء النقاط الإضافية للهواتف على الشاشات الكبيرة */
@media (min-width: 769px) {
    .mobile-dot-extra {
        display: none !important;
    }
}

/* عرض نقاط التعليقات الإضافية فقط على الشاشات الصغيرة */
@media (max-width: 768px) {

    /* للتأكد من ظهور جميع النقاط بشكل مناسب */
    .slider-dots {
        margin-top: 20px;
    }
}

/* تنسيقات النافذة المنبثقة للشاشات الأكبر (لا تظهر) */
@media (min-width: 769px) {
    .video-modal {
        display: none !important;
    }
}

/* كود التحكم في نوع وحجم خط نص "القراصنة" على شاشات الهاتف فقط */
@media (max-width: 768px) {
    .qrsna-mobile-font-control {
        /*
        * يمكنك تعديل نوع الخط وحجمه من هنا
        *
        * أمثلة على الخطوط المتاحة في المشروع:
        * 'Noto Sans Arabic', sans-serif
        * 'Tajawal', sans-serif
        * 'Rubik', sans-serif
        * 'sky'
        * 'sky-bold'
        */
        font-family: 'Tajawal', sans-serif !important;
        /* نوع الخط: تم اختيار Tajawal كمثال */
        font-size: 1.5rem !important;
        /* حجم الخط: تم اختيار 2.5rem كمثال */
        font-weight: 700 !important;
        /* وزن الخط: يمكنك تعديله حسب نوع الخط */
    }

    /* إخفاء بطاقتي البرو والبلس على شاشات الهاتف */
    .pricing-cards .price-card:nth-child(1),
    .pricing-cards .price-card:nth-child(3) {
        display: none !important;
    }

    /* جعل البطاقة الأساسية (الوسطى) تأخذ العرض الكامل */
    .pricing-cards .price-card:nth-child(2) {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* تعديل شبكة البطاقات لتكون عمود واحد */
    .pricing-cards {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}
/*           */
@media (max-width: 360px) {
    /*          */
    .price-card .card-features ul li {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: none;
        -webkit-hyphens: none;
        -moz-hyphens: none;
        line-height: 1.6 !important;
        padding: 8px 0 !important;
    }
    
    /*    */
    .price-card .card-features ul {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
    
    /*        */
    .price-card .card-features ul li i {
        font-size: 12px !important;
        margin-left: 8px !important;
        flex-shrink: 0;
    }
}

/*          */
@media (max-width: 768px) {
    #testimonials {
        padding-top: 40px !important;
    }
}

