/* =========================================================
   ASK Translation — hero-card.css
   كارت "ورقة الترجمة الحية" في الهيرو
   ========================================================= */
.live-doc {
  position: relative; z-index: 2;
  width: 100%;
  padding: 1.4rem 1.4rem 1.6rem;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(241,216,146,.28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.12);
  animation: ldIn 1.1s cubic-bezier(.22, 1, .36, 1) 1.3s both, ldFloat 8s ease-in-out 2.4s infinite;
}

/* الهيرو بيتقسم عمودين: الكلام يمين والكارت شمال، من غير ما حد يغطي على حد */
@media (min-width: 1180px) {
  .hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: clamp(2.5rem, 4vw, 4.5rem); align-items: center; }
  .hero-copy { max-width: none; }
  .hero h1 { white-space: normal; font-size: clamp(2.4rem, 1rem + 2.7vw, 3.7rem); }
}
@keyframes ldIn { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ldFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* الشريط العلوي */
.live-doc__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 1rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.live-doc__brand { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: rgba(255,255,255,.75); }
.live-doc__brand img { width: 26px; height: 26px; }
.live-doc__status {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 500; padding: .3rem .75rem; border-radius: 100px;
  background: rgba(241,216,146,.12); color: #F1D892;
  transition: background-color .4s, color .4s;
}
.live-doc__status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: ldBlink 1.2s ease-in-out infinite;
}
.live-doc__status.is-done { background: rgba(31,168,85,.18); color: #7BE0A4; }
.live-doc__status.is-done::before { animation: none; }
@keyframes ldBlink { 50% { opacity: .25; } }

/* المستند الأصلي والمترجم */
.live-doc__block {
  position: relative; border-radius: 14px; padding: .9rem 1rem 1rem;
  background: rgba(8,23,34,.35); border: 1px solid rgba(255,255,255,.08);
}
.live-doc__block--dst { direction: ltr; text-align: left; background: rgba(255,255,255,.95); color: #0B1F2E; border-color: transparent; min-height: 118px; }
.live-doc__tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .15rem .6rem; border-radius: 6px; margin-bottom: .55rem;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
}
.live-doc__block--dst .live-doc__tag { background: #0B1F2E; color: #F1D892; transition: opacity .3s; }
.live-doc__text {
  margin: 0; min-height: 1.6em;
  font-family: "Alexandria", "Segoe UI", "Noto Sans", Tahoma, sans-serif;
  font-size: 1.25rem; font-weight: 600; line-height: 1.6;
  transition: opacity .35s, filter .35s;
}
.live-doc__block--dst .live-doc__text { font-size: 1.2rem; padding-right: 5.5rem; }
.live-doc__text.is-fading { opacity: 0; filter: blur(4px); }
.live-doc__text.is-typing::after { /* مؤشر الكتابة */
  content: ""; display: inline-block; width: 2px; height: 1.1em; margin-inline: 3px;
  vertical-align: -.15em; background: #C99A3E; animation: ldCaret .8s steps(1) infinite;
}
@keyframes ldCaret { 50% { opacity: 0; } }

/* سهم الترجمة بين المستندين */
.live-doc__swap {
  display: grid; place-items: center; width: 38px; height: 38px; margin: -.35rem auto; position: relative; z-index: 1;
  border-radius: 50%; background: linear-gradient(135deg, #926318, #F6DB92 50%, #8F6118); color: #081722;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.6);
}
.live-doc__swap svg { width: 18px; height: 18px; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.live-doc.is-working .live-doc__swap svg { transform: rotate(180deg); }

/* ختم أسك (حبر أزرق زي الختم الحقيقي) */
.live-doc__seal {
  position: absolute; width: 96px; height: 96px; right: .5rem; top: 50%; margin-top: -48px;
  color: #1F3FA6; opacity: 0; pointer-events: none; mix-blend-mode: multiply;
}
.live-doc__seal.is-on { animation: ldStamp .5s cubic-bezier(.2, .9, .3, 1.25) forwards; }
.live-doc__seal.is-off { animation: ldUnstamp .35s ease forwards; }
@keyframes ldStamp {
  0% { opacity: 0; transform: rotate(var(--r, -12deg)) scale(2.4); }
  65% { opacity: .92; transform: rotate(var(--r, -12deg)) scale(.92); }
  100% { opacity: .88; transform: rotate(var(--r, -12deg)) scale(1); }
}
@keyframes ldUnstamp { from { opacity: .88; transform: rotate(var(--r, -12deg)) scale(1); } to { opacity: 0; transform: rotate(var(--r, -12deg)) scale(.9); } }
/* هزة خفيفة للورقة لحظة نزول الختم */
.live-doc__block--dst.is-hit { animation: ldHit .3s ease; }
@keyframes ldHit { 40% { transform: scale(.985); } }

/* سطور شكلية تحت المستند + شريط التقدم */
.live-doc__lines { display: grid; gap: .5rem; margin-top: 1.1rem; }
.live-doc__lines span { height: 7px; border-radius: 6px; background: rgba(255,255,255,.12); }
.live-doc__lines span:nth-child(2) { width: 82%; }
.live-doc__lines span:nth-child(3) { width: 60%; }
.live-doc__bar { height: 3px; margin-top: 1.2rem; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.live-doc__bar span {
  display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: right;
  background: linear-gradient(90deg, #8F6118, #F6DB92, #C99A3E);
}
.live-doc__bar span.is-run { transition: transform var(--hold, 2.4s) linear; transform: scaleX(1); }

/* يظهر بس على الشاشات الكبيرة عشان ميزاحمش العنوان */
@media (max-width: 1179px) { .live-doc { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .live-doc { animation: none; }
  .live-doc__seal { opacity: .88; transform: rotate(-12deg); }
}