/* ===== بنر برنامج كسبان — الـ Art Direction مأخوذ من ملفات «ستوري عروض اكتوبر» ===== */

@font-face { font-family: "Diodrum Arabic"; src: url("../fonts/DiodrumArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Diodrum Arabic"; src: url("../fonts/DiodrumArabic-Semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Diodrum Arabic"; src: url("../fonts/DiodrumArabic-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

.kb {
  /* الألوان المعتمدة من الإدارة لقسم كسبان */
  --kb-mustard: #FBB03F;   /* PANTONE 1365 C */
  --kb-orange: #F15929;    /* PANTONE 172 C */
  --kb-orange-2: #F58220;  /* PANTONE 158 C */
  --kb-ink: #141110;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--kb-ink);
  font-family: "Diodrum Arabic", Tahoma, sans-serif;
  background-color: var(--kb-mustard);
  padding: clamp(36px, 4.5vw, 56px) 16px;
}
/* خامة الورق فوق اللون زي ملف الستوري */
.kb::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/kasban/paper.webp") center/600px repeat;
  mix-blend-mode: multiply; opacity: .35;
}
.kb * { box-sizing: border-box; }

.kb-wrap {
  max-width: 1200px; margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(20px, 3vw, 40px); align-items: center;
}

/* نجوم */
.kb-spark { position: absolute; width: 34px; height: 34px; color: #fff; pointer-events: none; z-index: 0; }
.kb-spark.s1 { top: 7%;  right: 6%;  width: 40px; height: 40px; }
.kb-spark.s2 { top: 8%; left: 40%;  width: 24px; height: 24px; }
.kb-spark.s3 { display: none; }
.kb-spark.s4 { bottom: 9%; left: 5%; width: 44px; height: 44px; }
.kb-spark.s5 { bottom: 6%; right: 30%; width: 22px; height: 22px; }

/* ---------- النص ---------- */
.kb-logo { display: block; height: clamp(34px, 3vw, 42px); width: auto; margin-bottom: 12px; }

.kb-title {
  font-family: "Diodrum Arabic", Tahoma, sans-serif; font-weight: 700;
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.35; margin: 0; max-width: 18ch;
  color: var(--kb-ink);
}
.kb-lead {
  font-family: "Diodrum Arabic", Tahoma, sans-serif; font-weight: 700;
  font-size: clamp(19px, 1.9vw, 23px); line-height: 1.4; color: #fff;
  display: inline-block; background: var(--kb-orange); padding: 4px 14px 6px; border-radius: 8px;
  margin: 12px 0 14px;
}
.kb-text { font-size: 16px; line-height: 1.65; font-weight: 400; margin: 0 0 10px; max-width: 58ch; }
.kb-text-strong { font-weight: 600; margin-bottom: 20px; }

.kb-stores { display: flex; flex-wrap: wrap; gap: 12px; }
.kb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 10px;
  background: var(--kb-ink); color: #fff; text-decoration: none;
  font: 700 16px/1 "Diodrum Arabic", sans-serif; white-space: nowrap;
  transition: background-color .15s ease;
}
.kb-btn svg { width: 22px; height: 22px; flex: none; }
.kb-btn:hover { background: var(--kb-orange); }
.kb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* زر واحد على الجوال يفتح المتجر المناسب، وزرّين للمتجرين على الكمبيوتر */
.kb-cta { display: none; min-width: 220px; }
.is-mobile-os .kb-cta { display: inline-flex; }
.is-mobile-os .kb-stores { display: none; }

/* ---------- الصورة: شريط برتقالي مايل + الوجبة ---------- */
.kb-visual { position: relative; min-height: clamp(280px, 28vw, 380px); }
.kb-ribbon {
  position: absolute; z-index: 0; top: 34%; bottom: 20%;
  left: calc(-1 * max(16px, (100vw - 1200px) / 2));   /* يكمل لحد طرف الشاشة */
  right: 8%;
  background: var(--kb-orange-2);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}
/* شاشة صفحة الولاء من التطبيق داخل جوال */
.kb-visual { display: flex; justify-content: center; align-items: flex-start; align-self: stretch; }
.kb-phone {
  position: relative; z-index: 1; width: 300px; flex: none; margin-bottom: calc(-1 * clamp(36px, 4.5vw, 56px) - 40px);
  background: #111; border-radius: 44px 44px 0 0; padding: 11px 11px 0; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45), inset 0 0 0 2px #2b2b2b;
}
.kb-phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 84px; height: 24px; background: #000; border-radius: 14px; transform: translateX(-50%); z-index: 2; }
.kb-screen {
  background: #fff; color: #1d1d1d; border-radius: 34px 34px 0 0; padding: 46px 14px 16px; height: 470px; overflow: hidden;
  font-family: "Diodrum Arabic", Tahoma, sans-serif; font-size: 11px; line-height: 1.4; display: flex; flex-direction: column; gap: 10px;
}
.kb-screen svg { width: 18px; height: 18px; flex: none; }
.ls-bar { display: flex; align-items: center; justify-content: center; position: relative; font-weight: 700; font-size: 13px; }
.ls-bar svg { position: absolute; left: 0; }
.ls-card { background: #EF7D00; color: #fff; border-radius: 14px; padding: 10px; display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 10px; }
.ls-qr { width: 92px; height: 92px; background: #fff; padding: 7px; border-radius: 8px; image-rendering: pixelated; }
.ls-id { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ls-id strong { font-size: 13px; font-weight: 700; }
.ls-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .25); color: #5a4630; padding: 2px 10px; border-radius: 6px; font-weight: 600; }
.ls-chip i { width: 4px; height: 12px; border-radius: 0 6px 6px 0; border: 2px solid #EF7D00; border-left: 0; }
.ls-id small { font-size: 10px; opacity: .9; margin-top: 4px; }
.ls-id b { font-size: 13px; letter-spacing: 1px; }
.ls-points { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.ls-box { border: 1px solid #e3e3e3; border-radius: 10px; padding: 8px; display: flex; align-items: center; gap: 6px; }
.ls-box small { display: block; font-size: 10px; color: #555; }
.ls-box b { font-size: 12px; }
.ls-alert { display: flex; align-items: center; gap: 6px; background: #FDE7E7; color: #C0392B; border-radius: 10px; padding: 7px 10px; font-weight: 700; }
.ls-alert svg { width: 15px; height: 15px; }
.ls-tier { display: flex; gap: 10px; align-items: center; border: 1px solid #e3e3e3; border-radius: 10px; padding: 9px; }
.ls-tier > div { flex: 1; }
.ls-trophy { width: 40px; height: 40px; border-radius: 8px; background: #EF7D00; color: #fff; display: grid; place-items: center; }
.ls-tier-top { display: flex; justify-content: space-between; font-size: 12px; }
.ls-tier-top span { color: #777; } .ls-tier-top b { color: #1d1d1d; }
.ls-progress { height: 6px; background: #eee; border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.ls-progress i { display: block; height: 100%; width: 85%; margin-inline-start: auto; background: #EF7D00; border-radius: 4px; }
.ls-tier small { font-size: 10px; color: #444; }
.ls-tabs { display: flex; gap: 14px; border-bottom: 1px solid #e3e3e3; font-weight: 600; color: #7a8a99; }
.ls-tabs span { padding-bottom: 6px; } .ls-tabs .on { color: #1d1d1d; border-bottom: 2px solid #EF7D00; }
.ls-row { display: flex; justify-content: space-between; border: 1px solid #e3e3e3; border-radius: 10px; padding: 8px 10px; }
.ls-row small { display: block; font-size: 10px; color: #777; } .ls-row strong { font-size: 12px; } .ls-row b { color: #2E7D32; font-size: 12px; }
.ls-btn { margin-top: auto; background: #EF7D00; color: #fff; text-align: center; border-radius: 10px; padding: 10px; font-weight: 700; }

/* ---------- تابلت ---------- */
@media (max-width: 960px) {
  .kb-wrap { grid-template-columns: 1fr; }
  .kb-visual { order: 2; min-height: 0; margin-top: 8px; }
  .kb-phone { width: 270px; }
  .kb-screen { height: 400px; }
  .kb-ribbon { left: calc(50% - 50vw); right: 8%; }   /* الشريط يكمل لطرف الشاشة */
  .kb-spark.s2 { left: 10%; top: 4%; }
  .kb-spark.s3 { top: 46%; right: 6%; }
}

/* ---------- موبايل ---------- */
@media (max-width: 560px) {
  .kb-stores .kb-btn { flex: 1 1 140px; }
  .kb-spark { width: 24px; height: 24px; }
  .kb-spark.s1 { width: 28px; height: 28px; }
  .kb-spark.s4 { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: no-preference) {
  .kb-spark { animation: kb-twinkle 3.2s ease-in-out infinite; }
  .kb-spark.s2, .kb-spark.s5 { animation-delay: 1.1s; }
  .kb-spark.s3 { animation-delay: 2s; }
  @keyframes kb-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
}
