/* ═══════════════════════════════════════════════════════════
   بطاقات المراجعة قبل الاختبار (3D، بتتقلب وتتسحب)
   ═══════════════════════════════════════════════════════════ */

/* ═══════════ كروت الشرح (3D) ═══════════ */
.learn { position: fixed; inset: 0; z-index: 36; display: grid; place-items: center; padding: 2rem; background: var(--sand); overflow: hidden; }
.learn__inner { width: min(60rem, 100%); display: grid; justify-items: center; text-align: center; }
.learn__eyebrow { margin: 0 0 .7rem; color: var(--gold); font-weight: 600; }
.learn__title { margin: 0 0 .7rem; font-family: var(--display); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.25; }
.learn__sub { margin: 0 0 2.2rem; color: var(--ink-2); }
.deck { position: relative; width: min(21rem, 82vw); height: min(27rem, 49vh); perspective: 1400px; transform-style: preserve-3d; }
.fc { position: absolute; inset: 0; transform-style: preserve-3d; touch-action: pan-y; user-select: none; cursor: grab; }
.fc:not(.is-top) { pointer-events: none; }
.fc__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.fc.is-flipped .fc__in { transform: rotateY(180deg); }
.fc__face { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--paper); box-shadow: 0 30px 60px -28px rgba(60, 45, 20, .45), 0 2px 0 rgba(255, 255, 255, .8) inset; border: 1px solid rgba(255, 255, 255, .8); display: flex; flex-direction: column; text-align: start; }
.fc__front .fc__img { flex: 1; min-height: 0; position: relative; background: var(--sand-2); }
.fc__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fc__body { padding: 1.2rem 1.5rem 1.4rem; }
.fc__tag { display: inline-block; padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--tone-bg); color: var(--tone); }
.fc__t { margin: .6rem 0 .3rem; font-family: var(--display); font-size: 1.65rem; line-height: 1.3; }
.fc__hint { margin: 0; font-size: .85rem; color: var(--ink-2); }
.fc__hint::before { content: '↻ '; color: var(--tone); }
.fc__back { transform: rotateY(180deg); padding: 1.8rem 1.6rem; gap: .2rem; border-top: 6px solid var(--tone); }
.fc__back .fc__t { margin-top: .8rem; }
.fc__back .fc__tag { align-self: flex-start; }
.fc__b { margin: .4rem 0 1.2rem; font-size: 1.12rem; line-height: 1.85; }
.fc__x { margin-top: auto; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(191, 81, 59, .1); }
.fc__x b { display: block; margin-bottom: .2rem; font-size: .82rem; color: var(--red); }
.fc__x p { margin: 0; line-height: 1.75; }
.fc--green { --tone: var(--mint-d); --tone-bg: rgba(166, 212, 187, .4); }
.fc--gold { --tone: #9a7426; --tone-bg: rgba(230, 196, 122, .35); }
.fc--red { --tone: var(--red); --tone-bg: rgba(191, 81, 59, .12); }
.fc--ink { --tone: var(--ink); --tone-bg: rgba(36, 50, 43, .1); }
.learn__nav { display: flex; align-items: center; gap: 1.6rem; margin-top: 4.4rem; }
.learn__arrow { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); font-size: 1.3rem; transition: transform .3s var(--ease), border-color .3s, opacity .3s; }
.learn__arrow:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--mint-d); }
.learn__arrow:disabled { opacity: .3; cursor: default; }
.learn__count { min-width: 5rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.learn__actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.6rem; min-height: 3.6rem; }

/* ── الموبايل ── */
@media (max-width: 760px) {
  .learn { padding: 1.4rem; }
  .deck { width: 78vw; height: 50vh; margin-top: 1rem; }
  .fc__t { font-size: 2rem; }
  .fc__b { font-size: 1.35rem; }
  .fc__x p { font-size: 1.25rem; }
  .fc__hint, .fc__tag { font-size: 1.05rem; }
  .learn__sub { font-size: 1.3rem; margin-bottom: 1.6rem; }
}
