/* ── LESSON PACK: MORE ESSENTIALS A1–B1 ──
   Loads after learn-lessons-essentials.jsx — pushes into window.LESSONS_DATA.
   Uses existing groups: basics, prepositions, tenses. */

window.LESSONS_DATA.push(

  /* ─── SUBJECT–VERB AGREEMENT ─── */
  {
    id:'subject-verb-agreement', level:'A1', icon:'🤝', group:'basics',
    title:{ en:'Subject–Verb Agreement', ar:'مطابقة الفعل للفاعل', tr:'Özne–Yüklem Uyumu' },
    summary:{
      en:'The subject and the verb must match. Get the little -s right, and your English sounds correct.',
      ar:'يجب أن يتطابق الفاعل مع الفعل. أتقن الـ -s الصغيرة، وستبدو إنجليزيتك صحيحة.',
      tr:'Özne ve fiil uyumlu olmalı. Küçük -s\'yi doğru kullan, İngilizcen doğru gelsin.',
    },
    sections:[
      { type:'concept', title:{ en:'The core rule', ar:'القاعدة الأساسية' }, body:{
        en:'In the present simple, **he / she / it** (one person or thing) takes a verb + **-s**.\n*I work · you work · we work · they work* — but *he work**s** · she run**s** · it need**s**.\nWith **to be**: *I am · he/she/it is · you/we/they are.*\nWith **have**: *I/you/we/they have · he/she/it has.*',
        ar:'في المضارع البسيط، **he / she / it** (شخص أو شيء واحد) يأخذ الفعل + **-s**.\n*I work · you work · we work · they work* — لكن *he work**s***.\nمع **to be**: *I am · he/she/it is · you/we/they are.*\nمع **have**: *he/she/it has.*',
      }},
      { type:'table', title:{ en:'Add -s, -es, or -ies?', ar:'نضيف -s أم -es أم -ies؟' }, headers:['Subject','Rule','Example'], rows:[
        ['he / she / it','+ s','works, runs, plays'],
        ['verbs ending -sh, -ch, -ss, -x, -o','+ es','watches, fixes, goes, does'],
        ['consonant + y','y → ies','study → studies, try → tries'],
        ['I / you / we / they','no change','work, run, study'],
      ]},
      { type:'examples', title:{ en:'In real sentences', ar:'في جمل حقيقية' }, items:[
        { en:'The machine needs oil every week.',              ar:'تحتاج الآلة إلى الزيت كل أسبوع.',         ctx:'it → needs' },
        { en:'My manager checks the reports on Monday.',        ar:'يراجع مديري التقارير يوم الاثنين.',       ctx:'he → checks' },
        { en:'The engineers test every unit.',                 ar:'يختبر المهندسون كل وحدة.',                ctx:'they → test (no s)' },
        { en:'She studies electronics at university.',          ar:'تدرس الإلكترونيات في الجامعة.',           ctx:'study → studies' },
        { en:'This system has two backup batteries.',           ar:'يحتوي هذا النظام على بطاريتين احتياطيتين.', ctx:'it → has' },
      ]},
      { type:'note', title:{ en:'Pitfall', ar:'تحذير' }, body:{
        en:'The most common mistake: forgetting -s with he/she/it. ❌ *She work here* → ✅ *She works here.* And never add -s to I/you/we/they: ❌ *They works* → ✅ *They work.*',
        ar:'الخطأ الأكثر شيوعاً: نسيان -s مع he/she/it. ❌ *She work here* → ✅ *She works here.* ولا تضف -s إلى I/you/we/they.',
      }},
    ],
    practice:[
      { type:'mcq', q:'She ___ in a big company.', options:['work','works','working','work s'], a:1,
        explainEn:'she → work + s.', explainAr:'she → work + s.' },
      { type:'mcq', q:'The two engineers ___ the results together.', options:['checks','check','checking','is checking'], a:1,
        explainEn:'they (plural) → no -s.', explainAr:'جمع → بدون -s.' },
      { type:'mcq', q:'He ___ his email every hour.', options:['watch','watchs','watches','watching'], a:2,
        explainEn:'watch ends in -ch → add -es.', explainAr:'watch تنتهي بـ -ch → نضيف -es.' },
      { type:'mcq', q:'This report ___ three mistakes.', options:['have','has','haves','having'], a:1,
        explainEn:'it → has.', explainAr:'it → has.' },
      { type:'fill', q:'She ___ (study) mechanical engineering.', a:'studies',
        explainEn:'consonant + y → studies.', explainAr:'حرف ساكن + y → studies.' },
      { type:'fill', q:'The team ___ (need) more time. (one team = it)', a:'needs',
        explainEn:'"The team" acts as one → needs.', explainAr:'الفريق كوحدة → needs.' },
    ],
  },

  /* ─── SUBJECT & OBJECT PRONOUNS ─── */
  {
    id:'pronouns-subject-object', level:'A1', icon:'🧍', group:'basics',
    title:{ en:'Pronouns — I/me, he/him, they/them', ar:'الضمائر — I/me, he/him, they/them', tr:'Zamirler — I/me, he/him, they/them' },
    summary:{
      en:'Small words that replace names. Use the right one before and after the verb.',
      ar:'كلمات صغيرة تحل محل الأسماء. استخدم الضمير الصحيح قبل الفعل وبعده.',
      tr:'İsimlerin yerini tutan küçük kelimeler. Fiilden önce ve sonra doğrusunu kullan.',
    },
    sections:[
      { type:'concept', title:{ en:'Subject vs object', ar:'الفاعل مقابل المفعول' }, body:{
        en:'**Subject pronouns** do the action (before the verb): I, you, he, she, it, we, they.\n**Object pronouns** receive the action (after the verb or preposition): me, you, him, her, it, us, them.\n*She (subject) called me (object). We (subject) helped them (object).*',
        ar:'**ضمائر الفاعل** تقوم بالفعل (قبل الفعل): I, you, he, she, it, we, they.\n**ضمائر المفعول** تتلقى الفعل (بعد الفعل أو حرف الجر): me, you, him, her, it, us, them.\n*She called me. We helped them.*',
      }},
      { type:'table', title:{ en:'The full set', ar:'المجموعة الكاملة' }, headers:['Subject','Object','Possessive adj.'], rows:[
        ['I','me','my'],
        ['you','you','your'],
        ['he','him','his'],
        ['she','her','her'],
        ['it','it','its'],
        ['we','us','our'],
        ['they','them','their'],
      ]},
      { type:'examples', title:{ en:'In use', ar:'في الاستخدام' }, items:[
        { en:'He sent me the file.',                    ar:'أرسل لي الملف.',                 ctx:'He=subject, me=object' },
        { en:'Can you help us with the test?',          ar:'هل يمكنك مساعدتنا في الاختبار؟',  ctx:'us after verb' },
        { en:'I work with her every day.',              ar:'أعمل معها كل يوم.',              ctx:'her after preposition' },
        { en:'They gave him a new laptop.',             ar:'أعطوه حاسوباً جديداً.',           ctx:'They=subject, him=object' },
        { en:'We told them about the delay.',           ar:'أخبرناهم عن التأخير.',            ctx:'them after verb' },
      ]},
      { type:'note', title:{ en:'Pitfall', ar:'تحذير' }, body:{
        en:'After a preposition, always use the object pronoun. ❌ *between you and I* → ✅ *between you and me.* ❌ *He works with we* → ✅ *He works with us.*',
        ar:'بعد حرف الجر، استخدم دائماً ضمير المفعول. ❌ *between you and I* → ✅ *between you and me.*',
      }},
    ],
    practice:[
      { type:'mcq', q:'___ is my manager. (before the verb)', options:['Him','He','His','Her'], a:1,
        explainEn:'Subject position → He.', explainAr:'موضع الفاعل → He.' },
      { type:'mcq', q:'Please send the report to ___.', options:['I','me','my','mine'], a:1,
        explainEn:'After "to" → object pronoun me.', explainAr:'بعد "to" → me.' },
      { type:'mcq', q:'We saw ___ at the conference.', options:['they','them','their','theirs'], a:1,
        explainEn:'After the verb → them.', explainAr:'بعد الفعل → them.' },
      { type:'mcq', q:'This is a photo of ___ and the team.', options:['I','me','my','mine'], a:1,
        explainEn:'After "of" → me.', explainAr:'بعد "of" → me.' },
      { type:'fill', q:'She helped ___ with the code. (I → object)', a:'me',
        explainEn:'Object of "helped" → me.', explainAr:'مفعول "helped" → me.' },
      { type:'fill', q:'Give the tools to ___. (they → object)', a:'them',
        explainEn:'After "to" → them.', explainAr:'بعد "to" → them.' },
    ],
  },

  /* ─── POSSESSIVES ─── */
  {
    id:'possessives', level:'A1', icon:'🔑', group:'basics',
    title:{ en:'Possessives — my, mine, and \u2019s', ar:'الملكية — my, mine, و \u2019s', tr:'İyelik — my, mine ve \u2019s' },
    summary:{
      en:'How to say what belongs to whom: my car, the car is mine, Sara\u2019s car.',
      ar:'كيف تقول ما يخص من: سيارتي، السيارة لي، سيارة سارة.',
      tr:'Neyin kime ait olduğunu söylemek: arabam, araba benim, Sara\u2019nın arabası.',
    },
    sections:[
      { type:'concept', title:{ en:'Three ways', ar:'ثلاث طرق' }, body:{
        en:'**1) Possessive adjective + noun:** my, your, his, her, its, our, their. *This is my desk.*\n**2) Possessive pronoun (stands alone):** mine, yours, his, hers, ours, theirs. *This desk is mine.*\n**3) Apostrophe -\u2019s for people:** *Sara\u2019s laptop, the engineer\u2019s report, the workers\u2019 tools* (plural: just add \u2019 after the s).',
        ar:'**١) صفة ملكية + اسم:** my, your, his, her... *This is my desk.*\n**٢) ضمير ملكية (مستقل):** mine, yours, his, hers... *This desk is mine.*\n**٣) الفاصلة -\u2019s للأشخاص:** *Sara\u2019s laptop* (الجمع: نضيف \u2019 فقط بعد الـ s).',
      }},
      { type:'table', title:{ en:'Adjective vs pronoun', ar:'الصفة مقابل الضمير' }, headers:['Adjective (+noun)','Pronoun (alone)'], rows:[
        ['my report','mine'],
        ['your desk','yours'],
        ['his idea','his'],
        ['her office','hers'],
        ['our project','ours'],
        ['their results','theirs'],
      ]},
      { type:'examples', title:{ en:'Examples', ar:'أمثلة' }, items:[
        { en:'That is the CEO\u2019s parking space.',        ar:'ذلك موقف سيارة المدير التنفيذي.',   ctx:'\u2019s = belongs to one person' },
        { en:'The students\u2019 projects are on display.',  ar:'مشاريع الطلاب معروضة.',             ctx:'plural: students\u2019' },
        { en:'Is this pen yours or mine?',                ar:'هل هذا القلم لك أم لي؟',           ctx:'pronouns stand alone' },
        { en:'Their office is bigger than ours.',         ar:'مكتبهم أكبر من مكتبنا.',            ctx:'adjective vs pronoun' },
      ]},
      { type:'note', title:{ en:'Pitfall', ar:'تحذير' }, body:{
        en:'**its** (belonging to it) has NO apostrophe. **it\u2019s** = "it is". ❌ *The robot lost it\u2019s arm* → ✅ *its arm.* Also: possessive pronouns never take an apostrophe — ❌ *your\u2019s* → ✅ *yours.*',
        ar:'**its** (ملك لـ it) بلا فاصلة عليا. **it\u2019s** تعني "it is". ❌ *it\u2019s arm* → ✅ *its arm.* وضمائر الملكية لا تأخذ فاصلة: ✅ *yours.*',
      }},
    ],
    practice:[
      { type:'mcq', q:'This is ___ desk. (belongs to me, + noun)', options:['mine','my','me','I'], a:1,
        explainEn:'Before a noun → my.', explainAr:'قبل الاسم → my.' },
      { type:'mcq', q:'That laptop is ___. (stands alone)', options:['her','hers','her\u2019s','she'], a:1,
        explainEn:'Alone → hers (no apostrophe).', explainAr:'مستقل → hers.' },
      { type:'mcq', q:'The robot moved ___ arm.', options:['it\u2019s','its','its\u2019','it'], a:1,
        explainEn:'Belonging to it → its (no apostrophe).', explainAr:'ملك لـ it → its.' },
      { type:'mcq', q:'These are the ___ tools. (many workers)', options:['worker\u2019s','workers\u2019','workers','workers\u2019s'], a:1,
        explainEn:'Plural possessive → workers\u2019.', explainAr:'ملكية الجمع → workers\u2019.' },
      { type:'fill', q:'Is this bag ___ or mine? (you)', a:'yours',
        explainEn:'Pronoun, stands alone → yours.', explainAr:'ضمير مستقل → yours.' },
      { type:'fill', q:'That is ___ report. (Sara — use \u2019s)', a:'Sara\u2019s',
        explainEn:'One person → Sara\u2019s.', explainAr:'شخص واحد → Sara\u2019s.' },
    ],
  },

  /* ─── COUNTABLE & UNCOUNTABLE ─── */
  {
    id:'countable-uncountable', level:'A2', icon:'🧮', group:'basics',
    title:{ en:'Countable & Uncountable Nouns', ar:'الأسماء المعدودة وغير المعدودة', tr:'Sayılabilen ve Sayılamayan İsimler' },
    summary:{
      en:'Can you count it? The answer changes which words you can use: much/many, a/some, and more.',
      ar:'هل يمكنك عدّه؟ الإجابة تغيّر الكلمات التي تستخدمها: much/many, a/some وغيرها.',
      tr:'Sayabilir misin? Cevap, kullanabileceğin kelimeleri değiştirir: much/many, a/some ve daha fazlası.',
    },
    sections:[
      { type:'concept', title:{ en:'The big idea', ar:'الفكرة الأساسية' }, body:{
        en:'**Countable** nouns have singular and plural: *one file, two files.* You can use a/an and a number.\n**Uncountable** nouns have no plural: *water, information, advice, equipment, software.* No a/an, no plural -s.\nWe measure uncountables with units: *a piece of information, a bottle of water, a bit of advice.*',
        ar:'**المعدودة** لها مفرد وجمع: *one file, two files.* يمكن استخدام a/an ورقم.\n**غير المعدودة** بلا جمع: *water, information, advice, equipment.* بلا a/an وبلا -s.\nنقيسها بوحدات: *a piece of information, a bottle of water.*',
      }},
      { type:'table', title:{ en:'Which word to use', ar:'أي كلمة تستخدم' }, headers:['','Countable','Uncountable'], rows:[
        ['How much/many?','many files','much water'],
        ['A little / a few','a few files','a little water'],
        ['Some','some files','some water'],
        ['A / an','a file','— (no a/an)'],
        ['Plural','files','— (no plural)'],
      ]},
      { type:'examples', title:{ en:'Common uncountables in tech', ar:'أسماء غير معدودة شائعة في التقنية' }, items:[
        { en:'We need more information before we decide.',   ar:'نحتاج مزيداً من المعلومات قبل أن نقرر.', ctx:'❌ informations' },
        { en:'The lab has expensive equipment.',             ar:'يملك المختبر معدات باهظة.',             ctx:'❌ equipments' },
        { en:'She gave me good advice.',                     ar:'أعطتني نصيحة جيدة.',                    ctx:'❌ an advice' },
        { en:'How much software do you install?',            ar:'كم برنامجاً تثبّت؟',                    ctx:'software = uncountable' },
        { en:'We bought three new machines.',                ar:'اشترينا ثلاث آلات جديدة.',              ctx:'machine = countable' },
      ]},
      { type:'note', title:{ en:'Watch these words', ar:'انتبه لهذه الكلمات' }, body:{
        en:'These are uncountable in English (no plural, no a/an): **information, advice, equipment, software, furniture, news, research, work, money, luggage.** ❌ *an equipment / informations / advices* → ✅ *a piece of equipment / some information / a piece of advice.*',
        ar:'هذه غير معدودة في الإنجليزية: **information, advice, equipment, software, furniture, news, money.** ❌ *informations* → ✅ *some information.*',
      }},
    ],
    practice:[
      { type:'mcq', q:'How ___ information do you have?', options:['many','much','a few','number of'], a:1,
        explainEn:'Information is uncountable → much.', explainAr:'information غير معدودة → much.' },
      { type:'mcq', q:'We bought some new ___.', options:['equipments','equipment','a equipment','equipment s'], a:1,
        explainEn:'Equipment has no plural.', explainAr:'equipment بلا جمع.' },
      { type:'mcq', q:'There are ___ files in the folder.', options:['much','a little','many','a great deal of'], a:2,
        explainEn:'Files are countable → many.', explainAr:'files معدودة → many.' },
      { type:'mcq', q:'Let me give you ___ advice.', options:['an','a','some','a few'], a:2,
        explainEn:'Advice is uncountable → some (not "an").', explainAr:'advice غير معدودة → some.' },
      { type:'fill', q:'I need a ___ of information. (unit word)', a:'piece',
        explainEn:'a piece of information.', explainAr:'a piece of information.' },
      { type:'fill', q:'We have only a ___ time before the deadline. (little/few)', a:'little',
        explainEn:'Time (here uncountable) → a little.', explainAr:'time غير معدودة هنا → a little.' },
    ],
  },

  /* ─── THIS/THAT/THESE/THOSE ─── */
  {
    id:'demonstratives', level:'A1', icon:'👉', group:'basics',
    title:{ en:'this, that, these, those', ar:'this, that, these, those', tr:'this, that, these, those' },
    summary:{
      en:'Point with words: near or far, one or many.',
      ar:'أشِر بالكلمات: قريب أم بعيد، واحد أم كثير.',
      tr:'Kelimelerle işaret et: yakın mı uzak mı, tek mi çok mu.',
    },
    sections:[
      { type:'concept', title:{ en:'A simple grid', ar:'شبكة بسيطة' }, body:{
        en:'Two questions decide the word: **near or far?** and **one or many?**\n**this** = near + one · **these** = near + many\n**that** = far + one · **those** = far + many\n*This screwdriver (in my hand). Those cables (over there).*',
        ar:'سؤالان يحسمان الكلمة: **قريب أم بعيد؟** و **واحد أم كثير؟**\n**this** = قريب + واحد · **these** = قريب + كثير\n**that** = بعيد + واحد · **those** = بعيد + كثير.',
      }},
      { type:'table', title:{ en:'The grid', ar:'الشبكة' }, headers:['','One','Many'], rows:[
        ['Near','this','these'],
        ['Far','that','those'],
      ]},
      { type:'examples', title:{ en:'Examples', ar:'أمثلة' }, items:[
        { en:'This laptop (here) is faster than that one (there).', ar:'هذا الحاسوب أسرع من ذلك.',        ctx:'near vs far, one' },
        { en:'These parts are new; those parts are old.',           ar:'هذه القطع جديدة؛ تلك قديمة.',     ctx:'near vs far, many' },
        { en:'Can you pass me that manual, please?',                ar:'هل يمكنك مناولتي ذلك الدليل؟',   ctx:'far, one' },
        { en:'I will take these; you take those.',                  ar:'سآخذ هذه؛ خذ أنت تلك.',           ctx:'pronoun use' },
      ]},
      { type:'note', title:{ en:'Pitfall', ar:'تحذير' }, body:{
        en:'Match singular/plural with the noun. ❌ *this cables* → ✅ *these cables.* ❌ *those machine* → ✅ *that machine.* On the phone: "Hello, **this** is Amira" (not "that is").',
        ar:'طابق المفرد/الجمع مع الاسم. ❌ *this cables* → ✅ *these cables.* في الهاتف: "Hello, **this** is Amira".',
      }},
    ],
    practice:[
      { type:'mcq', q:'___ book here is very useful. (near, one)', options:['This','That','These','Those'], a:0,
        explainEn:'Near + one → this.', explainAr:'قريب + واحد → this.' },
      { type:'mcq', q:'___ people over there are our clients. (far, many)', options:['This','That','These','Those'], a:3,
        explainEn:'Far + many → those.', explainAr:'بعيد + كثير → those.' },
      { type:'mcq', q:'Are ___ your tools on the table here? (near, many)', options:['this','that','these','those'], a:2,
        explainEn:'Near + many → these.', explainAr:'قريب + كثير → these.' },
      { type:'mcq', q:'On the phone: "Hello, ___ is Kerem."', options:['this','that','these','it'], a:0,
        explainEn:'On the phone we say "this is".', explainAr:'في الهاتف نقول "this is".' },
      { type:'fill', q:'___ cables here are damaged. (near, plural)', a:'These',
        explainEn:'Near + plural → These.', explainAr:'قريب + جمع → These.' },
      { type:'fill', q:'Look at ___ building far away. (far, singular)', a:'that',
        explainEn:'Far + singular → that.', explainAr:'بعيد + مفرد → that.' },
    ],
  },

  /* ─── RELATIVE CLAUSES ─── */
  {
    id:'relative-clauses', level:'B1', icon:'🔗', group:'basics',
    title:{ en:'Relative Clauses — who, which, that', ar:'جمل الوصل — who, which, that', tr:'İlgi Cümlecikleri — who, which, that' },
    summary:{
      en:'Join two ideas into one smooth sentence — the mark of a B1 speaker.',
      ar:'اربط فكرتين في جملة واحدة سلسة — علامة متحدث المستوى B1.',
      tr:'İki fikri tek akıcı cümlede birleştir — B1 konuşmacısının işareti.',
    },
    sections:[
      { type:'concept', title:{ en:'How it works', ar:'كيف يعمل' }, body:{
        en:'A relative clause adds information about a noun using a relative pronoun:\n**who** = for people. *The engineer **who** designed it is here.*\n**which** = for things. *The tool **which** we bought is broken.*\n**that** = for people or things (informal). *The report **that** you sent.*\n**where** = for places · **whose** = for possession.',
        ar:'جملة الوصل تضيف معلومة عن اسم باستخدام ضمير وصل:\n**who** = للأشخاص. *The engineer **who** designed it.*\n**which** = للأشياء. *The tool **which** we bought.*\n**that** = للأشخاص أو الأشياء (غير رسمي).\n**where** = للأماكن · **whose** = للملكية.',
      }},
      { type:'table', title:{ en:'Which pronoun?', ar:'أي ضمير؟' }, headers:['Pronoun','For','Example'], rows:[
        ['who / that','people','the client who called'],
        ['which / that','things','the machine which failed'],
        ['where','places','the lab where we test'],
        ['whose','possession','the man whose car broke down'],
        ['when','times','the day when we launched'],
      ]},
      { type:'examples', title:{ en:'Joining sentences', ar:'ربط الجمل' }, items:[
        { en:'This is the engineer who fixed the server.',          ar:'هذا هو المهندس الذي أصلح الخادم.',        ctx:'who = person' },
        { en:'The software which we use is free.',                  ar:'البرنامج الذي نستخدمه مجاني.',            ctx:'which = thing' },
        { en:'That is the factory where the parts are made.',       ar:'ذلك هو المصنع حيث تُصنع القطع.',          ctx:'where = place' },
        { en:'She is the manager whose team won the award.',        ar:'هي المديرة التي فاز فريقها بالجائزة.',    ctx:'whose = possession' },
      ]},
      { type:'note', title:{ en:'Tip', ar:'نصيحة' }, body:{
        en:'When the pronoun is the OBJECT, you can often drop it: *The report (that) you sent is clear.* Both are correct. But do not drop it when it is the subject: ✅ *the man **who** called* (not "the man called" alone).',
        ar:'عندما يكون الضمير مفعولاً يمكن حذفه غالباً: *The report (that) you sent.* لكن لا تحذفه عندما يكون فاعلاً: ✅ *the man **who** called.*',
      }},
    ],
    practice:[
      { type:'mcq', q:'The colleague ___ helped me is on holiday.', options:['which','who','where','whose'], a:1,
        explainEn:'Person + subject → who.', explainAr:'شخص + فاعل → who.' },
      { type:'mcq', q:'This is the tool ___ broke yesterday.', options:['who','which','where','when'], a:1,
        explainEn:'Thing → which (or that).', explainAr:'شيء → which.' },
      { type:'mcq', q:'That\u2019s the building ___ we have our office.', options:['which','who','where','that'], a:2,
        explainEn:'Place → where.', explainAr:'مكان → where.' },
      { type:'mcq', q:'She\u2019s the engineer ___ designs won the prize.', options:['who','which','whose','where'], a:2,
        explainEn:'Possession (her designs) → whose.', explainAr:'ملكية → whose.' },
      { type:'fill', q:'The client ___ called wants a refund. (person, subject)', a:'who',
        explainEn:'Person + subject → who (or that).', explainAr:'شخص + فاعل → who.' },
      { type:'fill', q:'The parts ___ we ordered arrived late. (things)', a:'which',
        explainEn:'Things → which (or that).', explainAr:'أشياء → which.' },
    ],
  },

);
