/* ===================================================================
   بانر الصفحة الرئيسية + الهيدر — التصميم النهائي (Image 2)
   - يُحمَّل بعد كل أوراق الأنماط الأخرى فيغلب عليها.
   - الهيرو على الديسكتوب (≥1100px) مرسوم على «مسرح» بنسبة ثابتة 1821:771
     وكل مقاساته بوحدة cqw فيكبر ويصغر بنفس النِّسَب تمامًا مثل الصورة المرجعية.
   - تحت 1100px يتحوّل لعمود واحد (نص ← مدرّس) مع بقاء نفس الألوان والعناصر.
   - الوضع الليلي/النهاري: نفس كبسولة #thm/.tg القديمة (theme.js لم يتغيّر).
   =================================================================== */

/* ---------- ألوان البانر ---------- */
.pg{--hv-navy:#1B1A5C;--hv-org:#4338CA;--hv-org-t:#4338CA;--hv-teal:#0F7F8F;--hv-line:#007483;--hv-hl:rgba(34,211,238,.20)}
html[data-theme=dark] .pg{--hv-navy:#EEF0FF;--hv-org:#38DFF5;--hv-org-t:#67E8F9;--hv-teal:#38DFF5;--hv-line:#3DB7C4;--hv-hl:rgba(34,211,238,.26)}

/* =================== الهيدر =================== */
.pg .hx{background:linear-gradient(90deg,#F4FAFD 0%,#FFFFFF 46%,#CFEFF4 100%)}
html[data-theme=dark] .pg .hx{background:var(--bg)}
.pg .hx .hd{max-width:none;width:100%;box-sizing:border-box;gap:clamp(10px,1.1vw,20px);
  min-height:clamp(66px,4.95vw,96px);padding-block:8px;
  padding-inline-start:clamp(16px,7.55vw,150px);padding-inline-end:clamp(16px,5.9vw,120px)}
/* الشعار: دورق تيل بسائل ذهبي متحرك + DR + اسم المدرّس */
.pg .hx .brand{gap:clamp(8px,1.1vw,16px);font:700 clamp(19px,1.79vw,32px)/1.2 'Cairo',Tahoma,sans-serif;color:var(--hv-navy);margin-inline-end:auto}
.pg .hx .brand .brand__cap{width:clamp(28px,2.6vw,44px);height:auto;aspect-ratio:46/54;stroke:none;fill:none;color:#4338CA;transform-origin:50% 65%;animation:brandFlaskShake 1.5s ease-in-out infinite;filter:drop-shadow(0 3px 8px rgba(67,56,202,.22))}
html[data-theme=dark] .pg .hx .brand .brand__cap{color:#22D3EE;filter:drop-shadow(0 3px 10px rgba(34,211,238,.32))}
@keyframes brandFlaskShake{0%,100%{transform:translateX(0) rotate(0deg)}15%{transform:translateX(2.5px) rotate(9deg)}30%{transform:translateX(-2.5px) rotate(-9deg)}45%{transform:translateX(2px) rotate(7deg)}60%{transform:translateX(-2px) rotate(-7deg)}75%{transform:translateX(1px) rotate(4deg)}}
.pg .hx .brand__name{display:inline-flex;align-items:baseline;gap:.32em;font-weight:700}
.pg .hx .brand__dr{font-family:Georgia,'Times New Roman',serif;font-weight:800;font-size:1.05em;letter-spacing:.03em;color:#4338CA}
html[data-theme=dark] .pg .hx .brand__dr{color:#22D3EE}
.pg .hx .brand__ruqaa{font-family:'El Messiri','Cairo',sans-serif;font-weight:700;font-size:1.05em;line-height:1.25}
@media(prefers-reduced-motion:reduce){.pg .hx .brand .brand__cap{animation:none}}
/* كبسولة النهاري/الليلي — أزرق سماوي مع دائرة بيضاء وشمس/هلال كحلي */
.pg .hx .he{margin-inline-start:clamp(12px,1.8vw,28px)}
.pg .hx .tg{--tgw:clamp(74px,5.6vw,92px);--tgh:clamp(38px,2.8vw,46px);--thumb:calc(var(--tgh) - 8px);
  width:var(--tgw);height:var(--tgh);padding:0;border:1.5px solid #96C9F4;border-radius:999px;box-sizing:border-box;
  background:linear-gradient(135deg,#B5DBFA 0%,#D8EEFD 100%);box-shadow:0 4px 14px rgba(105,172,230,.35),inset 0 2px 6px rgba(105,172,230,.28);transition:border-color .25s,box-shadow .25s,background .25s}
.pg .hx .tg::before{top:2.5px;left:3px;width:var(--thumb);height:var(--thumb);
  background:#fff;box-shadow:0 3px 10px rgba(18,18,58,.18);transition:transform .28s cubic-bezier(.22,1,.36,1),background .25s,box-shadow .25s}
.pg .hx .tg .i{width:calc(var(--thumb)*.58);height:calc(var(--thumb)*.58);stroke-width:2}
.pg .hx .tg .i:first-of-type{color:#12123A}
.pg .hx .tg .i:first-of-type circle{fill:none}
.pg .hx .tg .i:nth-of-type(2){color:#12123A;fill:none;stroke:currentColor;opacity:.9}
html[data-theme=dark] .pg .hx .tg{background:linear-gradient(135deg,#0D1F38,#163254);border-color:rgba(61,214,195,.42);box-shadow:0 6px 18px rgba(0,0,0,.45),inset 0 1px 2px rgba(255,255,255,.08)}
html[data-theme=dark] .pg .hx .tg::before{transform:translateX(calc(var(--tgw) - var(--tgh) - 1px));background:#12123A;box-shadow:0 2px 10px rgba(34,211,238,.4),inset 0 0 0 1.5px #22D3EE}
html[data-theme=dark] .pg .hx .tg .i:first-of-type{color:#22D3EE;opacity:.9}
html[data-theme=dark] .pg .hx .tg .i:nth-of-type(2){color:#38DFF5;fill:none;opacity:1}
/* زر إنشاء حساب: حبة كحلية + أيقونة مستخدم برتقالية */
.pg .hx .dh-cta{flex-direction:row-reverse;min-height:clamp(40px,3.3vw,61px);padding:0 clamp(14px,1.25vw,23px);border-radius:999px;gap:clamp(6px,.5vw,9px);background:#1B1A5C;
  font:800 clamp(14px,1.15vw,21px)/1 'Cairo',Tahoma,sans-serif;box-shadow:0 8px 18px -8px rgba(11,38,66,.55)}
.pg .hx .dh-cta:hover{background:#0F3258;transform:translateY(-1px)}
.pg .hx .dh-ic{width:auto;height:auto;background:none;border-radius:0}
.pg .hx .dh-ic svg{width:clamp(22px,1.95vw,36px);height:clamp(22px,1.95vw,36px);fill:#4338CA;stroke:none}
html[data-theme=dark] .pg .hx .dh-cta{background:#12294A;box-shadow:inset 0 0 0 1px #2D2B66}
/* الهامبرجر: دائرة بيضاء + ثلاثة خطوط متساوية */
.pg .hx .dhm{width:clamp(42px,3.95vw,74px);height:clamp(42px,3.95vw,74px);padding:0;border-radius:50%;align-items:center;justify-content:center;gap:clamp(4px,.52vw,10px);
  background:#fff;border:1px solid #E6EEF2;box-shadow:0 6px 16px -4px rgba(11,38,66,.18)}
.pg .hx .dhm span{height:clamp(3px,.27vw,5px);border-radius:5px;background:#092A4C}
.pg .hx .dhm span:nth-child(1),.pg .hx .dhm span:nth-child(2),.pg .hx .dhm span:nth-child(3){width:clamp(18px,2.1vw,40px)}
.pg .hx .dhm:hover span:nth-child(2){width:clamp(18px,2.1vw,40px)}
html[data-theme=dark] .pg .hx .dhm{background:var(--card);border-color:var(--bd)}
html[data-theme=dark] .pg .hx .dhm span{background:var(--ink)}
/* الخط البرتقالي تحت الهيدر */
.pg .hx .ac{height:3px;background:linear-gradient(90deg,#22D3EE,#6366F1 50%,#4338CA)}

/* =================== الهيرو =================== */
.pg .hv{position:relative;isolation:isolate;overflow:hidden;container-type:inline-size;background:linear-gradient(135deg,#F3FBFD 0%,#FFFFFF 52%,#E8F7F9 100%);
  aspect-ratio:1821/771;font-family:'Cairo',Tahoma,sans-serif;color:var(--hv-navy)}
.hv__scene{position:absolute;inset:0;z-index:-2;background:url(hero-scene.webp) 0 0/100% 100% no-repeat;opacity:.58}
/* المدرّس: مرفوع عن الهيدر (فراغ ~2.8cqw فوق الرأس) + زاوية 15° يقدَّم فيها جانبه الأيسر نحو المشاهد */
.hv__teacher{position:absolute;z-index:-1;left:2%;bottom:0;width:42%;line-height:0}
.hv__teacher::before{content:"";position:absolute;z-index:-1;inset:6% 2% 0 0;pointer-events:none;background:radial-gradient(closest-side,rgba(43,187,208,.42),rgba(34,211,238,.14) 55%,rgba(43,187,208,0))}
.hv__teacher img{display:block;width:100%;height:auto;transform-origin:55% 60%;transform:none;
  -webkit-mask-image:linear-gradient(#000 88%,transparent);mask-image:linear-gradient(#000 88%,transparent);
  filter:drop-shadow(0 0 1.4cqw rgba(43,187,208,.45)) drop-shadow(0 1.2cqw 1.8cqw rgba(11,38,66,.22));animation:hvTin .9s ease-out both}
@keyframes hvTin{from{opacity:0;translate:0 1cqw}to{opacity:1;translate:0 0}}
/* فقاعات خفيفة تطلع من فوهة الدورق */
.hv__bub{position:absolute;z-index:0;border-radius:50%;pointer-events:none;background:radial-gradient(circle at 35% 30%,#fff,#7FE0EC 60%,#2BBBD0);animation:hvRise 4.2s ease-in infinite}
.hv__bub--1{left:11.94cqw;top:11.8cqw;width:.83cqw;height:.83cqw}
.hv__bub--2{left:13.47cqw;top:13.54cqw;width:.56cqw;height:.56cqw;animation-delay:1.4s}
.hv__bub--3{left:11.11cqw;top:14.38cqw;width:.42cqw;height:.42cqw;animation-delay:2.7s}
@keyframes hvRise{0%{opacity:0;transform:translateY(0) scale(.6)}30%{opacity:.9}100%{opacity:0;transform:translateY(-4.9cqw) scale(1)}}
.hv__copy{position:absolute;z-index:1;right:7.45cqw;top:9.27cqw;width:37cqw;text-align:right}
.pg .hv h1{margin:0;font-size:4.72cqw;line-height:1.315;font-weight:800;letter-spacing:0;color:var(--hv-navy);text-wrap:nowrap}
.hv__l{display:block}
.hv__em{position:relative;display:inline-block;color:var(--hv-org)}
.hv__em::after{content:"";position:absolute;z-index:-1;left:-5%;bottom:-.1em;width:112%;height:.46em;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 50' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%232BD0C0'/%3E%3Cstop offset='.45' stop-color='%237FE6DA'/%3E%3Cstop offset='1' stop-color='%232BD0C0' stop-opacity='.8'/%3E%3C/linearGradient%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='1.3'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M3 37C18 24 70 19 130 25C200 33 272 30 337 11L337 28C272 46 200 50 130 46C70 44 28 48 6 44Z' fill='url(%23g)' filter='url(%23b)'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
.pg .hv__lead{margin:1.22cqw 0 0;max-width:36.5cqw;font-size:1.46cqw;line-height:1.85;font-weight:600;color:var(--hv-navy)}
.hv__lead strong{font-weight:700;color:var(--hv-org-t);padding:0 .22em;margin:0 -.06em;border-radius:.25em;background:linear-gradient(transparent 22%,var(--hv-hl) 22% 92%,transparent 92%)}
.hv__cta{display:flex;flex-wrap:wrap;gap:1.3cqw;margin-top:1.66cqw}
.hv__btn{display:inline-flex;align-items:center;gap:1cqw;height:4.56cqw;padding:0 1.85cqw;border-radius:999px;box-sizing:border-box;text-decoration:none;white-space:nowrap;
  font-size:1.4cqw;transition:transform .2s,box-shadow .25s,filter .2s}
.hv__btn:hover{transform:translateY(-2px)}
.hv__btn svg{flex:none;width:2.15cqw;height:2.15cqw}
.hv__b1{font-weight:800;color:#1B1A5C;background:linear-gradient(180deg,#6366F1,#4338CA);border-bottom:2px solid rgba(11,38,66,.82);
  box-shadow:0 .85cqw 1.7cqw -.5cqw rgba(99,102,241,.45),inset 0 1px 0 rgba(255,255,255,.4)}
.hv__b1:hover{filter:brightness(1.04);box-shadow:0 1.05cqw 1.9cqw -.5cqw rgba(99,102,241,.5),inset 0 1px 0 rgba(255,255,255,.4)}
.hv__b1 svg{width:2.3cqw;height:2.3cqw;fill:none;stroke:#1B1A5C;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.hv__b2{font-weight:700;color:var(--hv-navy);background:#fff;border:2px solid var(--hv-line);box-shadow:0 .5cqw 1.2cqw -.6cqw rgba(0,116,131,.35)}
.hv__b2:hover{background:#F1FBFC}
.hv__b2 svg circle{fill:#4338CA}.hv__b2 svg path{fill:#fff}
html[data-theme=dark] .pg .hv{background:#0F0E30}
html[data-theme=dark] .hv__scene{filter:invert(1) hue-rotate(180deg) saturate(.8) brightness(.8)}
html[data-theme=dark] .hv__teacher{-webkit-mask-image:radial-gradient(94% 96% at 50% 48%,#000 68%,transparent 100%);mask-image:radial-gradient(94% 96% at 50% 48%,#000 68%,transparent 100%)}
html[data-theme=dark] .hv__teacher img{filter:brightness(.86) contrast(1.04)}
html[data-theme=dark] .hv__teacher::before{background:radial-gradient(closest-side,rgba(34,211,238,.30),rgba(34,211,238,0))}
html[data-theme=dark] .hv__b2{background:#15143A;border-color:var(--hv-line);color:#EEF0FF}
html[data-theme=dark] .hv__b2 svg circle{fill:#6366F1}
html[data-theme=dark] .hv__b1{color:#12123A}

/* =================== أقل من 1100px: عمود واحد =================== */
@media(max-width:1099px){
.pg .hv{aspect-ratio:auto;display:flex;flex-direction:column;align-items:center;padding-top:clamp(28px,6vw,52px)}
.hv__scene{background-size:cover;background-position:62% 100%}
.hv__copy{order:1;position:relative;right:auto;top:auto;width:100%;max-width:640px;box-sizing:border-box;padding:0 clamp(16px,5vw,32px);text-align:center}
.pg .hv h1{font-size:clamp(36px,9.2cqw,68px);text-wrap:balance}
.pg .hv__lead{max-width:none;margin:14px auto 0;font-size:clamp(17px,3.4cqw,22px)}
.hv__cta{justify-content:center;gap:12px;margin-top:24px}
.hv__btn{height:clamp(52px,7.4cqw,62px);padding:0 clamp(18px,3.6cqw,28px);gap:12px;font-size:clamp(16px,2.9cqw,20px)}
.hv__btn svg{width:clamp(28px,4.4cqw,34px);height:clamp(28px,4.4cqw,34px)}
.hv__teacher{order:2;position:relative;left:auto;top:auto;width:min(82%,400px);margin-top:clamp(10px,3cqw,26px)}
.hv__teacher img{transform:perspective(900px) rotateY(4deg)}
.hv__bub{display:none}
}
@media(max-width:720px){
.pg .hx .hd{padding-inline:16px;gap:8px;min-height:64px}
.pg .hx .brand{font-size:clamp(14px,4.4vw,19px);gap:8px;min-width:0}
.pg .hx .brand .brand__cap{width:28px}
.pg .hx .tg{--tgw:76px;--tgh:38px}
.pg .hx .dhm{width:40px;height:40px}
.pg .hx .dhm span,.pg .hx .dhm span:nth-child(2),.pg .hx .dhm:hover span:nth-child(2){width:17px;height:2.5px}
}
@media(max-width:340px){.pg .hx .tg{--tgw:64px;--tgh:34px}.pg .hx .brand{font-size:13px}}
@media(max-width:480px){
.hv__btn{flex:1 1 100%;justify-content:center}
.pg .hx .brand{font-size:clamp(15px,4.8vw,19px)}
}
/* =================== الموبايل (≤720px): الهيدر ← جملة الفيزياء ← صورة المدرّس ← الأزرار ===================
   الديسكتوب لا يتأثر: النسخة الطويلة من العنوان (.hv__d) هي المعروضة فوق 720px، والقصيرة (.hv__m) مخفية.
   .hv__copy يُفكَّك بـ display:contents فيصير العنوان والأزرار عناصر مباشرة في عمود .hv ونرتّبها بـ order
   (الصورة كانت أخًا للنص فلم يكن ممكنًا وضعها بين العنوان والأزرار بغير ذلك). */
.hv__d{display:contents}
.hv__m{display:none}
@media(max-width:720px){
.hv__d{display:none}
.hv__m{display:contents}
.pg .hv{padding-top:clamp(26px,7vw,40px);padding-bottom:clamp(26px,7vw,36px)}
.hv__copy{display:contents}
.pg .hv h1{order:1;width:100%;max-width:520px;box-sizing:border-box;padding:0 16px;text-align:center;font-size:clamp(38px,10.6cqw,52px);line-height:1.3}
.pg .hv__lead{display:none}
.hv__teacher{order:2;width:min(90%,440px);margin-top:clamp(6px,2.4cqw,14px)}
.hv__cta{order:3;width:100%;max-width:520px;box-sizing:border-box;padding:0 clamp(16px,5vw,24px);margin-top:clamp(2px,1.5cqw,10px)}
}
@media(prefers-reduced-motion:reduce){.hv__teacher img,.hv__bub{animation:none}.hv__btn{transition:none}.hv__btn:hover{transform:none}}

/* physics: light scene in day mode, dark scene (no invert) in night mode */
.hv__scene{background-image:url(hero-scene-light.webp);opacity:1}
html[data-theme=dark] .hv__scene{background-image:url(hero-scene.webp);filter:none;opacity:.9}
