@charset "UTF-8";
/* ==========================================================================
   مدارس نجوم الإبداع الأهلية — تنسيقات صفحة الهبوط
   يعتمد على design-system.css
   ========================================================================== */

/* ─────────────────────────────────────────────
   1) الشريط العلوي
   ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: linear-gradient(168deg, var(--wood-600), var(--wood-700) 70%);
  box-shadow: 0 2px 14px rgba(42, 24, 15, .18);
  transition: padding var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--copper) 20%, var(--gold) 50%, var(--copper) 80%, transparent);
  opacity: .55;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  transition: padding var(--t) var(--ease);
}
.site-header.is-scrolled .site-header__inner { padding-block: .45rem; }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand__logo {
  height: 46px;
  width: auto;
  transition: height var(--t) var(--ease);
}
.site-header.is-scrolled .brand__logo { height: 38px; }

.brand__text { display: none; }
@media (min-width: 1024px) {
  .brand__text { display: block; line-height: 1.35; }
  .brand__name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.0625rem;
    color: var(--cream);
  }
  .brand__tag {
    font-size: var(--fs-xxs);
    color: var(--gold);
    opacity: .82;
  }
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.header-actions .btn { --btn-h: 44px; font-size: .9375rem; padding-inline: var(--sp-4); }
.header-actions__cta { display: none; }
@media (min-width: 560px) { .header-actions__cta { display: inline-flex; } }

/* ─────────────────────────────────────────────
   2) القسم الرئيسي (Hero)
   ───────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2rem, 6vw, 3.5rem) 0;
}
.hero__shamsa-a {
  top: -70px;
  inset-inline-start: -80px;
  width: 300px; height: 300px;
  opacity: .07;
}
.hero__shamsa-b {
  bottom: 40px;
  inset-inline-end: -110px;
  width: 380px; height: 380px;
  opacity: .05;
}

.hero__grid {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: end;
  position: relative;
  z-index: var(--z-decor);
}

.hero__copy { text-align: center; padding-block-end: var(--sp-4); }

.hero__eyebrow { margin-block-end: var(--sp-4); }

.hero__title {
  color: var(--wood-900);
  margin-block-end: var(--sp-4);
  text-shadow: 0 1px 0 rgba(255, 244, 228, .4);
}
.hero__title em {
  display: block;
  font-style: normal;
  color: var(--wood-600);
  font-size: .74em;
  margin-block-start: .18em;
}

.hero__lead {
  color: var(--wood-800);
  font-size: var(--fs-lead);
  line-height: 1.8;
  max-width: 34rem;
  margin-inline: auto;
  margin-block-end: var(--sp-6);
}

.hero__actions {
  display: grid;
  gap: var(--sp-3);
  max-width: 24rem;
  margin-inline: auto;
  margin-block-end: var(--sp-6);
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-4);
}
.hero__point {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--wood-800);
  background: rgba(255, 248, 238, .58);
  /* حشو منطقي: أصغر جهة الأيقونة، أكبر بعد النص */
  padding-block: .3rem;
  padding-inline: .5rem .7rem;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.hero__point svg { width: 15px; height: 15px; color: var(--wood-600); flex: none; }

/* صورة الطالب داخل قوس نجدي */
.hero__figure {
  position: relative;
  margin: 0;
  display: grid;
  place-items: end center;
}
.hero__arch {
  position: absolute;
  bottom: 0;
  /* توسيط فيزيائي صريح — يعمل في RTL و LTR بنفس النتيجة */
  left: 50%;
  transform: translateX(-50%);
  width: min(84%, 380px);
  height: 86%;
  background: linear-gradient(180deg, rgba(255, 246, 233, .5), rgba(146, 94, 54, .28));
  border: 2px solid rgba(255, 248, 238, .5);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 46% 46% 0 0;
  box-shadow: inset 0 -30px 60px rgba(90, 52, 30, .16);
}
.hero__arch::before {
  content: "";
  position: absolute;
  inset: 10px 10px 0;
  border: 1px solid rgba(255, 248, 238, .38);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 46% 46% 0 0;
}
.hero__img {
  position: relative;
  z-index: var(--z-decor);
  width: auto;
  height: clamp(300px, 62vw, 460px);
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 26px rgba(74, 43, 30, .3));
  animation: hero-float 4.2s var(--ease) infinite alternate;
}
@keyframes hero-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__img { animation: none; }
}

