document.addEventListener("DOMContentLoaded", function() { const faqItems = document.querySelectorAll(".faq-item"); faqItems.forEach(item => { const question = item.querySelector(".q"); const answer = item.querySelector(".a"); // نخفي كل الأجوبة بالبداية answer.style.display = "none"; question.addEventListener("click", () => { // إذا كان مفتوح، نقفل، وإذا كان مقفول نفتح const isVisible = answer.style.display === "block"; answer.style.display = isVisible ? "none" : "block"; }); }); }); /* =================كونتينر الصفحات فقطا================= */ /* ================= الهيدر================= */ (function(){ // الصفحات التي يظهر فيها الهيدر الجديد const pages = [ "/ar/connect%20with%20us/page-1360506844", "/ar/قدّم-طلب/page-813120795", "/ar/about-us/page-271304405" ]; const path = window.location.pathname; if (!pages.includes(path)) return; let header = document.querySelector("header"); if (!header) { header = document.createElement("header"); document.body.insertBefore(header, document.body.firstChild); } header.innerHTML = ""; // إنشاء الهيدر الجديد const headerContainer = document.createElement("div"); headerContainer.className = "custom-header"; // الروابط على اليمين const linksHtml = `
`; // الزر على اليسار const btn = document.createElement("button"); btn.className = "order-btn"; btn.type = "button"; btn.textContent = "اطلب الآن"; btn.addEventListener("click", function(){ window.open("https://nttaq.com/ar/whatsapp/send", "_blank"); // يفتح في تبويب جديد }); // عكس الترتيب: الروابط أولاً ثم الزر const temp = document.createElement("div"); temp.innerHTML = linksHtml; const navLinksElem = temp.querySelector(".nav-links"); headerContainer.appendChild(navLinksElem); headerContainer.appendChild(btn); header.appendChild(headerContainer); })(); /* ================= الرئيسيه ================= */ (function () { /* ================= إعداد سريع ================= */ const injectAfterSelector = '.hero-right'; // العنصر الذي نضيف بعده السكشن الجديد const anchor = document.querySelector(injectAfterSelector); if (!anchor) return; // لو العنصر مش موجود، الكود يوقف /* ================= CSS للسكشن الجديد ================= */ const SID = 'hero-like-sara-v2'; if (!document.getElementById(SID)) { const css = ` :root{ --topBg:#393939; --sea:#3a3a3a; --card:#e6e6e6; --wave-1:#b4b4b4; --wave-2:White; --white:#ffffff; --green:#ed6a23; --greenText:#0b3b0a; --gold1:#ed6a23; --gold2:#ec5006; --chipText:#393939; } .s-hero{position:relative;background:var(--sea);color:var(--white);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;overflow:hidden} .s-head{position:relative;background:var(--topBg)} .s-head__inner{max-width:1320px;margin:0 auto;padding:18px 16px 32px;direction:rtl;position:relative;z-index:2} .actions{display:grid;grid-template-columns:1fr 1fr 1.6fr;gap:18px;direction:rtl} .action{display:flex;align-items:center;justify-content:space-between;border-radius:22px;padding:18px;background:#fff;box-shadow:0 10px 28px rgba(0,0,0,.18)} .action a{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;color:#0c2a16;text-decoration:none;font-weight:800;font-size:22px} .action__icon{flex:0 0 54px;height:54px;border-radius:16px;background:#dfffe8;display:flex;align-items:center;justify-content:center} .action__icon svg{width:28px;height:28px} .action--apply{background:var(--green)} .action--apply a{color:var(--greenText)} .action--apply .action__icon{background:#baff9a} .shape{direction:ltr;left:0;line-height:0;overflow:hidden;position:absolute;width:100%} .shape svg{display:block;width:101%;height:86px} .shape--head-bottom{bottom:-1px;z-index:0} .terms{background:var(--card);padding:72px 16px 120px;position:relative} .terms:before{content:"";position:absolute;inset:0;background:linear-gradient(0deg, transparent 0, transparent 30px);pointer-events:none} .terms__inner{max-width:1200px;margin:0 auto;text-align:center} .title{font-size:44px;font-weight:900;margin:0 0 10px} .sub{font-size:22px;opacity:.9;margin:0 0 36px} .chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;justify-items:center} .chip{background:linear-gradient(180deg,var(--gold1),var(--gold2));color:var(--chipText);border-radius:26px;padding:18px 28px;min-height:72px;display:flex;align-items:center;gap:16px;font-weight:900;font-size:24px;box-shadow:0 16px 36px rgba(0,0,0,.22)} .chip__icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center} .shape--bottom{bottom:-1px;transform:rotate(180deg)} @media (max-width:1024px){ .actions{grid-template-columns:1fr} .action a{font-size:20px} .chips{grid-template-columns:repeat(2,1fr)} .title{font-size:36px} } @media (max-width:560px){ .chips{grid-template-columns:1fr} .shape svg{height:70px} }`; const style = document.createElement('style'); style.id = SID; style.textContent = css; document.head.appendChild(style); } /* ================== HTML للسكشن الجديد ================== */ const section = document.createElement('section'); section.className = 's-hero'; // سكشن مستقل section.innerHTML = `فقط تكون