/* ═══════════════════════════════════════════════════════════════
   دكتورة سلمى محزم — واجهة فاتحة احترافية
   هيرو بصورة المدرّسة · رموز علوم · عربي
   ═══════════════════════════════════════════════════════════════ */

@keyframes hxRise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hxFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(3deg); }
}
@keyframes hxDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(10px, -14px, 0); }
  66% { transform: translate3d(-8px, -6px, 0); }
}
@keyframes hxOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes hxPulseSoft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .85; }
}
@keyframes hxBubble {
  0% { transform: translateY(0); opacity: .85; }
  70% { opacity: .55; }
  100% { transform: translateY(-10px); opacity: .15; }
}
@keyframes hxStrand {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 12; }
}
@keyframes hxBeat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.1); }
  40% { transform: scale(1); }
  55% { transform: scale(1.08); }
}
@keyframes hxLensGlow {
  0%, 100% { opacity: .3; }
  50% { opacity: .65; }
}

.hx-noise { display: none; }

/* طبقة رموز علوم متحركة في المنصة */
.hx-science {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hx-science__item {
  position: absolute;
  color: rgba(197, 38, 155, 0.16);
  animation: hxDrift 11s ease-in-out infinite;
  will-change: transform;
}
html[data-theme="dark"] .hx-science__item {
  color: rgba(243, 163, 220, 0.14);
}
html[data-theme="dark"] .hx-float {
  color: rgba(243, 163, 220, 0.28);
}
.hx-science__item--a { top: 8%; inset-inline-start: 4%; animation-duration: 12s; }
.hx-science__item--b { top: 18%; inset-inline-end: 6%; animation-duration: 14s; animation-delay: .4s; }
.hx-science__item--c { top: 42%; inset-inline-start: 3%; animation-duration: 13s; animation-delay: .8s; }
.hx-science__item--d { top: 58%; inset-inline-end: 5%; animation-duration: 15s; animation-delay: 1.1s; }
.hx-science__item--e { top: 72%; inset-inline-start: 12%; animation-duration: 12.5s; animation-delay: .6s; }
.hx-science__item--f { top: 30%; inset-inline-end: 18%; animation-duration: 16s; animation-delay: 1.5s; opacity: .85; }
.hx-science__item--g { top: 12%; inset-inline-start: 38%; animation-duration: 13.5s; animation-delay: .2s; opacity: .7; }
.hx-science__item--h { top: 78%; inset-inline-end: 22%; animation-duration: 14.5s; animation-delay: 1.8s; }
.hx-science__item--i { top: 50%; inset-inline-start: 46%; animation-duration: 17s; animation-delay: 1s; opacity: .55; }
.hx-science__item--j { top: 86%; inset-inline-start: 55%; animation-duration: 12s; animation-delay: .3s; }
.hx-science__item--k { top: 24%; inset-inline-start: 22%; animation-duration: 15.5s; animation-delay: 2s; opacity: .6; }
.hx-science__item--l { top: 64%; inset-inline-end: 40%; animation-duration: 13s; animation-delay: .9s; opacity: .65; }

body.salma-platform .hx-hero,
body.salma-platform .hx-statement,
body.salma-platform .hx-path,
body.salma-platform .hx-metrics,
body.salma-platform .hx-pros,
body.salma-platform .hx-grades,
body.salma-platform .hx-cta,
body.salma-platform .hx-end,
body.salma-platform .hx-auth,
body.salma-platform .acc-page {
  position: relative;
  z-index: 1;
}
body.salma-platform .hx-dock,
body.salma-platform .acc-topbar { z-index: 200; }

/* رسائل تسجيل الدخول / إنشاء الحساب */
@keyframes hxToastIn {
  from { opacity: 0; transform: translate(-50%, -14px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes hxToastOut {
  to { opacity: 0; transform: translate(-50%, -10px) scale(.97); }
}
@keyframes hxToastBar {
  to { transform: scaleX(0); }
}

.phy-toast {
  --toast-accent: #2F6B4F;
  --toast-duration: 6000ms;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  z-index: 10050;
  width: min(440px, calc(100vw - 28px));
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 16px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--toast-accent);
  box-shadow: 0 18px 48px rgba(15, 17, 21, 0.18);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  animation: hxToastIn .36s var(--ease) both;
  overflow: hidden;
  color: var(--text);
}
html[data-theme="dark"] .phy-toast {
  background: #171A21;
  border-color: rgba(243, 163, 220, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.phy-toast--top {
  bottom: auto;
  top: max(88px, calc(env(safe-area-inset-top, 0px) + 78px));
}
body.hx-auth-body .phy-toast--top {
  top: max(88px, calc(env(safe-area-inset-top, 0px) + 78px));
}
.phy-toast--success { --toast-accent: #2F6B4F; }
.phy-toast--error { --toast-accent: #C5269B; }
.phy-toast__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--toast-accent);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--toast-accent) 35%, transparent);
}
.phy-toast__body { min-width: 0; flex: 1; }
.phy-toast__title {
  display: block;
  font-weight: 900;
  font-size: 15px;
  color: var(--text-strong);
}
.phy-toast__msg,
.phy-toast__list {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
  font-weight: 600;
}
.phy-toast__list {
  padding-inline-start: 18px;
}
.phy-toast__close {
  width: 30px;
  height: 30px;
  margin-inline-start: auto;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  background: var(--violet-50);
  border: 1px solid var(--border);
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.phy-toast__close:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.phy-toast__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
}
.phy-toast__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--toast-accent);
  transform-origin: right;
  animation: hxToastBar var(--toast-duration) linear forwards;
}
.phy-toast.is-paused .phy-toast__progress span { animation-play-state: paused; }
.phy-toast.is-leaving {
  animation: hxToastOut .28s var(--ease) both;
  pointer-events: none;
}

/* تنبيه داخل فورم الدخول/التسجيل */
.hx-auth__notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 14px 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(197, 38, 155, 0.28);
  border-inline-start: 4px solid #C5269B;
  background: #FDF2F9;
  color: var(--text-strong);
}
.hx-auth__notice--ok {
  border-color: rgba(47, 107, 79, 0.28);
  border-inline-start-color: #2F6B4F;
  background: rgba(47, 107, 79, 0.08);
}
.hx-auth__notice--info {
  border-color: rgba(197, 38, 155, 0.22);
  border-inline-start-color: #E85BC0;
  background: #FDF5FA;
}
html[data-theme="dark"] .hx-auth__notice {
  background: rgba(197, 38, 155, 0.12);
  color: #fff;
}
html[data-theme="dark"] .hx-auth__notice--ok {
  background: rgba(47, 107, 79, 0.16);
}
.hx-auth__noticeIco {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #C5269B;
  color: #fff;
  font-weight: 900;
}
.hx-auth__notice--ok .hx-auth__noticeIco { background: #2F6B4F; }
.hx-auth__noticeTitle {
  display: block;
  margin-bottom: 4px;
  font-weight: 900;
  font-size: 14.5px;
}
.hx-auth__noticeList {
  margin: 0;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
}
html[data-theme="dark"] .hx-auth__noticeList { color: var(--muted-strong); }
.hx-auth__noticeMsg {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
}

/* حركة داخل الرموز */
.hx-sym { display: block; overflow: visible; }
.hx-sym--live .hx-sym__orbit {
  transform-box: view-box;
  transform-origin: 32px 32px;
}
.hx-sym--live .hx-sym__orbit--1 { animation: hxOrbitSpin 10s linear infinite; }
.hx-sym--live .hx-sym__orbit--2 { animation: hxOrbitSpin 14s linear infinite reverse; }
.hx-sym--live .hx-sym__orbit--3 { animation: hxOrbitSpin 18s linear infinite; }
.hx-sym--live .hx-sym__core { animation: hxPulseSoft 2.4s ease-in-out infinite; transform-origin: 32px 32px; }
.hx-sym--live .hx-sym__nucleus { animation: hxPulseSoft 3s ease-in-out infinite; transform-origin: 32px 32px; }
.hx-sym--live .hx-sym__membrane { animation: hxPulseSoft 4s ease-in-out infinite; transform-origin: 32px 32px; }
.hx-sym--live .hx-sym__dot { animation: hxPulseSoft 2.2s ease-in-out infinite; }
.hx-sym--live .hx-sym__bubble--1 { animation: hxBubble 2.4s ease-in-out infinite; }
.hx-sym--live .hx-sym__bubble--2 { animation: hxBubble 2.8s ease-in-out infinite .4s; }
.hx-sym--live .hx-sym__bubble--3 { animation: hxBubble 2.2s ease-in-out infinite .8s; }
.hx-sym--live .hx-sym__strand { stroke-dasharray: 8 6; animation: hxStrand 3s ease-in-out infinite; }
.hx-sym--live .hx-sym__strand--b { animation-delay: .4s; }
.hx-sym--live .hx-sym__beat { transform-origin: 32px 32px; animation: hxBeat 1.4s ease-in-out infinite; }
.hx-sym--live .hx-sym__lens { animation: hxLensGlow 2.5s ease-in-out infinite; }
.hx-sym--live .hx-sym__vein { stroke-dasharray: 4 3; animation: hxStrand 4s ease-in-out infinite; }

.hx-wrap {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.hx-kicker {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 800;
  color: var(--violet-600);
}

.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: 14px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 15px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s, background .22s, border-color .22s;
}
.hx-btn--primary {
  background: linear-gradient(135deg, #C5269B, #E85BC0);
  color: #fff;
  box-shadow: 0 10px 24px rgba(197, 38, 155, 0.28);
}
.hx-btn--primary:hover { transform: translateY(-2px); filter: brightness(1.03); }
.hx-btn--soft {
  background: #fff;
  color: var(--violet-700);
  border-color: var(--border-strong);
}
.hx-btn--soft:hover { background: var(--violet-50); }
.hx-btn--light { background: #fff; color: var(--violet-800); }
.hx-btn--ghost {
  background: transparent; color: var(--violet-700);
  border-color: var(--border-strong);
}

/* Dock */
.hx-dock {
  position: sticky; top: 0; z-index: 200;
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  background: rgba(253, 245, 250, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
html[data-theme="dark"] .hx-dock {
  background: rgba(11, 12, 16, 0.92);
  border-bottom-color: rgba(243, 163, 220, 0.16);
}
.hx-dock__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-strong);
  font-weight: 800; font-size: 15px;
}
.hx-dock__brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: contain;
  object-position: center;
  background: #C5269B;
  padding: 2px;
  box-shadow: 0 8px 18px rgba(197, 38, 155, 0.28);
  flex: 0 0 auto;
}
.hx-dock__brand span {
  font-size: 16px;
  font-weight: 900;
}
.hx-dock__actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.hx-dock__theme {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.hx-dock__link {
  padding: 9px 14px; border-radius: 12px;
  color: var(--text-strong); font-weight: 800; font-size: 14px;
  white-space: nowrap;
}
.hx-dock__link:hover { background: var(--violet-50); }
.hx-dock__cta {
  padding: 10px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #C5269B, #E85BC0);
  color: #fff; font-weight: 800; font-size: 14px;
  white-space: nowrap;
}
.hx-dock__menu,
.hx-sheet { display: none !important; }

/* Hero فاتح + صورة المدرّسة */
.hx-hero {
  position: relative;
  padding: clamp(36px, 6vw, 64px) 0 clamp(48px, 7vw, 80px);
  background: var(--grad-soft);
  overflow: hidden;
}
html[data-theme="dark"] .hx-hero {
  background: linear-gradient(160deg, #0B0C10 0%, #14141C 45%, #1A1020 100%);
}
html[data-theme="dark"] .hx-hero__lead,
html[data-theme="dark"] .hx-hero__caption span {
  color: var(--muted);
}
html[data-theme="dark"] .hx-hero__title,
html[data-theme="dark"] .hx-hero__caption strong {
  color: #fff;
}
html[data-theme="dark"] .hx-hero__badge,
html[data-theme="dark"] .hx-hero__chips li,
html[data-theme="dark"] .hx-hero__caption {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text-strong);
}
html[data-theme="dark"] .hx-btn--soft {
  background: var(--card-bg);
  color: var(--violet-300);
  border-color: var(--border-strong);
}
.hx-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-wave);
  opacity: .18;
  pointer-events: none;
}
.hx-hero__symbols { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hx-float {
  position: absolute; color: rgba(197, 38, 155, 0.34);
  animation: hxFloat 7s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(197, 38, 155, 0.12));
}
.hx-float--a { top: 10%; inset-inline-start: 4%; }
.hx-float--b { top: 18%; inset-inline-end: 6%; animation-delay: .5s; }
.hx-float--c { bottom: 16%; inset-inline-start: 10%; animation-delay: 1s; }
.hx-float--d { bottom: 24%; inset-inline-end: 12%; animation-delay: 1.4s; }
.hx-float--e { top: 46%; inset-inline-start: 44%; animation-delay: .8s; opacity: .75; }
.hx-float--f { top: 8%; inset-inline-end: 28%; animation-delay: 1.2s; opacity: .8; }
.hx-float--g { bottom: 12%; inset-inline-end: 36%; animation-delay: 1.7s; opacity: .7; }
.hx-float--h { top: 62%; inset-inline-start: 28%; animation-delay: .3s; opacity: .72; }

.hx-hero__grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.hx-hero__copy { animation: hxRise .7s var(--ease) both; }
.hx-hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--violet-700);
  font-size: 13px; font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.hx-hero__badge svg { color: var(--violet-600); }