@media (min-width: 860px) {
  .hero { padding-block-start: clamp(2.5rem, 5vw, 4rem); }
  .hero__grid {
    grid-template-columns: 1fr 0.92fr;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .hero__copy { text-align: start; padding-block-end: clamp(2.5rem, 5vw, 4rem); }
  .hero__lead { margin-inline: 0; }
  .hero__actions {
    grid-template-columns: auto auto;
    justify-content: start;
    max-width: none;
    margin-inline: 0;
  }
  .hero__points { justify-content: flex-start; }
  .hero__img { height: clamp(400px, 44vw, 540px); }
}

/* ─────────────────────────────────────────────
   3) شريط الثقة
   ───────────────────────────────────────────── */
.trust-strip { background: var(--wood-700); color: var(--text-on-dark); }
.trust-strip__list {
  display: grid;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
}
.trust-strip__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.trust-strip__item svg {
  width: 26px; height: 26px;
  flex: none;
  color: var(--gold);
}
.trust-strip__item strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--cream);
}
.trust-strip__item span { font-size: var(--fs-xs); color: rgba(246, 237, 225, .72); }

@media (min-width: 700px) {
  .trust-strip__list { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
  .trust-strip__item + .trust-strip__item {
    border-inline-start: 1px solid rgba(232, 201, 170, .2);
    padding-inline-start: var(--sp-6);
  }
}

/* ─────────────────────────────────────────────
   4) المراحل الدراسية
   ───────────────────────────────────────────── */
.stages__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 720px) { .stages__grid { grid-template-columns: repeat(3, 1fr); } }

.stage-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage-card__top {
  position: relative;
  display: grid;
  place-items: center;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 248, 238, .72), transparent 62%),
    linear-gradient(170deg, var(--clay-300), var(--clay-400));
  border-block-end: 1px solid var(--border-strong);
}
.stage-card__top::after {
  content: "";
  position: absolute;
  inset-inline: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  opacity: .5;
  transition: opacity var(--t) var(--ease), height var(--t) var(--ease);
}
.stage-card:hover .stage-card__top::after { opacity: 1; height: 4px; }
.stage-card__top { transition: filter var(--t) var(--ease); }
.stage-card:hover .stage-card__top { filter: brightness(1.03) saturate(1.04); }
.stage-card__badge {
  position: absolute;
  top: var(--sp-3);
  inset-inline-end: var(--sp-3);
}
.stage-card__title { text-align: center; color: var(--wood-800); }
.stage-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
  padding: var(--sp-5);
}
.stage-card__desc { color: var(--text-soft); font-size: var(--fs-sm); line-height: 1.75; flex: 1; }
.stage-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--copper);
}
.stage-card__meta svg { width: 16px; height: 16px; }

/* ─────────────────────────────────────────────
   5) ما يميزنا
   ───────────────────────────────────────────── */
.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 640px) { .features__grid { gap: var(--sp-4); } }
@media (min-width: 900px) {
  .features__grid { grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-3);
  text-align: center;
}
.feature-card__badge { position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2); }
.feature-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--wood-800);
}
.feature-card__note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   6) البيئة التعليمية
   ───────────────────────────────────────────── */
.environment { position: relative; overflow: hidden; }
.environment__shamsa {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(72vw, 460px);
  height: min(72vw, 460px);
  color: var(--cream);
  opacity: .08;
}
.environment__inner {
  position: relative;
  z-index: var(--z-decor);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.environment__glyph {
  width: 34px; height: 34px;
  margin-inline: auto;
  margin-block-end: var(--sp-5);
  color: var(--gold);
}
.environment__quote {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.1rem, 3.6vw, 1.55rem);
  line-height: 1.85;
  color: var(--cream);
}
.environment__sign {
  display: block;
  margin-block-start: var(--sp-6);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-h3);
  color: var(--gold);
}

/* ─────────────────────────────────────────────
   7) نموذج التسجيل
   ───────────────────────────────────────────── */
.register { position: relative; }

.register__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  overflow: hidden;
}
.register__card::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--wood-600), var(--copper) 40%, var(--gold) 50%, var(--copper) 60%, var(--wood-600));
}
.register__body { padding: clamp(1.25rem, 4.5vw, 2.75rem); }

.form-group { margin-block-end: var(--sp-8); }
.form-group:last-of-type { margin-block-end: var(--sp-6); }

