/* ============================================================
   تطبيق سنود للخدمات الطبية (SMDS) — صفحة الهبوط
   نظام تصميم: أزرق طبي + أبيض | RTL | متجاوب 100%
   ============================================================ */

/* ---------- المتغيرات (Design Tokens) ---------- */
:root {
  --blue-900: #063463;
  --blue-800: #073B6B;
  --blue-700: #0A5CA8;
  --blue-600: #1565C0;
  --blue-500: #1E88E5;
  --blue-400: #42A5F5;
  --blue-300: #64B5F6;
  --blue-100: #E3F0FC;
  --blue-050: #F4F9FF;
  --teal: #12A18A;

  --ink: #0F2135;
  --muted: #5B6B7C;
  --line: #E2ECF6;
  --white: #ffffff;

  --grad-blue: linear-gradient(135deg, #1E88E5 0%, #0A5CA8 100%);
  --grad-deep: linear-gradient(150deg, #0A5CA8 0%, #063463 100%);

  --shadow-sm: 0 4px 14px rgba(10, 92, 168, .08);
  --shadow-md: 0 12px 30px rgba(10, 92, 168, .12);
  --shadow-lg: 0 24px 60px rgba(6, 52, 99, .18);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- إعادة الضبط ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Cairo', 'Tajawal', sans-serif; line-height: 1.3; font-weight: 800; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: min(100% - 40px); max-width: var(--container); margin-inline: auto; }

/* ---------- الأيقونات (Font Awesome) ---------- */
.ico-inline { margin-inline-end: 7px; }
.about-icon i, .feature-icon i, .svc-icon i,
.hc-icon i, .program-emoji i, .ags-emoji i { line-height: 1; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-blue); color: #fff; box-shadow: 0 10px 24px rgba(21, 101, 192, .35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(21, 101, 192, .45); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--blue-700); transform: translateY(-3px); }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ============================================================
   شريط التنقل
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 76px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-img {
  height: 52px; max-height: 52px; width: auto; max-width: 200px;
  display: block; object-fit: contain;
}
.brand-img-footer {
  height: 78px; max-height: 78px; width: auto; background: #fff;
  padding: 10px 16px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); margin-bottom: 16px;
}

.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  position: relative; padding: 8px 13px; border-radius: 10px;
  font-weight: 500; color: var(--ink); font-size: .96rem; transition: color .2s, background .2s;
}
.nav-links a::after {
  content: ""; position: absolute; inset-inline: 13px; bottom: 4px; height: 2px;
  background: var(--grad-blue); border-radius: 2px; transform: scaleX(0); transition: transform .28s var(--ease);
}
.nav-links a:hover { color: var(--blue-700); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta { padding: 11px 22px; }

/* أزرار الإجراءات + زر اللغة */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-btn {
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: .9rem;
  min-width: 44px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: var(--blue-050); color: var(--blue-700); border: 2px solid var(--blue-100);
  transition: background .2s, color .2s, border-color .2s;
}
.lang-btn:hover { background: var(--blue-100); border-color: var(--blue-300); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; border-radius: 3px; background: var(--blue-700); transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   القسم الرئيسي (Hero)
   ============================================================ */
.hero { position: relative; padding: 70px 0 130px; overflow: hidden; background: var(--grad-deep); }
.hero-bg {
  position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(600px circle at 85% 15%, rgba(79, 195, 247, .35), transparent 60%),
    radial-gradient(500px circle at 10% 90%, rgba(18, 161, 138, .25), transparent 60%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }

.hero-badge {
  display: inline-block; background: rgba(255, 255, 255, .14); color: #eaf5ff;
  border: 1px solid rgba(255, 255, 255, .28); padding: 7px 16px; border-radius: 999px;
  font-size: .86rem; font-weight: 600; margin-bottom: 22px; backdrop-filter: blur(6px);
}
.hero-title { color: #fff; font-size: clamp(1.5rem, 3.6vw, 3rem); font-weight: 900; }
.hero-title-accent {
  display: block; margin-top: 10px; font-size: clamp(1rem, 2.2vw, 1.55rem); font-weight: 700;
  background: linear-gradient(90deg, #7fd4ff, #b8f3e6); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: #d5e6f6; font-size: clamp(1rem, 1.5vw, 1.18rem); margin: 22px 0 30px; max-width: 560px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-trust { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-trust li { display: flex; flex-direction: column; }
.hero-trust strong { color: #fff; font-size: 1.05rem; font-family: 'Cairo'; }
.hero-trust span { color: #a9c7e2; font-size: .82rem; }

/* الخريطة التفاعلية والبطاقات العائمة */
.hero-visual { position: relative; min-height: 440px; display: grid; place-items: center; }
.hero-map {
  width: 100%; height: 430px; border-radius: 22px; overflow: hidden; position: relative; z-index: 1;
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(255, 255, 255, .12); background: #dfeaf3;
}
.map-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 10px; z-index: 0;
  color: var(--blue-700); font-weight: 700; text-align: center;
}
.map-fallback i { font-size: 2.4rem; }
.map-fallback span { display: block; font-size: .95rem; }
/* دبابيس الخريطة المخصصة */
.map-pin span {
  --c: #1565C0; display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--c); color: #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(6, 52, 99, .35); border: 2px solid #fff;
}
.map-pin span i { transform: rotate(45deg); font-size: .9rem; }
.leaflet-popup-content { font-family: 'Tajawal', sans-serif; font-weight: 700; direction: rtl; }
.leaflet-container { font-family: 'Tajawal', sans-serif; }

.hero-card {
  position: absolute; z-index: 3; background: #fff; border-radius: 16px; padding: 13px 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-md); max-width: 230px;
}
.hero-card .hc-icon { font-size: 1.4rem; color: var(--blue-600); display: grid; place-items: center; width: 42px; }
.hero-card strong { font-size: .9rem; display: block; color: var(--ink); }
.hero-card p { font-size: .76rem; color: var(--muted); margin: 0; }
.hero-card { top: 6%; right: -6px; }
.hero-card.hc-2 { top: auto; bottom: 4%; right: auto; left: -10px; }

.float-a { animation: floatY 5s ease-in-out infinite; }
.float-b { animation: floatY 5s ease-in-out infinite .8s; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; }
.hero-wave svg { width: 100%; height: 90px; }

/* ============================================================
   الأقسام العامة
   ============================================================ */
.section { padding: 90px 0; }
.section-tint { background: var(--blue-050); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.eyebrow {
  display: inline-block; color: var(--blue-600); background: var(--blue-100);
  font-weight: 700; font-size: .82rem; padding: 6px 16px; border-radius: 999px; margin-bottom: 14px;
}
.eyebrow-light { background: rgba(255, 255, 255, .16); color: #eaf5ff; }
.section-head h2 { font-size: clamp(1.6rem, 3.3vw, 2.4rem); color: var(--ink); }
.section-lead { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.about-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.about-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--grad-blue); }
.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.about-icon { font-size: 2rem; color: var(--blue-600); display: inline-block; margin-bottom: 12px; }
.about-card h3 { color: var(--blue-700); font-size: 1.4rem; margin-bottom: 10px; }
.about-card p { color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px;
  background: var(--grad-blue); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md);
}
.stat { text-align: center; color: #fff; }
.stat b { display: block; font-family: 'Cairo'; font-size: 1.9rem; font-weight: 900; }
.stat-star { font-size: 1.3rem; margin-inline-end: 5px; vertical-align: 2px; color: #ffd257; }
.stat span { font-size: .88rem; color: #d7ebff; }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.feature-icon {
  font-size: 1.6rem; width: 62px; height: 62px; display: grid; place-items: center;
  background: var(--blue-050); color: var(--blue-600); border-radius: 16px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.22rem; margin-bottom: 8px; color: var(--ink); }
.feature-card p { color: var(--muted); font-size: .97rem; }
.feature-hero {
  grid-column: span 2; background: var(--grad-deep); border: 0; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.feature-hero h3, .feature-hero p { color: #fff; }
.feature-hero .feature-icon { background: rgba(255, 255, 255, .14); color: #fff; }
.feature-hero p { color: #d5e6f6; max-width: 620px; }
.feature-tag {
  position: absolute; top: 22px; inset-inline-end: 22px; background: var(--teal);
  color: #fff; font-size: .74rem; font-weight: 700; padding: 5px 13px; border-radius: 999px;
}

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.svc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.svc-icon {
  font-size: 1.4rem; width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--blue-050); color: var(--blue-600); border-radius: 14px;
}
.svc-price {
  background: var(--blue-100); color: var(--blue-700); font-weight: 800; font-family: 'Cairo';
  font-size: .9rem; padding: 6px 13px; border-radius: 999px;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.service-card p { color: var(--muted); font-size: .94rem; flex-grow: 1; }
.svc-extra {
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line);
  color: var(--teal); font-weight: 600; font-size: .86rem;
}

/* ---------- تنويه الأسعار ---------- */
.price-note {
  display: flex; align-items: center; gap: 12px; max-width: 820px; margin: 0 auto 36px;
  background: #fff8e6; border: 1px solid #f4dfa0; border-radius: var(--radius-sm);
  padding: 14px 20px; color: #8a6d1a;
}
.price-note i { font-size: 1.3rem; color: #d9a400; flex-shrink: 0; }
.price-note strong { color: #6b520f; }
.svc-price em { font-style: normal; font-size: .72rem; opacity: .8; font-weight: 600; }

/* ---------- شريط البوكسات المتحرك ---------- */
.box-carousel {
  position: relative; overflow: hidden; padding: 10px 0 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.box-track { display: flex; gap: 20px; width: max-content; animation: marquee 32s linear infinite; }
.box-carousel:hover .box-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

.box-slide {
  flex: 0 0 auto; width: 260px; text-align: center; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-sm); font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.box-slide:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.box-slide-icon {
  width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px;
  background: var(--grad-blue); color: #fff; font-size: 1.7rem; box-shadow: var(--shadow-sm);
}
/* صورة البوكس داخل بطاقة الشريط */
.box-slide-media {
  width: 100%; height: 150px; display: grid; place-items: center; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px;
}
.box-slide-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* بديل الأيقونة للبوكسات بدون صورة — بنفس مساحة الصور */
.box-slide-media-icon { background: var(--blue-050); border-color: var(--blue-100); color: var(--blue-600); font-size: 3rem; }
.box-slide-name { font-family: 'Cairo'; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.box-slide-tag { font-size: .82rem; color: var(--teal); font-weight: 700; background: rgba(18,161,138,.1); padding: 3px 12px; border-radius: 999px; }
.box-slide-cta { margin-top: 6px; font-size: .85rem; font-weight: 700; color: var(--blue-600); }
.box-slide-cta i { margin-inline-start: 4px; }

.box-hint { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 6px; }
.box-hint i { color: var(--blue-500); margin-inline-end: 6px; }

/* ---------- خاصية التهادي ---------- */
.gift-band {
  display: grid; grid-template-columns: 260px 1fr; align-items: center; gap: 20px;
  background: var(--grad-deep); border-radius: 26px; padding: 42px; box-shadow: var(--shadow-lg);
  overflow: hidden; position: relative;
}
.gift-band::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(79,195,247,.35), transparent 70%);
}
.gift-visual { display: grid; place-items: center; position: relative; z-index: 1; }
.gift-visual i {
  font-size: 5rem; color: #fff; width: 150px; height: 150px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 30px;
  animation: floatY 5s ease-in-out infinite;
}
.gift-content { position: relative; z-index: 1; }
.gift-content h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 8px 0 12px; }
.gift-content p { color: #d5e6f6; margin-bottom: 16px; max-width: 620px; }
.gift-features { display: grid; gap: 10px; margin-bottom: 24px; }
.gift-features li { color: #eaf5ff; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.gift-features i { color: #7fd4ff; width: 22px; text-align: center; }

/* ---------- تبويبات التسجيل ---------- */
.reg-tabs { display: flex; gap: 10px; max-width: 940px; margin: 0 auto 22px; flex-wrap: wrap; }
.reg-tab {
  flex: 1; min-width: 200px; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1rem;
  padding: 15px 20px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #eaf5ff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: .25s;
}
.reg-tab:hover { background: rgba(255,255,255,.16); }
.reg-tab.active { background: #fff; color: var(--blue-700); border-color: #fff; box-shadow: var(--shadow-md); }
.reg-panel[hidden] { display: none; }
.field label .opt { color: var(--muted); font-weight: 500; font-size: .82rem; }

/* ---------- نافذة تفاصيل البوكس ---------- */
.modal-x {
  position: absolute; top: 16px; inset-inline-end: 16px; width: 38px; height: 38px; border: 0;
  background: var(--blue-050); color: var(--blue-700); border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; display: grid; place-items: center; transition: background .2s;
}
.modal-x:hover { background: var(--blue-100); }
.box-modal-card { max-width: 620px; text-align: right; padding: 30px; max-height: 88vh; overflow-y: auto; }
/* صورة البوكس داخل النافذة */
.bm-media {
  position: relative; display: grid; place-items: center; margin-bottom: 20px; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  max-height: 280px; overflow: hidden; transition: border-color .25s;
}
.bm-media[hidden] { display: none; }
.bm-media img { max-width: 100%; max-height: 258px; object-fit: contain; }
.bm-media:hover { border-color: var(--blue-300); }
.bm-zoom {
  position: absolute; bottom: 10px; inset-inline-start: 10px; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(10, 92, 168, .9);
  color: #fff; font-size: .9rem; opacity: 0; transition: opacity .25s;
}
.bm-media:hover .bm-zoom { opacity: 1; }
.bm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.bm-icon {
  width: 68px; height: 68px; flex-shrink: 0; display: grid; place-items: center; border-radius: 18px;
  background: var(--grad-blue); color: #fff; font-size: 1.7rem;
}
.bm-head h3 { font-size: 1.35rem; color: var(--ink); }
.bm-service { color: var(--teal); font-weight: 700; font-size: .9rem; }
.bm-desc { color: var(--muted); margin-bottom: 18px; }
.bm-items { background: var(--blue-050); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 16px; }
.bm-items h4 { color: var(--blue-700); margin-bottom: 10px; font-size: 1rem; }
.bm-price { font-size: 1rem; color: var(--ink); margin-bottom: 18px; }
.bm-price strong { font-family: 'Cairo'; color: var(--blue-700); font-size: 1.15rem; }
.bm-order-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.bm-order-btns { display: grid; gap: 10px; }
.bm-order-btns .btn { width: 100%; }
.btn-outline { background: #fff; color: var(--blue-700); border-color: var(--blue-300); }
.btn-outline:hover { background: var(--blue-050); transform: translateY(-2px); }
.btn-gift { background: #fff4e6; color: #b5730a; border-color: #f0c78a; }
.btn-gift:hover { background: #ffe9cc; transform: translateY(-2px); }

/* ---------- إشعار منبثق (Toast) ---------- */
.toast {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 210;
  display: flex; align-items: center; gap: 12px; max-width: 340px;
  background: var(--ink); color: #fff; padding: 15px 20px; border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); font-weight: 600;
}
.toast[hidden] { display: none; }
.toast i { color: #4be1b0; font-size: 1.4rem; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Programs ---------- */
.programs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.program-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
/* صورة البرنامج أعلى البطاقة */
.program-media {
  display: grid; place-items: center; width: 100%; height: 230px; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; overflow: hidden; transition: border-color .25s, transform .25s var(--ease);
}
.program-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.program-media:hover { border-color: var(--blue-300); }
.program-media:hover img { transform: scale(1.02); }
.program-media img { transition: transform .35s var(--ease); }

.program-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.program-emoji {
  font-size: 1.5rem; width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--grad-blue); color: #fff; border-radius: 16px; box-shadow: var(--shadow-sm);
}
.program-head h3 { font-size: 1.3rem; color: var(--blue-700); }
.program-desc { color: var(--muted); margin-bottom: 18px; }
.box-block { background: var(--blue-050); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 16px; }
.box-title { display: block; font-family: 'Cairo'; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.box-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.box-list li { position: relative; padding-inline-start: 20px; color: var(--muted); font-size: .92rem; }
.box-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--teal); font-weight: 900; }
.program-foot { color: var(--blue-700); font-weight: 700; font-size: .95rem; }

.plans-label { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.plans-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan {
  position: relative; text-align: center; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 10px; transition: border-color .25s, transform .25s;
}
.plan:hover { border-color: var(--blue-300); transform: translateY(-4px); }
.plan-name { display: block; color: var(--muted); font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.plan-price { font-family: 'Cairo'; font-weight: 900; font-size: 1.5rem; color: var(--blue-700); }
.plan-price i { font-style: normal; font-size: .78rem; color: var(--muted); font-weight: 600; margin-inline-start: 3px; }
.plan-featured { border-color: var(--blue-500); background: var(--blue-050); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--teal); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}

/* ---------- Agreement ---------- */
.agreement-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; }
.agreement-side { position: sticky; top: 100px; }
.ags-box {
  background: var(--grad-deep); color: #fff; border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow-md); text-align: center;
}
.ags-emoji {
  font-size: 1.9rem; width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 14px;
  background: rgba(255, 255, 255, .12); color: #fff; border-radius: 20px;
}
/* صورة بوكس الممارس في بطاقة الاتفاقية — إطار منتج أنيق */
.ags-media {
  display: grid; place-items: center; width: 100%; height: 200px; margin: 0 auto 18px;
  background: #ded9d6; border-radius: var(--radius); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.ags-media img { width: 100%; height: 100%; object-fit: contain; }
.ags-box h3 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }
.ags-box p { color: #d5e6f6; font-size: .96rem; }
.ags-price {
  margin: 22px 0 16px; padding: 18px; background: rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, .18);
}
.ags-price span { display: block; font-size: .8rem; color: #b7d3ec; margin-bottom: 4px; }
.ags-price strong { font-family: 'Cairo'; font-size: 2rem; color: #fff; }
.ags-note { font-size: .88rem; color: #ffd; background: rgba(255, 214, 102, .14); border-radius: 10px; padding: 10px; }

.agreement-terms { display: grid; gap: 16px; }
.term {
  display: flex; gap: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.term:hover { transform: translateX(-6px); box-shadow: var(--shadow-md); }
.term-num {
  flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--grad-blue); color: #fff; border-radius: 12px; font-family: 'Cairo'; font-weight: 900; font-size: 1.2rem;
}
.term h4 { color: var(--blue-700); font-size: 1.1rem; margin-bottom: 6px; }
.term p { color: var(--muted); font-size: .96rem; }

/* ---------- Registration ---------- */
.section-register { background: var(--grad-deep); position: relative; }
.section-register .section-head h2 { color: #fff; }
.section-register .section-lead { color: #cfe3f5; }

.reg-form {
  background: #fff; border-radius: 24px; padding: 40px; box-shadow: var(--shadow-lg);
  max-width: 940px; margin: 0 auto;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .94rem; margin-bottom: 7px; color: var(--ink); }
.field label span { color: #e53935; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 15px; border: 2px solid var(--line);
  border-radius: var(--radius-sm); background: #fbfdff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #9fb0c0; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(30, 136, 229, .14); background: #fff;
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e53935; box-shadow: 0 0 0 4px rgba(229, 57, 53, .12); }
.err { color: #e53935; font-size: .82rem; margin-top: 5px; min-height: 1px; font-weight: 600; }

.check-field {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; cursor: pointer;
  background: var(--blue-050); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px;
}
.check-field input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  flex-shrink: 0; width: 24px; height: 24px; border: 2px solid var(--blue-400); border-radius: 7px;
  display: grid; place-items: center; transition: background .2s, border-color .2s; margin-top: 2px;
}
.check-box::after { content: "✓"; color: #fff; font-weight: 900; font-size: .9rem; transform: scale(0); transition: transform .2s; }
.check-field input:checked + .check-box { background: var(--grad-blue); border-color: var(--blue-600); }
.check-field input:checked + .check-box::after { transform: scale(1); }
.check-field input:focus-visible + .check-box { box-shadow: 0 0 0 4px rgba(30, 136, 229, .2); }
.check-text { font-size: .95rem; color: var(--ink); font-weight: 500; }
.check-field.invalid { border-color: #e53935; }
.err-agree { display: block; margin-top: 6px; }

.reg-form .btn-lg { margin-top: 24px; }

/* ============================================================
   التذييل
   ============================================================ */
.footer { background: var(--blue-900); color: #cdd9e6; }
.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; padding: 60px 0 46px;
}
.footer .brand-ar { color: #fff; }
.footer .brand-en { color: var(--blue-300); }
.footer-brand p { margin-top: 16px; font-size: .94rem; color: #9fb3c7; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-contact li { margin-bottom: 12px; }
.footer-contact span { display: block; font-size: .8rem; color: #8ea6bd; }
.footer-contact a { color: #fff; font-weight: 700; font-family: 'Cairo'; transition: color .2s; }
.footer-contact a:hover { color: var(--blue-300); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #b7c7d8; transition: color .2s, padding .2s; font-size: .95rem; }
.footer-links a:hover { color: #fff; padding-inline-start: 6px; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.1rem; font-weight: 700;
  transition: background .25s, transform .25s;
}
.socials a:hover { background: var(--grad-blue); transform: translateY(-4px); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0; }
.footer-bottom p { text-align: center; font-size: .88rem; color: #8ea6bd; }

/* ============================================================
   نافذة النجاح المنبثقة
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 52, 99, .55); backdrop-filter: blur(4px); animation: fade .3s ease; }
.modal-card {
  position: relative; background: #fff; border-radius: 24px; padding: 44px 38px; text-align: center;
  max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); animation: pop .45s var(--ease);
}
.modal-check { width: 84px; height: 84px; margin: 0 auto 20px; }
.modal-check svg { width: 100%; height: 100%; }
.modal-check circle { stroke: var(--teal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s var(--ease) .2s forwards; }
.modal-check path { stroke: var(--teal); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .5s var(--ease) .7s forwards; }
.modal-card h3 { font-size: 1.5rem; color: var(--ink); margin-bottom: 12px; }
.modal-card p { color: var(--muted); margin-bottom: 26px; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.94); } }

/* زر العودة للأعلى */
.to-top {
  position: fixed; bottom: 26px; inset-inline-start: 26px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--grad-blue); color: #fff; font-size: 1.15rem; box-shadow: var(--shadow-md);
  transition: transform .25s, opacity .3s; animation: fade .3s;
}
.to-top:hover { transform: translateY(-4px); }
.to-top[hidden] { display: none; }

/* ============================================================
   تأثيرات الظهور عند التمرير
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   الاستجابة (Responsive)
   ============================================================ */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 420px; order: 2; }
  .hero-content { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .feature-hero { grid-column: span 1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .agreement-wrap { grid-template-columns: 1fr; }
  .agreement-side { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; padding: 12px 20px 24px; box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .35s var(--ease); margin: 0;
    border-top: 1px solid var(--line); max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a::after { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-inline-start: auto; }
  .brand-img { height: 46px; }

  .section { padding: 64px 0; }
  .about-grid, .programs-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .reg-form { padding: 26px 20px; }
  .box-list { grid-template-columns: 1fr; }
  .gift-band { grid-template-columns: 1fr; text-align: center; padding: 34px 24px; }
  .gift-visual i { width: 120px; height: 120px; font-size: 3.8rem; margin: 0 auto; }
  .gift-features li { justify-content: center; text-align: right; }
  .reg-tab { min-width: 100%; }
  .hero-map { height: 360px; }
  .program-media { height: 190px; }
  .ags-media { height: 170px; }
  .box-modal-card { padding: 24px 20px; }
  .bm-media { max-height: 210px; }
  .bm-media img { max-height: 190px; }
}

@media (max-width: 560px) {
  .features-grid, .services-grid { grid-template-columns: 1fr; }
  .plans-row { grid-template-columns: 1fr; }
  .hero-card { position: static; margin: 0 auto; max-width: 280px; }
  .hero-card.hc-2 { margin-top: 14px; }
  .hero-visual { min-height: auto; gap: 14px; display: flex; flex-direction: column; }
  .hero-map { height: 300px; order: -1; }
  .box-slide { width: 240px; }
  .box-slide-media { height: 125px; }
  .program-media { height: 160px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin-inline: auto; }
  .socials { justify-content: center; }
  .hero-trust { gap: 18px; }
}