.hx-hero__title {
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900; line-height: 1.1;
  color: var(--text-strong);
}
.hx-hero__lead {
  margin: 0 0 26px; max-width: 34rem;
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--muted); line-height: 1.85;
}
.hx-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hx-hero__chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hx-hero__chips li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--border);
  color: var(--violet-800);
  font-size: 12.5px; font-weight: 800;
}
.hx-hero__chips svg { color: var(--violet-600); }

.hx-hero__portrait { animation: hxRise .8s .08s var(--ease) both; }
.hx-hero__frame {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 24px 50px rgba(197, 38, 155, 0.22);
  aspect-ratio: 4 / 5;
}
/* بدون القوس المتقطع الموجود في الشعار */
.hx-hero__frame::after { display: none; }
.hx-hero__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.hx-hero__caption {
  margin-top: 14px;
  display: grid; gap: 2px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.hx-hero__caption strong {
  font-size: 15px; font-weight: 900; color: var(--text-strong);
}
.hx-hero__caption span {
  font-size: 13px; color: var(--muted); font-weight: 600;
}

/* Manifesto — شكل مختلف عن الهيرو (بدون صورة) */
.hx-statement {
  padding: clamp(40px, 6vw, 72px) 0;
  background: #fff;
}
html[data-theme="dark"] .hx-statement { background: var(--page-bg); }
.hx-manifesto {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 40px);
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.hx-manifesto::before {
  content: "";
  position: absolute; inset: 0 auto auto 0; right: 0;
  height: 4px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, #C5269B, #E85BC0 55%, #F3A3DC);
}
html[data-theme="dark"] .hx-manifesto {
  background: var(--card-bg);
  border-color: var(--border);
}
html[data-theme="dark"] .hx-manifesto__ico { background: var(--card-bg-strong); }
.hx-manifesto__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--violet-50); color: var(--violet-700);
  font-size: 13px; font-weight: 900;
  border: 1px solid var(--border);
}
.hx-manifesto__kicker svg { color: var(--violet-600); }
.hx-manifesto__quote {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900; line-height: 1.25;
  color: var(--text-strong);
}
.hx-manifesto__quote em {
  display: block; margin-top: 6px; font-style: normal;
  background: linear-gradient(90deg, #C5269B, #E85BC0);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hx-manifesto__text {
  margin: 0 auto 28px;
  max-width: 36rem;
  color: var(--muted); font-size: 16px; line-height: 1.9;
}
.hx-manifesto__steps {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.hx-manifesto__steps li {
  display: grid; justify-items: center; gap: 8px;
  padding: 16px 10px;
  border-radius: 18px;
  background: var(--page-bg-alt);
  border: 1px solid var(--border);
}
.hx-manifesto__ico {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: #fff; color: var(--violet-600);
  border: 1px solid var(--border);
}
.hx-manifesto__steps strong {
  font-size: 14px; font-weight: 900; color: var(--text-strong);
}

/* Path cards */
.hx-path, .hx-pros, .hx-grades, .hx-metrics {
  padding: 0 0 clamp(56px, 8vw, 88px);
}
.hx-blockHead { margin-bottom: 28px; }
.hx-blockHead--center { text-align: center; max-width: 40rem; margin-inline: auto; margin-bottom: 32px; }
.hx-blockHead__title {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 900;
}
.hx-blockHead__sub {
  margin: 10px 0 0;
  color: var(--muted); font-size: 15px; line-height: 1.8;
}
.hx-path__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hx-path__card {
  position: relative;
  padding: 22px 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .hx-path__card { background: var(--card-bg); }
.hx-path__ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--violet-50); color: var(--violet-600);
  margin-bottom: 14px;
}
.hx-path__num {
  position: absolute; top: 16px; inset-inline-end: 16px;
  font-size: 22px; font-weight: 900; color: var(--violet-200);
}
.hx-path__card h3 {
  margin: 0 0 8px; font-size: 18px; font-weight: 900;
}
.hx-path__card p {
  margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7;
}

/* Metrics */
.hx-metrics__row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.hx-metric {
  padding: 24px; border-radius: 20px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .hx-metric { background: var(--card-bg); }
.hx-metric strong {
  display: block; font-size: clamp(30px, 4vw, 42px);
  font-weight: 900; color: var(--violet-600); line-height: 1.1;
}
.hx-metric span {
  display: block; margin-top: 8px; color: var(--muted); font-weight: 700; font-size: 13px;
}

/* Pros — بطاقات احترافية */
.hx-pros {
  position: relative;
  background:
    radial-gradient(ellipse 50% 60% at 0% 0%, rgba(232,91,192,.12), transparent 55%),
    var(--page-bg-alt);
  padding: clamp(56px, 8vw, 88px) 0 !important;
  border-block: 1px solid var(--border);
}
.hx-pros__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hx-pros__card {
  position: relative;
  display: grid; align-content: start; gap: 10px;
  min-height: 240px;
  padding: 24px 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), box-shadow .25s;
}
html[data-theme="dark"] .hx-pros__card { background: var(--card-bg); }
.hx-pros__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.hx-pros__cardTop {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.hx-pros__badge {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #C5269B, #E85BC0);
  color: #fff; font-size: 15px; font-weight: 900;
}
.hx-pros__ico {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--violet-50); color: var(--violet-600);
  border: 1px solid var(--border);
}
.hx-pros__ico img { width: 28px; height: 28px; object-fit: contain; }
.hx-pros__card h3 {
  margin: 0; font-size: 20px; font-weight: 900; color: var(--text-strong);
}
.hx-pros__card p {
  margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.8;
}

/* Grades — الصورة تظهر كاملة */
.hx-grades__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.hx-grade {
  display: grid;
  grid-template-rows: auto auto;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s;
}
html[data-theme="dark"] .hx-grade { background: var(--card-bg); }
.hx-grade:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hx-grade__media {
  aspect-ratio: 4 / 3;
  min-height: 200px;
  background: linear-gradient(145deg, #FCE4F4, #F8C9EB);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
}
html[data-theme="dark"] .hx-grade__media {
  background: linear-gradient(145deg, #1A1D26, #2A1530);
}
.hx-grade__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hx-grade__fallback { color: var(--violet-700); }
.hx-grade__body { padding: 16px 18px 18px; }
.hx-grade__body h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-strong);
}
.hx-grade__body p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.hx-grade__body span { font-size: 13px; font-weight: 900; color: var(--violet-600); }
html[data-theme="dark"] .hx-grade__body span { color: var(--violet-300); }

/* CTA — نصوص واضحة في الوضعين */
.hx-cta { padding: 0 0 clamp(64px, 9vw, 96px); }
.hx-cta__box {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 52px);
  border-radius: 28px;
  background: linear-gradient(145deg, #FFFFFF 0%, #FDF2F9 40%, #FCE4F4 100%);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .hx-cta__box {
  background: linear-gradient(145deg, #171A21 0%, #1E222B 50%, #2A1530 100%);
  border-color: var(--border-strong);
}
.hx-cta__icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--violet-600);
  margin-bottom: 12px;
}
html[data-theme="dark"] .hx-cta__icons { color: var(--violet-300); }
.hx-cta__box .hx-kicker { color: var(--violet-700); }
html[data-theme="dark"] .hx-cta__box .hx-kicker { color: var(--violet-300); }
.hx-cta__box h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.8vw, 38px);
  font-weight: 900;
  color: var(--text-strong);
}
.hx-cta__box > p {
  margin: 0 auto 22px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

/* Footer احترافي */
.hx-end {
  position: relative;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  color: var(--text);
  overflow: hidden;
  padding: 0;
}
html[data-theme="dark"] .hx-end {
  background: #0E1016;
  border-top-color: rgba(243, 163, 220, 0.16);
}
.hx-end__inner {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 28px;
}
.hx-end__top {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.hx-end__brand {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.hx-end__mark {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: contain;
  object-position: center;
  background: #C5269B;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(197, 38, 155, 0.28);
  border: 2px solid rgba(197, 38, 155, 0.25);
}
.hx-end__name {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-strong);
}
.hx-end__line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 28rem;
}
.hx-end__symbols {
  display: flex;
  gap: 12px;
  color: var(--violet-500);
  margin-top: 4px;
}
html[data-theme="dark"] .hx-end__symbols { color: var(--violet-300); }
.hx-end__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: auto;
  margin: 0;
}
.hx-end__label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--violet-700);
}
html[data-theme="dark"] .hx-end__label { color: var(--violet-300); }
.hx-end__links {
  display: grid;
  gap: 10px;
}
.hx-end__links a,
.hx-end__phones a {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  transition: color .2s;
}
.hx-end__links a:hover,
.hx-end__phones a:hover { color: var(--violet-600); }
html[data-theme="dark"] .hx-end__links a,
html[data-theme="dark"] .hx-end__phones a { color: var(--muted-strong); }
html[data-theme="dark"] .hx-end__links a:hover,
html[data-theme="dark"] .hx-end__phones a:hover { color: #fff; }
.hx-end__phones { display: grid; gap: 10px; }
.hx-end__phone { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hx-end__empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* أيقونات السوشيال من لوحة التحكم */
.hx-end__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hx-end__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--page-bg-alt);
  color: var(--text-strong);
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background .2s;
}
.hx-end__social:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  color: var(--violet-700);
}
.hx-end__social--icon {
  padding: 8px 12px 8px 8px;
}
.hx-end__social img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  flex: 0 0 auto;
  display: block;
  background: #fff;
}
html[data-theme="dark"] .hx-end__social {
  background: var(--card-bg-strong);
  color: #fff;
}
html[data-theme="dark"] .hx-end__social:hover {
  color: var(--violet-300);
  background: #22262F;
}
html[data-theme="dark"] .hx-end__social img {
  background: #fff;
}
.hx-end__socialLbl { line-height: 1.2; }