.form-group__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block-end: var(--sp-3);
  margin-block-end: var(--sp-5);
  border-block-end: 1px solid var(--border);
}
.form-group__num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .9375rem;
  color: var(--cream);
  background: var(--wood-600);
  border-radius: var(--r-xs);
  box-shadow: var(--sh-inset-copper);
}
.form-group__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-h4);
  color: var(--wood-800);
}
.form-group__title span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.form-row { display: grid; gap: var(--sp-5); }
@media (min-width: 640px) {
  .form-row--2 { grid-template-columns: repeat(2, 1fr); }
}

.form-footer {
  display: grid;
  gap: var(--sp-4);
  padding-block-start: var(--sp-2);
}
.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
}
.form-note svg { width: 16px; height: 16px; color: var(--success); flex: none; }

/* زر الإرسال أثناء المعالجة */
.btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.btn--loading::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 2.5px solid rgba(242, 228, 210, .35);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* لوحة نجاح (معاينة تصميم) */
.success-panel {
  display: none;
  text-align: center;
  padding: clamp(1.75rem, 6vw, 3.25rem) clamp(1.25rem, 4vw, 2.5rem);
}
.success-panel.is-shown { display: block; animation: field-in var(--t-slow) var(--ease); }
.success-panel__icon {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin-inline: auto;
  margin-block-end: var(--sp-5);
  color: #FFF;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--success-bg);
}
.success-panel__icon svg { width: 38px; height: 38px; }
.success-panel h3 { margin-block-end: var(--sp-3); font-size: var(--fs-h2); }
.success-panel p { color: var(--text-soft); max-width: 32rem; margin-inline: auto; }
.ref-box {
  display: inline-grid;
  gap: var(--sp-1);
  margin-block: var(--sp-6);
  padding: var(--sp-4) var(--sp-8);
  background: var(--clay-50);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r);
}
.ref-box__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.ref-box__value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  color: var(--wood-700);
  direction: ltr;
  letter-spacing: .06em;
}

/* ─────────────────────────────────────────────
   8) الموقع والتواصل
   ───────────────────────────────────────────── */
.contact__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 880px) {
  .contact__grid { grid-template-columns: 1fr 1.15fr; gap: var(--sp-8); align-items: start; }
}

.contact-list { display: grid; gap: var(--sp-4); }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.contact-item__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  color: var(--copper);
  background: var(--clay-100);
  border-radius: var(--r-sm);
}
.contact-item__icon svg { width: 23px; height: 23px; }
.contact-item__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-block-end: 2px;
}
.contact-item__value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--wood-800);
}
.contact-item__value a { color: var(--wood-800); }
.contact-item__value a:hover { color: var(--copper); }
.contact-item--pending .contact-item__value { color: var(--text-muted); font-weight: 400; font-size: var(--fs-sm); }

.contact__actions { display: grid; gap: var(--sp-3); margin-block-start: var(--sp-5); }
@media (min-width: 480px) { .contact__actions { grid-template-columns: repeat(2, 1fr); } }

/* الخريطة — ظاهرة مباشرة بـ loading="lazy" */
.map-box {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--clay-200);
  aspect-ratio: 4 / 3;
  min-height: 280px;
  box-shadow: var(--sh-sm);
}
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }

/* زر فتح الخريطة في تطبيق الخرائط — يطفو أعلى الإطار */
.map-open {
  position: absolute;
  top: var(--sp-3);
  inset-inline-start: var(--sp-3);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .5rem .9rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--wood-800);
  background: rgba(255, 252, 247, .94);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
  backdrop-filter: blur(4px);
  transition: background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.map-open svg { width: 16px; height: 16px; color: var(--copper); flex: none; }
.map-open:hover {
  background: #FFF;
  color: var(--wood-900);
  transform: translateY(-2px);
  box-shadow: var(--sh);
}
.map-open:active { transform: translateY(0); }

/* بديل احتياطي يُضاف بـ JavaScript إن تعذّر تحميل الخريطة */
.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6);
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255, 248, 238, .55), transparent),
    repeating-linear-gradient(45deg, var(--clay-200) 0 14px, var(--clay-300) 14px 28px);
  transition: filter var(--t) var(--ease);
}
.map-placeholder:hover { filter: brightness(1.03); }
.map-placeholder__pin {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  color: #FFF;
  background: var(--copper);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(74, 43, 30, .25);
}
.map-placeholder__pin svg { width: 28px; height: 28px; }
.map-placeholder__text {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--wood-800);
}
.map-placeholder__hint { font-size: var(--fs-xs); color: var(--text-soft); }

