/* =====================================================================
   HOME PREMIUM — الصفحة الرئيسية لمعلم الحاسب
   ---------------------------------------------------------------------
   ▸ خاص بصفحة home-start فقط (يُحمَّل عبر @section styles).
   ▸ يعتمد توكنات premium-theme.css (--brand / --pt-* / --glass-*).
   ▸ RTL-first، أداء أولاً: blur محدود، حركات 200–250ms.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0) إزاحة كل المراسي (#home/#features/#portals/#FAQ/#contact) تحت النافبار الثابت
   --------------------------------------------------------------------- */
html { scroll-padding-top: 100px; }

/* ---------------------------------------------------------------------
   0) إيقاع عمودي معتدل — تقليص فراغات Vuexy الكبيرة (5rem) بلا ازدحام
   --------------------------------------------------------------------- */
/* تقليص الأقسام — عدا الهيرو (يحتاج مسافة علوية لتجاوز النافبار الثابت) */
.scrollspy-example .section-py:not(.landing-hero) { padding: 2.75rem 0; }
@media (max-width: 767.98px) { .scrollspy-example .section-py:not(.landing-hero) { padding: 2rem 0; } }
/* الهيرو: مسافة علوية تكفي لتجاوز النافبار (~82px) + سفلية مضبوطة */
#hero-animation .landing-hero { padding-top: 5.5rem; padding-bottom: 2rem; }
/* الجوال: الشريط صار صفّاً واحداً (~78px) بعد premium-theme، فتكفي مسافة أقل —
   لكن ليست أقل من ارتفاعه وإلا زحف فوق الشارة كما كان يحدث مع الصفّين */
@media (max-width: 575.98px) {
  #hero-animation .landing-hero { padding-top: 5.25rem; padding-bottom: 1.25rem; }
}
/* الفاصل الميت بعد الهيرو (26rem) — الصورة داخل التدفق فلا حاجة له */
.scrollspy-example .landing-hero-blank { display: none; }
/* Vuexy يسحب صورة المعاينة بهامش سالب -32rem فتفيض وتنقصّ بالـoverflow —
   نلغيه لتجلس داخل تدفق الهيرو كاملةً بلا قصّ */
#hero-animation .landing-hero .hero-animation-img { margin-bottom: 0 !important; }
/* إزالة الهامش العلوي الزائد لقسم «من نحن» */
#about.landing-team { margin-top: 0 !important; }

/* ---------------------------------------------------------------------
   1) Hero — مسرح الصفحة: أوربات ضبابية + شبكة خطوط خافتة
   --------------------------------------------------------------------- */
.hp-hero { position: relative; overflow: hidden; }
.hp-hero .container { position: relative; z-index: 2; }
#hero-animation .landing-hero,
#hero-animation .bg-body { background: transparent !important; }

.hp-orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .55;
  pointer-events: none; z-index: 0;
}
.hp-orb-1 { width: 430px; height: 430px; background: rgba(212, 110, 42, .17); top: -130px; inset-inline-start: -90px;  animation: hp-drift 16s ease-in-out infinite alternate; }
.hp-orb-2 { width: 360px; height: 360px; background: rgba(39, 76, 119, .14);  top: 32%;    inset-inline-end: -130px;  animation: hp-drift 20s ease-in-out infinite alternate-reverse; }
.hp-orb-3 { width: 300px; height: 300px; background: rgba(78, 168, 222, .13); bottom: -90px; inset-inline-start: 38%; animation: hp-drift 18s ease-in-out infinite alternate; }
@keyframes hp-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(38px, 28px, 0); } }

