


  <!-- Clipboard.js -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>

  <style>
 
   
    .share-icons {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 15px;
      margin-top: 30px;
    }

    .share-button {
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      background:white;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      font-size: 22px;
      transition: transform 0.2s;
      text-decoration: none;
      border: none;
      cursor: pointer;
    }

    .share-button:hover {
      transform: scale(1.1);
    }

    .la-whatsapp { color:#25D366; }
    .la-twitter { color:#00c2ff; }
    .la-facebook-f { color:#1877f2; }
    .la-link { color:#333; }

    .note {
      margin-top: 15px;
      font-size: 14px;
      color:#666;
    }
  </style>


  	<div class='page_title' style='display: inline-block;font-size: 26px;margin: 15px;line-height: inherit;overflow: hidden;height: 45px;padding: 7px;'>شارك الموضوع </div> 


  <div class="share-icons">

    <!-- WhatsApp -->
    <a class="share-button" href="https://wa.me/?text=شاهد هذه الصفحة: <?php echo urlencode('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>"
       target="_blank" title="واتساب">
      <i class="lab la-whatsapp"></i>
    </a>

    <!-- X (Twitter) -->
    <a class="share-button" href="https://twitter.com/intent/tweet?url=<?php echo urlencode('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>"
       target="_blank" title="مشاركة على X">
      <i class="lab la-twitter"></i>
    </a>

    <!-- Facebook -->
    <a class="share-button" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>"
       target="_blank" title="فيسبوك">
      <i class="lab la-facebook-f"></i>
    </a>

    <!-- نسخ الرابط -->
    <button class="share-button btn-copy"
            data-clipboard-text="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"
            title="نسخ الرابط">
      <i class="las la-link"></i>
    </button>

  </div>


  <script>
    // تفعيل النسخ
    new ClipboardJS('.btn-copy').on('success', function(e) {
      alert("✅ تم نسخ الرابط إلى الحافظة!");
    });
  </script>