/* Add custom JS code below */ (() => { const sectionId = "mira-telegram-community"; function createCommunity() { // عرض القسم في الصفحة الرئيسية فقط if (!/^\/(?:(?:ar|en)\/?)?$/.test(location.pathname)) return; if (document.getElementById(sectionId)) return; const footer = document.querySelector("footer"); if (!footer) return; const section = document.createElement("section"); section.id = sectionId; section.dir = "rtl"; section.innerHTML = `
كفوف ميرا تجمعنا

مجتمع مربّي الحيوانات الأليفة

انضم لمجتمع كفوف ميرا على التليجرام، وشارك تجاربك واستفد من نصائح العناية والتغذية لصديقك الأليف.

انضم لنا الآن
انضم إلى مجتمع المربين على التليجرام
`; if (!document.getElementById("mira-community-style")) { const style = document.createElement("style"); style.id = "mira-community-style"; style.textContent = ` #${sectionId} { background: #fff; color: #222; padding: 56px 24px; width: 100%; box-sizing: border-box; clear: both; } #${sectionId} * { box-sizing: border-box; } #${sectionId} .mira-community-layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; } #${sectionId} .mira-community-content { text-align: right; } #${sectionId} .mira-community-label { display: block; color: #666; font-size: 16px; margin-bottom: 12px; } #${sectionId} h2 { color: #5590ff; font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1.5; margin: 0 0 20px; } #${sectionId} p { font-size: 18px; line-height: 2; margin: 0; } #${sectionId} a { display: inline-flex; align-items: center; justify-content: center; gap: 18px; background: #5590ff; color: #fff; text-decoration: none; padding: 15px 28px; margin-top: 28px; border-radius: 6px; font: inherit; font-weight: 700; min-height: 48px; transition: background .2s; } #${sectionId} a:hover { background: #3474e6; } #${sectionId} a:focus-visible { outline: 3px solid #222; outline-offset: 4px; } #${sectionId} img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; } @media (max-width: 767px) { #${sectionId} { padding: 32px 20px; } #${sectionId} .mira-community-layout { grid-template-columns: 1fr; gap: 24px; } #${sectionId} .mira-community-image { grid-row: 1; } #${sectionId} img { max-height: 300px; } #${sectionId} .mira-community-content { text-align: center; } #${sectionId} p { font-size: 16px; } } `; document.head.appendChild(style); } footer.before(section); } createCommunity(); if (document.readyState === "loading") { document.addEventListener( "DOMContentLoaded", createCommunity, { once: true } ); } const observer = new MutationObserver(createCommunity); observer.observe(document.documentElement, { childList: true, subtree: true }); // إيقاف المراقبة بعد اكتمال تحميل العناصر setTimeout(() => observer.disconnect(), 30000); })();