/* ===================================================
   الصفحة الرئيسية — تصميم v3 (Mobile-first)
   يُحمَّل في index.html فقط
   =================================================== */

.home main { overflow-x: clip; }
.home .section { padding: 72px 0; }
@media (min-width: 900px) { .home .section { padding: 110px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  background: #fff;
  border: 1px solid rgba(176,141,87,0.35);
  padding: 6px 14px;
  border-radius: 100px;
}
.eyebrow .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2bb673;
  box-shadow: 0 0 0 0 rgba(43,182,115,0.5);
}
@media (prefers-reduced-motion: no-preference) {
  .eyebrow .live { animation: live-ping 2s ease-out infinite; }
}
@keyframes live-ping { to { box-shadow: 0 0 0 10px rgba(43,182,115,0); } }

.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head .section-title { margin-top: 12px; }
.sec-head--start { text-align: right; }
.sec-head--start .divider { margin-inline: 0 auto; }
@media (min-width: 900px) { .sec-head { margin-bottom: 56px; } }

/* ===================================================
   HERO — نص + جدار صور متحرك
   =================================================== */
.hx {
  position: relative;
  padding: 28px 0 0;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(214,189,140,0.25), transparent 60%),
    var(--color-bg);
  overflow: hidden;
}
.hx-grid { display: grid; gap: 28px; }
.hx-copy { position: relative; z-index: 2; }
.hx h1 {
  font-size: clamp(2rem, 8.4vw, 3.6rem);
  line-height: 1.25;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 16px 0 14px;
}
.hx h1 span {
  display: block;
  font-size: 0.62em;
  font-weight: 700;
  margin-top: 6px;
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-accent-dark) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hx-desc { font-size: 1rem; color: var(--color-text-med); line-height: 1.9; max-width: 540px; margin-bottom: 22px; }
.hx-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.hx-cta .btn { padding: 15px 12px; font-size: 0.95rem; }
.hx-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hx-trust li {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.4;
}
.hx-trust strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

/* جدار الصور: صفين أفقيين على الموبايل، 3 أعمدة رأسية على الكمبيوتر */
.hx-wall {
  display: grid;
  gap: 10px;
  margin-inline: -16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hx-col { overflow: hidden; }
.hx-col:nth-child(3) { display: none; }
.hx-track { display: flex; gap: 10px; width: max-content; }
.hx-track figure {
  margin: 0;
  width: 150px;
  aspect-ratio: 4/5;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-section);
  box-shadow: 0 12px 30px -14px rgba(14,34,51,0.45);
}
.hx-track img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .hx-col:nth-child(1) .hx-track { animation: wall-x 40s linear infinite; }
  .hx-col:nth-child(2) .hx-track { animation: wall-x 46s linear infinite reverse; }
}
@keyframes wall-x { to { translate: 50% 0; } }
@keyframes wall-y { to { translate: 0 -50%; } }

@media (min-width: 900px) {
  .hx { padding: 0; min-height: min(92vh, 900px); display: flex; align-items: center; }
  .hx > .container { width: 100%; }
  .hx-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hx-cta { display: flex; }
  .hx-cta .btn { padding: 16px 30px; }
  .hx-trust { max-width: 480px; }
  .hx-wall {
    grid-template-columns: repeat(3, 1fr);
    height: min(92vh, 900px);
    margin: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  }
  .hx-col:nth-child(3) { display: block; }
  .hx-col:nth-child(2) { margin-top: -80px; }
  .hx-track { flex-direction: column; width: auto; }
  .hx-track figure { width: 100%; border-radius: 22px; }
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .hx-col:nth-child(1) .hx-track { animation: wall-y 48s linear infinite; }
  .hx-col:nth-child(2) .hx-track { animation: wall-y 56s linear infinite reverse; }
  .hx-col:nth-child(3) .hx-track { animation: wall-y 44s linear infinite; }
  .hx-wall:hover .hx-track { animation-play-state: paused; }
}

/* دخول الهيرو */
@media (prefers-reduced-motion: no-preference) {
  .js .hx-copy > * { animation: rise-in 0.9s var(--ease-out) both; }
  .js .hx-copy > :nth-child(2) { animation-delay: 0.08s; }
  .js .hx-copy > :nth-child(3) { animation-delay: 0.16s; }
  .js .hx-copy > :nth-child(4) { animation-delay: 0.24s; }
  .js .hx-copy > :nth-child(5) { animation-delay: 0.32s; }
  .js .hx-wall { animation: wall-in 1.2s var(--ease-out) 0.2s both; }
}
@keyframes wall-in { from { opacity: 0; scale: 0.96; } }

