/* إعدادات المتغيرات العامة للشركة */
:root {
  --primary-color: #00045F;
  /* اللون الأخضر الداكن المستوحى من هوية الموقع */
  --text-dark: #0120039555522;
  --text-muted: #666666;
  --border-light: #eaeaea;
  --overlay-bg: rgba(0, 0, 0, 0.45);
  /* طبقة تعتيم متوازنة لظهور النص الأبيض بوضوح */
  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* الحاوية الأساسية ودعم الاتجاه من اليمين لليسار */
.pest-control-wrapper {
  direction: rtl;
  font-family: var(--font-main);
  background-color: #ffffff;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
  /* مسافة عمودية مريحة وموحدة بين السكاشن */
}

.pest-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  /* مسافة موحدة بين التكست والصور في وضع الموبايل */
}

/* تفتيت تفاصيل النصوص والخطوط بناءً على توجيهاتك */
.pest-main-title {
  font-size: 2rem;
  /* حجم كبير للموبايل */
  font-weight: 600;
  /* سماكة نحيفة وخفيفة جداً كما في الصورة الأساسية */
  color: var(--primary-color);
  line-height: 1.3;
  margin: 0;
}

.pest-description {
  font-size: 0.95rem;
  font-weight: 300;
  /* خط نحيف وواضح ومميز عن العنوان */
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.pest-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* توزيع داخلي مرن بديل للمارجن */
}

/* قائمة الـ Subtitles المميزة */
.pest-subtitles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pest-subtitle-item {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-light);
  /* الخط الفاصل بين العناصر */
}

/* شبكة الصور للسيكشن الأول (الموبايل: عمود واحد) */
.pest-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid-item {
  background-size: cover;
  background-position: center;
  height: 320px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

/* طبقة الفلتر والنصوص داخل الصور */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.grid-overlay span {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 500;
  /* درجة وضوح وسماكة ممتازة ومتناسقة */
  line-height: 1.5;
}

/* صورة السيكشن الثاني (الموبايل) */
.pest-single-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}


/* ==========================================================================
     شاشات الديسك توب والأجهزة الكبيرة (Media Queries)
     ========================================================================== */
@media (min-width: 992px) {

  /* تكييف السيكشن الأول ليصبح جنبًا إلى جنب */
  .pest-need-section .pest-container {
    flex-direction: row;
    align-items: flex-start;
    gap: 50px;
  }

  .pest-need-section .pest-content {
    flex: 1.1;
    /* يعطي مساحة أكبر قليلاً للنصوص المكتوبة */
  }

  .pest-need-section .pest-image-grid {
    flex: 0.9;
    grid-template-columns: repeat(2, 1fr);
    /* شبكة متوازنة 2×2 للديسك توب */
    gap: 10px;
  }

  .grid-item {
    height: 300px;
    /* الطول المتناسق للصور داخل المربع */
  }

  /* تكييف السيكشن الثاني ليصبح متطابقًا تمامًا مع صورة الديسك توب */
  .pest-best-section .pest-container {
    flex-direction: row;
    align-items: center;
    gap: 50px;
  }

  .pest-best-section .pest-single-image {
    flex: 1;
    order: 1;
    /* يضمن بقاء الصورة على اليسار في التصميم العربي */
  }

  .pest-best-section .pest-content {
    flex: 1;
    order: 2;
    /* يضمن بقاء النص على اليمين */
  }

  /* تكبير حجم العناوين للديسك توب مع الحفاظ على الوزن النحيف */
  .pest-main-title {
    font-size: 2.4rem;
  }

  .pest-description {
    font-size: 1.05rem;
  }
}