/* ── LESSON PACK: PHRASAL VERBS ──
   Loads after learn-lessons-grammar.jsx — pushes into window.LESSONS_DATA */

/* add the group right after Connectors */
window.LESSON_GROUPS.splice(3, 0,
  { id:'phrasal', emoji:'🧩', en:'Phrasal Verbs', ar:'الأفعال المركبة', tr:'Öbek Fiiller' }
);

window.LESSONS_DATA.push(

  /* ─── HOW PHRASAL VERBS WORK ─── */
  {
    id:'phrasal-intro', level:'B1', icon:'🧩', group:'phrasal',
    title:{ en:'Phrasal Verbs — How They Work', ar:'الأفعال المركبة — كيف تعمل', tr:'Öbek Fiiller — Nasıl Çalışır' },
    summary:{
      en:'Verb + small word = totally new meaning. The system behind the chaos.',
      ar:'فعل + كلمة صغيرة = معنى جديد تماماً. النظام الذي يقف خلف الفوضى.',
      tr:'Fiil + küçük kelime = bambaşka anlam. Kaosun arkasındaki sistem.',
    },
    sections:[
      { type:'concept', title:{ en:'What is a phrasal verb?', ar:'ما هو الفعل المركب؟' }, body:{
        en:'A **phrasal verb** = verb + particle (up, off, out, on, in, over…). The particle CHANGES the meaning:\n• *look* = to direct your eyes → *look for* = to search for → *look after* = to take care of → *look up* = to find in a reference\nNative speakers use phrasal verbs constantly in speech. Formal writing often prefers the one-word version (*find out → discover*).',
        ar:'**الفعل المركب** = فعل + أداة (up, off, out, on, in, over…). الأداة تغيّر المعنى:\n• *look* = ينظر → *look for* = يبحث عن → *look after* = يعتني بـ → *look up* = يبحث في مرجع\nالمتحدثون الأصليون يستخدمونها باستمرار في الكلام. الكتابة الرسمية تفضل غالباً الكلمة الواحدة (*find out → discover*).',
      }},
      { type:'concept', title:{ en:'Separable or not?', ar:'قابل للفصل أم لا؟' }, body:{
        en:'**Separable:** the object can go in the middle — *turn off the light* / *turn the light off*.\n⚠️ With a pronoun, you MUST separate: ✅ *turn it off* — ❌ *turn off it*.\n**Inseparable:** the object always comes after — *look after the kids* (never *look the kids after*).',
        ar:'**قابل للفصل:** يمكن وضع المفعول في الوسط — *turn off the light* / *turn the light off*.\n⚠️ مع الضمير يجب الفصل: ✅ *turn it off* — ❌ *turn off it*.\n**غير قابل للفصل:** المفعول يأتي دائماً بعده — *look after the kids*.',
      }},
      { type:'examples', title:{ en:'One verb, many meanings', ar:'فعل واحد، معانٍ كثيرة' }, items:[
        { en:'The meeting turned into an argument.',            ar:'تحوّل الاجتماع إلى جدال.',              ctx:'turn into = to become' },
        { en:'Please turn down the music.',                     ar:'اخفض الموسيقى من فضلك.',                ctx:'turn down = to lower' },
        { en:'They turned down our proposal.',                  ar:'رفضوا اقتراحنا.',                        ctx:'turn down = to reject' },
        { en:'He turned up 20 minutes late.',                   ar:'ظهر متأخراً 20 دقيقة.',                 ctx:'turn up = to appear' },
        { en:'It turned out that the cable was broken.',        ar:'اتضح أن الكابل كان مقطوعاً.',           ctx:'turn out = to be revealed' },
      ]},
      { type:'note', title:{ en:'How to learn them', ar:'كيف تتعلمها' }, body:{
        en:'Don\u2019t memorize lists of particles. Learn each phrasal verb like a NEW WORD, inside a real sentence you might actually say.',
        ar:'لا تحفظ قوائم الأدوات. تعلّم كل فعل مركب كأنه كلمة جديدة، داخل جملة حقيقية قد تقولها فعلاً.',
      }},
    ],
    practice:[
      { type:'mcq', q:'The light is on. Please turn ___ .',
        options:['off it','it off','off','it of'], a:1,
        explainEn:'Pronoun must go in the middle: turn it off.', explainAr:'الضمير يوضع في الوسط: turn it off.' },
      { type:'mcq', q:'It ___ that the error was in our own code.',
        options:['turned off','turned out','turned up','turned down'], a:1,
        explainEn:'turn out = to become known in the end.', explainAr:'turn out = يتضح في النهاية.' },
      { type:'mcq', q:'They ___ our offer because the price was too high.',
        options:['turned down','turned into','turned on','looked after'], a:0,
        explainEn:'turn down = reject.', explainAr:'turn down = يرفض.' },
      { type:'fill', q:'Can you look ___ this word in the dictionary?', a:'up',
        explainEn:'look up = to find information in a dictionary or reference.', explainAr:'look up = يبحث في مرجع.' },
      { type:'fill', q:'I\u2019m looking ___ my keys — have you seen them?', a:'for',
        explainEn:'look for = to try to find something.', explainAr:'look for = يبحث عن.' },
    ],
  },

  /* ─── DAILY LIFE PHRASAL VERBS ─── */
  {
    id:'phrasal-daily', level:'A2', icon:'🌅', group:'phrasal',
    title:{ en:'Daily Life Phrasal Verbs', ar:'أفعال مركبة للحياة اليومية', tr:'Günlük Hayat Öbek Fiilleri' },
    summary:{
      en:'The 12 phrasal verbs you\u2019ll use from waking up to going to bed.',
      ar:'الأفعال المركبة الاثنا عشر التي ستستخدمها من الاستيقاظ حتى النوم.',
      tr:'Uyanmaktan yatmaya kadar kullanacağınız 12 öbek fiil.',
    },
    sections:[
      { type:'table', title:{ en:'Morning to night', ar:'من الصباح إلى الليل' }, headers:['Phrasal verb','Meaning','Example'], rows:[
        ['wake up','stop sleeping','I wake up at 6:30.'],
        ['get up','leave your bed','I get up right away — no snooze.'],
        ['put on','dress in clothing','Put on a jacket, it\u2019s cold.'],
        ['take off','remove clothing','Take off your shoes at the door.'],
        ['turn on / off','start / stop a machine','Turn on the kettle. Turn off the lights.'],
        ['pick up','lift; collect someone','I\u2019ll pick you up at 8.'],
        ['run out of','have none left','We ran out of milk.'],
        ['throw away','put in the trash','Throw away the old batteries.'],
        ['hang out','spend relaxed time','We hung out at the café.'],
        ['work out','exercise','I work out three times a week.'],
        ['wash up','wash the dishes','I\u2019ll wash up after dinner.'],
        ['go out','leave home for fun','Let\u2019s go out on Friday.'],
      ]},
      { type:'examples', title:{ en:'A day in phrasal verbs', ar:'يوم كامل بالأفعال المركبة' }, items:[
        { en:'I woke up late and got up in a hurry.',               ar:'استيقظت متأخراً ونهضت مسرعاً.',              ctx:'Morning' },
        { en:'I put on my clothes and turned off the AC.',          ar:'ارتديت ملابسي وأطفأت المكيف.',              ctx:'Morning' },
        { en:'We ran out of coffee, so I picked some up on the way.', ar:'نفدت القهوة، فاشتريت بعضها في الطريق.',   ctx:'Errand' },
        { en:'After work I worked out, then hung out with friends.', ar:'بعد العمل تمرنت، ثم قضيت وقتاً مع أصدقائي.', ctx:'Evening' },
        { en:'I took off my shoes, washed up, and went to bed.',     ar:'خلعت حذائي وغسلت الأطباق وذهبت للنوم.',     ctx:'Night' },
      ]},
    ],
    practice:[
      { type:'mcq', q:'It\u2019s hot in here — can I ___ my jacket?',
        options:['put on','take off','turn off','throw away'], a:1,
        explainEn:'take off = to remove clothing.', explainAr:'take off = يخلع.' },
      { type:'mcq', q:'We\u2019ve ___ sugar. Can you buy some?',
        options:['run out of','thrown away','picked up','taken off'], a:0,
        explainEn:'run out of = to have none left.', explainAr:'run out of = نفد.' },
      { type:'mcq', q:'I\u2019ll ___ you ___ from the airport.',
        options:['pick / up','put / on','turn / on','wake / up'], a:0,
        explainEn:'pick up = to collect someone by car.', explainAr:'pick up = يقلّ شخصاً بالسيارة.' },
      { type:'fill', q:'Don\u2019t forget to turn ___ the lights when you leave.', a:'off',
        explainEn:'turn off = to stop a light or machine.', explainAr:'turn off = يطفئ.' },
      { type:'fill', q:'I usually wake ___ before my alarm.', a:'up',
        explainEn:'wake up = to stop sleeping.', explainAr:'wake up = يستيقظ.' },
    ],
  },

  /* ─── BUSINESS PHRASAL VERBS ─── */
  {
    id:'phrasal-business', level:'B1', icon:'💼', group:'phrasal',
    title:{ en:'Business & Meetings Phrasal Verbs', ar:'أفعال مركبة للأعمال والاجتماعات', tr:'İş ve Toplantı Öbek Fiilleri' },
    summary:{
      en:'The phrasal verbs you hear in every meeting, standup, and negotiation.',
      ar:'الأفعال المركبة التي تسمعها في كل اجتماع ومفاوضة.',
      tr:'Her toplantı ve müzakerede duyduğunuz öbek fiiller.',
    },
    sections:[
      { type:'table', title:{ en:'Meeting-room essentials', ar:'أساسيات غرفة الاجتماعات' }, headers:['Phrasal verb','Meaning','Example'], rows:[
        ['set up','establish / prepare','We set up a new testing lab.'],
        ['follow up','check progress later','I\u2019ll follow up with the client tomorrow.'],
        ['carry out','perform / complete','We carried out the safety inspection.'],
        ['take over','take control of','She took over the project in May.'],
        ['put off','postpone','They put off the launch until June.'],
        ['call off','cancel','The meeting was called off.'],
        ['bring up','raise a topic','He brought up the budget issue.'],
        ['deal with','handle','I\u2019ll deal with the supplier problem.'],
        ['point out','draw attention to','She pointed out a risk we had missed.'],
        ['come up with','think of / suggest','We came up with a cheaper solution.'],
        ['go over','review','Let\u2019s go over the numbers together.'],
        ['back up','support; make a copy','The data backs up our decision.'],
      ]},
      { type:'examples', title:{ en:'In a real meeting', ar:'في اجتماع حقيقي' }, items:[
        { en:'Before we start, let\u2019s go over last week\u2019s actions.',   ar:'قبل أن نبدأ، لنراجع مهام الأسبوع الماضي.',        ctx:'Opening' },
        { en:'I want to bring up the testing schedule.',                        ar:'أريد طرح موضوع جدول الاختبارات.',                  ctx:'Agenda' },
        { en:'Good point — can you follow up with QA about it?',                ar:'نقطة جيدة — هل يمكنك المتابعة مع فريق الجودة؟',   ctx:'Action' },
        { en:'We may have to put off the release by a week.',                   ar:'قد نضطر لتأجيل الإصدار أسبوعاً.',                  ctx:'Decision' },
        { en:'Ahmed will take over the client account from March.',              ar:'سيتولى أحمد حساب العميل من مارس.',                 ctx:'Handover' },
        { en:'Finally, someone needs to come up with a plan B.',                 ar:'أخيراً، على أحدهم اقتراح خطة بديلة.',              ctx:'Closing' },
      ]},
      { type:'note', title:{ en:'put off vs call off', ar:'الفرق بين put off و call off' }, body:{
        en:'• **put off** = postpone — it will happen LATER.\n• **call off** = cancel — it will NOT happen.\n*The demo was put off to Friday.* / *The demo was called off completely.*',
        ar:'• **put off** = يؤجل — سيحدث لاحقاً.\n• **call off** = يلغي — لن يحدث.\n*The demo was put off to Friday.* / *The demo was called off completely.*',
      }},
    ],
    practice:[
      { type:'mcq', q:'The strike ended, so the airline ___ the cancellations.',
        options:['called off','put off','set up','took over'], a:0,
        explainEn:'call off = to cancel.', explainAr:'call off = يلغي.' },
      { type:'mcq', q:'Can we ___ the deadline ___ until next week?',
        options:['call / off','put / off','carry / out','bring / up'], a:1,
        explainEn:'put off = to postpone.', explainAr:'put off = يؤجل.' },
      { type:'mcq', q:'She ___ a clever way to cut costs by 20%.',
        options:['dealt with','came up with','went over','pointed out'], a:1,
        explainEn:'come up with = to think of an idea or solution.', explainAr:'come up with = يبتكر فكرة.' },
      { type:'mcq', q:'Who will ___ the project while she is on leave?',
        options:['take over','take off','put on','call off'], a:0,
        explainEn:'take over = to take control or responsibility.', explainAr:'take over = يتولى المسؤولية.' },
      { type:'fill', q:'We need to carry ___ more tests before release.', a:'out',
        explainEn:'carry out = to perform or complete a task.', explainAr:'carry out = ينفّذ.' },
      { type:'fill', q:'He pointed ___ that the budget was too optimistic.', a:'out',
        explainEn:'point out = to draw attention to something.', explainAr:'point out = يشير إلى.' },
    ],
  },

  /* ─── COMMUNICATION PHRASAL VERBS ─── */
  {
    id:'phrasal-communication', level:'B1', icon:'📞', group:'phrasal',
    title:{ en:'Calls & Email Phrasal Verbs', ar:'أفعال مركبة للمكالمات والبريد', tr:'Arama ve E-posta Öbek Fiilleri' },
    summary:{
      en:'Sound natural on calls, in chats, and in email threads.',
      ar:'تحدث بطلاقة في المكالمات والمحادثات وسلاسل البريد.',
      tr:'Aramalarda, sohbetlerde ve e-postalarda doğal olun.',
    },
    sections:[
      { type:'table', title:{ en:'On the phone & online', ar:'على الهاتف وعبر الإنترنت' }, headers:['Phrasal verb','Meaning','Example'], rows:[
        ['call back','return a call','I\u2019m busy — can I call you back?'],
        ['hang up','end a call','She hung up before I could answer.'],
        ['speak up','talk louder','Could you speak up? You\u2019re very quiet.'],
        ['get back to','reply later','I\u2019ll get back to you by Thursday.'],
        ['write down','note on paper','Let me write down your number.'],
        ['find out','discover / learn','I\u2019ll find out and let you know.'],
        ['reach out','contact someone','Feel free to reach out anytime.'],
        ['fill in / fill out','complete a form','Please fill out this form.'],
        ['cut off','disconnected','Sorry, we got cut off.'],
        ['catch up','exchange news','Let\u2019s catch up over coffee.'],
      ]},
      { type:'examples', title:{ en:'A phone call, start to finish', ar:'مكالمة هاتفية من البداية للنهاية' }, items:[
        { en:'Sorry, you\u2019re breaking up — could you speak up a little?',   ar:'عذراً، صوتك يتقطع — هلا رفعت صوتك قليلاً؟',       ctx:'Bad line' },
        { en:'Let me write that down… okay, got it.',                            ar:'دعني أدوّن ذلك… حسناً، تم.',                       ctx:'Taking notes' },
        { en:'I don\u2019t know the price — I\u2019ll find out and get back to you.', ar:'لا أعرف السعر — سأستعلم وأعود إليك بالرد.',   ctx:'Promise' },
        { en:'We got cut off — sorry, I\u2019m calling you back now.',            ar:'انقطع الاتصال — عذراً، أعاود الاتصال بك الآن.',    ctx:'Reconnect' },
        { en:'Don\u2019t hesitate to reach out if you have questions.',           ar:'لا تتردد في التواصل إذا كانت لديك أسئلة.',          ctx:'Email closing' },
      ]},
      { type:'note', title:{ en:'Email gold', ar:'ذهب البريد الإلكتروني' }, body:{
        en:'The most useful email sentence in English:\n*"I\u2019ll look into it and **get back to you** by tomorrow."* — it buys you time and sounds professional.',
        ar:'أكثر جملة بريد مفيدة في الإنجليزية:\n*"I\u2019ll look into it and **get back to you** by tomorrow."* — تمنحك وقتاً وتبدو احترافية.',
      }},
    ],
    practice:[
      { type:'mcq', q:'I\u2019m in a meeting — I\u2019ll ___ you ___ in an hour.',
        options:['hang / up','call / back','cut / off','speak / up'], a:1,
        explainEn:'call back = to return a phone call.', explainAr:'call back = يعاود الاتصال.' },
      { type:'mcq', q:'Please ___ this form before your appointment.',
        options:['fill out','find out','write down','catch up'], a:0,
        explainEn:'fill out = to complete a form.', explainAr:'fill out = يملأ نموذجاً.' },
      { type:'mcq', q:'I don\u2019t have the answer now, but I\u2019ll ___ to you by Friday.',
        options:['get back','call off','hang up','cut off'], a:0,
        explainEn:'get back to = to reply to someone later.', explainAr:'get back to = يعود بالرد.' },
      { type:'fill', q:'Could you speak ___? I can barely hear you.', a:'up',
        explainEn:'speak up = to talk louder.', explainAr:'speak up = يرفع صوته.' },
      { type:'fill', q:'Sorry we got cut ___ — my train went into a tunnel.', a:'off',
        explainEn:'cut off = disconnected in the middle of a call.', explainAr:'cut off = انقطع الاتصال.' },
    ],
  },

);
