/* افتراض استخدام خط Cairo */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;800&display=swap');

/* الألوان: الأحمر: var(--primaryColor)، الخط: #333333، الخلفية: var(--white) */

.pest-features-section {
    position: relative;
    background-color: var(--white);
    padding: 100px 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    overflow: hidden;
}

.pest-features-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* تصميم GRID للعمودين: صورة (1fr) ومحتوى (1.1fr) */
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
    /* لمحاذاة العمودين في الوسط */
}

/* ----------------------------------
   تنسيق الصورة (8)
   ---------------------------------- */
.image-column img {
    width: 100%;
    /* طول وعرض مناسب للصورة */
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    /* حواف الصورة */
    display: block;
}

/* ----------------------------------
   تنسيق المحتوى الرئيسي
   ---------------------------------- */
.tag {
    background-color: var(--primaryColor);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 25px;
}

.pest-features-section h1 {
    color: #333333;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
}

.main-description {
    color: #555555;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 40px;
    /* المسافة بين الفقرة و سكاشن المميزات */
}

/* ----------------------------------
   تنسيق شبكة المميزات (Cards Grid) (6, 7)
   ---------------------------------- */
.features-grid {
    display: grid;
    /* تصميم شبكة لـ 4 بطاقات: بطاقتان في كل عمود و صف */
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
    /* مسافة عمودية (30px) ومسافة أفقية (20px) */
}

.feature-wrapper {
    /* كل سكشن ميزة هو Flexbox لترتيب الأيقونة والشرح */
    display: flex;
    align-items: flex-start;
    /* محاذاة العناصر من الأعلى */
    gap: 15px;
    /* المسافة بين سكشن الأيقونة وسكشن الشرح (6) */
}

/* ----------------------------------
   تنسيق الأيقونة (5)
   ---------------------------------- */
.icon-card {
    background-color: var(--primaryColor);
    color: var(--white);
    /* تحديد العرض والطول ليكون مربعًا تمامًا */
    width: 55px;
    height: 55px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    /* الأيقونة في المنتصف الأفقي */
    align-items: center;
    /* الأيقونة في المنتصف العمودي */
    flex-shrink: 0;
    /* لمنع تقليص المربع في الشاشات الصغيرة */
    box-shadow: 0 4px 10px var(--primaryColor);
    /* ظل خفيف */
}

.icon-card i {
    font-size: 20px;
    /* حجم الأيقونة */
}

/* ----------------------------------
   تنسيق النص والشرح
   ---------------------------------- */
.text-card {
    text-align: right;
}

.feature-title {
    color: #333333;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.text-card p {
    color: #777777;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ----------------------------------
   نقاط الزخرفة (من التصميم السابق)
   ---------------------------------- */

.moving-dots-container {
    position: absolute;
    top: 50px;
    /* تم تعديل الموضع ليناسب الصورة الثانية */
    left: 0;
    transform: translateY(-50%);
    width: 120px;
    height: 100px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.dots-grid {
    background-image: radial-gradient(#475569 15%, transparent 16%);
    background-size: 20px 20px;
    width: 150%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.5s ease-out;
}

.vertical-dots {
    position: absolute;
    left: 5%;
    top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 15px);
    grid-template-rows: repeat(8, 15px);
    gap: 5px;
    /* المسافة بين النقاط */
}

.vertical-dots span {
    width: 6px;
    height: 6px;
    background: var(--primaryColor);
    border-radius: 50%;
    display: inline-block;
}

/* ----------------------------------
   التصميم المتجاوب (Responsive) (4)
   ---------------------------------- */

/* شاشات التابلت وأحجام اللابتوب الصغيرة (حتى 992px) */
@media (max-width: 992px) {
    .pest-features-section {
        padding: 60px 0;
    }

    .pest-features-section .container {
        /* تحويل التخطيط إلى عمود واحد: الصورة في الأسفل (كما في الصورة الثانية/الثالثة) */
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .image-column {
        order: 2;
        /* وضع الصورة بعد المحتوى النصي */
        padding: 0 20px;
        /* مسافة حول الصورة */
    }

    .content-column {
        order: 1;
        /* وضع المحتوى النصي في الأعلى */
        padding: 0 20px;
    }

    .pest-features-section h1 {
        font-size: 32px;
    }

    .main-description {
        margin-bottom: 30px;
    }

    /* تعديل شبكة المميزات: 2 عمود ولكن بمحاذاة للوسط */
    .features-grid {
        max-width: 600px;
        margin: 0 auto;
        gap: 25px 15px;
    }

    .moving-dots-container {
        /* إخفاء أو تصغير النقاط قليلاً */
        display: none;
    }
}

/* شاشات الموبايل (Mobile - حتى 576px) */
@media (max-width: 576px) {
    .pest-features-section {
        padding: 40px 0;
    }

    .image-column,
    .content-column {
        padding: 0 15px;
    }

    .pest-features-section h1 {
        font-size: 26px;
    }

    .main-description {
        font-size: 15px;
    }

    /* تحويل شبكة البطاقات إلى عمود واحد (بطاقة تلو الأخرى) */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-wrapper {
        gap: 10px;
    }

    .icon-card {
        width: 50px;
        height: 50px;
    }

    .icon-card i {
        font-size: 18px;
    }

    .feature-title {
        font-size: 16px;
    }

    .text-card p {
        font-size: 13px;
    }
}