.home .marquee { margin-top: 36px; }
@media (min-width: 900px) { .home .marquee { margin-top: 0; } }

/* ===================================================
   الخدمات — كروت بالصور (سلايدر على الموبايل)
   =================================================== */
.svc-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 18px;
  margin-inline: -16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.svc-rail::-webkit-scrollbar { display: none; }
.svc-card {
  scroll-snap-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background: var(--color-primary-dark);
  isolation: isolate;
  box-shadow: 0 24px 50px -28px rgba(14,34,51,0.6);
}
.svc-card picture { position: absolute; inset: 0; z-index: -2; }
.svc-card img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--ease-out); }
.svc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14,34,51,0) 25%, rgba(14,34,51,0.55) 55%, rgba(11,27,41,0.95) 100%);
}
.svc-card:hover img { scale: 1.06; }
.svc-body { margin-top: auto; padding: 22px; }
.svc-num { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; color: var(--color-accent-light); letter-spacing: 0.1em; }
.svc-card h3 { font-size: 1.25rem; font-weight: 800; margin: 4px 0 8px; color: #fff; }
.svc-card p { font-size: 0.86rem; line-height: 1.8; color: rgba(255,255,255,0.82); margin-bottom: 14px; }
.svc-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0e2233;
  background: var(--gold-grad);
  padding: 9px 16px;
  border-radius: 100px;
}
.svc-go svg { width: 16px; height: 16px; transition: translate 0.3s var(--ease-out); }
.svc-card:hover .svc-go svg { translate: -4px 0; }
.svc-hint { text-align: center; font-size: 0.78rem; color: var(--color-text-muted); margin-top: 4px; }

@media (min-width: 900px) {
  .svc-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    padding: 0;
    margin: 0;
    gap: 22px;
  }
  .svc-card:first-child { grid-column: span 2; }
  .svc-card { min-height: 380px; }
  .svc-hint { display: none; }
}

/* ===================================================
   المعرض — فلاتر + Masonry
   =================================================== */
.gal-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 16px 6px;
  margin: 0 -16px 22px;
}
.gal-filters::-webkit-scrollbar { display: none; }
.gal-filters button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: #fff;
  font: 700 0.88rem var(--font-main);
  color: var(--color-text-med);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.gal-filters button[aria-pressed="true"] { background: var(--color-primary-dark); color: #fff; border-color: var(--color-primary-dark); }
@media (min-width: 900px) { .gal-filters { justify-content: center; } }

.gal { columns: 2; column-gap: 10px; }
@media (min-width: 900px) { .gal { columns: 3; column-gap: 18px; } }
.gal-item {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-bg-section);
  display: block;
}
@media (min-width: 900px) { .gal-item { margin-bottom: 18px; border-radius: 22px; } }
.gal-item[hidden] { display: none; }
.gal-item picture { display: block; }
.gal-item img { width: 100%; height: auto; display: block; }
.gal-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(11,27,41,0.85));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
}
.gal-item figcaption small { display: block; font-weight: 500; color: rgba(255,255,255,0.75); }
@media (hover: hover) {
  .gal-item figcaption { opacity: 0; translate: 0 8px; transition: opacity 0.35s, translate 0.35s var(--ease-out); }
  .gal-item:hover figcaption, .gal-item:focus-visible figcaption { opacity: 1; translate: 0 0; }
}

/* ===================================================
   مراحل الشغل — 3D مرتبط بالتمرير
   =================================================== */