.hx-end__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: auto;
  margin: 0;
  padding-top: 20px;
  border-top: 0;
  font-size: 13px;
  color: var(--muted);
}
.hx-end__legal span { font-weight: 600; }

/* Auth — الفورم يمين · الصورة يسار (RTL) · مع هيدر/فوتر */
.hx-auth {
  min-height: calc(100svh - 88px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--page-bg);
}
body.hx-auth-body .hx-dock { position: sticky; }
.hx-auth__wall {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  padding: clamp(28px, 4vw, 48px);
  color: var(--text-strong);
  background: linear-gradient(160deg, #FDF2F9, #FCE4F4 50%, #F3A3DC 100%);
}
html[data-theme="dark"] .hx-auth__wall {
  background: linear-gradient(160deg, #0B0C10, #14141C 50%, #2A1530 100%);
  color: #fff;
}
html[data-theme="dark"] .hx-auth__wallCopy span { color: var(--muted); }
.hx-auth__wallLogo {
  position: absolute;
  inset: 12% 12% 28% 12%;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .95;
}
/* الصورة تظهر كاملة بدون قص */
.hx-auth__wall--photo {
  padding: 0;
  align-content: center;
  place-items: center;
  background: #C5269B;
  min-height: calc(100svh - 88px);
  overflow: visible;
}
html[data-theme="dark"] .hx-auth__wall--photo {
  background: #8A1870;
}
.hx-auth__wallImg {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100svh - 88px);
  object-fit: contain;
  object-position: center;
}
.hx-auth__wall--photo::after {
  content: none;
}
.hx-auth__wall--photo .hx-auth__wallCopy {
  display: none;
}
.hx-auth__wallCopy { position: relative; z-index: 1; }
.hx-auth__wallCopy strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}
.hx-auth__wallCopy span {
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.hx-auth__panel {
  background: #fff;
  display: grid;
  align-content: center;
  padding: clamp(28px, 5vw, 52px);
}
html[data-theme="dark"] .hx-auth__panel { background: var(--card-bg); }
.hx-auth__back {
  display: inline-flex; margin-bottom: 22px;
  color: var(--muted); font-weight: 800; font-size: 13px;
}
.hx-auth__title {
  margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 34px); font-weight: 900;
}
.hx-auth__sub { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }
.hx-auth__form { display: grid; gap: 13px; }
.hx-auth__form .field { display: grid; gap: 6px; }
.hx-auth__form .label { font-size: 13px; font-weight: 800; color: var(--text-strong); }
.hx-auth__form .input,
.hx-auth__form select.input {
  width: 100%; padding: 13px 14px; border-radius: 14px;
  border: 1px solid var(--field-border);
  background: var(--field-bg); color: var(--field-text);
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  outline: none;
}
.hx-auth__form .input:focus {
  border-color: var(--violet-500);
  box-shadow: 0 0 0 4px rgba(139,92,246,.14);
}
.hx-auth__form .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hx-auth__form .hint { font-size: 12px; color: var(--muted); }
.hx-auth__submit {
  margin-top: 4px; width: 100%; min-height: 50px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #C5269B, #E85BC0);
  color: #fff; font-family: var(--font-body); font-size: 15px; font-weight: 900;
  cursor: pointer; box-shadow: 0 10px 24px rgba(139,92,246,.25);
}
.hx-auth__meta {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  justify-content: space-between; align-items: center;
  font-size: 13.5px; color: var(--muted);
}
.hx-auth__meta a,
.hx-auth__meta button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--violet-700); font-weight: 900; font-size: 13.5px;
  font-family: var(--font-body);
}
.hx-auth--register .hx-auth__panel {
  align-content: start;
  overflow: auto;
  max-height: none;
  padding-block: 28px;
}

