/* موقع البوت العام (الرئيسية / الخدمات / الشروط / الخطأ / مكافأة الإعلان) — فوق ui.css */

body.site { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(20px, var(--safe-l)); padding-right: max(20px, var(--safe-r)); }
.site-main { flex: 1 0 auto; }

/* ---------- الهيدر ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}
.head-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important;
  font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; min-width: 0;
}
.brand bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; background: var(--accent);
  box-shadow: 4px 4px 0 var(--mark);
}
[dir="rtl"] .brand-dot { box-shadow: -4px 4px 0 var(--mark); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 700; font-size: 14.5px; text-decoration: none !important; white-space: nowrap;
}
@media (hover: hover) { .nav-link:hover { background: var(--hover); color: var(--text); } }
.nav-link.on { background: var(--accent-soft); color: var(--accent); }
.nav-extra { display: flex; align-items: center; gap: 8px; margin-inline-start: 8px; }
.lang-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.nav-extra .theme-slot { flex: 0 0 auto; }
.menu-btn { display: none; }

/* ---------- الفوتر ---------- */
.site-foot { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-top: 22px; padding-bottom: 22px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { color: var(--text-2); font-weight: 600; font-size: 14px; }
.foot-copy { margin: 0; margin-inline-start: auto; color: var(--muted); font-size: 13px; }
/* اللمس: اسم البوت وروابط الفوتر مساحة ضغطها 40 بكسل على الأقل */
@media (pointer: coarse) {
  .brand { min-height: 40px; }
  .foot-links { gap: 0 18px; }
  .foot-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; }
}

/* ---------- عام ---------- */
.page-title { margin: 32px 0 6px; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.25; }
.page-lead { margin: 0 0 24px; color: var(--text-2); font-size: 15.5px; line-height: 1.8; max-width: 720px; }
.section-title { margin: 44px 0 16px; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.3; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.mono-tile {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  color: #fbf7ef; background: var(--tile, var(--accent)); font-weight: 800; font-size: 20px; line-height: 1;
}

/* ---------- الرئيسية ---------- */
.hero { color: var(--art-ink); }
.hero::after {
  content: ''; position: absolute; width: 460px; height: 460px; bottom: -150px; inset-inline-end: -120px;
  background: var(--deco, var(--bubble-lines)) center / contain no-repeat; opacity: .4; transform: rotate(-8deg); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1.12; max-width: 760px; overflow-wrap: anywhere; }
.hero p { margin: 16px 0 28px; max-width: 620px; font-size: 18px; line-height: 1.8; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .btn-light { background: var(--art-ink); color: var(--art-bg); height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.hero .btn-outline { background: transparent; color: var(--art-ink); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
@media (hover: hover) {
  .hero .btn-light:hover { filter: brightness(.95); }
  .hero .btn-outline:hover { background: rgba(255, 255, 255, .1); }
}
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.cat-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; color: var(--text); text-decoration: none !important;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s var(--ease), box-shadow .15s;
}
@media (hover: hover) { .cat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); } }
.cat-card b { display: block; font-size: 16px; line-height: 1.5; }
.cat-card .cat-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.7; margin-top: 2px; }

/* ---------- صفحة الخدمات ---------- */
.svc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.cat-list { padding: 10px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.cat-list h2 { margin: 6px 8px 8px; font-size: 12.5px; color: var(--muted); font-weight: 800; letter-spacing: .04em; }
.cat-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text);
  font-weight: 700; font-size: 14.5px; text-decoration: none !important; line-height: 1.5;
}
.cat-link .mono-tile { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
@media (hover: hover) { .cat-link:hover { background: var(--hover); } }
.cat-link.on { background: var(--active); }
.svc-content { padding: 22px; min-height: 320px; }
.svc-content h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.3; }
.svc-desc { margin: 0 0 18px; color: var(--text-2); line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.svc-content h3 { margin: 22px 0 10px; font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .04em; }
.svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.svc-item { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.svc-item b { display: block; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.svc-item p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
a.svc-item { color: var(--text); text-decoration: none !important; display: flex; gap: 12px; align-items: center; }
@media (hover: hover) { a.svc-item:hover { border-color: var(--accent); } }

/* ---------- الشروط ---------- */
.doc { max-width: 820px; padding: 8px 28px 26px; }
.doc h2 { margin: 26px 0 10px; font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.35; }
.doc p { margin: 0 0 10px; color: var(--text-2); line-height: 1.9; }
.doc ul { margin: 0 0 6px; padding: 0; list-style: none; }
.doc li { position: relative; padding-inline-start: 22px; margin: 8px 0; line-height: 1.85; color: var(--text-2); }
.doc li::before { content: ''; position: absolute; inset-inline-start: 4px; top: .75em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* ---------- صفحة الخطأ ---------- */
.center-card { max-width: 520px; margin: 64px auto 0; padding: 36px 28px; text-align: center; }
.err-code { font-family: var(--display); font-weight: 700; font-size: 84px; line-height: 1; color: var(--accent); }
.center-card h1 { margin: 14px 0 8px; font-size: 24px; font-family: var(--display); font-weight: 700; }
.center-card p { margin: 0 0 6px; color: var(--text-2); line-height: 1.85; }
.center-card .btn { margin-top: 18px; }

/* ---------- مكافأة الإعلان ---------- */
.claim { max-width: 640px; margin: 36px auto 0; padding: 26px 24px; text-align: center; }
.claim h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.3; }
.claim .lead { margin: 0 0 18px; color: var(--text-2); line-height: 1.8; }
.countdown {
  width: 128px; height: 128px; margin: 8px auto 10px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 34px; direction: ltr;
  background: conic-gradient(var(--accent) var(--p, 0%), var(--surface-3) 0);
  position: relative;
}
.countdown::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.countdown span { position: relative; }
.claim .note { margin: 0 0 18px; color: var(--clay); font-weight: 700; font-size: 14px; }
.ads { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 14px 0 20px; min-height: 60px; overflow: hidden; }
.ads > div { max-width: 100%; overflow: hidden; }
.claim .btn-block { max-width: 360px; margin: 0 auto; }
.alert { margin: 14px auto 0; max-width: 460px; padding: 12px 14px; border-radius: 12px; font-weight: 600; line-height: 1.7; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.claim .after { margin-top: 16px; }

/* ---------- الموبايل ---------- */
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; margin-inline-start: auto; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px max(16px, var(--safe-r)) 16px max(16px, var(--safe-l)); background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
  }
  .site-nav.open { display: flex; animation: fadein .15s; }
  .nav-link { height: 46px; }
  .nav-extra { margin: 8px 0 0; flex-wrap: wrap; }
  .nav-extra .lang-form, .nav-extra .select { flex: 1 1 auto; }
  .nav-cta { flex: 1 1 auto; }
  .site-head { position: sticky; }
  .head-row { position: static; }
  .svc-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-list { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .cat-list::-webkit-scrollbar { display: none; }
  .cat-list h2 { display: none; }
  .cat-link { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--line); padding: 6px 12px 6px 8px; }
  [dir="rtl"] .cat-link { padding: 6px 8px 6px 12px; }
}
@media (max-width: 600px) {
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .hero::after { width: 300px; height: 300px; bottom: -110px; inset-inline-end: -110px; }
  .page-title { font-size: 28px; margin-top: 24px; }
  .section-title { font-size: 22px; margin-top: 32px; }
  .svc-content { padding: 16px; }
  .doc { padding: 4px 18px 20px; }
  .foot-copy { margin-inline-start: 0; width: 100%; }
  .brand { font-size: 19px; }
  .claim { padding: 20px 16px; }
}