/* ─────────────────────────────────────────────
   9) التذييل
   ───────────────────────────────────────────── */
.site-footer { position: relative; padding-block: var(--sp-10) var(--sp-6); }
/* ترتفع رؤوس الشرفات فوق التذييل، بلونه نفسه */
.site-footer__parapet { top: -13px; color: var(--wood-700); }

.footer__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: var(--sp-8); }
}

.footer__brand-logo { height: 74px; width: auto; margin-block-end: var(--sp-4); }
.footer__about {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: rgba(246, 237, 225, .74);
  max-width: 26rem;
}

.footer__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-sm);
  color: var(--gold);
  margin-block-end: var(--sp-4);
}
.footer__list { display: grid; gap: var(--sp-3); }
.footer__list a, .footer__list span {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: rgba(246, 237, 225, .8);
}
.footer__list a:hover { color: var(--gold); }
.footer__list svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--copper-light); }

.footer__bottom {
  display: grid;
  gap: var(--sp-3);
  margin-block-start: var(--sp-8);
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid rgba(232, 201, 170, .18);
  font-size: var(--fs-xs);
  color: rgba(246, 237, 225, .58);
  text-align: center;
}
.footer__bottom a { color: rgba(246, 237, 225, .78); }
.footer__bottom a:hover { color: var(--gold); }
@media (min-width: 640px) {
  .footer__bottom {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: start;
  }
}
.footer__credit { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ─────────────────────────────────────────────
   10) الشريط السفلي الثابت + واتساب العائم
   ───────────────────────────────────────────── */
.cta-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(74, 43, 30, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px rgba(42, 24, 15, .22);
  transform: translateY(120%);
  transition: transform var(--t) var(--ease);
}
.cta-bar.is-shown { transform: translateY(0); }
.cta-bar__btn { flex: 1; --btn-h: 50px; }
.cta-bar__wa { flex: none; width: 50px; height: 50px; }
@media (min-width: 860px) { .cta-bar { display: none; } }

.wa-float {
  position: fixed;
  /* في RTL يستقر أسفل يمين الشاشة — الموضع المعتاد لزر واتساب */
  inset-inline-start: var(--sp-5);
  bottom: var(--sp-5);
  z-index: var(--z-float);
  display: none;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  color: #FFF;
  background: #1FA855;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(31, 168, 85, .38);
  transition: transform var(--t) var(--ease), background-color var(--t-fast) var(--ease);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #178443; color: #FFF; transform: scale(1.07); }
.wa-float:active { transform: scale(1); }
/* حلقة نبض هادئة تلفت النظر دون إزعاج */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #1FA855;
  animation: wa-ring 2.8s var(--ease) infinite;
  pointer-events: none;
}
@keyframes wa-ring {
  0%       { transform: scale(1);    opacity: .55; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}
@media (min-width: 860px) { .wa-float { display: flex; } }
@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; display: none; }
}

/* مساحة سفلية حتى لا يغطي الشريط الثابت المحتوى */
@media (max-width: 859px) {
  body { padding-bottom: 74px; }
}

/* ─────────────────────────────────────────────
   11) لافتة معاينة التصميم (تُحذف في مرحلة الربط)
   ───────────────────────────────────────────── */