body.salma-platform.hx-auth-body {
  background: var(--page-bg) !important;
  padding: 0 !important;
}
body.hx-auth-body .hx-end {
  margin-top: 0;
}

@media (max-width: 960px) {
  .hx-hero__grid,
  .hx-path__grid,
  .hx-pros__grid,
  .hx-metrics__row,
  .hx-end__top,
  .hx-end__cols,
  .hx-auth { grid-template-columns: 1fr; }
  .hx-manifesto__steps { grid-template-columns: 1fr 1fr; }
  .hx-hero__portrait { order: -1; max-width: 360px; }
  .hx-auth {
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .hx-auth__wall {
    order: -1;
    min-height: 0;
  }
  .hx-auth__wall--photo {
    min-height: 0;
    height: auto;
    width: 100%;
    overflow: visible;
    background: #C5269B;
  }
  html[data-theme="dark"] .hx-auth__wall--photo {
    background: #8A1870;
  }
  .hx-auth__wallImg {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    display: block;
  }
  .hx-auth__form .fgrid { grid-template-columns: 1fr; }
  .hx-end__brand { justify-items: center; text-align: center; }
  .hx-end__symbols { justify-content: center; }
  .hx-end__line { max-width: none; }
  .hx-float--e,
  .hx-float--f,
  .hx-float--g,
  .hx-float--h { display: none; }
  .hx-science__item--g,
  .hx-science__item--h,
  .hx-science__item--i,
  .hx-science__item--j,
  .hx-science__item--k,
  .hx-science__item--l { display: none; }
}
@media (max-width: 720px) {
  .hx-dock {
    gap: 8px;
    padding: 10px 12px;
  }
  .hx-dock__brand { gap: 8px; min-width: 0; }
  .hx-dock__brand img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
  .hx-dock__brandText {
    font-size: 13px;
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hx-dock__actions {
    display: flex !important;
    gap: 6px;
    margin-inline-start: auto;
  }
  .hx-dock__theme .theme-switch,
  .hx-dock__theme .theme-switch--pro {
    transform: scale(0.92);
    transform-origin: center;
  }
  .hx-dock__link {
    padding: 8px 10px;
    font-size: 12.5px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
  }
  html[data-theme="dark"] .hx-dock__link {
    background: var(--card-bg);
  }
  .hx-dock__cta {
    padding: 8px 11px;
    font-size: 12.5px;
    border-radius: 11px;
  }
  .hx-path__grid,
  .hx-pros__grid { grid-template-columns: 1fr 1fr; }
  .hx-float { opacity: .55; }
}
@media (max-width: 420px) {
  .hx-dock__brandText { display: none; }
  .hx-dock__link,
  .hx-dock__cta {
    padding: 8px 9px;
    font-size: 12px;
  }
}
@media (max-width: 520px) {
  .hx-path__grid,
  .hx-pros__grid { grid-template-columns: 1fr; }
  .hx-float--c,
  .hx-float--d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-float,
  .hx-science__item,
  .hx-sym--live .hx-sym__orbit--1,
  .hx-sym--live .hx-sym__orbit--2,
  .hx-sym--live .hx-sym__orbit--3,
  .hx-sym--live .hx-sym__core,
  .hx-sym--live .hx-sym__nucleus,
  .hx-sym--live .hx-sym__membrane,
  .hx-sym--live .hx-sym__dot,
  .hx-sym--live .hx-sym__bubble--1,
  .hx-sym--live .hx-sym__bubble--2,
  .hx-sym--live .hx-sym__bubble--3,
  .hx-sym--live .hx-sym__strand,
  .hx-sym--live .hx-sym__beat,
  .hx-sym--live .hx-sym__lens,
  .hx-sym--live .hx-sym__vein {
    animation: none !important;
  }
  .hx-mascotTip,
  .hx-mascotTip__bar span { animation: none !important; }
}

/* كاريكاتير الدكتورة + رسالة تحفيزية */
@keyframes hxMascotIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hxMascotOut {
  to { opacity: 0; transform: translateY(12px) scale(.97); }
}
@keyframes hxMascotBar {
  to { transform: scaleX(0); }
}

.hx-mascotTip {
  --hx-mascot-duration: 16000ms;
  position: fixed;
  z-index: 10060;
  inset-inline-start: 16px;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100vw - 24px));
  padding: 14px 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(197, 38, 155, 0.22);
  box-shadow: 0 18px 48px rgba(15, 17, 21, 0.18);
  color: #14181F;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
html[data-theme="dark"] .hx-mascotTip {
  background: rgba(23, 26, 33, 0.97);
  border-color: rgba(243, 163, 220, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #F0F2F6;
}
.hx-mascotTip.is-open {
  opacity: 1;
  pointer-events: auto;
  animation: hxMascotIn .42s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.hx-mascotTip.is-leaving {
  animation: hxMascotOut .28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
  pointer-events: none;
}
.hx-mascotTip__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(197, 38, 155, 0.2);
  border-radius: 10px;
  background: #FDF2F9;
  color: #4A5160;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
html[data-theme="dark"] .hx-mascotTip__close {
  background: #2A1530;
  border-color: rgba(243, 163, 220, 0.28);
  color: #F3A3DC;
}
.hx-mascotTip__close:hover {
  color: #14181F;
  border-color: rgba(197, 38, 155, 0.45);
}
html[data-theme="dark"] .hx-mascotTip__close:hover { color: #fff; }
.hx-mascotTip__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding-inline-end: 28px;
}
.hx-mascotTip__avatar {
  width: 88px;
  height: 110px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #FCE4F4, #C5269B);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 22px rgba(197, 38, 155, 0.25);
}
html[data-theme="dark"] .hx-mascotTip__avatar {
  border-color: rgba(243, 163, 220, 0.35);
}
.hx-mascotTip__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hx-mascotTip__bubble {
  min-width: 0;
  padding: 10px 12px 8px;
  border-radius: 16px;
  background: #FDF5FA;
  border: 1px solid rgba(197, 38, 155, 0.14);
}
html[data-theme="dark"] .hx-mascotTip__bubble {
  background: #1E222B;
  border-color: rgba(243, 163, 220, 0.18);
}
.hx-mascotTip__who {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: #C5269B;
}
html[data-theme="dark"] .hx-mascotTip__who { color: #F3A3DC; }
.hx-mascotTip__label {
  margin: 2px 0 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #6B7280;
}
html[data-theme="dark"] .hx-mascotTip__label { color: #A8B0BD; }
.hx-mascotTip__text {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.75;
  color: #14181F;
}
html[data-theme="dark"] .hx-mascotTip__text { color: #FFFFFF; }
.hx-mascotTip__bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(197, 38, 155, 0.12);
}
.hx-mascotTip__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #C5269B, #E85BC0);
  transform-origin: right;
  animation: hxMascotBar var(--hx-mascot-duration) linear forwards;
}
.hx-mascotTip.is-paused .hx-mascotTip__bar span {
  animation-play-state: paused;
}
@media (max-width: 560px) {
  .hx-mascotTip {
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    width: auto;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .hx-mascotTip__row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }
  .hx-mascotTip__avatar {
    width: 72px;
    height: 92px;
  }
  .hx-mascotTip__text { font-size: 13.5px; }
}
