/* ===== الكارت رابط ===== */
a.card { color: inherit; text-decoration: none; }

/* ===== أيقونة صورة ===== */
.icon-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.row-icon { overflow: hidden; }
.row-icon .icon-img { border-radius: 15px; }

/* ===== صفحة الشرح الكاملة ===== */
.item-wrap { max-width: 880px; padding-bottom: 60px; }
.back-link-top {
  display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 10px;
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.back-link-top:hover { color: var(--text); }

.item-cover {
  display: block; width: 100%; height: clamp(200px, 42vw, 380px);
  object-fit: cover; border-radius: 28px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.item-cover.placeholder {
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface-solid)), color-mix(in srgb, var(--accent) 8%, var(--surface-solid)));
}
.item-cover.placeholder span { font-size: 92px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.18)); }

.item-info { margin-top: 26px; }
.item-info .type-tag { font-weight: 700; font-size: .85rem; color: var(--accent); }
.item-info h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; margin-top: 4px; }
.item-info .subtitle { font-size: 1.02rem; margin-top: 6px; }
.item-info .desc { font-size: 1rem; margin-top: 14px; color: var(--muted); white-space: pre-line; }
.point-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.point-list li {
  padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.point-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }

.guide-section { margin-top: 40px; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.guide-head h2 { font-size: 1.45rem; font-weight: 800; }
.count-pill { font-size: .85rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 30px; }
.timeline::before {
  content: ""; position: absolute; top: 22px; bottom: 22px; inset-inline-start: 21px;
  width: 2px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 15%, transparent));
}
.step-full { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; animation: rise .6s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 10) * 80ms); }
.step-num {
  width: 44px; height: 44px; border-radius: 15px; z-index: 1;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: 0 10px 22px -10px var(--accent);
}
.step-body { min-width: 0; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.step-label { font-size: .8rem; font-weight: 700; color: var(--accent); }
.step-body h3 { font-size: 1.22rem; font-weight: 800; margin-top: 2px; }
.step-body p { color: var(--muted); margin-top: 8px; white-space: pre-line; font-size: 1rem; }

.shot { margin: 18px 0 0; }
.shot-btn {
  display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; border-radius: 18px;
}
.shot-btn img {
  display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain;
  background: var(--bg-2); border-radius: 18px; border: 1px solid var(--border);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.shot-btn:hover img { box-shadow: 0 18px 40px -20px var(--accent); }
.shot figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* ===== المعرض (تكبير الصور) ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  background: rgba(3, 7, 18, .94); padding: 16px;
  animation: fade .25s ease both;
}
.lightbox[hidden] { display: none !important; }
.lb-top { display: flex; justify-content: space-between; align-items: center; color: #e2e8f0; font-weight: 700; }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; animation: pop .35s var(--ease) both; }
.lb-cap { color: #cbd5e1; text-align: center; font-size: .95rem; padding-bottom: 6px; }
.lb-btn {
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 22px; cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { inset-inline-start: 4px; }
.lb-next { inset-inline-end: 4px; }
.lb-bottom { display: flex; justify-content: center; }

/* ===== لوحة الإدارة: الأيقونات ===== */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 12px; }
.emoji-btn {
  height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-solid); font-size: 22px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.emoji-btn:hover { transform: translateY(-2px); }
.emoji-btn[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.icon-preview { width: 74px; height: 74px; border-radius: 20px; font-size: 38px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .step-full { grid-template-columns: 36px 1fr; gap: 12px; }
  .step-num { width: 36px; height: 36px; border-radius: 12px; font-size: .95rem; }
  .timeline::before { inset-inline-start: 17px; }
  .step-body { padding: 16px; border-radius: 18px; }
  .lb-btn { width: 40px; height: 40px; }
}
