/* ═══════════════════════════════════════════════════════════════
   كاركتير دكتور عمر عقل + فقاعة الرسائل
   ═══════════════════════════════════════════════════════════════ */

.oa-quote {
  --oa-quote-bg: #fffdf8;
  --oa-quote-ink: #14342C;
  --oa-quote-muted: #4A6A5E;
  --oa-quote-accent: #00A878;
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px 16px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--oa-quote-bg);
  color: var(--oa-quote-ink);
  box-shadow: 0 14px 36px rgba(8, 28, 22, .22);
  text-align: start;
  max-width: 100%;
}
.oa-quote::after {
  content: "";
  position: absolute;
  bottom: -9px;
  inset-inline-start: 28px;
  width: 18px;
  height: 18px;
  background: var(--oa-quote-bg);
  transform: rotate(45deg);
  border-radius: 2px;
}
.oa-quote[data-type="scientific"] {
  --oa-quote-accent: #1FB6C9;
}
.oa-quote[data-type="scientific"] .oa-quote__badge {
  background: rgba(31, 182, 201, .16);
}
.oa-quote__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 168, 120, .16);
  color: var(--oa-quote-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.oa-quote__text {
  margin: 0;
  font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--oa-quote-ink);
  min-height: 2.4em;
  transition: opacity .35s ease, transform .35s ease;
}
.oa-quote.is-swap .oa-quote__text {
  opacity: 0;
  transform: translateY(6px);
}
html[data-theme="dark"] .oa-quote {
  --oa-quote-bg: #12241F;
  --oa-quote-ink: #EAF7F2;
  --oa-quote-muted: #9BB8AE;
}

.oa-home-quote {
  margin: 4px 0 8px;
  max-width: 540px;
  z-index: 2;
}
.lg-hero__copy .oa-home-quote::after {
  inset-inline-start: 22px;
}

/* فقاعة الهيرو */
.lg-hero__photo {
  position: relative;
  overflow: visible;
}
.lg-hero__quote {
  position: absolute;
  top: 8px;
  inset-inline-end: -6%;
  inset-inline-start: auto;
  width: min(280px, 78%);
  z-index: 4;
  animation: oaQuotePop .7s cubic-bezier(.22, 1, .36, 1) .2s both;
}
.lg-hero__photo img {
  object-fit: cover;
  object-position: center 12%;
}
@keyframes oaQuotePop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ودجت الكاركتير العائم */
.oa-mascot {
  position: fixed;
  z-index: 12000;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  inset-inline-start: max(12px, env(safe-area-inset-left, 0px));
  display: grid;
  justify-items: start;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  pointer-events: none;
}
.oa-splash ~ .oa-mascot,
body.oa-splash-lock .oa-mascot {
  opacity: 0;
  visibility: hidden;
}
.oa-mascot.is-ready {
  opacity: 1;
  visibility: visible;
  animation: oaMascotIn .55s cubic-bezier(.22, 1, .36, 1) both;
}
.oa-mascot[hidden] {
  display: none !important;
}
.oa-mascot * {
  pointer-events: auto;
}
.oa-mascot.is-leaving {
  animation: oaMascotOut .35s ease forwards;
}
@keyframes oaMascotIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes oaMascotOut {
  to { opacity: 0; transform: translateY(16px) scale(.96); }
}
.oa-mascot__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: end;
  gap: 8px;
}
.oa-mascot__face {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 12px 28px rgba(8, 28, 22, .28);
  background: #9fd9c8;
}
.oa-mascot__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
}
.oa-mascot .oa-quote {
  margin-bottom: 10px;
}
.oa-mascot__close {
  position: absolute;
  top: -6px;
  inset-inline-end: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #14342C;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(8, 28, 22, .28);
}
.oa-mascot__close:hover { background: #0b1f1a; }

@media (max-width: 720px) {
  .oa-home-quote { max-width: 100%; }
  .oa-quote__text { font-size: 13.5px; }
  .oa-mascot {
    width: min(280px, calc(100vw - 18px));
  }
  .oa-mascot__face { width: 72px; height: 72px; }
  .oa-mascot__row { grid-template-columns: 72px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .oa-quote,
  .oa-mascot,
  .lg-hero__quote {
    animation: none !important;
    transition: none !important;
  }
}