.craft { background: var(--color-primary-dark); color: #fff; position: relative; overflow: hidden; }
.craft .section-title { color: #fff; }
.craft .section-tag { background: rgba(201,169,110,0.12); border-color: rgba(201,169,110,0.35); color: var(--color-accent-light); }
.craft-pin { display: flex; flex-direction: column-reverse; gap: 24px; padding: 64px 0; }
.craft-head { margin-bottom: 22px; }
.craft-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: radial-gradient(circle at 50% 30%, #1d3b55, #0b1b29);
}
.craft-stage > picture img { width: 100%; height: 100%; object-fit: cover; }
.craft-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.craft-steps { display: grid; gap: 12px; counter-reset: craft; }
.craft-step {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px 18px 18px 18px;
  background: rgba(255,255,255,0.03);
  transition: background-color 0.4s, border-color 0.4s;
}
.craft-step span { font-family: var(--font-display); font-weight: 800; color: var(--color-accent-light); font-size: 0.85rem; letter-spacing: 0.1em; }
.craft-step h3 { color: #fff; font-size: 1.1rem; margin: 4px 0 6px; }
.craft-step p { color: rgba(255,255,255,0.72); font-size: 0.9rem; line-height: 1.85; }
.craft-progress { display: none; }

/* وضع 3D المثبّت (كمبيوتر) */
.craft.is-3d .craft-stage > picture { display: none; }
@media (min-width: 900px) {
  .craft-pin { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 56px; padding: 100px 0; }
  .craft.is-3d .craft-pin { min-height: 100vh; padding: 90px 0; }
  .craft.is-3d .craft-stage { aspect-ratio: auto; height: 74vh; }
  .craft.is-3d .craft-step { opacity: 0.38; }
  .craft.is-3d .craft-step.is-active { opacity: 1; background: rgba(201,169,110,0.1); border-color: rgba(201,169,110,0.5); }
  .craft.is-3d .craft-progress { display: block; height: 3px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; margin-top: 8px; }
  .craft.is-3d .craft-progress i { display: block; height: 100%; background: var(--gold-grad); transform-origin: right; scale: 0 1; }
  .craft .section { padding-block: 0; }
}

/* ===================================================
   أرقام + لماذا ياسر
   =================================================== */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 34px; }
.stat {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 20px 14px;
  text-align: center;
}
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 2.6rem); color: var(--color-primary-dark); line-height: 1.1; }
.stat span { font-size: 0.82rem; color: var(--color-text-light); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.home .why-grid { grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .home .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .home .why-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.home .why-card { padding: 20px; }

/* ===================================================
   التقييمات
   =================================================== */
.reviews { background: var(--color-bg-alt); }
.rv-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 18px;
  margin-inline: -16px;
  scrollbar-width: none;
}
.rv-rail::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .rv-rail { grid-auto-columns: calc((100% - 28px) / 3); padding: 4px 0 18px; margin: 0; } }
.rv-card {
  scroll-snap-align: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rv-stars { color: #d4a72c; letter-spacing: 2px; font-size: 1rem; }
.rv-text { font-size: 0.95rem; line-height: 1.9; color: var(--color-text); }
.rv-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--color-border); }
.rv-who { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.rv-who b { color: var(--color-primary-dark); }
.rv-who small { color: var(--color-text-muted); display: block; }
.rv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #0e2233;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rv-empty {
  background: #fff;
  border: 1px dashed rgba(176,141,87,0.6);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.rv-empty h3 { font-size: 1.2rem; color: var(--color-primary-dark); margin-bottom: 8px; }
.rv-empty p { color: var(--color-text-med); font-size: 0.95rem; line-height: 1.9; margin-bottom: 18px; }
.rv-empty .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===================================================
   مناطق الخدمة — كروت المناطق
   =================================================== */
.areas-wrap {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 80%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 18px;
  margin-inline: -16px;
  scrollbar-width: none;
}
.areas-wrap::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .areas-wrap { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; } }
.region {
  scroll-snap-align: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 18px;
}
.region h3 { font-size: 1rem; color: var(--color-primary-dark); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.region h3 svg { width: 18px; height: 18px; color: var(--color-accent); }
.region ul { display: flex; flex-wrap: wrap; gap: 6px; }
.region li { font-size: 0.8rem; font-weight: 600; color: var(--color-text-med); background: var(--color-bg-alt); border-radius: 100px; padding: 4px 11px; }

/* ===================================================
   الأسئلة
   =================================================== */
.faq-lead {
  max-width: 820px;
  margin: 0 auto 22px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--color-text-med);
}
.faq-lead strong { color: var(--color-primary-dark); }

/* ===================================================
   CTA النهائي بصورة
   =================================================== */
.cta-x { position: relative; isolation: isolate; color: #fff; padding: 84px 0; overflow: hidden; }
.cta-x > picture { position: absolute; inset: 0; z-index: -2; }
.cta-x > picture img { width: 100%; height: 100%; object-fit: cover; }
.cta-x::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,27,41,0.78), rgba(11,27,41,0.92)); }
.cta-x h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); color: #fff; text-align: center; margin-bottom: 12px; }
.cta-x p { text-align: center; color: rgba(255,255,255,0.82); max-width: 560px; margin: 0 auto 26px; line-height: 1.9; }
.cta-x .cta-buttons { margin-bottom: 22px; }
.wa-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wa-quick a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.25s, border-color 0.25s;
}
.wa-quick a:hover { background: rgba(37,211,102,0.2); border-color: #25d366; }

/* الأزرار العائمة لا تغطي آخر المحتوى على الموبايل */
@media (max-width: 768px) { .home .site-footer { padding-bottom: 90px; } }
