/* خط Montserrat للنصوص الإنجليزية والأرقام، وChanga للعربي (من Google Fonts في layout.html) */

/* ألوان المظهر الداكن (الافتراضي) */
:root,
:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --frame: #0E0E0E;
  --card: #151515;
  --card-2: #1B1B1B;
  --card-hover: #202020;
  --line: rgba(255, 255, 255, .07);
  --text: #FAFAFA;
  --muted: #A3A3A3;
  --faint: #6E6E6E;
  --btn-light-bg: #FAFAFA;
  --btn-light-text: #121212;
  --yellow: #F5E55B;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  color-scheme: dark;
}
/* المظهر الفاتح */
:root[data-theme="light"] {
  --bg: #ECEAE5;
  --frame: #F3F2EE;
  --card: #E7E5DF;
  --card-2: #FAF9F6;
  --card-hover: #FFFFFF;
  --line: rgba(40, 32, 20, .08);
  --text: #1A1918;
  --muted: #5C5A55;
  --faint: #8A8781;
  --btn-light-bg: #1A1918;
  --btn-light-text: #FAF9F6;
  --shadow: 0 1px 2px rgba(40, 32, 20, .05);
  color-scheme: light;
}

:root {
  --font: "Changa", system-ui, sans-serif;
  --side-w: 272px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 93.75%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 12px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 12px; }

/* التوزيع العام */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

/* القائمة الجانبية */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: 12px; padding-inline-end: 0;
}
.side-top, .side-bottom { display: grid; gap: 8px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; box-shadow: var(--shadow); }

.profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 12px; padding: 12px; }
.profile img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; object-position: 50% 22%; background: #000; border: 1px solid var(--line); }
.profile-name { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.profile-role { color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8125rem; line-height: 1; }
.profile .status {
  grid-column: 1 / -1; margin-top: 12px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(245, 229, 91, .15); }
.profile .menu-close { display: none; }

.group-title { padding: 6px 10px 4px; color: var(--faint); font-size: .8125rem; font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px;
  border-radius: var(--r-sm); color: var(--muted); font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-item:hover { background: var(--card-2); color: var(--text); }
.nav-item.is-active { background: var(--card-2); color: var(--text); }
.nav-item .ext { width: 14px; height: 14px; margin-inline-start: auto; opacity: .6; }

.theme-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 8px; padding-inline-start: 12px; color: var(--muted); font-size: .875rem; }
.theme-switch { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.theme-switch button { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; color: var(--faint); }
.theme-switch button svg { width: 15px; height: 15px; }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.prefs { display: grid; gap: 2px; padding: 4px; }
.prefs .theme-row { padding: 6px 6px 6px 6px; padding-inline-start: 10px; }
.lang-switch a { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; color: var(--faint); font-size: .75rem; font-weight: 700; transition: color .2s var(--ease), background-color .2s var(--ease); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.mobile-actions { display: flex; gap: 6px; }
.lang-btn { font-size: .8125rem; font-weight: 700; color: var(--text); }

/* الصفحة الإنجليزية: من اليسار لليمين */
:root[lang="en"] { --font: "Inter", "Changa", system-ui, sans-serif; }
[dir="ltr"] .bar { transform-origin: left center; }
[dir="ltr"] .playhead::before { right: auto; left: 0; }
[dir="ltr"] .proc-time.is-in .playhead { animation-name: playheadLtr; }
@keyframes playheadLtr { from { transform: translateX(0); } to { transform: translateX(calc(100% - 2px)); } }
[dir="ltr"] .reveal-line.is-shining > span { animation-name: glintLtr; background-position: 100% 0; }
@keyframes glintLtr { from { background-position: 100% 0; } to { background-position: 0 0; } }
[dir="ltr"] .site-footer { flex-direction: row-reverse; }

/* الأزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  font-weight: 600; font-size: .9375rem; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), opacity .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-light { background: var(--btn-light-bg); color: var(--btn-light-text); }
.btn-light:hover { opacity: .88; }
.btn-dark { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn-dark:hover { background: var(--card-hover); }
.btn-block { width: 100%; min-height: 46px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); }

/* المحتوى */
.main { padding: 12px; min-width: 0; }
.frame {
  min-height: calc(100vh - 24px); padding-block: clamp(10px, 1.4vw, 20px);
  background: var(--frame); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: clamp(10px, 1.4vw, 20px); }
.section { padding-top: clamp(64px, 8.5vw, 120px); }
section[id] { scroll-margin-top: 24px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.3; }
.section-head p { color: var(--muted); max-width: 40ch; margin-top: 4px; }
.head-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.head-link:hover { color: var(--text); }
.head-link svg { width: 14px; height: 14px; }

/* الواجهة */
.bento {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.bento > * { min-width: 0; }
.bento > .card { background: var(--card-2); }
.hero-intro {
  grid-column: span 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px;
  padding: clamp(24px, 3.2vw, 44px);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; padding-inline-end: 12px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .8125rem; color: var(--muted);
  transition: color .2s var(--ease);
}
.pill:hover { color: var(--text); }
.pill-new { padding: 1px 10px; border-radius: 999px; background: var(--yellow); color: #191919; font-weight: 600; }
.pill svg { width: 13px; height: 13px; }
.hero-intro h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.muted { color: var(--faint); }

/* حركة 1: العنوان ينكتب حرفاً حرفاً ثم تمر عليه لمعة خفيفة */
.reveal-line { --ink: var(--text); --glint: #FFF6B0; position: relative; display: inline-block; min-height: 1.25em; }
.reveal-line.muted { --ink: var(--faint); }
:root[data-theme="light"] .reveal-line { --glint: #B8A600; }
.typing-caret {
  display: inline-block; width: 3px; height: .85em; margin-inline-start: 4px; vertical-align: -.08em;
  border-radius: 2px; background: var(--yellow); animation: caretBlink .9s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.reveal-line.is-shining > span {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, var(--glint) 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 300% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: glint 1.8s ease-in-out forwards;
}
@keyframes glint { from { background-position: 0 0; } to { background-position: 100% 0; } }
.lead { color: var(--muted); max-width: 46ch; font-size: 1.0625rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-photo { position: relative; overflow: hidden; min-height: 360px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

.stat { display: grid; gap: 2px; padding: 14px 16px 16px; }
.stat-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .8125rem; margin-bottom: 14px; }
.stat-head svg { width: 16px; height: 16px; color: var(--faint); }
.stat-num { font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .875rem; }

.trusted { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 8px; background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.trusted-label { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.marquee { flex: 1; min-width: 0; overflow: hidden; direction: ltr; mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee ul { display: flex; }
.marquee li { padding-inline: 22px; color: var(--faint); font-weight: 700; font-size: 1.125rem; letter-spacing: .02em; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* الأعمال: بطاقات تتكدّس مع التمرير */
.stack-cards { display: grid; gap: 20px; }
.stack-card {
  position: sticky; top: 24px; display: flex; flex-direction: column; overflow: hidden;
  padding: 6px; background: var(--card); border-radius: var(--r-lg);
  transform-origin: 50% 0; will-change: transform;
}
.stack-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: #000; opacity: var(--dim, 0);
}
.stack-media { position: relative; height: clamp(240px, 34vw, 520px); overflow: hidden; border-radius: var(--r-md); background: var(--card-2); }
.stack-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.stack-card:hover .stack-media img { transform: scale(1.03); }
.stack-info { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 14px 12px 8px; }
.stack-title { font-weight: 600; font-size: 1.0625rem; display: flex; align-items: baseline; gap: 6px; }
.stack-title span { color: var(--faint); font-weight: 400; font-size: .9375rem; }
.stack-desc { color: var(--muted); font-size: .9375rem; }
/* حركة 3: ألوان الهوية تتفرد عند ظهور البطاقة */
.swatches { display: flex; align-items: center; margin-inline-start: auto; padding-bottom: 2px; }
.swatches i {
  width: 22px; height: 22px; border-radius: 50%; background: var(--c);
  border: 2px solid var(--card); margin-inline-start: -6px; box-shadow: 0 0 0 1px var(--line);
  transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), margin .5s var(--ease);
}
.swatches i:first-child { margin-inline-start: 0; }
.stack-card.is-seen .swatches i { transform: scale(1); }
.stack-card.is-seen .swatches i:nth-child(2) { transition-delay: .08s; }
.stack-card.is-seen .swatches i:nth-child(3) { transition-delay: .16s; }
.stack-card.is-seen .swatches i:nth-child(4) { transition-delay: .24s; }
.stack-card:hover .swatches i { margin-inline-start: 3px; }
.stack-card:hover .swatches i:first-child { margin-inline-start: 0; }

/* حركة 2: مؤشر "شاهد" فوق بطاقات المشاريع */
.view-cursor {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  display: grid; place-items: center; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  background: var(--yellow); color: #191919; font-weight: 700; font-size: .8125rem;
  transform: translate3d(var(--cx, -200px), var(--cy, -200px), 0) scale(0); opacity: 0;
  transition: opacity .25s var(--ease), scale .35s var(--ease);
  will-change: transform;
}
.view-cursor.is-on { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .stack-card { cursor: none; }
}

.stack-go { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: .875rem; transition: color .2s var(--ease); }
.stack-card:hover .stack-go { color: var(--text); }
.stack-go svg { width: 14px; height: 14px; }

.chip {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted); font-size: .75rem; font-weight: 500;
}
.chip-top { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(20, 20, 20, .72); color: #EDEDED; border-color: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.chip-new { background: var(--yellow); color: #191919; border-color: transparent; font-weight: 600; }
.stack-media .chip-new { position: absolute; top: 12px; inset-inline-end: 12px; }

/* الخدمات */
.services-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.service { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 0; background: var(--card-2); }
.svc-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px;
  border-radius: var(--r-sm); background: var(--card); border: 1px solid rgba(245, 229, 91, .18);
  color: var(--yellow); box-shadow: 0 0 0 0 rgba(245, 229, 91, 0);
  animation: iconGlow 3.6s ease-in-out infinite;
}
:root[data-theme="light"] .svc-icon { background: #191919; }
.svc-icon svg { width: 19px; height: 19px; animation: iconFloat 3.6s ease-in-out infinite; }
.service:nth-child(2) .svc-icon, .service:nth-child(2) .svc-icon svg { animation-delay: -.9s; }
.service:nth-child(3) .svc-icon, .service:nth-child(3) .svc-icon svg { animation-delay: -1.8s; }
.service:nth-child(4) .svc-icon, .service:nth-child(4) .svc-icon svg { animation-delay: -2.7s; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-2.5px) rotate(-6deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(1.5px) rotate(5deg); }
}
@keyframes iconGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 229, 91, 0); border-color: rgba(245, 229, 91, .18); }
  50% { box-shadow: 0 0 18px 0 rgba(245, 229, 91, .16); border-color: rgba(245, 229, 91, .4); }
}
.service h3 { font-size: 1.25rem; font-weight: 600; }
.service p { color: var(--muted); font-size: .9375rem; max-width: 44ch; }
.svc-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: auto -20px 0; margin-top: 18px; padding: 14px 20px; border-top: 1px solid var(--line);
  font-weight: 600; font-size: .9375rem;
}
.svc-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-weight: 500; font-size: .8125rem; }
.svc-foot a:hover { color: var(--text); }
.svc-foot svg { width: 13px; height: 13px; }

/* آراء العملاء */
.rating { display: flex; align-items: center; gap: 12px; }
.avatars { display: flex; }
.avatars span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  margin-inline-start: -10px; border: 2px solid var(--frame); background: var(--card-2);
  color: var(--muted); font-size: .8125rem; font-weight: 600;
}
.avatars span:first-child { margin-inline-start: 0; }
.rating-score { font-weight: 600; line-height: 1.3; }
.star { color: var(--yellow); margin-inline-end: 4px; }
.rating-note { color: var(--faint); font-size: .8125rem; line-height: 1.3; }

.reviews-marquee {
  overflow: hidden; direction: ltr; padding-block: 2px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.reviews-track { display: flex; gap: 8px; width: max-content; animation: reviewsScroll 60s linear infinite; }
.reviews-marquee:hover .reviews-track, .reviews-marquee:focus-within .reviews-track { animation-play-state: paused; }
@keyframes reviewsScroll { from { transform: translateX(-50%); } to { transform: translateX(-4px); } }
.review {
  direction: rtl; display: flex; flex-direction: column; gap: 14px;
  width: 340px; min-height: 280px; padding: 22px; background: var(--card-2);
}
.quote { font-size: 2.5rem; line-height: .6; height: 18px; color: var(--faint); font-weight: 700; }
.review-text { font-size: 1.125rem; font-weight: 500; line-height: 1.6; }
.review-by { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.review-avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .8125rem; font-weight: 600;
}
.review-name { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.review-role { color: var(--faint); font-size: .8125rem; line-height: 1.3; }

/* الأسئلة الشائعة */
.faq-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.faq-grid .card { background: var(--card-2); }
.faq-side { display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.faq-contact { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 16px 18px; }
.faq-person { display: flex; align-items: center; gap: 12px; padding-inline-end: 20px; border-inline-end: 1px solid var(--line); }
.faq-person img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; object-position: 50% 20%; background: #000; }
.faq-person span { display: grid; line-height: 1.35; }
.faq-person b { font-weight: 600; font-size: .9375rem; }
.faq-person small { color: var(--muted); font-size: .8125rem; }
.faq-links { display: flex; gap: 24px; flex-wrap: wrap; margin: 0; }
.faq-links div { display: grid; gap: 2px; }
.faq-links dt { color: var(--faint); font-size: .75rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.faq-links dd { margin: 0; font-weight: 500; font-size: .9375rem; text-align: start; }
.faq-links a:hover { color: var(--yellow); }
.faq-image { position: relative; overflow: hidden; min-height: 240px; }
.faq-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.faq-image:hover img { transform: scale(1.04); }

.faq-list { display: grid; gap: 6px; align-content: start; }
.faq-item { overflow: hidden; transition: border-color .3s var(--ease); }
.faq-item.is-open { border-color: rgba(245, 229, 91, .3); }
.faq-item h3 { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-q { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 16px 20px; text-align: start; }
.faq-num {
  display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--btn-light-bg); color: var(--btn-light-text); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.faq-item.is-open .faq-num { background: var(--yellow); color: #191919; }
.faq-text { flex: 1; font-size: 1.0625rem; font-weight: 600; }
.faq-plus { position: relative; flex: none; width: 16px; height: 16px; transition: transform .4s var(--ease); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1.5px; margin-top: -.75px; background: currentColor; border-radius: 2px; }
.faq-plus::after { transform: rotate(90deg); transition: transform .4s var(--ease); }
.faq-item.is-open .faq-plus { transform: rotate(180deg); }
.faq-item.is-open .faq-plus::after { transform: rotate(0deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 56px 20px 20px; padding-inline: 56px 20px; color: var(--muted); opacity: 0; transform: translateY(-4px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a p { opacity: 1; transform: none; transition-delay: .1s; }

/* الباقات */
.pricing {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 6px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.pricing > .card { background: var(--card-2); }

/* البطاقة الجانبية */
.price-side { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 28px; padding: 40px 24px 24px; text-align: center; }
.pen-stage {
  width: min(100%, 220px); aspect-ratio: 1; border-radius: var(--r-md); border: 1px solid var(--line);
  background-color: var(--card);
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.2px);
  background-size: 14px 14px; background-position: center;
}
.pen-svg { width: 100%; height: 100%; overflow: visible; }
.pen-svg * { vector-effect: non-scaling-stroke; }
.pen-path { fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; }
.pen-fill { fill: var(--text); stroke: none; opacity: 0; }
.pen-handle { opacity: 0; transition: opacity .3s var(--ease); }
.pen-handle line { stroke: var(--muted); stroke-width: 1; }
.pen-handle circle { fill: var(--card); stroke: var(--muted); stroke-width: 1; }
.pen-handle.is-on { opacity: 1; }
.pen-anchor { fill: var(--card); stroke: var(--text); stroke-width: 1.2; opacity: 0; transition: opacity .2s var(--ease), fill .3s var(--ease); }
.pen-anchor.is-on { opacity: 1; }
.pen-anchor.is-active { fill: var(--yellow); stroke: var(--yellow); }
.pen-cursor path { fill: var(--card-2); stroke: var(--text); stroke-width: 1.3; stroke-linejoin: round; }
.pen-cursor line { stroke: var(--text); stroke-width: 1.2; }
.pen-cursor circle { fill: var(--text); }
.pen-cursor .pen-cursor-base { fill: var(--text); stroke: none; }
.price-tagline p { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.price-tagline svg { width: 15px; height: 15px; color: var(--yellow); }
.price-tagline span { display: block; color: var(--muted); font-size: .9375rem; }
.price-trust { width: 100%; padding-top: 20px; border-top: 1px dashed var(--line); text-align: start; }
.trust-faces { display: flex; margin-bottom: 14px; }
.trust-faces img, .trust-faces span {
  width: 38px; height: 38px; border-radius: 10px; object-fit: cover; border: 2px solid var(--card-2); margin-inline-start: -8px;
}
.trust-faces img:first-child { margin-inline-start: 0; }
.trust-faces span { display: grid; place-items: center; background: var(--card); color: var(--text); font-size: .75rem; font-weight: 700; }
.price-trust p { font-weight: 600; font-size: .9375rem; }
.price-trust > span { color: var(--muted); font-size: .875rem; }

/* الباقتان */
.price-plans { display: grid; grid-template-columns: 1fr 1fr; }
.price-plan { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 40px); }
.price-plan + .price-plan { border-inline-start: 1px solid var(--line); }
.plan-head { display: flex; align-items: center; gap: 14px; }
.plan-head h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; white-space: nowrap; }
.plan-rule { flex: 1; height: 1px; background: var(--line); }
.plan-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.plan-tag::before { content: ""; width: 5px; height: 5px; background: currentColor; }
.plan-tag-hot { color: var(--yellow); }
.plan-desc { color: var(--muted); max-width: 44ch; }
.plan-price { display: flex; align-items: flex-end; gap: 6px; line-height: 1; }
.plan-price .cur { align-self: flex-start; font-size: 1.25rem; font-weight: 600; margin-top: 4px; }
.plan-price { flex-wrap: wrap; }
.plan-price b { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.plan-price .per { color: var(--muted); font-size: .9375rem; padding-bottom: 6px; white-space: nowrap; }
.plan-list { display: grid; gap: 12px; }
.plan-list li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.plan-list li::before {
  content: "+"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card-hover); border: 1px solid var(--line); color: var(--text); font-size: .875rem; font-weight: 600; line-height: 1;
}
.plan-divider { display: flex; align-items: center; gap: 14px; margin-top: auto; color: var(--muted); font-size: .875rem; }
.plan-divider::before, .plan-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.plan-btn { min-height: 64px; border-radius: var(--r-md); font-size: 1rem; }
.plan-btn-dark { background: var(--card-hover); color: var(--text); border: 1px solid var(--line); }
.plan-btn-dark:hover { background: #2A2A2A; }
:root[data-theme="light"] .plan-btn-dark:hover { background: #E2E2E1; }
.plan-btn-light { background: var(--btn-light-bg); color: var(--btn-light-text); }
.plan-btn-light:hover { opacity: .9; }
.btn-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.plan-btn:hover .btn-dot { animation: dotPulse .8s var(--ease) infinite alternate; }
@keyframes dotPulse { to { transform: scale(1.8); } }
.plan-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: -8px; color: var(--muted); font-size: .8125rem; }
.plan-note svg { width: 14px; height: 14px; color: var(--yellow); }

/* مراحل العمل */
.process-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); grid-template-rows: auto auto; gap: 6px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.process-grid > .card { background: var(--card-2); overflow: hidden; }

/* التقويم */
.proc-cal {
  grid-row: span 2; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 2.4vw, 32px);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(245, 229, 91, .10), transparent 60%),
    linear-gradient(180deg, #232320, #151515 70%) !important;
}
:root[data-theme="light"] .proc-cal { background: radial-gradient(120% 70% at 50% 0%, rgba(245, 229, 91, .35), transparent 60%), linear-gradient(180deg, #F4F3EE, #FFFFFF 70%) !important; }
.cal { border-radius: var(--r-md); background: rgba(20, 20, 20, .55); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
:root[data-theme="light"] .cal { background: rgba(255, 255, 255, .7); }
.cal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.cal-arrows svg { width: 14px; height: 14px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 2px; padding: 14px 12px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-days span { display: grid; place-items: center; height: 32px; color: var(--faint); font-size: .875rem; }
.cal-days .dow { height: 24px; color: var(--text); font-size: .75rem; font-weight: 600; }
.cal-days .meet { position: relative; justify-self: center; width: 32px; border-radius: 9px; color: var(--text); font-weight: 600; transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease); }
.cal-days .meet img, .cal-days .meet b { width: 28px; height: 28px; border-radius: 50%; }
.cal-days .meet img { object-fit: cover; object-position: 50% 18%; background: #000; }
.cal-days .meet b { display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: .75rem; }
.cal-days .meet.is-selected { background: var(--btn-light-bg); color: var(--btn-light-text); box-shadow: 0 0 0 3px rgba(245, 229, 91, .35); }
.cal-days .meet.is-selected b { background: transparent; border-color: transparent; color: var(--btn-light-text); }
.cal-days .meet.is-selected img { width: 26px; height: 26px; }
.cal-events { display: grid; gap: 2px; padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.ev-time { color: var(--faint); font-size: .75rem; font-weight: 600; }
.ev-title { font-weight: 600; margin-bottom: 8px; }
.ev-title:last-child { margin-bottom: 0; }
.ev-with { color: var(--muted); font-weight: 400; }
.cal-events.is-changing > * { animation: evIn .5s var(--ease) both; }
.cal-events.is-changing > *:nth-child(n+3) { animation-delay: .08s; }
@keyframes evIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.proc-caption h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.proc-caption p { color: var(--muted); max-width: 40ch; }

/* الجدول الزمني */
.proc-time { display: flex; flex-direction: column; }
.time-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; padding-inline-start: 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.time-label { font-weight: 600; font-size: .9375rem; }
.time-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.time-badge svg { width: 16px; height: 16px; color: var(--yellow); }
.time-body { overflow-x: auto; padding: 18px; }
.time-grid {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 38px; row-gap: 8px; min-width: 520px;
  background-image: repeating-linear-gradient(to left, transparent 0, transparent calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px), var(--line) calc(100% / 12));
}
.bar {
  grid-column: var(--s) / var(--e); grid-row: var(--r);
  position: relative; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line); font-size: .875rem;
  transform-origin: right center; transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.bar b { font-weight: 500; }
.bar i { position: absolute; top: 4px; inset-inline-end: 8px; font-style: normal; font-size: .625rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar-sub { border-style: dashed; }
.bar.is-on { border-color: rgba(245, 229, 91, .55); background: rgba(245, 229, 91, .08); }
.bar.is-on i { color: var(--yellow); }
:root[data-theme="light"] .bar.is-on { background: rgba(245, 229, 91, .35); border-color: #191919; }
.js .proc-time:not(.is-in) .bar { transform: scaleX(0); opacity: 0; }
.js .proc-time.is-in .bar { animation: barIn .8s var(--ease) both; animation-delay: calc(var(--r) * .12s); }
@keyframes barIn { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.playhead { position: absolute; top: -10px; bottom: -10px; left: 0; right: 0; pointer-events: none; opacity: 0; will-change: transform; }
.playhead::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; border-radius: 2px; background: var(--yellow); box-shadow: 0 0 12px rgba(245, 229, 91, .6); }
.proc-time.is-in .playhead { opacity: 1; animation: playhead 9s linear 1s infinite; }
@keyframes playhead { from { transform: translateX(0); } to { transform: translateX(calc(-100% + 2px)); } }

/* ما تستلمه */
.proc-deliver {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 22px; min-height: 300px; padding: 28px 20px 40px;
  background:
    radial-gradient(70% 90% at 50% 120%, rgba(245, 229, 91, .14), transparent 70%),
    var(--card-2) !important;
}
.deliver-head { text-align: center; }
.deliver-head h3 { font-size: 1.125rem; font-weight: 600; }
.deliver-head p { color: var(--muted); font-size: .9375rem; }
.deliver-stack { position: relative; width: min(100%, 380px); height: 88px; }
.deliver-item {
  position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 12px; height: 76px; padding: 6px; padding-inline-end: 16px;
  border-radius: var(--r-md); background: rgba(38, 38, 38, .82); border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #FAFAFA;
  transition: transform .6s var(--ease), opacity .6s var(--ease);
  transform: translateY(var(--y, 0)) scale(var(--sc, 1)); opacity: var(--op, 1); z-index: var(--z, 1);
}
.deliver-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.deliver-item div { display: grid; flex: 1; min-width: 0; }
.deliver-item span { color: #A3A3A3; font-size: .75rem; }
.deliver-item b { font-weight: 600; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deliver-item .tick { width: 18px; height: 18px; color: var(--yellow); stroke-width: 2.2; }

/* التواصل والفوتر */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.contact-main, .contact-side { display: flex; flex-direction: column; background: var(--card-2); overflow: hidden; }
.contact-body { flex: 1; display: grid; align-content: start; gap: 12px; padding: clamp(20px, 3vw, 32px); }
.contact-main h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.3; }
.contact-side h3 { font-size: 1.25rem; font-weight: 600; }
.contact-body p { color: var(--muted); max-width: 42ch; }
.contact-main .actions { margin-top: 24px; }
.social-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8125rem; }
.card-foot .status { color: var(--muted); }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 6px; padding: 12px 16px; color: var(--faint); font-size: .8125rem;
}
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-logo { width: 132px; height: auto; fill: var(--text); stroke: none; }
.footer-sep { width: 1px; height: 32px; background: var(--line); }
.footer-meta { display: grid; gap: 2px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .8125rem; line-height: 1.4; color: var(--faint); text-align: left; }
.footer-meta b { color: var(--muted); font-weight: 600; }
.footer-icons { display: flex; gap: 6px; }
.footer-icons a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--muted); border: 1px solid var(--line); background: var(--card-2); transition: color .2s var(--ease), background-color .2s var(--ease); }
.footer-icons a:hover { background: var(--card-hover); color: var(--text); }
.footer-icons svg { width: 20px; height: 20px; }

/* شريط الموبايل */
.mobile-bar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); }
.scrim[hidden] { display: none; }

/* ظهور الواجهة عند التحميل */
.js .hero .bento > * { animation: rise .7s var(--ease) both; }
.js .hero .bento > *:nth-child(2) { animation-delay: .08s; }
.js .hero .bento > *:nth-child(3) { animation-delay: .16s; }
.js .hero .bento > *:nth-child(4) { animation-delay: .22s; }
.js .hero .bento > *:nth-child(5) { animation-delay: .28s; }
.js .hero .bento > *:nth-child(6) { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* التابلت */
@media (max-width: 1100px) {
  .hero-intro { grid-column: 1 / -1; }
  .hero-photo { grid-column: 1 / -1; min-height: 0; aspect-ratio: 16 / 10; }
  .hero-photo img { object-position: 50% 30%; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-image { min-height: 200px; }
  .pricing { grid-template-columns: minmax(0, 1fr); }
  .price-side { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 24px; }
  .price-trust { flex-basis: 100%; }
}

/* الموبايل: القائمة الجانبية تصير درج */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .mobile-bar {
    position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center;
    margin: 10px 10px 0; padding: 8px; padding-inline-start: 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  }
  .mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
  .mobile-brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; object-position: 50% 18%; background: #000; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70; width: min(300px, 86vw);
    padding: 10px; background: var(--bg); transform: translateX(105%); transition: transform .35s var(--ease);
  }
  [dir="ltr"] .sidebar { transform: translateX(-105%); }
  [dir="ltr"] .sidebar.is-open { transform: none; }
  .sidebar.is-open { transform: none; }
  .profile .menu-close { display: grid; }
  .main { padding: 10px; }
  .frame { padding-block: 10px 10px; border-radius: var(--r-md); }
  .container { padding-inline: 10px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { aspect-ratio: 4 / 5; }
  .hero-photo img { object-position: 50% 20%; }
  .trusted { flex-direction: column; align-items: stretch; gap: 10px; }
  .trusted-label { align-self: flex-start; }
  .review { width: 280px; min-height: 250px; padding: 18px; }
  .review-text { font-size: 1rem; }
  .stack-cards { gap: 12px; }
  .stack-card { top: 84px; }
  .stack-media { height: 56vw; }
  .stack-info { padding: 12px 8px 6px; }
  .stack-go { display: none; }
  .services-grid, .contact-grid { grid-template-columns: 1fr; }
  .price-plans { grid-template-columns: 1fr; }
  .price-plan + .price-plan { border-inline-start: 0; border-top: 1px solid var(--line); }
  .pen-stage { width: 170px; }
  .faq-person { border-inline-end: 0; padding-inline-end: 0; }
  .faq-q { min-height: 64px; padding: 14px 16px; }
  .faq-a p { padding-inline: 52px 16px; }
  .process-grid { grid-template-columns: minmax(0, 1fr); }
  .proc-cal { grid-row: auto; padding: 14px; }
  .cal-days span { height: 30px; font-size: .8125rem; }
  .cal-days .dow { font-size: .625rem; }
  .time-head { flex-direction: column; align-items: flex-start; }
  .time-body { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* إيقاع موحّد للمسافات وارتفاع الأسطر */
body { line-height: 1.8; }
h1, h2, h3,
.stack-title, .faq-text, .profile-name, .rating-score { line-height: 1.4; }
.hero-intro h1 { line-height: 1.35; }
.section-head { margin-bottom: 32px; }
.section-head h2, .contact-main h2 { line-height: 1.4; }
.section-head p { margin-top: 8px; line-height: 1.75; }
.service h3, .plan h3, .plan-head h3, .proc-caption h3, .contact-side h3, .deliver-head h3 { line-height: 1.4; }
.service h3 { margin-bottom: 2px; }
.lead, .service p, .plan-desc, .faq-a p, .contact-body p, .proc-caption p, .stack-desc { line-height: 1.8; }
.review-text { line-height: 1.75; }
.plan-price b { line-height: 1.3; }
.plan-list li, .about-points li { line-height: 1.6; }
.stat-label, .card-foot, .plan-note, .price-trust > span, .deliver-head p, .rating-note, .review-role, .ev-time { line-height: 1.5; }
.ev-title { line-height: 1.5; margin-bottom: 10px; }
.hero-intro { gap: 22px; }
.contact-body { gap: 14px; }
.proc-caption h3 { margin-bottom: 6px; }

/* الإنجليزي يحتاج أسطراً أقرب من العربي */
:root[lang="en"] body { line-height: 1.6; }
:root[lang="en"] h1, :root[lang="en"] h2, :root[lang="en"] h3,
:root[lang="en"] .stack-title, :root[lang="en"] .faq-text, :root[lang="en"] .profile-name { line-height: 1.25; }
:root[lang="en"] .hero-intro h1 { line-height: 1.12; letter-spacing: -.02em; }
:root[lang="en"] .section-head h2, :root[lang="en"] .contact-main h2 { line-height: 1.2; letter-spacing: -.01em; }
:root[lang="en"] .lead, :root[lang="en"] .service p, :root[lang="en"] .plan-desc, :root[lang="en"] .faq-a p,
:root[lang="en"] .contact-body p, :root[lang="en"] .proc-caption p, :root[lang="en"] .stack-desc, :root[lang="en"] .section-head p { line-height: 1.6; }
:root[lang="en"] .review-text { line-height: 1.55; }
:root[lang="en"] .plan-price b { line-height: 1.1; }

@media (max-width: 860px) {
  .section-head { margin-bottom: 24px; }
}
/* تباعد مطابق لـ Sidefolio: المحتوى يعبّي الإطار بهامش ثابت */
.main { padding: 10px; padding-inline-start: 16px; }
.frame { padding: 34px 0 24px; border-radius: 22px; }
.container { max-width: none; padding-inline: clamp(14px, 2vw, 34px); }
.section { padding-top: clamp(64px, 6.4vw, 104px); }
.section-head { margin-bottom: 36px; }
.section-head p { margin-top: 10px; }
.bento { gap: 6px; padding: 4px; border-radius: 20px; }
.hero-intro { padding: clamp(28px, 3.4vw, 48px); padding-top: clamp(40px, 4.6vw, 80px); padding-bottom: clamp(32px, 2.6vw, 48px); }
.stat { padding: 16px; }
.stat-head { margin-bottom: 22px; }
@media (max-width: 860px) {
  .main { padding: 10px; }
  .frame { padding: 12px 0; }
  .container { padding-inline: 10px; }
  .hero-intro { padding: 24px; }
}
/* القائمة الجانبية بأسلوب Sidefolio: صندوق خارجي وبطاقة داخلية */
:root { --side-w: 272px; }
.sidebar { padding: 10px; padding-inline-end: 0; gap: 10px; }
.side-top { display: grid; gap: 10px; }
.side-group {
  display: grid; gap: 0; padding: 4px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.side-inner { padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.side-group .group-title { padding: 10px 12px 9px; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.side-group .nav-item { min-height: 40px; padding: 0 12px; gap: 12px; border-radius: 10px; font-size: 1rem; font-weight: 500; color: var(--muted); }
.side-group .nav-item svg { width: 18px; height: 18px; }
.side-group .nav-item .ext { width: 14px; height: 14px; }
.side-group .nav-item:hover { background: var(--card-hover); color: var(--text); }
.side-group .nav-item.is-active { background: var(--card-hover); color: var(--text); font-weight: 600; }
.side-profile .profile { padding: 10px; gap: 0 12px; }
.side-profile .profile img { width: 44px; height: 44px; border-radius: 50%; }
.side-profile .status { padding: 11px 12px 9px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.side-profile .dot { width: 8px; height: 8px; }
.side-bottom { gap: 4px; }
.side-bottom .theme-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 4px; padding-inline-start: 12px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.lang-field { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px; padding-inline-start: 12px; color: var(--muted); font-size: .9375rem; }
.lang-field > svg { width: 17px; height: 17px; }
.lang-field > span { flex: 1; }
.lang-field .lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); }
.lang-field .lang-switch a { width: 28px; height: 24px; border-radius: 6px; }
.side-bottom .btn-block { min-height: 42px; border-radius: 12px; font-size: .9375rem; }
@media (max-width: 860px) {
  .sidebar { padding: 10px; }
  .side-profile .profile .menu-close { display: grid; }
}
/* حركة الأزرار: النص يتدحرج والأيقونة تطير وترجع */
.btn { transition: background-color .3s var(--ease), box-shadow .3s var(--ease), transform .2s var(--ease); }
.btn-roll { position: relative; display: inline-block; overflow: hidden; height: 1.5em; line-height: 1.5em; vertical-align: middle; }
.btn-txt { display: block; transition: transform .5s cubic-bezier(.65, 0, .35, 1); }
.btn-txt::after { content: attr(data-text); position: absolute; inset-inline: 0; top: 100%; }
.btn:hover .btn-txt, .btn:focus-visible .btn-txt { transform: translateY(-100%); }
.btn:hover > svg:first-child { animation: iconFly .55s cubic-bezier(.65, 0, .35, 1); }
@keyframes iconFly {
  0% { transform: none; opacity: 1; }
  45% { transform: translate(9px, -9px); opacity: 0; }
  46% { transform: translate(-9px, 9px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.btn-light:hover { opacity: 1; background: var(--btn-light-bg); box-shadow: 0 8px 24px rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .4); }
:root[data-theme="light"] .btn-light:hover { box-shadow: 0 8px 24px rgba(25, 25, 25, .18); }
.plan-btn-light:hover { opacity: 1; }
.btn:active { transform: scale(.97); }
/* السعر: الرقم وعلامة الدولار دائماً من اليسار لليمين */
.plan-price .amount { display: inline-flex; align-items: flex-start; gap: 3px; }
.plan-price .amount .cur { margin-top: 6px; }

/* شعارات العملاء في شريط عملت مع */
.marquee .client-logos li { padding-inline: 14px; }
.client-logos img { display: block; height: 52px; width: auto; transition: opacity .3s var(--ease); }
.marquee:hover .client-logos img { opacity: .55; }
.marquee .client-logos li:hover img { opacity: 1; }
:root[data-theme="light"] .client-logos img { filter: brightness(.85); }
@media (max-width: 860px) { .client-logos img { height: 44px; } .marquee .client-logos li { padding-inline: 8px; } }

.faq-image img { object-position: 47% 50%; }

/* أيقونات ما تستلمه بالأصفر */
.deliver-icon { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 12px; background: #1B1B1B; border: 1px solid rgba(245, 229, 91, .28); color: var(--yellow); box-shadow: inset 0 0 18px rgba(245, 229, 91, .06); }
.deliver-icon svg { width: 26px; height: 26px; stroke-width: 1.5; }

.deliver-item .deliver-icon { color: var(--yellow); }

/* بطاقات المشاريع: الصندوق يأخذ نسبة الصورة لتظهر كاملة، دون أن يتجاوز الشاشة */
.stack-media { height: auto; aspect-ratio: var(--ar, 1.75); max-height: calc(100vh - 150px); }
@media (max-width: 860px) { .stack-media { height: auto; aspect-ratio: var(--ar, 1.75); max-height: none; } }
/* كل بطاقات المشاريع بنفس القياس */
.stack-media { aspect-ratio: 16 / 10; }
.stack-media img { object-position: center; }
@media (max-width: 860px) { .stack-media { aspect-ratio: 16 / 10; } }

/* ===== الصفحات الداخلية ===== */
.section-tight { padding-top: 40px; }
.page-hero {
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px;
  padding: clamp(28px, 3.4vw, 48px); padding-top: clamp(40px, 4.6vw, 72px);
  background: var(--card-2); border-radius: var(--r-lg);
}
.page-hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); font-weight: 600; line-height: 1.35; }
:root[lang="en"] .page-hero h1 { line-height: 1.12; letter-spacing: -.02em; }
.container > .page-hero { box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); margin: 5px; }

/* الأعمال: الفلاتر والشبكة */
.work-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.seg button { min-height: 34px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-size: .875rem; font-weight: 500; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--card-hover); color: var(--text); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.work-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 6px; background: var(--card-2); border-radius: var(--r-md); }
.work-card[hidden] { display: none; }
.work-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: var(--card); }
.work-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-card:hover .work-card-media img { transform: scale(1.04); }
.work-card-media .chip-new { position: absolute; top: 12px; inset-inline-end: 12px; }
.work-card .stack-info { padding: 12px 8px 6px; }
.work-card .stack-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-grid[data-view="list"] { grid-template-columns: minmax(0, 1fr); }
.work-grid[data-view="list"] .work-card { flex-direction: row; align-items: center; gap: 16px; }
.work-grid[data-view="list"] .work-card-media { width: 200px; flex: none; }
.work-grid[data-view="list"] .work-card .chip { display: none; }
.work-grid[data-view="list"] .stack-info { flex: 1; padding: 0 8px; }
.work-grid.is-switching .work-card { animation: rise .45s var(--ease) both; }
.work-more { display: flex; justify-content: center; margin-top: 24px; }

/* من أنا */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 6px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.about-hero .page-hero { border-radius: var(--r-md); justify-content: center; }
.about-photo { position: relative; overflow: hidden; min-height: 420px; border-radius: var(--r-md); background: #000; }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.client-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.client-tile { display: grid; place-items: center; min-height: 112px; background: var(--card-2); transition: background-color .3s var(--ease); }
.client-tile img { height: 64px; width: auto; transition: transform .4s var(--ease), filter .3s var(--ease); }
.client-tile:hover { background: var(--card-hover); }
.client-tile:hover img { transform: scale(1.06); filter: brightness(1.5); }
.xp-list { display: grid; gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.xp-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 18px; background: var(--card-2); }
.xp-years { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.xp-role { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.xp-org, .xp-place { color: var(--muted); font-size: .875rem; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tool { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--card-2); }
.tool-badge { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; background: #1B1B1B; border: 1px solid rgba(245, 229, 91, .28); color: var(--yellow); font-weight: 700; font-size: .875rem; font-family: "Inter", system-ui, sans-serif; }
.tool-name { font-weight: 600; line-height: 1.35; }
.tool-use { color: var(--muted); font-size: .875rem; line-height: 1.4; }

@media (max-width: 1100px) {
  .about-hero { grid-template-columns: minmax(0, 1fr); }
  .about-photo { min-height: 0; aspect-ratio: 4 / 5; max-height: 560px; }
  .client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-grid[data-view="list"] .work-card-media { width: 110px; }
  .work-grid[data-view="list"] .stack-desc { display: none; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-tile { min-height: 88px; }
  .client-tile img { height: 48px; }
  .xp-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .section-tight { padding-top: 28px; }
}
/* آراء العملاء: النجوم */
.review-top { display: flex; justify-content: space-between; align-items: center; }
.review-stars { color: var(--yellow); font-size: .875rem; letter-spacing: 2px; }
.review { width: 360px; }

/* الإنجليزي بخط Montserrat في كل الصفحات، والعربي يبقى بـ Changa */
:root, :root[lang="en"] { --font: "Montserrat", "Changa", system-ui, sans-serif; }
.footer-meta, .tool-badge { font-family: var(--font); }

/* بطاقة "والمزيد" تحت شعارات العملاء */
.client-more { grid-column: 1 / -1; background: transparent; border: 1px dashed rgba(255, 255, 255, .14); box-shadow: none; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
:root[data-theme="light"] .client-more { border-color: rgba(25, 25, 25, .2); }
.client-more a { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; min-height: 84px; padding: 14px 20px; }
.more-count { color: var(--yellow); font-size: 1.75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .more-count { color: var(--text); }
.more-text { color: var(--muted); font-weight: 500; }
.more-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-size: .875rem; font-weight: 500; transition: background-color .25s var(--ease); }
.more-link svg { width: 13px; height: 13px; transition: transform .3s var(--ease); }
.client-more:hover { border-color: rgba(245, 229, 91, .45); background: rgba(245, 229, 91, .03); }
.client-more:hover .more-link { background: var(--card-hover); }
.client-more:hover .more-link svg { transform: translate(-2px, -2px); }
[dir="ltr"] .client-more:hover .more-link svg { transform: translate(2px, -2px); }
/* أدوات العمل: أربع بطاقات وحركة ناعمة للأيقونات */
.tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-badge { animation: toolFloat 4s ease-in-out infinite, iconGlow 4s ease-in-out infinite; }
.tool:nth-child(2) .tool-badge { animation-delay: -1s; }
.tool:nth-child(3) .tool-badge { animation-delay: -2s; }
.tool:nth-child(4) .tool-badge { animation-delay: -3s; }
.tool:hover .tool-badge { animation-play-state: paused; background: var(--yellow); color: #191919; transform: rotate(-8deg) scale(1.06); transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
@keyframes toolFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-4px) rotate(-4deg); }
  60% { transform: translateY(1px) rotate(3deg); }
}
@media (max-width: 1100px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }
/* ===== صفحة المشروع ===== */
.proj-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 6px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.proj-intro { border-radius: var(--r-md); justify-content: center; }
.proj-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; font-weight: 500; transition: color .2s var(--ease); }
.proj-back:hover { color: var(--text); }
.proj-back svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .3s var(--ease); }
[dir="ltr"] .proj-back svg { transform: rotate(-90deg); }
.proj-back:hover svg { transform: rotate(90deg) translateY(-3px); }
[dir="ltr"] .proj-back:hover svg { transform: rotate(-90deg) translateY(-3px); }
.proj-meta { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.proj-meta > div { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 20px; background: var(--card-2); }
.proj-meta dt { color: var(--faint); font-size: .8125rem; }
.proj-meta dd { margin: 0; font-weight: 600; font-size: 1.0625rem; }
.proj-hero, .proj-row img { margin: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.proj-hero img { display: block; width: 100%; height: auto; }
.proj-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.proj-point { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--card-2); }
.proj-num { color: var(--yellow); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.proj-point h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.proj-point p { color: var(--muted); line-height: 1.8; }
.proj-gallery { display: grid; gap: 12px; }
.proj-row { display: grid; gap: 12px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); align-items: start; }
.proj-row.cols-2 { --n: 2; }
.proj-row.cols-3 { --n: 3; }
.proj-row img { display: block; width: 100%; height: auto; }
.proj-gallery:not(.is-web) .proj-row:not(.cols-1) img { aspect-ratio: 4 / 3; object-fit: cover; height: 100%; }
.proj-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(24px, 3vw, 40px); background: var(--card-2); }
.proj-cta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.4; }
.proj-cta p { color: var(--muted); margin-top: 6px; line-height: 1.8; }
@media (max-width: 1100px) {
  .proj-top { grid-template-columns: minmax(0, 1fr); }
  .proj-meta { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .proj-gallery, .proj-row { gap: 8px; }
  .proj-row.cols-3 { --n: 1; }
  .proj-gallery.is-web .proj-row.cols-2 { --n: 1; }
}
/* ===== صفحة الخدمة ===== */
a.service { transition: background-color .3s var(--ease); }
a.service:hover { background: var(--card-hover); }
.svc-go { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-weight: 500; font-size: .8125rem; transition: color .2s var(--ease); }
a.service:hover .svc-go { color: var(--text); }
.svc-top { display: grid; gap: 6px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.svc-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 6px; }
.svc-intro { border-radius: var(--r-md); justify-content: center; }
.svc-media { position: relative; margin: 0; min-height: 380px; overflow: hidden; border-radius: var(--r-md); background: var(--card-2); }
.svc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.svc-media:hover img { transform: scale(1.04); }
.svc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.svc-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card-2); border-radius: var(--r-md); }
.svc-stats dt { display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: .8125rem; }
.svc-stats dt svg { width: 15px; height: 15px; color: var(--yellow); }
.svc-stats dd { margin: 6px 0 0; font-weight: 600; font-size: 1.25rem; line-height: 1.4; }
.svc-stats span { color: var(--muted); font-size: .8125rem; }
.svc-inc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.svc-inc-item { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--card-2); }
.svc-inc-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 10px; background: var(--card); border: 1px solid rgba(245, 229, 91, .28); color: var(--yellow); }
:root[data-theme="light"] .svc-inc-icon { background: #191919; }
.svc-inc-icon svg { width: 16px; height: 16px; }
.svc-inc-item h3, .svc-step h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.svc-inc-item p, .svc-step p { color: var(--muted); font-size: .9375rem; line-height: 1.8; }
.svc-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); counter-reset: none; }
.svc-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; background: var(--card-2); overflow: hidden; }
.svc-step::after { content: ""; position: absolute; inset-inline-start: 20px; top: 0; width: 28px; height: 2px; background: var(--yellow); transform-origin: right; transition: width .5s var(--ease); }
.svc-step:hover::after { width: 60px; }
.svc-step .proj-num { margin-bottom: 18px; }
.svc-others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
@media (max-width: 1100px) {
  .svc-head { grid-template-columns: minmax(0, 1fr); }
  .svc-media { min-height: 0; aspect-ratio: 16 / 10; }
  .svc-stats, .svc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-others { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .svc-inc { grid-template-columns: minmax(0, 1fr); }
  .svc-steps { grid-template-columns: minmax(0, 1fr); }
  .svc-stats dd { font-size: 1.0625rem; }
}
/* المظهر الفاتح: الأصفر كنص أو أيقونة على خلفية فاتحة يصبح ذهبياً أغمق ليبقى واضحاً */
:root[data-theme="light"] :is(.star, .review-stars, .plan-tag-hot, .plan-note svg, .deliver-item .tick, .proj-num, .time-badge svg, .price-tagline svg, .faq-links a:hover, .bar.is-on i) { color: #9A8400; }
:root[data-theme="light"] .svc-stats dt svg { color: var(--text); }
:root[data-theme="light"] .svc-step::after { background: #1A1918; }
:root[data-theme="light"] .work-grid, :root[data-theme="light"] .svc-inc, :root[data-theme="light"] .svc-steps, :root[data-theme="light"] .proj-points { box-shadow: var(--shadow); }
/* ===== الموبايل: إصلاحات التخطيط والأداء ===== */
@media (max-width: 860px) {
  /* بطاقات الأعمال: قائمة عادية بدل التكدّس، حتى لا تختفي تحت الشريط العلوي ولا تغطي بعضها */
  .stack-card { position: relative; top: auto; transform: none !important; will-change: auto; }
  .stack-card::after { display: none; }
  .stack-title { flex-wrap: wrap; row-gap: 0; }

  /* بدون تمويه خلفي على الهاتف: ثقيل على المعالج */
  .chip-top, .cal, .deliver-item { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chip-top { background: rgba(20, 20, 20, .88); }
  .cal { background: var(--card); }
  :root[data-theme="light"] .cal { background: #FFFFFF; }
  .deliver-item { background: #262626; }

  /* الحركات المستمرة التي تعيد الرسم في كل إطار */
  .svc-icon, .svc-icon svg, .tool-badge { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }

  /* الجدول الزمني يتسع داخل البطاقة بدل أن يخرج منها */
  .time-body { overflow: hidden; padding: 12px; }
  .time-grid { min-width: 0; grid-auto-rows: 34px; row-gap: 6px; }
  .bar { font-size: .6875rem; padding-inline: 2px; }
  .bar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bar i { display: none; }

  /* الباقات: العنوان والوسم ينزلان سطراً إذا ضاق المكان */
  .plan-head { flex-wrap: wrap; row-gap: 6px; }
  .plan-head h3 { white-space: normal; }
  .plan-rule { min-width: 24px; }
  .price-plan { padding: 22px 18px; }

  /* الفوتر: كل عنصر في سطره */
  .site-footer { flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 16px 8px; }
  .footer-brand { flex-direction: column; gap: 10px; }
  .footer-sep { display: none; }
  .footer-meta { text-align: center; }
  .footer-icons { flex-wrap: wrap; justify-content: center; }

  /* صفحات المشاريع والخدمات */
  .proj-meta > div, .svc-stats > div { padding: 14px; }
  .proj-meta dd { font-size: 1rem; }
  .svc-media { aspect-ratio: 4 / 3; }
  .proj-cta { flex-direction: column; align-items: stretch; text-align: start; }
  .proj-cta .btn { justify-content: center; }
  .work-toolbar { flex-direction: column; align-items: stretch; }
  .work-toolbar .seg { flex-wrap: wrap; }
  .work-toolbar .seg button { flex: 1 1 auto; }
  .work-card .stack-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .actions { flex-wrap: wrap; }
}
/* بطاقات الأعمال: النص يبقى داخل البطاقة في كل القياسات */
.work-card .stack-info > div { flex: 1; min-width: 0; }
.work-card .stack-title { flex-wrap: wrap; row-gap: 0; }
.work-card .stack-desc { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.work-card .stack-go { white-space: nowrap; }
@media (max-width: 1280px) { .work-card .stack-go { display: none; } }
/* الباقات: العمودان لا يتمددان خارج البطاقة، والعنوان والوسم ينزلان سطراً عند الضيق */
.price-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price-plan { min-width: 0; }
.plan-head { flex-wrap: wrap; row-gap: 6px; }
.plan-rule { min-width: 24px; }
@media (max-width: 860px) { .price-plans { grid-template-columns: minmax(0, 1fr); } }
/* ===== إصلاحات التابلت والشاشات الضيقة ===== */
/* أسماء طويلة وأزرار داخل البطاقات */
.proj-meta dd, .svc-stats dd { overflow-wrap: anywhere; }
.proj-cta > div { min-width: 0; }
.plan-head h3 { white-space: normal; }
.cal { min-width: 0; }
.cal-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }

/* حتى 1280: مراحل العمل والباقات في عمود واحد، لأن القائمة الجانبية تأخذ من العرض */
@media (max-width: 1280px) {
  .process-grid { grid-template-columns: minmax(0, 1fr); }
  .proc-cal { grid-row: auto; }
  .time-body { overflow: hidden; }
  .time-grid { min-width: 0; }
  .bar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding-inline: 4px; }
  .price-plan { padding: clamp(20px, 2.4vw, 32px); }
  .plan-btn { padding-inline: 12px; }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .price-plans { grid-template-columns: minmax(0, 1fr); }
  .price-plan + .price-plan { border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* التابلت بالطول (601 إلى 860): القائمة درج، والمحتوى في عمودين بدل عمود هاتف ممدود */
@media (max-width: 860px) and (min-width: 601px) {
  .main { padding: 14px; }
  .container { padding-inline: 14px; }
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento > .hero-intro, .bento > .hero-photo, .bento > .trusted { grid-column: 1 / -1; }
  .hero-photo { aspect-ratio: 16 / 10; }
  .hero-photo img { object-position: 50% 25%; }
  .stack-cards, .work-grid, .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-media { height: auto; }
  .work-grid[data-view="list"] { grid-template-columns: minmax(0, 1fr); }
  .work-toolbar { flex-direction: row; align-items: center; }
  .price-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-plan + .price-plan { border-top: 0; border-inline-start: 1px solid var(--line); }
  .svc-inc, .svc-steps, .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-others { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proj-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .svc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proj-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proj-row.cols-3 { --n: 3; }
  .proj-gallery.is-web .proj-row.cols-2 { --n: 2; }
  .proj-cta { flex-direction: row; align-items: center; }
  .client-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xp-row { grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; }
  .contact-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .site-footer { flex-direction: row; justify-content: space-between; text-align: start; }
  .footer-brand { flex-direction: row; }
  .review { width: 340px; }
}

/* الهواتف الصغيرة جداً */
@media (max-width: 380px) {
  .pill { white-space: normal; max-width: 100%; height: auto; padding-block: 4px; line-height: 1.5; }
  .proj-cta .btn, .plan-btn { white-space: normal; text-align: center; }
  .plan-btn { font-size: .9375rem; }
  .proj-meta, .svc-stats { grid-template-columns: minmax(0, 1fr); }
  .page-hero h1 { font-size: 2rem; }
}@media (max-width: 380px) {
  .btn { white-space: normal; text-align: center; height: auto; min-height: 44px; padding-block: 8px; }
  .btn-roll { height: auto; overflow: visible; }
  .btn-txt::after { display: none; }
}
@media (max-width: 860px) and (min-width: 601px) {
  .trusted { flex-direction: row; align-items: center; }
  .trusted-label { align-self: center; }
}@media (max-width: 380px) { .pill { flex-wrap: wrap; border-radius: 14px; } }

/* صورة الهيرو المربعة: الرأس يبقى ظاهراً حين يكون الصندوق عريضاً (التابلت) */
.hero-photo img { object-position: 50% 4%; }
