/*
 * NatTrade — hero.css
 * أنماط قسم Hero (المشاهد المتحركة)
 * إصلاح: كانت مُضمَّنة في index.php كـ <style> inline
 *
 * إصلاح رئيسي:
 *  - توحيد --gold: #e8b84b (نفس قيمة home.css)
 *  - إزالة !important المكررة (كانت في سطور 680-730)
 *  - دعم prefers-reduced-motion
 */

/* ── متغيرات Hero (موحّدة مع home.css) ── */
#home {
  --gold:   #e8b84b;   /* موحَّد: كان #f5c842 في home.css — الآن نفس القيمة */
  --gold2:  #f5d07a;
  --blue:   #4fa3e0;
  --green:  #3dd68c;
  --red:    #f05e5e;
  --purple: #9d7de8;
  --bg:     #050a14;
  --bg2:    #080f1e;
  --card:   rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text:   #e8ecf4;
  --muted:  #6b7a99;
  --pad:    clamp(18px,5vw,32px);
}

#home * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ── الخلفية ── */
#BG { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ── الغلاف الرئيسي ── */
#APP {
  position: relative; z-index: 1;
  width: 100%; height: 100vh; height: 100svh;
  overflow: hidden;
}

/* ── الشريط العلوي ── */
#TOPBAR {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(5,10,20,0.7);
  backdrop-filter: blur(12px);
}
.tb-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px; font-weight: 900;
  color: var(--gold); letter-spacing: 2px;
  margin: 0; padding: 0;
}
.tb-badge {
  font-size: 10px; padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(61,214,140,0.4);
  color: var(--green);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
}

/* ── المشاهد ── */
.SCN {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--pad);
  padding-top: 52px;
  padding-bottom: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.SCN.active { opacity: 1; pointer-events: auto; }

/* ── شريط التقدم (مخفي — مُبسَّط) ── */
#PROG { display: none; }
#PROG-BAR { display: none; }

/* ── نقاط التنقل ── */
#DOTS {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 50;
}
#home .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border); transition: all 0.3s;
}
#home .dot.on { background: var(--gold); width: 16px; border-radius: 3px; }

/* ── زر التخطي — إصلاح: حجم touch target صغير جداً ── */
#hero-skip {
  position: absolute; bottom: 16px; right: 16px;
  font-family: 'Orbitron', sans-serif; font-size: 11px;
  color: var(--muted); letter-spacing: 2px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 20px;
  /* إصلاح: زيادة الـ padding لـ 44px touch target (WCAG) */
  padding: 11px 18px;
  min-height: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,10,20,0.6);
  z-index: 20; transition: color .2s, border-color .2s;
}
#hero-skip:active, #hero-skip:focus-visible {
  color: var(--gold); border-color: var(--gold);
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ── مشهد 1 — الشعار ── */
#s1 .brand-ring {
  width: 154px; height: 154px; border-radius: 32px; padding: 0; overflow: hidden;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg2), var(--bg2)) padding-box,
    conic-gradient(from 0deg, var(--gold), var(--blue), var(--gold)) border-box;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  animation: spinBorder 6s linear infinite;
  opacity: 0; transform: scale(0.3);
  transition: opacity 1s, transform 1s cubic-bezier(0.16,1,0.3,1);
}
@keyframes spinBorder { to { filter: hue-rotate(360deg); } }
#s1 .brand-ring.in  { opacity: 1; transform: scale(1); }
#s1 .brand-letter   { font-family: 'Orbitron', sans-serif; font-size: 38px; font-weight: 900; color: var(--gold); }
#s1 .brand-name {
  font-family: 'Orbitron', sans-serif; font-size: 28px; font-weight: 900;
  color: var(--text); letter-spacing: 4px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s 0.6s, transform 0.8s 0.6s cubic-bezier(0.16,1,0.3,1);
  margin: 0; padding: 0;
}
#s1 .brand-name.in  { opacity: 1; transform: translateY(0); }
#s1 .brand-name span { color: var(--gold); }
#s1 .brand-divider {
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto;
  transition: width 0.8s 1s ease;
}
#s1 .brand-divider.in { width: 180px; }
#s1 .brand-tagline {
  color: var(--muted); font-size: 13px; font-weight: 300; line-height: 1.9;
  text-align: center; max-width: 280px;
  opacity: 0; transition: opacity 0.8s 1.3s;
  margin: 0; padding: 0;
}
#s1 .brand-tagline.in   { opacity: 1; }
#s1 .brand-tagline strong { color: var(--text); font-weight: 700; }

