/* ===== صفحة طريقة التفعيل ===== */
.act { padding-top: 28px; padding-bottom: 56px; }
.act bdi { unicode-bidi: isolate; }
.act h2, .act h3 { font-family: Cairo, Tajawal, sans-serif; }

/* البداية */
.act-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 44px 24px 34px; border: 1px solid var(--border-strong); border-radius: 24px;
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(0, 217, 255, .18), transparent 70%),
    radial-gradient(40% 60% at 100% 100%, rgba(0, 145, 255, .12), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.act-kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(0, 217, 255, .1); border: 1px solid rgba(0, 217, 255, .28); color: var(--cyan); font-size: 13px; font-weight: 800; }
.act-hero h1 { margin: 14px 0 10px; font-family: Cairo, sans-serif; font-weight: 900; font-size: clamp(26px, 4.4vw, 42px); line-height: 1.35; }
.act-hero p { max-width: 620px; margin: 0 auto; color: var(--text-dim); font-size: 16px; line-height: 1.9; }
.act-flow { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin: 24px 0 0; padding: 0; list-style: none; }
.act-flow li { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14.5px; }
.act-flow span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); color: #03121c; font-weight: 900; font-size: 14px; }
.act-flow li + li::before { content: ""; width: 26px; height: 2px; margin-inline-end: 8px; background: linear-gradient(90deg, transparent, var(--border-strong)); }

/* اختيار الجهاز */
.act-picker { margin-top: 34px; }
.act-picker h2 { font-size: clamp(19px, 2.6vw, 24px); font-weight: 900; margin-bottom: 14px; }
.act-devices { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.act-device {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 8px 13px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  color: var(--text); cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.act-device:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.act-device[aria-selected="true"] {
  border-color: var(--cyan); background: radial-gradient(90% 80% at 50% 0, rgba(0, 217, 255, .2), transparent 75%), var(--surface-2);
  box-shadow: 0 0 0 1px var(--cyan), 0 10px 26px rgba(0, 217, 255, .18);
}
.act-device:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.act-device-art { display: grid; place-items: center; width: 52px; height: 52px; }
.act-device-name { font-size: 13px; font-weight: 800; line-height: 1.45; text-align: center; }
.act-yours { position: absolute; top: -9px; inset-inline-start: 50%; transform: translateX(50%); padding: 2px 9px; border-radius: 999px; background: var(--gold); color: #1a1300; font-size: 11px; font-weight: 900; white-space: nowrap; }

/* بطاقة الشرح */
.act-guide { margin-top: 22px; scroll-margin-top: 80px; }
.act-card { border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(180deg, var(--surface), #0c1b2b); overflow: hidden; animation: act-in .25s ease; }
@keyframes act-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.act-card-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: rgba(0, 217, 255, .04); }
.act-card-art { display: grid; place-items: center; flex: none; width: 56px; height: 56px; padding: 9px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border-strong); }
.act-card-title { flex: 1; min-width: 0; }
.act-card-title h2 { font-size: clamp(19px, 2.6vw, 25px); font-weight: 900; }
.act-card-title p { margin-top: 2px; color: var(--text-dim); font-size: 14px; }
.act-share { flex: none; padding: 9px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: color .2s, border-color .2s; }
.act-share:hover { color: var(--cyan); border-color: var(--border-strong); }
.act-notice { display: flex; gap: 10px; margin: 18px 24px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 201, 60, .08); border: 1px solid rgba(255, 201, 60, .3); color: #ffe7a3; font-size: 14.5px; line-height: 1.8; }
.act-card-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; padding: 24px; }
.act-card-body h3 { font-size: 17px; font-weight: 900; margin-bottom: 14px; }
.act-sub { margin-top: 26px; }

/* الخطوات: خط زمني مرقّم */
.act-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.act-steps li {
  position: relative; counter-increment: step; padding: 2px 52px 22px 0; font-size: 16px; line-height: 1.9; font-weight: 500;
}
.act-steps li::before {
  content: counter(step); position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); color: #03121c; font-weight: 900; font-size: 15px; box-shadow: 0 0 0 5px rgba(0, 217, 255, .12);
}
.act-steps li::after { content: ""; position: absolute; top: 40px; bottom: 4px; right: 16px; width: 2px; background: linear-gradient(180deg, var(--border-strong), transparent); }
.act-steps li:last-child { padding-bottom: 0; }
.act-steps li:last-child::after { display: none; }
.act-inline { display: inline-block; padding: 0 8px; margin: 0 2px; border-radius: 7px; background: rgba(255, 201, 60, .12); border: 1px solid rgba(255, 201, 60, .35); color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: .5px; }

/* الجانب: التطبيقات والأكواد */
.act-side { display: flex; flex-direction: column; gap: 16px; }
.act-box { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-2); }
.act-apps, .act-codes { display: grid; gap: 10px; }
.act-app { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); transition: border-color .2s, transform .2s, background .2s; }
a.act-app:hover { border-color: var(--cyan); background: var(--surface-2); transform: translateY(-1px); }
.act-app.is-static { opacity: .9; }
.act-app-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: #050c16; color: var(--text); }
.act-app-icon svg { width: 22px; height: 22px; }
.act-app-text { display: flex; flex-direction: column; min-width: 0; }
.act-app-text strong { font-size: 15px; font-weight: 800; }
.act-app-text small { color: var(--text-dim); font-size: 12.5px; }
.act-hint { margin-top: 10px; color: var(--text-dim); font-size: 12.5px; }
.act-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px dashed rgba(255, 201, 60, .4); border-radius: 14px; background: rgba(255, 201, 60, .05); }
.act-code > div { display: flex; flex-direction: column; min-width: 0; }
.act-code-label { color: var(--text-dim); font-size: 12.5px; font-weight: 700; }
.act-code-value { color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 900; letter-spacing: 1.5px; text-align: right; }
.act-copy { flex: none; min-width: 64px; min-height: 38px; padding: 7px 14px; border: 1px solid rgba(255, 201, 60, .5); border-radius: 11px; background: transparent; color: var(--gold); font: inherit; font-size: 13.5px; font-weight: 900; cursor: pointer; transition: background .2s; }
.act-copy:hover { background: rgba(255, 201, 60, .12); }
.act-copy.is-done { background: var(--success); border-color: var(--success); color: #03121c; }

/* فيديو الشرح */
.act-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.act-video { display: flex; align-items: center; gap: 12px; padding: 9px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); color: var(--text); transition: border-color .2s; }
.act-video:hover { border-color: var(--cyan); }
.act-video-thumb { position: relative; flex: none; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; background: #050c16; }
.act-video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.act-play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ff0033; color: #fff; font-size: 12px; padding-inline-start: 2px; }
.act-video-label { display: flex; flex-direction: column; font-weight: 800; font-size: 14.5px; }
.act-video-label small { color: var(--text-dim); font-weight: 500; font-size: 12px; margin-top: 2px; }

/* بيانات الدخول، الأسئلة، الدعم */
.act-creds { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.act-creds-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--bg-2); font-size: 22px; }
.act-creds > div { flex: 1; }
.act-creds h2 { font-size: 17px; font-weight: 900; }
.act-creds p { margin-top: 3px; color: var(--text-dim); font-size: 14.5px; line-height: 1.8; }
.act-faq { margin-top: 38px; }
.act-faq h2 { font-size: clamp(19px, 2.6vw, 24px); font-weight: 900; margin-bottom: 14px; }
.act-q { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.act-q summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; font-weight: 800; cursor: pointer; list-style: none; }
.act-q summary::-webkit-details-marker { display: none; }
.act-q summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg-2); color: var(--cyan); font-size: 18px; transition: transform .2s; }
.act-q[open] summary::after { transform: rotate(45deg); }
.act-q p { padding: 0 18px 16px; color: var(--text-dim); line-height: 1.9; }
.act-support {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 34px; padding: 26px 28px; border-radius: 22px;
  border: 1px solid var(--border-strong); background: radial-gradient(70% 120% at 0 50%, rgba(0, 217, 255, .14), transparent 70%), var(--surface);
}
.act-support h2 { font-size: 21px; font-weight: 900; }
.act-support p { margin-top: 4px; color: var(--text-dim); }

