/* Add custom Js styles below */ // ===================== اضافة فيديو للصفحة ===================== const SECTION_POSITION = 3; // const VIDEO_SRC = "https://files.catbox.moe/s544aj.mp4"; // const VIDEO_LINK = "#"; // رابط عند الضغط // ==================================================== (function() { if (!document.body.classList.contains("index")) return; const style = document.createElement("style"); style.textContent = ` .custom-video-banner { font-size: 16px; margin: 30px 0; } .custom-video-banner .container { font-size: 16px; max-width: 1200px; margin: 0 auto; } .custom-video-banner .banner { display: block; overflow: hidden; border-radius: 12px; box-shadow: none; } .custom-video-banner video { width: auto; height: auto; display: block; border-radius: 12px; object-fit: cover; margin: 0 auto; } @media (max-width: 768px) { .custom-video-banner { font-size: 14px; margin: 20px 0; } .custom-video-banner .container { padding: 0 10px; } .custom-video-banner video { width: 100%; height: auto; } } `; document.head.appendChild(style); const section = document.createElement("section"); section.className = "custom-video-banner s-block s-block--fixed-banner wide-placeholder appear"; section.innerHTML = `
`; const sections = document.querySelectorAll("section"); if (sections.length >= SECTION_POSITION) { sections[SECTION_POSITION - 1].insertAdjacentElement("afterend", section); } else { // fallback -> لو مفيش سكشن كفاية نحطه آخر الصفحة document.body.appendChild(section); } // 🔥 تأكيد تشغيل الفيديو تلقائياً في الموبايل const video = section.querySelector("video"); if (video) { video.muted = true; video.setAttribute("playsinline", ""); video.setAttribute("webkit-playsinline", ""); video.play().catch(err => { console.log("Autoplay blocked:", err); }); } })(); /* Add custom Js styles below */ document.addEventListener("DOMContentLoaded", function () { // ✅ إضافة ستايل const style = document.createElement("style"); style.textContent = ` /* زرار الفتح */ #faq-toggle-btn { position: fixed; bottom: 20px; right: 20px; background: #A6661F; color: #fff; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 14px; font-weight: bold; cursor: pointer; box-shadow: 0 0 15px rgba(68,24,12,0.8); z-index: 9999; transition: transform 0.2s; } #faq-toggle-btn:hover { transform: scale(1.1); } /* نافذة الأسئلة */ #faq-container { position: fixed; bottom: 90px; right: 20px; width: 320px; max-height: 70vh; background: #111; color: #fff; border-radius: 12px; box-shadow: 0 0 20px rgba(68,24,12,0.8); display: none; flex-direction: column; z-index: 10000; overflow: hidden; } #faq-header { background: #A6661F; padding: 12px; font-size: 16px; font-weight: bold; text-align: center; position: relative; } #faq-close { position: absolute; right: 10px; top: 5px; background: transparent; border: none; font-size: 20px; font-weight: bold; color: #fff; cursor: pointer; } .faq-item { border-bottom: 1px solid rgba(255,255,255,0.2); } .faq-question { padding: 12px; cursor: pointer; position: relative; } .faq-question::after { content: "›"; position: absolute; right: 15px; transition: transform 0.3s; } .faq-question.active::after { transform: rotate(90deg); } .faq-answer { display: none; padding: 0 12px 12px; font-size: 14px; color: #ccc; } .faq-answer.show { display: block; } `; document.head.appendChild(style); // ✅ HTML للزرار + نافذة FAQ const faqBtn = document.createElement("button"); faqBtn.id = "faq-toggle-btn"; faqBtn.textContent = "FAQ"; const faqBox = document.createElement("div"); faqBox.id = "faq-container"; faqBox.innerHTML = `