/* ── مشهد 2 — الأسعار ── */
.price-header {
  font-size: 9px; font-family: 'Orbitron', sans-serif;
  color: var(--muted); letter-spacing: 2px; text-align: right;
  width: 100%; margin-bottom: 10px;
  opacity: 0; transition: opacity 0.5s;
}
.price-header.in { opacity: 1; }
.price-card {
  width: 100%; padding: 14px 18px; margin-bottom: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transform: translateX(-30px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16,1,0.3,1);
  backdrop-filter: blur(8px);
}
.price-card.in    { opacity: 1; transform: translateX(0); }
.pc-pair          { font-family: 'Orbitron', sans-serif; font-size: clamp(14px,4vw,17px); font-weight: 700; color: var(--text); margin: 0; padding: 0; }
.pc-sub           { font-size: 9px; color: var(--muted); margin-top: 3px; font-family: 'Orbitron', sans-serif; letter-spacing: 1px; }
.pc-price         { font-family: 'Orbitron', sans-serif; font-size: clamp(16px,4.5vw,20px); font-weight: 700; color: var(--gold); text-align: left; }
.pc-change        { font-size: 10px; text-align: left; margin-top: 3px; font-family: 'Orbitron', sans-serif; }
#home .up         { color: var(--green); }
#home .dn         { color: var(--red); }
#home .live-dot   { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; margin-left: 4px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink  { 0%,100%{ opacity:1 } 50%{ opacity:0.2 } }

/* ── مشهد 3 — البوتات ── */
.bots-title { font-family: 'Orbitron', sans-serif; font-size: 11px; color: var(--muted); letter-spacing: 2px; margin-bottom: 16px; text-align: center; opacity: 0; transition: opacity 0.5s; }
.bots-title.in { opacity: 1; }
.bot-card { width: 100%; padding: 18px 20px; margin-bottom: 10px; border-radius: 14px; border: 1px solid; backdrop-filter: blur(8px); opacity: 0; transform: translateY(24px); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.bot-card.in     { opacity: 1; transform: translateY(0); }
.bot-news        { background: rgba(79,163,224,0.12); border-color: rgba(79,163,224,0.35); }
.bot-smart       { background: rgba(157,125,232,0.12); border-color: rgba(157,125,232,0.35); }
.bot-top         { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bot-name        { font-size: clamp(15px,4vw,18px); font-weight: 800; color: var(--text); margin: 0; padding: 0; }
.bot-icon        { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; }
.bot-icon svg    { width: 20px; height: 20px; }
.bot-news .bot-icon  { background: rgba(79,163,224,0.12); }
.bot-news .bot-icon svg { stroke: var(--blue); }
.bot-smart .bot-icon { background: rgba(157,125,232,0.12); }
.bot-smart .bot-icon svg { stroke: var(--purple); }
.bot-label       { font-size: 9px; font-family: 'Orbitron', sans-serif; padding: 2px 8px; border-radius: 10px; font-weight: 600; letter-spacing: 1px; margin-top: 4px; }
.bot-news .bot-label  { background: rgba(79,163,224,0.15); color: var(--blue); }
.bot-smart .bot-label { background: rgba(157,125,232,0.15); color: var(--purple); }
.bot-desc        { font-size: clamp(11px,3vw,13px); color: var(--muted); line-height: 1.8; margin-bottom: 12px; padding: 0; }
.bot-stats       { display: flex; gap: 8px; }
.bstat           { flex: 1; text-align: center; padding: 8px 4px; background: rgba(255,255,255,0.06); border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); }
.bstat-val       { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 700; color: var(--gold); margin: 0; padding: 0; }
.bstat-lbl       { font-size: 9px; color: var(--muted); margin-top: 2px; padding: 0; }
.bot-demo-note   { font-size: 10px; color: var(--muted); text-align: center; margin-top: 8px; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); }