/* الشاشات المتوسطة */
@media (max-width: 1080px) { .act-devices { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .act-card-body { grid-template-columns: 1fr; }
  .act-side { order: -1; }
}

/* الجوال: الأجهزة في شريط أفقي يتمرر بدل ما تاخذ الشاشة كلها */
@media (max-width: 760px) {
  .act { padding-top: 16px; }
  .act-hero { padding: 30px 16px 24px; border-radius: 20px; }
  .act-hero p { font-size: 15px; }
  .act-flow { gap: 8px 12px; }
  .act-flow li { font-size: 13px; gap: 6px; }
  .act-flow li + li::before { width: 12px; margin-inline-end: 4px; }
  .act-flow span { width: 24px; height: 24px; font-size: 12.5px; }
  .act-picker { margin-top: 24px; }
  .act-devices {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -20px; padding: 12px 20px 6px;
  }
  .act-devices::-webkit-scrollbar { display: none; }
  .act-device { flex: 0 0 104px; scroll-snap-align: center; padding: 14px 6px 11px; }
  .act-device-art { width: 44px; height: 44px; }
  .act-device-name { font-size: 12px; }
  .act-card { border-radius: 18px; }
  .act-card-head { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .act-card-art { width: 48px; height: 48px; }
  .act-share { width: 100%; }
  .act-notice { margin: 14px 16px 0; font-size: 14px; }
  .act-card-body { padding: 16px; gap: 20px; }
  .act-steps li { font-size: 15.5px; padding-right: 46px; }
  .act-videos { grid-template-columns: 1fr; }
  .act-creds { flex-wrap: wrap; padding: 16px; }
  .act-creds .btn { width: 100%; }
  .act-support { flex-direction: column; align-items: stretch; text-align: center; padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { .act-card { animation: none; } .act-device, .act-app { transition: none; } }