.hp-grid-lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 41, 55, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 41, 55, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(62% 55% at 50% 30%, #000 0%, transparent 80%);
          mask-image: radial-gradient(62% 55% at 50% 30%, #000 0%, transparent 80%);
}

/* ---------------------------------------------------------------------
   2) العنوان — تدرّج الهوية على الكلمة المفتاحية
   --------------------------------------------------------------------- */
.hp-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1.05rem; border-radius: 999px;
  background: rgba(212, 110, 42, .10);
  border: 1px solid rgba(212, 110, 42, .22);
  color: #B85B21; font-weight: 700; font-size: .85rem;
}
/* نقطة نابضة مبهجة داخل الشارة */
.hp-eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: #D46E2A; position: relative;
}
.hp-eyebrow-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #D46E2A; animation: hp-ping 1.6s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes hp-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
.hp-headline {
  font-family: 'Cairo', sans-serif; font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.3; color: var(--pt-text, #1F2937);
  margin: 1rem 0 .6rem;
}
.hp-gradient-text {
  /* لمسة زجاجية خفيفة: شريط ضوء ناعم ينساب عبر التدرّج */
  background: linear-gradient(105deg,
              #B85B21 0%, #D46E2A 34%, #E29A62 47%,
              #EFB588 50%, #E29A62 53%, #D46E2A 66%, #B85B21 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: hp-glass-shine 6s ease-in-out infinite;
}
@keyframes hp-glass-shine {
  0%   { background-position: 210% 0; }
  60%, 100% { background-position: -30% 0; }
}
.hp-sub {
  color: var(--pt-text-2, #6B7280);
  font-size: 1.06rem; line-height: 1.9;
  max-width: 44rem; margin-inline: auto;
}
/* إبراز عبارتي الرسالة داخل وصف الهيرو — إبراز هادئ بالوزن واللون فقط */
.hp-sub .hp-mark {
  color: var(--pt-text, #1F2937);
  font-weight: 700;
}
@media (min-width: 992px) {
  .hp-hero-copy.text-lg-start .hp-sub { margin-inline: 0; }
}

/* زر زجاجي ثانوي */
.hp-btn-glass {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .62rem 1.35rem; border-radius: 12px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
  color: var(--pt-text, #1F2937); font-weight: 600;
  text-decoration: none;
  transition: all 220ms cubic-bezier(.4, 0, .2, 1);
}
.hp-btn-glass:hover {
  transform: translateY(-1px);
  color: #B85B21; border-color: rgba(212, 110, 42, .38);
  box-shadow: 0 8px 18px rgba(16, 24, 40, .10);
}

/* ---------------------------------------------------------------------
   3) شريط الخدمات المتحرك — Marquee بحواف متلاشية
   --------------------------------------------------------------------- */
.hp-marquee {
  position: relative;
  width: 100%; overflow: hidden;
  direction: rtl;
  padding: .2rem 0; border: 0;
  min-height: 38px;
  background: transparent;
}
/* لمسة زجاجية ذكية: شريط blur عند الطرفين يفرشت الشرائح، ويتلاشى للداخل عبر mask
   (مستقل عن الخلفية — لا «لفّة» ولا لون مخالف) */
.hp-marquee::before, .hp-marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 9%;
  z-index: 3; pointer-events: none;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.hp-marquee::before {
  inset-inline-start: 0;
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent);
          mask-image: linear-gradient(to left, #000 20%, transparent);
}
.hp-marquee::after {
  inset-inline-end: 0;
  -webkit-mask-image: linear-gradient(to right, #000 20%, transparent);
          mask-image: linear-gradient(to right, #000 20%, transparent);
}
.hp-marquee .scroll-track {
  display: inline-flex; white-space: nowrap;
  animation: hp-scroll-rtl 90s linear infinite;   /* بطيء جداً وانسيابي */
  animation-delay: .6s;
}
/* دخول انسيابي هادئ للشريط على التحميل */
.hp-marquee { animation: hp-band-in 900ms cubic-bezier(.22,.61,.36,1) both; }
@keyframes hp-band-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes hp-scroll-rtl { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }
.hp-marquee:hover .scroll-track { animation-play-state: paused; }

.hp-chip {
  display: flex; align-items: center; gap: .4rem; flex: 0 0 auto;
  padding: .28rem .4rem .28rem .75rem; border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--pt-border, #E7EAF0);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
  font-size: .74rem; font-weight: 600; color: var(--pt-text, #1F2937);
  text-decoration: none; white-space: nowrap;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, color 200ms ease;
}
a.hp-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 110, 42, .45);
  box-shadow: 0 8px 18px rgba(212, 110, 42, .18);
  color: #B85B21;
}
/* أيقونة الشريحة — مربّع مستدير بتدرّج هوية خفيف */
.hp-chip-icon {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(212,110,42,.16), rgba(242,181,140,.12));
  color: var(--brand, #D46E2A); font-size: 13px;
  transition: transform 200ms ease;
}
a.hp-chip:hover .hp-chip-icon { transform: scale(1.08); color: var(--brand-hover, #B85B21); }
/* شريحة الهوية — تدرّج + لمعة داخلية */
.hp-chip-brand {
  padding: .32rem .8rem;
  background: linear-gradient(135deg, #E8823B, #D46E2A 55%, #B85B21);
  color: #fff !important; border: 0;
  box-shadow: 0 4px 12px rgba(212, 110, 42, .32),
              inset 0 1px 0 rgba(255, 255, 255, .28);
}
.hp-chip-brand i { font-size: 13px; }

/* ---------------------------------------------------------------------
   4) بانر الرخصة المهنية — حدود متدرّجة + زجاج
   --------------------------------------------------------------------- */
.hp-license {
  position: relative; border-radius: 20px;
  padding: 1.6rem 1.8rem;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--glass-bg, rgba(255,255,255,.72)), var(--glass-bg, rgba(255,255,255,.72))) padding-box,
    linear-gradient(120deg, rgba(212,110,42,.55), rgba(242,181,140,.40), rgba(39,76,119,.35)) border-box;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .07);
}
.hp-license-icon {
  width: 64px; height: 64px; border-radius: 18px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #D46E2A, #B85B21);
  color: #fff; font-size: 30px;
  box-shadow: 0 8px 20px rgba(212, 110, 42, .35);
}
.hp-license-text { color: var(--pt-text-2, #6B7280); line-height: 1.85; font-size: .95rem; }
@media (max-width: 767px) { .hp-license { padding: 1.25rem 1rem; } }

/* ---------------------------------------------------------------------
   5) بوابات الدخول — 3 بطاقات Premium بخط تمييز علوي
   --------------------------------------------------------------------- */
.hp-portal {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; height: 100%; overflow: hidden;
  border-radius: 18px; padding: 1rem 1.2rem;
  text-align: center; text-decoration: none;
  background:
    linear-gradient(180deg, var(--hp-accent-soft, rgba(212,110,42,.10)), rgba(255,255,255,0) 44%),
    var(--glass-bg, rgba(255,255,255,.72));
  border: 1px solid var(--pt-border, #E7EAF0);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
  transition: transform 220ms cubic-bezier(.4,0,.2,1),
              box-shadow 220ms cubic-bezier(.4,0,.2,1),
              border-color 220ms cubic-bezier(.4,0,.2,1);
}
.hp-portal::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px;
  background: var(--hp-accent, linear-gradient(90deg, #D46E2A, #F2B58C));
}
.hp-portal--gold  { --hp-accent: linear-gradient(90deg, #D46E2A, #F2B58C); --hp-accent-soft: rgba(212, 110, 42, .10); --hp-strong: #B85B21; --hp-ring: rgba(212, 110, 42, .07); }
.hp-portal--slate { --hp-accent: linear-gradient(90deg, #274C77, #4EA8DE); --hp-accent-soft: rgba(39, 76, 119, .08);  --hp-strong: #274C77; --hp-ring: rgba(39, 76, 119, .06); }
.hp-portal--sky   { --hp-accent: linear-gradient(90deg, #4EA8DE, #8CCBEE); --hp-accent-soft: rgba(78, 168, 222, .10); --hp-strong: #2B7FB8; --hp-ring: rgba(78, 168, 222, .07); }

/* بطاقة المدفوع — الاختيار الأول: حدود ذهبية متدرّجة + توهّج + رفعة دائمة */
.hp-portal--gold {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(212, 110, 42, .12), rgba(255, 255, 255, 0) 44%) padding-box,
    linear-gradient(var(--glass-bg, rgba(255,255,255,.72)), var(--glass-bg, rgba(255,255,255,.72))) padding-box,
    linear-gradient(135deg, rgba(212, 110, 42, .55), rgba(242, 181, 140, .45)) border-box;
  box-shadow: 0 12px 32px rgba(212, 110, 42, .16);
}
/* الذهبية تبرز بالحدود والتوهّج فقط — بلا تكبير حتى تبقى على خط واحد */

.hp-portal:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .13);
  border-color: rgba(212, 110, 42, .30);
}

/* بوابة ثانوية هادئة (الطالب) — أقل بروزاً من بوابتَي المعلم */
.hp-portal--muted {
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 4px 14px rgba(16, 24, 40, .04);
}
.hp-portal--muted::before { height: 3px; opacity: .7; }
.hp-portal--muted .hp-portal-icon {
  width: 56px; height: 56px; border-radius: 15px; box-shadow: none;
  margin: 0;
}
.hp-portal--muted .hp-portal-icon img { width: 30px; height: 30px; }
.hp-portal--muted .hp-portal-title { font-size: .92rem; opacity: .9; }
.hp-portal--muted .hp-portal-cta { font-size: .8rem; padding: .32rem .9rem; }
.hp-portal--muted:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16, 24, 40, .10); }
.hp-portal-icon {
  width: 58px; height: 58px; margin: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hp-accent-soft, rgba(212, 110, 42, .10));
  box-shadow: 0 0 0 7px var(--hp-ring, rgba(212, 110, 42, .06));
  transition: transform 220ms cubic-bezier(.4,0,.2,1);
}
.hp-portal:hover .hp-portal-icon { transform: scale(1.07) rotate(-4deg); }
.hp-portal-icon img { width: 38px; height: 38px; object-fit: contain; }

.hp-portal-title {
  font-family: 'Cairo', sans-serif; font-weight: 700;
  font-size: 1.02rem; color: var(--pt-text, #1F2937);
  margin: 0;
}
.hp-portal-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .34rem .95rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
}
.hp-badge-gold  { background: rgba(212, 110, 42, .12); color: #B85B21; }
.hp-badge-green { background: rgba(34, 197, 94, .12);  color: #15803D; }
.hp-badge-sky   { background: rgba(78, 168, 222, .14); color: #2B7FB8; }

.hp-portal-cta {
  display: flex; width: fit-content; margin-inline: auto;
  align-items: center; gap: .4rem;
  margin-top: .2rem; padding: .4rem 1.1rem;
  border-radius: 999px; font-weight: 700; font-size: .85rem;
  color: var(--hp-strong, #B85B21);
  background: var(--hp-accent-soft, rgba(212, 110, 42, .10));
  transition: background 220ms cubic-bezier(.4,0,.2,1),
              color 220ms cubic-bezier(.4,0,.2,1),
              box-shadow 220ms cubic-bezier(.4,0,.2,1);
}
.hp-portal:hover .hp-portal-cta {
  background: var(--hp-strong, #B85B21);
  color: #fff;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .18);
}
.hp-portal-cta i { transition: transform 220ms cubic-bezier(.4,0,.2,1); }
.hp-portal:hover .hp-portal-cta i { transform: translateX(-5px); }

/* تخطيط أفقي على الشاشات العريضة فقط — الطولية تبقى عمودية كما هي */
@media (min-width: 768px) {
  .hp-portal {
    display: grid !important;
    grid-template-columns: auto auto;   /* أعمدة بحجم النص */
    grid-template-areas:
      "icon badge"
      "title cta";
    align-items: center; justify-content: center; gap: .45rem 1.2rem;
    padding: 1.1rem 1.3rem;
  }
  .hp-portal-icon  { grid-area: icon; justify-self: center; }
  .hp-portal-title { grid-area: title; justify-self: center; margin: 0; white-space: nowrap; }
  .hp-portal-badge { grid-area: badge; margin: 0 !important; justify-self: center; }
  .hp-portal-cta   { grid-area: cta; margin: 0 !important; justify-self: center; }
}

/* ---------------------------------------------------------------------
   6) إطار السلايدر — زجاج مائل بلمسة
   --------------------------------------------------------------------- */
.hp-showcase {
  border-radius: 24px; padding: .65rem;
  margin-block-start: 2.25rem;
  margin-inline-start: 1.25rem;
  background: var(--glass-bg, rgba(255,255,255,.72));
  border: 1px solid rgba(255, 255, 255, .65);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(16, 24, 40, .12);
  /* الميلان أُلغي: كان مقبولاً مع الصور لكنه يُظهر شريحة HTML الحيّة معوجّة */
  transform: none;
  transition: transform 250ms cubic-bezier(.4,0,.2,1);
}
.hp-showcase:hover { transform: rotate(0deg); }
.hp-showcase .carousel,
.hp-showcase .carousel-item img { border-radius: 18px; }
.hp-showcase .carousel-item img { object-fit: cover; width: 100%; }

/* ---------------------------------------------------------------------
   7) معاينة المحتوى — توهّج خلف الصورة + شارة عائمة
   --------------------------------------------------------------------- */
.hp-dash { max-width: 980px; }
.hp-dash::before {
  content: ""; position: absolute; inset: 6% 10%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(212, 110, 42, .20), transparent 70%);
  filter: blur(34px); z-index: 0;
}
.hp-dash .hero-dashboard-img { position: relative; z-index: 1; }
.hp-dash img.animation-img {
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .16);
  border: 1px solid var(--pt-border, #E7EAF0);
}
.hp-dash-chip {
  position: absolute; top: -18px; inset-inline-start: 50%;
  transform: translateX(50%); z-index: 3;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(212, 110, 42, .30);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
  color: #B85B21; font-weight: 700; font-size: .85rem;
}

/* ---------------------------------------------------------------------
   8) عناوين الأقسام + بطاقات المزايا
   --------------------------------------------------------------------- */
.hp-sec-title {
  font-family: 'Cairo', sans-serif; font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--pt-text, #1F2937);
  position: relative; display: inline-block;
}
.hp-sec-title::after {
  content: ""; display: block; width: 58px; height: 4px;
  border-radius: 4px; margin: .55rem auto 0;
  background: linear-gradient(90deg, #D46E2A, #F2B58C);
}

.hp-feature {
  height: 100%; border-radius: 20px; padding: 1.9rem 1.4rem;
  background: var(--pt-card, #fff);
  border: 1px solid var(--pt-border, #E7EAF0);
  box-shadow: 0 6px 18px rgba(16, 24, 40, .05);
  transition: transform 220ms cubic-bezier(.4,0,.2,1),
              box-shadow 220ms cubic-bezier(.4,0,.2,1),
              border-color 220ms cubic-bezier(.4,0,.2,1);
}
.hp-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(16, 24, 40, .10);
  border-color: rgba(212, 110, 42, .25);
}
.hp-feature h5 { font-weight: 700; color: var(--pt-text, #1F2937); }
.hp-feature p  { color: var(--pt-text-2, #6B7280); font-size: .93rem; line-height: 1.85; margin-bottom: 0; }

/* هالة أيقونة المزايا + خط تمييز علوي متناوب */
.hp-feature { position: relative; overflow: hidden; }
.hp-feature::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: var(--hp-fa, linear-gradient(90deg, #D46E2A, #F2B58C));
  opacity: 0; transition: opacity 220ms ease;
}
.hp-feature:hover::before { opacity: 1; }
.hp-feature-halo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; margin-bottom: 1.1rem; border-radius: 24px;
  background: var(--hp-fa-soft, rgba(212, 110, 42, .10));
  transition: transform 220ms cubic-bezier(.4,0,.2,1);
}
.hp-feature:hover .hp-feature-halo { transform: translateY(-3px) scale(1.05); }
.hp-feature-halo img { height: 52px; width: 52px; object-fit: contain; margin: 0; }
/* أيقونة ti داخل الهالة (للبطاقات الزجاجية الجديدة) */
.hp-feature-halo i.ti { font-size: 42px; line-height: 1; color: var(--hp-fa-ic, #D46E2A); }
.hp-feature--gold  { --hp-fa: linear-gradient(90deg, #D46E2A, #F2B58C); --hp-fa-soft: rgba(212, 110, 42, .10); --hp-fa-ic: #D46E2A; }
.hp-feature--sky   { --hp-fa: linear-gradient(90deg, #4EA8DE, #8CCBEE); --hp-fa-soft: rgba(78, 168, 222, .12); --hp-fa-ic: #2B7FB8; }
.hp-feature--slate { --hp-fa: linear-gradient(90deg, #274C77, #4EA8DE); --hp-fa-soft: rgba(39, 76, 119, .10); --hp-fa-ic: #274C77; }
.hp-feature--green { --hp-fa: linear-gradient(90deg, #22C55E, #86EFAC); --hp-fa-soft: rgba(34, 197, 94, .12); --hp-fa-ic: #15803D; }

/* بطاقة ميزة زجاجية — لمسة زجاج + حدّ متدرّج خفيف */
.hp-feature--glass {
  background:
    linear-gradient(180deg, var(--hp-fa-soft, rgba(212,110,42,.10)), rgba(255,255,255,0) 40%),
    var(--glass-bg, rgba(255, 255, 255, .72)) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--glass-border, rgba(255, 255, 255, .55)) !important;
}
.hp-feature--glass::before { opacity: .8; }   /* خط التمييز العلوي ظاهر دائماً */
html.dark-style .hp-feature--glass {
  background:
    linear-gradient(180deg, var(--hp-fa-soft), rgba(255,255,255,0) 40%),
    rgba(28, 31, 38, .55) !important;
}

/* توحيد عناوين Vuexy (contact/about) بروح hp-sec-title */
.landing-contact .section-title,
.landing-team .section-title {
  font-family: 'Cairo', sans-serif; font-weight: 800;
  color: var(--pt-text, #1F2937); position: relative; display: inline-block;
}
.landing-contact .section-title::after,
.landing-team .section-title::after {
  content: ""; display: block; width: 58px; height: 4px; border-radius: 4px;
  margin: .55rem auto 0; background: linear-gradient(90deg, #D46E2A, #F2B58C);
}

/* ---------------------------------------------------------------------
   9) الأسئلة المكررة — أكورديون أنيق
   --------------------------------------------------------------------- */
.hp-faq .accordion-item {
  border-radius: 14px !important; overflow: hidden;
  border: 1px solid var(--pt-border, #E7EAF0) !important;
  background: var(--pt-card, #fff);
  box-shadow: 0 2px 8px rgba(16, 24, 40, .04) !important;
  margin-bottom: .8rem;
}
.hp-faq .accordion-button {
  font-weight: 600; background: transparent;
  box-shadow: none !important; padding: 1.05rem 1.25rem;
  color: var(--pt-text, #1F2937);
}
.hp-faq .accordion-button:not(.collapsed) {
  color: #B85B21;
  background: rgba(212, 110, 42, .06);
}
.hp-faq .accordion-body { color: var(--pt-text-2, #6B7280); line-height: 1.9; }

/* ---------------------------------------------------------------------
   10) Reveal on scroll — يظهر فقط عند تفعيل JS (فولباك آمن)
   --------------------------------------------------------------------- */
html.hp-js .hp-reveal {
  opacity: 0; transform: translateY(26px);
  /* انسيابي بطيء — انزلاق ناعم بلا ارتداد */
  transition: opacity 900ms cubic-bezier(.22,.61,.36,1),
              transform 1100ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
html.hp-js .hp-reveal.in-view { opacity: 1; transform: none; will-change: auto; }
html.hp-js .hp-reveal.hp-d1 { transition-delay: 120ms; }
html.hp-js .hp-reveal.hp-d2 { transition-delay: 240ms; }
html.hp-js .hp-reveal.hp-d3 { transition-delay: 360ms; }

/* دخول فوري متتابع على التحميل (لا ينتظر التمرير) — للبوابات: انبثاق بتكبير */
.hp-pop { animation: hp-pop-in 700ms cubic-bezier(.34, 1.22, .4, 1) both; }
@keyframes hp-pop-in {
  0%   { opacity: 0; transform: translateY(30px) scale(.82); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hp-pop.hp-d1 { animation-delay: 100ms; }
.hp-pop.hp-d2 { animation-delay: 220ms; }
.hp-pop.hp-d3 { animation-delay: 340ms; }

/* «المحتوى المدفوع» يخرج من نص العنوان: يبدأ نقطة صغيرة مرفوعة نحو العنوان ثم يطير لمكانه */
.hp-emerge {
  animation: hp-emerge-in 950ms cubic-bezier(.34, 1.25, .4, 1) both;
  animation-delay: .55s; transform-origin: center;
}
@keyframes hp-emerge-in {
  0%   { opacity: 0; transform: translateY(-120px) scale(.15); filter: blur(2px); }
  50%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* تتابع خروج الزر الثاني */
.hp-emerge.hp-emerge-d2 { animation-delay: .8s; }

/* بطاقة «دخول المعلم» الذهبية — نطّ مستمر مثل كرة تنقط */
.hp-emerge-card { animation: hp-ball-bounce 1.5s infinite; will-change: transform; }
@keyframes hp-ball-bounce {
  0%   { transform: translateY(0);     animation-timing-function: cubic-bezier(.2, .6, .35, 1); }   /* صعود: تباطؤ */
  50%  { transform: translateY(-24px); animation-timing-function: cubic-bezier(.6, 0, .75, .5); }   /* هبوط: تسارع */
  100% { transform: translateY(0); }
}
/* يثبت عند المرور/اللمس/التركيز ليسهل النقر */
.hp-emerge-card:hover,
.hp-emerge-card:focus-within,
.hp-emerge-card:active {
  animation-play-state: paused;
}

/* ---------------------------------------------------------------------
   10.5) حركات مستمرة انسيابية — طفو ناعم بطيء يعطي حياة للصفحة
   --------------------------------------------------------------------- */
@keyframes hp-float      { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hp-float-soft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hp-float-faint { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* الطفو المستمر متوقف بالكامل بقرار المستخدم — الصورة والبوابات والهالات
   وأيقونة الرخصة كلها ساكنة. keyframes أعلاه باقية لمن يعيد تفعيلها لاحقاً. */

@media (prefers-reduced-motion: reduce) {
  html.hp-js .hp-reveal { opacity: 1; transform: none; transition: none; }
  .hp-pop, .hp-emerge, .hp-emerge-card { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .hp-orb, .hp-marquee, .hp-marquee .scroll-track,
  .hp-dash .animation-img:first-child, .hp-dash .hero-elements-img,
  .hp-portal-icon, .hp-feature-halo, .hp-license-icon,
  .hp-gradient-text { animation: none !important; background-position: 50% 0 !important; }
}

/* ---------------------------------------------------------------------
   11) الوضع الداكن
   --------------------------------------------------------------------- */
html.dark-style .hp-grid-lines {
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
}
html.dark-style .hp-btn-glass {
  background: rgba(28, 31, 38, .60);
  border-color: rgba(255, 255, 255, .10);
  color: #E6E8EC;
}
html.dark-style .hp-dash-chip {
  background: rgba(28, 31, 38, .85);
  color: #F2B58C;
}
html.dark-style .hp-orb-1 { background: rgba(212, 110, 42, .10); }

/* أيقونات بطاقات الحقائق — الدرجات الغامقة تختفي على الداكن فنقلبها للطرف الفاتح من تدرّج كل بطاقة */
html.dark-style .hp-metric-label i { color: #F2B58C; }
html.dark-style .hp-metric--sky .hp-metric-label i { color: #8CCBEE; }
html.dark-style .hp-metric--green .hp-metric-label i { color: #86EFAC; }
html.dark-style .hp-metric--violet .hp-metric-label i { color: #C4B5FD; }
html.dark-style .hp-metric--rose .hp-metric-label i { color: #FDA4AF; }

/* شريط الخدمات في الوضع الداكن — شفاف أيضاً */
html.dark-style .hp-marquee { background: transparent; border-block: 0; }
html.dark-style .hp-chip {
  background: rgba(40, 44, 54, .7);
  border-color: rgba(255, 255, 255, .09);
  color: var(--pt-text, #E6E8EC);
}
html.dark-style a.hp-chip:hover {
  background: rgba(48, 53, 64, .85);
  border-color: rgba(212, 110, 42, .5);
  color: #F2B58C;
}
html.dark-style .hp-chip-icon {
  background: linear-gradient(135deg, rgba(212,110,42,.28), rgba(242,181,140,.16));
  color: #F2B58C;
}
html.dark-style a.hp-chip:hover .hp-chip-icon { color: #F8C79B; }
/* حواف التلاشي تتكيّف تلقائياً عبر var(--pt-bg) الداكن */

/* بطاقة بوابة الطالب (المخفّفة) في الوضع الداكن — بدل الأبيض الساطع */
html.dark-style .hp-portal--muted {
  background:
    linear-gradient(180deg, rgba(78, 168, 222, .06), rgba(255, 255, 255, 0) 44%),
    rgba(28, 31, 38, .5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
html.dark-style .hp-portal--muted .hp-portal-icon {
  background: rgba(78, 168, 222, .12);
}
html.dark-style .hp-portal--muted:hover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, .4);
}

/* ---------------------------------------------------------------------
   12) الزر الذهبي — المحتوى المدفوع (لمعة تمر عند hover)
   --------------------------------------------------------------------- */
.hp-btn-gold {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.5rem; border-radius: 12px;
  background: linear-gradient(135deg, #E8A05F 0%, #D46E2A 45%, #B85B21 100%);
  color: #fff !important; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 20px rgba(212, 110, 42, .35),
              inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform 220ms cubic-bezier(.4,0,.2,1),
              box-shadow 220ms cubic-bezier(.4,0,.2,1);
}
.hp-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(212, 110, 42, .45),
              inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hp-btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  inset-inline-start: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  transition: inset-inline-start 420ms ease;
  pointer-events: none;
}
.hp-btn-gold:hover::after { inset-inline-start: 120%; }

/* زر outline بروح الهوية — العينات والأسعار */
.hp-btn-outline {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .68rem 1.45rem; border-radius: 12px;
  border: 1.5px solid rgba(212, 110, 42, .55);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #B85B21; font-weight: 700; text-decoration: none;
  transition: all 220ms cubic-bezier(.4,0,.2,1);
}
.hp-btn-outline:hover {
  background: linear-gradient(135deg, #E8823B, #D46E2A);
  border-color: transparent; color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(212, 110, 42, .30);
}
html.dark-style .hp-btn-outline { background: rgba(28, 31, 38, .55); color: #F2B58C; }

/* ---------------------------------------------------------------------
   13) شريط الحقائق تحت العنوان
   --------------------------------------------------------------------- */
/* بطاقات الحقائق المبهجة */
.hp-metrics { display: flex; flex-wrap: wrap; gap: .75rem; }
.hp-metric {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .7rem 1.15rem; border-radius: 14px; min-width: 120px;
  background: var(--pt-card, #fff);
  border: 1px solid var(--pt-border, #E7EAF0);
  box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
  position: relative; overflow: hidden;
  transition: transform 220ms cubic-bezier(.4,0,.2,1), box-shadow 220ms cubic-bezier(.4,0,.2,1);
}
.hp-metric::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px;
  background: var(--hp-m, #D46E2A);
}
.hp-metric:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16, 24, 40, .10); }
.hp-metric--gold  { --hp-m: linear-gradient(180deg, #D46E2A, #F2B58C); }
.hp-metric--sky   { --hp-m: linear-gradient(180deg, #4EA8DE, #8CCBEE); }
.hp-metric--green { --hp-m: linear-gradient(180deg, #22C55E, #86EFAC); }
.hp-metric--violet { --hp-m: linear-gradient(180deg, #7C3AED, #C4B5FD); }
.hp-metric--rose  { --hp-m: linear-gradient(180deg, #E11D48, #FDA4AF); }
a.hp-metric { text-decoration: none; color: inherit; }
.hp-metric-num {
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.1;
  background: var(--hp-m, #D46E2A); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hp-metric-label {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--pt-text-2, #6B7280); font-size: .82rem; font-weight: 600;
}
.hp-metric-label i { color: var(--brand, #D46E2A); font-size: 15px; }
.hp-metric--sky .hp-metric-label i { color: #2B7FB8; }
.hp-metric--green .hp-metric-label i { color: #15803D; }
.hp-metric--violet .hp-metric-label i { color: #6D28D9; }
.hp-metric--rose .hp-metric-label i { color: #BE123C; }

/* ---------------------------------------------------------------------
   14) ترقية البوابات — لمعة تمر + توهّج الأيقونة
   --------------------------------------------------------------------- */
.hp-portal::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  inset-inline-start: -70%; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transition: inset-inline-start 480ms ease;
  pointer-events: none;
}
.hp-portal:hover::after { inset-inline-start: 130%; }
.hp-portal:hover .hp-portal-icon { box-shadow: 0 12px 26px var(--hp-accent-soft, rgba(212, 110, 42, .18)); }
/* فجوة تنفّس فوق البوابات (كانت ملتصقة ببطاقات الأرقام) */
#portals { margin-top: 1rem; }

/* (أُزيل إطار المتصفح — الصورة حرّة بالتوهّج والشارة فقط) */

/* ---------------------------------------------------------------------
   12) قسم «تواصل معنا» — لوحة هوية داكنة + نموذج أنيق
   --------------------------------------------------------------------- */
/* اللوحة اليمنى: تدرّج كحلي بالهوية مع توهّج برتقالي خفيف */
.hp-contact-panel {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 2.2rem 1.9rem;
  background: linear-gradient(160deg, #243356 0%, #1B2740 100%);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
  display: flex; flex-direction: column;
}
.hp-contact-panel::before {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,110,42,.35), transparent 70%);
  pointer-events: none;
}
.hp-contact-logo { height: 88px; width: auto; max-width: 240px; object-fit: contain; margin-bottom: 1.1rem; }
.hp-contact-lead { color: rgba(255,255,255,.72); line-height: 1.9; margin-bottom: 1.5rem; }

/* صفوف معلومات التواصل — رقاقة أيقونة زجاجية */
.hp-contact-list { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.6rem; }
.hp-contact-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem .8rem; border-radius: 12px;
  color: #fff !important; text-decoration: none;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  transition: background 220ms ease, transform 220ms ease, border-color 220ms ease;
}
.hp-contact-item:hover { background: rgba(212,110,42,.16); border-color: rgba(212,110,42,.5); transform: translateX(-4px); }
.hp-contact-ico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover)); color: #fff; font-size: 1.05rem;
}
.hp-contact-item span { color: rgba(255,255,255,.9); font-weight: 500; direction: ltr; unicode-bidi: plaintext; }

/* أزرار اللوحة */
.hp-contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.hp-contact-ghost {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.35rem; border-radius: 12px; font-weight: 700; text-decoration: none;
  color: #fff !important; border: 1.5px solid rgba(255,255,255,.35); background: transparent;
  transition: background 220ms ease, border-color 220ms ease;
}
.hp-contact-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }

/* بطاقة النموذج */
.hp-contact-card { border: 1px solid var(--pt-border); border-radius: 20px; box-shadow: 0 10px 30px rgba(16,24,40,.06); }
.hp-contact-card .form-label { font-weight: 600; color: var(--pt-text); display: inline-flex; align-items: center; gap: .35rem; }
.hp-contact-card .form-label i { color: var(--brand); }
.hp-contact-card .form-control { border-radius: 12px; padding: .65rem .9rem; }

@media (max-width: 767.98px) {
  .hp-contact-panel { padding: 1.6rem 1.25rem; }
  .hp-contact-logo { height: 68px; }
}

/* =====================================================================
   إيقاع الجوال — تقليل التباعد داخل الهيرو
   ---------------------------------------------------------------------
   المسافات مضبوطة لشاشة عريضة؛ على الجوال تتضخّم بصرياً فيهبط زرّا الدعوة
   تحت الطيّة. نضغط الشارة والعنوان والوصف وشبكة الأرقام فقط — بلا مسّ
   الأحجام على الشاشات الأكبر.
   ===================================================================== */
@media (max-width: 575.98px) {
  .hp-eyebrow { font-size: .78rem; padding: .35rem .85rem; margin-block: 1rem .35rem; }
  .hp-headline { font-size: clamp(1.8rem, 7.6vw, 2.4rem); line-height: 1.25; margin: .65rem 0 .4rem; }
  .hp-sub { font-size: .98rem; line-height: 1.75; }
  .hp-hero-copy .hp-sub.mb-4 { margin-bottom: .9rem !important; }
  .hp-hero-copy .hp-metrics.mt-4 { margin-top: 1.1rem !important; }
  .hp-metrics { gap: .5rem; }
}

/* =====================================================================
   الجوال — خفض ارتفاع الصفحة بلا تصغير مساحات اللمس
   ---------------------------------------------------------------------
   البطاقات مصمَّمة عمودية (أيقونة كبيرة فوق النص) فتتكدّس على الجوال بطول
   هائل. الحلّ ليس تصغير الحشوات — بل قلب البوابات إلى صفوف أفقية، وتصغير
   الهالات، وضغط المسافات بين الأقسام.
   ▸ قاعدة اللمس: كل هدف قابل للنقر ≥ 44px ارتفاعاً (إرشاد WCAG/Apple)،
     والبوابة كلها رابط واحد فارتفاع صفّها ≥ 72px.
   ===================================================================== */
@media (max-width: 767.98px) {

  /* ---- بوابات الدخول: صفّ أفقي بدل عمود (توفير ~140px لكل بطاقة) ---- */
  #portals { --bs-gutter-y: .75rem; }
  .hp-portal {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon title cta"
      "icon badge cta";
    align-items: center;
    gap: .15rem .8rem;
    padding: .75rem .9rem;
    min-height: 76px;                  /* هدف لمس مريح للبطاقة كاملة */
    text-align: start;
  }
  .hp-portal-icon,
  .hp-portal--muted .hp-portal-icon {
    grid-area: icon;
    width: 48px; height: 48px; border-radius: 14px;
    box-shadow: 0 0 0 5px var(--hp-ring, rgba(212, 110, 42, .06));
  }
  .hp-portal-icon img,
  .hp-portal--muted .hp-portal-icon img { width: 28px; height: 28px; }
  .hp-portal-title { grid-area: title; justify-self: start; align-self: end; }
  .hp-portal-badge { grid-area: badge; justify-self: start; align-self: start; }
  .hp-portal-cta,
  .hp-portal--muted .hp-portal-cta {
    grid-area: cta; align-self: center;
    margin: 0; padding: .55rem 1rem; min-height: 44px;
  }

  /* ---- بطاقات المزايا: هالة أصغر وحشوة أقلّ (توفير ~70px لكل بطاقة) ---- */
  .landing-features .row.g-4 { --bs-gutter-y: .75rem; }
  .hp-feature { padding: 1.15rem 1rem; border-radius: 16px; }
  .hp-feature-halo { width: 62px; height: 62px; border-radius: 18px; margin-bottom: .55rem; }
  .hp-feature-halo img { width: 36px; height: 36px; }
  .hp-feature-halo i.ti { font-size: 30px; }
  .hp-feature h5 { font-size: 1rem; margin-bottom: .35rem !important; }
  .hp-feature p { font-size: .88rem; line-height: 1.7; }

  /* ---- المسافات بين الكتل: الفوارق 3rem مصمَّمة لشاشة عريضة ---- */
  .scrollspy-example .section-py:not(.landing-hero) { padding: 1.75rem 0; }
  .hp-license.mt-5 { margin-top: 1.25rem !important; }
  #hero-animation .hp-reveal.mt-5.pt-4 { margin-top: 1.5rem !important; padding-top: .5rem !important; }
  .landing-features h3.mb-5 { margin-bottom: 1.1rem !important; }
  .hp-faq p.mb-5 { margin-bottom: 1.1rem !important; padding-bottom: 0 !important; }
  .hp-sec-title::after { margin-top: .4rem; }

  /* ---- مساحات اللمس: لا شيء أقلّ من 44px مهما ضاقت المسافات ---- */
  .hp-btn-gold, .hp-btn-glass, .hp-btn-outline,
  .hp-faq .accordion-button {
    min-height: 44px;
  }
}

/* UX micro-polish: نفس التصميم، تفاعل أوضح وثبات أفضل */
.hp-btn-gold,
.hp-btn-glass,
.hp-btn-outline,
.hp-chip,
.hp-portal {
  -webkit-tap-highlight-color: transparent;
}

.hp-btn-gold:focus-visible,
.hp-btn-glass:focus-visible,
.hp-btn-outline:focus-visible,
.hp-chip:focus-visible,
.hp-portal:focus-visible {
  outline: 3px solid rgba(78, 168, 222, .35);
  outline-offset: 3px;
}

.hp-btn-gold:active,
.hp-btn-glass:active,
.hp-btn-outline:active,
.hp-chip:active,
.hp-portal:active {
  transform: translateY(0) scale(.98);
}

.hp-showcase .carousel-item img,
.hp-portal-icon img,
.hp-feature-halo img {
  display: block;
}

.hp-portal-title,
.hp-portal-badge,
.hp-portal-cta,
.hp-metric-label {
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .hp-eyebrow {
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .hp-chip {
    min-height: 34px;
  }

  .hp-portal-badge,
  .hp-portal-cta {
    white-space: nowrap;
  }
}

/* Tablet polish: prevent portal cards from becoming too narrow */
@media (min-width: 768px) and (max-width: 991.98px) {
  #portals {
    --bs-gutter-y: .85rem;
  }

  #portals > [class*="col-md-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #portals .hp-portal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "icon title cta"
      "icon badge cta";
    align-items: center;
    min-height: 86px;
    padding: .85rem 1rem;
    gap: .2rem .9rem;
    text-align: start;
  }

  #portals .hp-portal-icon {
    grid-area: icon;
    width: 52px;
    height: 52px;
    margin: 0;
  }

  #portals .hp-portal-title {
    grid-area: title;
    justify-self: start;
    white-space: normal;
  }

  #portals .hp-portal-badge {
    grid-area: badge;
    justify-self: start;
  }

  #portals .hp-portal-cta {
    grid-area: cta;
    align-self: center;
    justify-self: end;
    margin: 0;
    white-space: nowrap;
  }
}

/* Medium desktop polish: keep the navbar calm before it has lots of room */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .layout-navbar > .container,
  #hero-animation .landing-hero .container {
    max-width: min(1280px, calc(100% - 32px));
  }

  .landing-navbar .navbar-nav .nav-link {
    white-space: nowrap;
    font-size: .92rem;
    padding-inline: .55rem;
  }

  .landing-navbar .navbar-nav {
    gap: .1rem;
  }

  .landing-navbar .navbar-brand.app-brand {
    margin-inline-end: .9rem !important;
  }
}

/* Tablet landscape polish: keep the homepage close to desktop without crowding */
@media (min-width: 992px) and (max-width: 1199.98px) {
  #hero-animation .landing-hero {
    padding-top: 5.85rem;
  }

  #hero-animation .row.align-items-center {
    --bs-gutter-x: 1.25rem;
  }

  #hero-animation .hp-hero-copy.col-lg-7 {
    flex: 0 0 auto;
    width: 55%;
  }

  #hero-animation .col-lg-5.d-none.d-lg-block {
    flex: 0 0 auto;
    width: 45%;
  }

  .hp-headline {
    font-size: clamp(2.75rem, 4.25vw, 3.1rem);
    line-height: 1.24;
    margin-top: .75rem;
  }

  .hp-sub {
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.82;
  }

  .hp-hero-copy .d-flex.flex-wrap.gap-2 {
    gap: .65rem !important;
  }

  .hp-btn-gold,
  .hp-btn-glass,
  .hp-btn-outline {
    padding-inline: 1.08rem;
    font-size: .95rem;
  }

  .hp-metrics {
    gap: .6rem;
  }

  .hp-metric {
    min-width: 112px;
    padding: .62rem .9rem;
  }

  .hp-showcase {
    margin-block-start: 1.1rem;
    margin-inline-start: .35rem;
    padding: .55rem;
    transform: rotate(.35deg);
  }

  #portals {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
    align-items: stretch;
  }

  #portals > [class*="col-md-"] {
    flex: 0 0 auto;
    width: 33.333333%;
  }

  #portals .hp-portal {
    height: 100%;
    min-height: 170px;
    padding-inline: 1rem;
  }
}

/* Section rhythm polish: reduce the quiet gap after the content preview */
#hero-animation .hp-reveal.mt-5.pt-4 {
  margin-top: 1.75rem !important;
  padding-top: .35rem !important;
  margin-bottom: 0 !important;
}

#hero-animation .landing-hero {
  padding-bottom: .85rem;
}

#features.landing-features {
  padding-top: .85rem !important;
}

.landing-features .text-center.mb-2 {
  margin-bottom: .35rem !important;
}

.landing-features h3.mb-5 {
  margin-bottom: 2rem !important;
}

.hp-dash img.animation-img {
  box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
}

.hp-dash::before {
  inset: 14% 18%;
  opacity: .55;
  filter: blur(18px);
}

@media (max-width: 767.98px) {
  #hero-animation .hp-reveal.mt-5.pt-4 {
    margin-top: 1rem !important;
    padding-top: .25rem !important;
  }

  #hero-animation .landing-hero {
    padding-bottom: .65rem;
  }

  #features.landing-features {
    padding-top: .75rem !important;
  }

  .landing-features h3.mb-5 {
    margin-bottom: 1.25rem !important;
  }
}

/* General UX polish: softer motion, cleaner anchors, and touch-friendly states */
html {
  scroll-padding-top: 104px;
}

#home,
#features,
#about,
#FAQ,
#contact {
  scroll-margin-top: 104px;
}

::selection {
  background: rgba(212, 110, 42, .18);
  color: var(--pt-text, #1F2937);
}

.landing-navbar .navbar-nav .nav-link {
  border-radius: 10px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.landing-navbar .navbar-nav .nav-link:hover,
.landing-navbar .navbar-nav .nav-link.active {
  background: rgba(212, 110, 42, .08);
  color: var(--brand-hover, #B85B21);
}

.hp-btn-gold,
.hp-btn-glass,
.hp-btn-outline,
.hp-portal-cta {
  justify-content: center;
  min-height: 44px;
}

.hp-btn-gold i,
.hp-btn-glass i,
.hp-btn-outline i,
.hp-chip-icon,
.hp-portal-cta i,
.hp-metric-label i {
  flex: 0 0 auto;
}

.hp-portal:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, .09);
}

.hp-portal--muted:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, .08);
}

.hp-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
}

.hp-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, .08);
}

.hp-feature h5 {
  line-height: 1.45;
}

.hp-feature p {
  margin-bottom: 0;
  max-width: 34ch;
  margin-inline: auto;
}

.hp-license {
  align-items: center;
}

@media (hover: none) {
  .hp-btn-gold:hover,
  .hp-btn-glass:hover,
  .hp-btn-outline:hover,
  a.hp-chip:hover,
  .hp-portal:hover,
  .hp-portal--muted:hover,
  .hp-feature:hover,
  .hp-metric:hover,
  .hp-showcase:hover {
    transform: none;
  }

  .hp-portal:hover .hp-portal-icon,
  .hp-feature:hover .hp-feature-halo {
    transform: none;
  }
}

@media (max-width: 575.98px) {
  html {
    scroll-padding-top: 88px;
  }

  #home,
  #features,
  #about,
  #FAQ,
  #contact {
    scroll-margin-top: 88px;
  }

  .hp-btn-gold,
  .hp-btn-glass,
  .hp-btn-outline {
    width: 100%;
    max-width: 310px;
  }

  .hp-portal-cta {
    min-width: 88px;
  }
}

/* =====================================================================
   شريحة «لوحة المعلم» الحيّة — أول شرائح الاستعراض (HTML بدل صورة)
   ===================================================================== */
.hpm { position: relative; height: 340px; padding: 24px 30px; }
.hpm-window {
  height: 100%; background: #fff; border-radius: 16px;
  border: 1px solid #F2E7D6;
  box-shadow: 0 14px 34px rgba(16, 24, 40, .10);
  display: flex; flex-direction: column; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: box-shadow 220ms ease, transform 220ms ease;
}
a.hpm-window:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(16, 24, 40, .15); }
.hpm-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .85rem; background: #FAFAFA; border-bottom: 1px solid #F1F1F1;
}
.hpm-dots { display: inline-flex; gap: .3rem; }
.hpm-dots i { display: block; width: 9px; height: 9px; border-radius: 50%; }
.hpm-dots i:nth-child(1) { background: #F87171; }
.hpm-dots i:nth-child(2) { background: #FBBF24; }
.hpm-dots i:nth-child(3) { background: #34D399; }
.hpm-url {
  flex: 1; text-align: center; font-size: .68rem; color: #9CA3AF;
  background: #fff; border: 1px solid #F1F1F1; border-radius: 8px;
  padding: .16rem .8rem; direction: ltr;
}
.hpm-body { flex: 1; display: flex; gap: .75rem; padding: .8rem; min-height: 0; }
.hpm-grid {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr; gap: .55rem;
}
.hpm-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .22rem; background: #FDF7EF; border: 1px solid #F5E9D9;
  border-radius: 11px; padding: .3rem; min-width: 0;
}
.hpm-tile i { font-size: 18px; color: #B8732E; }
.hpm-tile span { font-size: .66rem; font-weight: 700; color: #6B4A26; white-space: nowrap; }
.hpm-side { width: 32px; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding-top: .15rem; }
.hpm-side-pill { display: block; width: 22px; height: 8px; border-radius: 6px; background: #C77B33; }
.hpm-side-line { display: block; width: 18px; height: 5px; border-radius: 4px; background: #EDEDED; }
/* الشارات العائمة فوق النافذة */
.hpm-badge {
  position: absolute; top: 42px; left: 2px;
  width: 74px; height: 74px; border-radius: 18px; transform: rotate(-6deg);
  background: linear-gradient(150deg, #D98A3E, #B96A24); color: #fff;
  border: 3px solid rgba(255, 255, 255, .4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(185, 106, 36, .35);
}
.hpm-badge b { font-family: 'Cairo', sans-serif; font-size: 1.15rem; line-height: 1.2; }
.hpm-badge small { font-size: .6rem; font-weight: 700; }
.hpm-toast {
  position: absolute; display: flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid #F3F4F6; border-radius: 12px; padding: .42rem .7rem;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .14);
}
.hpm-toast b { display: block; font-size: .68rem; color: #1F2937; line-height: 1.35; }
.hpm-toast small { display: block; font-size: .58rem; color: #9CA3AF; }
.hpm-toast > i { font-size: 15px; }
.hpm-check {
  width: 26px; height: 26px; border-radius: 50%; background: #DCFCE7; color: #16A34A;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.hpm-toast--check { top: 6px; right: 8px; }
.hpm-toast--dist { bottom: 30px; left: 0; }
.hpm-toast--dist > i { color: #C77B33; }
.hpm-toast--progress { bottom: 4px; right: 12px; }
.hpm-toast--progress > i { color: #7C3AED; }
/* زر العينات الدائم أسفل النافذة */
.hpm-cta {
  position: absolute; bottom: 6px; inset-inline: 0; margin-inline: auto; width: max-content;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem 1rem; border-radius: 999px;
  background: linear-gradient(135deg, #D46E2A, #B85B21); color: #fff;
  font-size: .72rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 20px rgba(184, 91, 33, .35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.hpm-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(184, 91, 33, .45); }
@media (prefers-reduced-motion: reduce) { .hpm-toast { animation: none; } }

/* مؤشرات الشرائح — نقاط هادئة أسفل الإطار (الدوران يدوي فقط) */
#carouselExampleDark .carousel-indicators { justify-content: flex-end; margin: 0 .9rem .3rem; }
#carouselExampleDark .carousel-indicators [data-bs-target] { width: 7px; height: 7px; border-radius: 50%; margin: 0 3px; }

/* =====================================================================
   كيف تعمل — ٣ خطوات هادئة بين الشريط المتحرك والبوابات
   ===================================================================== */
.hp-steps {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap;
}
.hp-step {
  display: flex; align-items: center; gap: .6rem;
  background: var(--pt-card, #fff); border: 1px solid var(--pt-border, #E7EAF0);
  border-radius: 14px; padding: .65rem 1.1rem;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
}
.hp-step > i { font-size: 20px; color: var(--brand, #D46E2A); }
.hp-step-num {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft, rgba(212, 110, 42, .12)); color: var(--brand, #D46E2A);
  font-weight: 800; font-size: .85rem;
}
.hp-step-txt b { display: block; font-size: .88rem; color: var(--pt-text, #1F2937); line-height: 1.4; }
.hp-step-txt small { display: block; font-size: .72rem; color: var(--pt-text-2, #6B7280); }
.hp-step-sep { color: var(--pt-text-2, #6B7280); opacity: .5; font-size: 16px; }
@media (max-width: 767.98px) {
  .hp-step-sep { display: none; }
  .hp-step { width: 100%; max-width: 420px; }
}

/* =====================================================================
   آراء المعلمين — بطاقات اقتباس هادئة
   ===================================================================== */
.hp-quote {
  height: 100%; margin: 0;
  background: var(--pt-card, #fff); border: 1px solid var(--pt-border, #E7EAF0);
  border-radius: 16px; padding: 1.4rem 1.5rem;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
  display: flex; flex-direction: column; gap: .8rem;
  transition: transform 220ms cubic-bezier(.4,0,.2,1), box-shadow 220ms cubic-bezier(.4,0,.2,1);
}
.hp-quote:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16, 24, 40, .10); }
.hp-quote-mark { font-size: 26px; color: #E5B588; line-height: 1; }
.hp-quote blockquote {
  margin: 0; flex-grow: 1;
  color: var(--pt-text-2, #6B7280); font-size: .95rem; line-height: 1.9;
}
.hp-quote figcaption {
  display: flex; align-items: center; gap: .65rem;
  border-top: 1px solid var(--pt-border, #F1F1F1); padding-top: .85rem;
}
.hp-quote-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft, rgba(212, 110, 42, .12)); color: var(--brand, #D46E2A);
  font-weight: 800;
}
.hp-quote figcaption b { display: block; font-size: .9rem; color: var(--pt-text, #1F2937); }
.hp-quote figcaption small { display: block; font-size: .75rem; color: var(--pt-text-2, #6B7280); }