/* ── مشهد 4 — نقاط الخدمة ── */
.pts-header { text-align: center; margin-bottom: 16px; opacity: 0; transform: translateY(-16px); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.pts-header.in { opacity: 1; transform: translateY(0); }
.pts-title   { font-family: 'Orbitron', sans-serif; font-size: 10px; color: var(--muted); letter-spacing: 2px; margin-bottom: 6px; }
.pts-main    { font-size: clamp(22px,6vw,30px); font-weight: 800; color: var(--text); margin: 0; padding: 0; }
.pts-main span { color: var(--gold); }
.pts-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.pts-item    { padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.07); text-align: center; opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.pts-item.in { opacity: 1; transform: translateY(0); }
.pts-icon    { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; border: 1px solid var(--border); }
.pts-icon svg { width: 22px; height: 22px; }
.pts-val     { font-family: 'Orbitron', sans-serif; font-size: clamp(14px,3.5vw,18px); font-weight: 700; margin: 0; padding: 0; }
.pts-lbl     { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.pts-note    { width: 100%; margin-top: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(232,184,75,0.2); background: rgba(232,184,75,0.04); font-size: 11px; color: var(--muted); line-height: 1.7; text-align: center; opacity: 0; transition: opacity 0.7s 0.5s; }
.pts-note.in { opacity: 1; }

/* ── مشهد 5 — المجتمع ── */
.comm-header   { text-align: center; margin-bottom: 16px; opacity: 0; transition: opacity 0.6s; }
.comm-header.in { opacity: 1; }
.comm-title    { font-size: clamp(18px,5vw,24px); font-weight: 800; color: var(--text); margin-bottom: 6px; }
.comm-sub      { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; padding: 0; }
.comm-cards    { display: flex; gap: 8px; width: 100%; }
.comm-card     { flex: 1; padding: 16px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.07); text-align: center; opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.comm-card.in  { opacity: 1; transform: translateY(0); }
.comm-card-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; border: 1px solid var(--border); }
.comm-card-icon svg { width: 24px; height: 24px; }
.comm-card-val { font-family: 'Orbitron', sans-serif; font-size: clamp(16px,4vw,20px); font-weight: 700; color: var(--gold); margin-bottom: 4px; padding: 0; }
.comm-card-lbl { font-size: 10px; color: var(--muted); line-height: 1.5; margin: 0; padding: 0; }
.comm-features { width: 100%; margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.comm-feat     { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.06); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); opacity: 0; transition: opacity 0.5s; }
.comm-feat.in  { opacity: 1; }
.comm-feat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── مشهد 7 — CTA النهائي ── */
.hero-inner { width: 100%; max-width: 860px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: clamp(12px,2.5vh,22px); position: relative; z-index: 1; }
#s7 { justify-content: center; padding-top: 56px; padding-bottom: 36px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#hero-timer     { position: absolute; top: 42px; left: 0; right: 0; height: 2px; background: rgba(255,255,255,0.06); z-index: 20; }
#hero-timer-bar { height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--gold), var(--gold2)); box-shadow: 0 0 6px rgba(232,184,75,0.5); }