.preview-flag {
  position: relative;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .5rem var(--sp-4);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xxs);
  text-align: center;
  color: var(--wood-800);
  background: var(--gold);
}
.preview-flag svg { width: 15px; height: 15px; flex: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   12) طبقة التجاوب الموسّعة
   ---------------------------------------------------------------------------
   Mobile First — كل الاستعلامات min-width عدا حالات خاصة موضّحة
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── منع أي تمرير أفقي على مستوى المستند ── */
html, body { max-width: 100%; overflow-x: hidden; }
/* كسر الكلمات الطويلة والروابط بدل خروجها عن الحاوية */
p, li, h1, h2, h3, h4, .field__hint, .field__error,
.contact-item__value, .consent__text, .footer__about {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ═══ هاتف ضيق جدًا: 320 – 380 بكسل (iPhone SE، Galaxy A) ═══ */
@media (max-width: 380px) {
  :root {
    --gutter: 0.875rem;
    --fs-display: 1.72rem;
    --section-y: 2.35rem;
  }
  .hero__title em { font-size: .78em; }
  .hero__points { gap: var(--sp-2); }
  .hero__point { font-size: .75rem; padding-block: .26rem; padding-inline: .42rem .6rem; }
  .hero__img { height: 268px; }
  /* المميزات عمود واحد — بطاقتان بعرض النصف تضغط النص كثيرًا هنا */
  .features__grid { grid-template-columns: 1fr; }
  .feature-card { flex-direction: row; text-align: start; align-items: center; gap: var(--sp-4); }
  .feature-card .niche { width: 52px; height: 64px; }
  .feature-card .niche svg { width: 26px; height: 26px; }
  .feature-card__badge { position: static; align-self: flex-start; }
  .btn { padding-inline: var(--sp-4); font-size: 1rem; }
  .btn--lg { --btn-h: 56px; font-size: 1.05rem; }
  .form-group__head { gap: var(--sp-2); }
  .ref-box { padding: var(--sp-4) var(--sp-5); }
  .trust-strip__item svg { width: 22px; height: 22px; }
}

/* ═══ هاتف أفقي أو شاشة قصيرة الارتفاع ═══ */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-block-start: var(--sp-4); }
  .hero__grid { grid-template-columns: 1fr 0.8fr; gap: var(--sp-5); align-items: center; }
  .hero__copy { text-align: start; padding-block-end: var(--sp-6); }
  .hero__lead { margin-inline: 0; margin-block-end: var(--sp-4); font-size: 1rem; }
  .hero__actions { grid-template-columns: auto auto; justify-content: start; max-width: none; margin-inline: 0; }
  .hero__img { height: 240px; }
  .hero__points { justify-content: flex-start; }
  .map-box { min-height: 220px; }
  /* الشريط الثابت يقتطع مساحة كبيرة من شاشة قصيرة */
  .cta-bar { padding-block: var(--sp-2); }
  .cta-bar__btn { --btn-h: 44px; }
  .cta-bar__wa { width: 44px; height: 44px; }
}

/* ═══ لوحي رأسي: 600 – 860 بكسل ═══ */
@media (min-width: 600px) and (max-width: 859px) {
  .hero__copy { max-width: 34rem; margin-inline: auto; }
  .hero__actions { grid-template-columns: 1fr 1fr; max-width: 32rem; }
  .hero__img { height: clamp(360px, 48vw, 420px); }
  /* المميزات ثلاثة أعمدة — أنسب من عمودين على هذا العرض */
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .features__grid > :nth-child(4) { grid-column: 1 / 2; }
}

/* ═══ لوحي أفقي وحاسب صغير: 860 – 1024 بكسل ═══ */
@media (min-width: 860px) and (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr 0.85fr; }
  .hero__img { height: clamp(380px, 42vw, 460px); }
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .features__grid > :nth-child(4) { grid-column: 1 / 2; }
  .contact__grid { grid-template-columns: 1fr; }
  .map-box { aspect-ratio: 16 / 9; }
}

/* ═══ حاسب عريض: 1440 بكسل وأكثر ═══ */
@media (min-width: 1440px) {
  :root {
    --container: 1240px;
    --section-y: 6rem;
  }
  .hero__img { height: 570px; }
  .hero__grid { gap: 4.5rem; }
}

/* ═══ شاشات فائقة العرض: 1800 بكسل وأكثر ═══ */
@media (min-width: 1800px) {
  :root { --container: 1320px; }
}

/* ═══ شاشات عالية الكثافة — تخفيف حدّة الظلال ═══ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hairline { height: .5px; }
}

/* ═══ الطباعة الورقية ═══ */
@media print {
  .site-header, .cta-bar, .wa-float, .preview-flag,
  .map-box, .hero__figure, .btn, .sec-head__glyph, .shamsa-wm, .parapet { display: none !important; }
  body { background: #FFF; color: #000; padding: 0; }
  .section { padding-block: 1rem; }
  .card, .register__card { box-shadow: none; border: 1px solid #CCC; break-inside: avoid; }
  .clay-wall, .wood-panel { background: #FFF !important; color: #000 !important; }
  .environment__quote, .environment__sign, .footer__about, .footer__list a { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