.h7-title { font-size: clamp(20px,5.5vw,36px); font-weight: 800; line-height: 1.35; color: var(--text); opacity: 0; transform: translateY(20px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); margin: 0; padding: 0; }
.h7-title.in    { opacity: 1; transform: translateY(0); }
.h7-title span  { color: var(--gold); }
.h7-sub         { font-size: clamp(12px,3.2vw,15px); color: var(--muted); line-height: 1.9; max-width: 640px; padding: 0 8px; opacity: 0; transform: translateY(16px); transition: opacity .9s cubic-bezier(.16,1,.3,1) .2s, transform .9s cubic-bezier(.16,1,.3,1) .2s; margin: 0; }
.h7-sub.in      { opacity: 1; transform: translateY(0); }
.h7-btns        { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; opacity: 0; transform: translateY(12px); transition: opacity .8s cubic-bezier(.16,1,.3,1) .4s, transform .8s cubic-bezier(.16,1,.3,1) .4s; }
.h7-btns.in     { opacity: 1; transform: translateY(0); }
.h7-stats       { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.16,1,.3,1) .6s, transform .9s cubic-bezier(.16,1,.3,1) .6s; }
.h7-stats.in    { opacity: 1; transform: translateY(0); }
.h7-scard       { border-radius: 12px; padding: 16px 10px; text-align: center; border: 1px solid var(--border); backdrop-filter: blur(6px); }
.h7-scard-blue  { background: rgba(79,163,224,0.08); border-color: rgba(79,163,224,0.2); }
.h7-scard-purple { background: rgba(157,125,232,0.08); border-color: rgba(157,125,232,0.2); }
.h7-scard-green { background: rgba(61,214,140,0.08); border-color: rgba(61,214,140,0.2); }
.h7-scard-gold  { background: rgba(232,184,75,0.08); border-color: rgba(232,184,75,0.2); }
.h7-snum        { font-family: 'Orbitron', sans-serif; font-size: clamp(20px,6vw,28px); font-weight: 900; line-height: 1; margin-bottom: 5px; padding: 0; }
.h7-snum-blue   { color: var(--blue); }
.h7-snum-purple { color: var(--purple); }
.h7-snum-green  { color: var(--green); }
.h7-snum-gold   { color: var(--gold); }
.h7-slabel      { font-size: clamp(9px,2.5vw,11px); color: var(--muted); margin: 0; padding: 0; }
.h7-disclaimer  { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(240,94,94,0.2); background: rgba(240,94,94,0.05); font-size: 10px; color: rgba(240,94,94,0.8); line-height: 1.7; text-align: center; opacity: 0; transition: opacity .8s cubic-bezier(.16,1,.3,1) .8s; }
.h7-disclaimer.in { opacity: 1; }

/* ── أزرار Hero ── */
#home .btn-main {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--gold), #d4a240);
  border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Almarai', sans-serif; font-size: clamp(15px,4vw,18px);
  font-weight: 800; color: #080600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(232,184,75,0.3);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 10px;
}
#home .btn-main:active, #home .btn-main:focus-visible { transform: scale(0.97); outline: 2px solid var(--gold); outline-offset: 2px; }
#home .btn-sec {
  width: 100%; padding: 14px;
  background: transparent;
  border: 1px solid var(--border); border-radius: 14px; cursor: pointer;
  font-family: 'Almarai', sans-serif; font-size: clamp(13px,3.5vw,15px);
  font-weight: 700; color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
#home .btn-sec:active, #home .btn-sec:focus-visible { border-color: var(--gold); color: var(--text); outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── نبض الأرقام ── */
@keyframes numPulse { 0%,100%{ text-shadow: 0 0 0px currentColor } 50%{ text-shadow: 0 0 14px currentColor } }
#home .pulse-done { animation: numPulse 2.5s ease-in-out infinite; }

/* ── prefers-reduced-motion — إصلاح مهم ── */
@media (prefers-reduced-motion: reduce) {
  .SCN,
  #s1 .brand-ring,
  #s1 .brand-name,
  #s1 .brand-divider,
  #s1 .brand-tagline,
  .price-card,
  .bot-card,
  .pts-item,
  .comm-card,
  .h7-title, .h7-sub, .h7-btns, .h7-stats, .h7-disclaimer {
    transition: none !important;
    animation: none !important;
  }
  .SCN.active { opacity: 1; }
  #s1 .brand-ring.in,
  #s1 .brand-name.in,
  .price-card.in, .bot-card.in, .pts-item.in, .pts-note.in,
  .comm-card.in, .h7-title.in, .h7-sub.in, .h7-btns.in,
  .h7-stats.in, .h7-disclaimer.in { opacity: 1; transform: none; }
  #hero-timer-bar { transition: none !important; }
  #home .pulse-done { animation: none !important; }
}