/* =========================================================
   Zaffeer Tec — الصفحات الداخلية (الخدمات، طريقة شغلنا، البنية التحتية، من نحن)
   كل صفحة إلها لونين (--p1 / --p2) وبتغيّر شكلها كامل
   ========================================================= */
.pg-services { --p1: #10A4B7; --p2: #4C8DFF; --p1d: #0B6E7C; --p2d: #2457D6; }
.pg-process  { --p1: #8B6CFF; --p2: #4C8DFF; --p1d: #5B3FD6; --p2d: #2457D6; }
.pg-infra    { --p1: #10B981; --p2: #10A4B7; --p1d: #08785A; --p2d: #0B6E7C; }
.pg-about    { --p1: #F59E0B; --p2: #EC4899; --p1d: #B45309; --p2d: #BE185D; }

.nav-links a.active { color: var(--brand); }
.nav-links a.active::after { transform: scaleX(1); }

/* ---------- هيرو الصفحات ---------- */
.page-hero { padding: 140px 0 96px; }
.page-hero .hero-text h1 { font-size: clamp(32px, 4.4vw, 52px); }
.page-hero .hero-text h1 .grad { background-image: linear-gradient(90deg, var(--p1d), var(--p2d)); }
.page-hero .mono.on-dark { color: var(--p1d); }
.page-hero .btn-accent { background: linear-gradient(90deg, var(--p1d), var(--p2d)); color: #fff; }
.page-hero .live-bg .b1 i { background: radial-gradient(circle, color-mix(in srgb, var(--p1) 42%, transparent), transparent 66%); }
.page-hero .live-bg .b2 i { background: radial-gradient(circle, color-mix(in srgb, var(--p2) 36%, transparent), transparent 66%); }
.ph-visual { flex: 1 1 420px; display: flex; justify-content: center; animation: slideIn 1s var(--ease) .3s both; }
.ph-visual svg { width: 100%; max-width: 520px; height: auto; filter: drop-shadow(0 30px 40px rgba(11,31,58,.12)); }

/* ---------- ألوان الرسومات ---------- */
.illo text { font-family: var(--mono); font-weight: 700; }
.illo .f1 { fill: var(--p1); } .illo .f2 { fill: var(--p2); }
.illo .fw { fill: #fff; } .illo .fs { fill: #E9EFF6; } .illo .fk { fill: var(--ink); }
.illo .s1 { stroke: var(--p1); } .illo .s2 { stroke: var(--p2); }
.illo .sl { stroke: rgba(11,31,58,.16); } .illo .sw { stroke: #fff; }

/* ---------- عام ---------- */
.sec { padding: 80px 0 24px; }
.center-head { text-align: center; max-width: 720px; margin: 0 auto 44px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.center-head .mono { color: var(--p1d); text-align: center; }
.center-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.center-head p { color: var(--muted); line-height: 1.8; font-size: 17px; }

/* ---------- الخدمات: صفوف متناوبة ---------- */
.svc-rows { display: flex; flex-direction: column; gap: 26px; }
.svc-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 40px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px 36px;
  box-shadow: 0 24px 50px -36px rgba(11,31,58,.35);
}
.svc-row:nth-child(even) { flex-direction: row-reverse; --p1: #4C8DFF; --p2: #10A4B7; --p1d: #2457D6; --p2d: #0B6E7C; }
.svc-text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 12px; }
.svc-num { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--p1d); }
.svc-text h3 { font-size: 26px; }
.svc-text p { color: var(--muted); line-height: 1.8; }
.svc-text ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.svc-text li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.svc-text li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--p1), var(--p2)); }
.mini {
  flex: 0 1 320px; margin-inline: auto; border-radius: 18px; padding: 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--p1) 12%, #fff), color-mix(in srgb, var(--p2) 12%, #fff));
  border: 1px solid color-mix(in srgb, var(--p1) 22%, var(--line));
}
.mini svg { width: 100%; height: auto; display: block; }

/* ---------- شريط الدعوة (CTA) ---------- */
.cta-wrap { padding: 56px 0 96px; }
.cta-band {
  position: relative; overflow: hidden; border-radius: 26px; padding: 48px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  color: #fff; background: linear-gradient(120deg, var(--p1d), var(--p2d), var(--p1d)); background-size: 220% 220%;
  animation: gradShift 12s ease infinite;
}
.cta-band > div { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); max-width: 600px; }
.cta-band p { opacity: .88; margin-top: 8px; max-width: 600px; line-height: 1.8; }
.cta-band .btn { position: relative; z-index: 1; background: #fff; color: var(--p1d); }
.cta-deco { position: absolute; inset-inline-end: -30px; top: -50px; width: 280px; opacity: .22; pointer-events: none; }

/* ---------- طريقة الشغل: تايملاين ---------- */
.timeline { position: relative; max-width: 980px; margin: 0 auto; --prog: 0; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; top: 0; inset-inline-start: 39px; width: 3px; border-radius: 3px;
}
.timeline::before { bottom: 0; background: var(--line); }
.timeline::after { height: calc(var(--prog) * 100%); background: linear-gradient(180deg, var(--p1), var(--p2)); box-shadow: 0 0 14px color-mix(in srgb, var(--p1) 50%, transparent); }
.tl-item { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 26px; padding-bottom: 36px; }
.tl-dot {
  position: relative; z-index: 1; width: 80px; height: 80px; border-radius: 50%; background: #fff;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  transition: border-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.tl-item.on .tl-dot { border-color: var(--p1); box-shadow: 0 0 0 7px color-mix(in srgb, var(--p1) 14%, transparent); transform: scale(1.05); }
.tl-dot svg { width: 50px; height: 50px; }
.tl-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px 30px; box-shadow: 0 24px 50px -38px rgba(11,31,58,.4); }
.tl-card .num { font-family: var(--mono); font-weight: 700; color: var(--p1d); font-size: 14px; }
.tl-card h3 { font-size: 24px; margin: 6px 0 10px; }
.tl-card p { color: var(--muted); line-height: 1.8; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--p1) 10%, #fff); color: var(--p1d);
  border: 1px solid color-mix(in srgb, var(--p1) 26%, transparent);
}

/* كروت صغيرة بأيقونات */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pcard {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s, box-shadow .35s;
}
.pcard:hover { border-color: var(--p1); box-shadow: 0 26px 50px -30px color-mix(in srgb, var(--p1d) 55%, transparent); }
.pcard::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--p1) 14%, transparent), transparent 60%);
}
.pcard:hover::before { opacity: 1; }
.pcard .ico { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--p1), var(--p2)); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 24px -12px var(--p1d); }
.pcard .ico svg { width: 34px; height: 34px; }
.pcard h3 { font-size: 20px; }
.pcard p { color: var(--muted); line-height: 1.75; font-size: 15px; }

/* أسئلة شائعة */
.faq { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 24px; transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: var(--p1); box-shadow: 0 20px 40px -28px rgba(11,31,58,.4); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 24px; color: var(--p1d); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); line-height: 1.8; padding-bottom: 20px; }

/* ---------- البنية التحتية: طبقات ---------- */
.layers-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.layers-svg { flex: 1 1 320px; max-width: 440px; margin-inline: auto; }
.layers-svg svg { width: 100%; height: auto; display: block; overflow: visible; }
.layers-list { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }
.layers-list li {
  display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; transition: border-color .25s, transform .35s var(--ease), box-shadow .35s;
}
.layers-list li:hover { border-color: var(--lc); transform: translateX(calc(var(--dir) * 8px)); box-shadow: 0 18px 36px -24px var(--lc); }
.layers-list .tag { flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--lc); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.layers-list strong { display: block; font-size: 18px; margin-bottom: 4px; }
.layers-list .d { color: var(--muted); font-size: 15px; line-height: 1.7; }
.li-1 { --lc: #10B981; } .li-2 { --lc: #10A4B7; } .li-3 { --lc: #4C8DFF; } .li-4 { --lc: #8B6CFF; }
.ly { transition: transform .45s var(--ease), opacity .3s; transform-box: fill-box; transform-origin: center; }
.layers-wrap:has(.layers-list li:hover) .ly { opacity: .3; }
.layers-wrap:has(.li-1:hover) .ly-1, .layers-wrap:has(.li-2:hover) .ly-2,
.layers-wrap:has(.li-3:hover) .ly-3, .layers-wrap:has(.li-4:hover) .ly-4 { opacity: 1; transform: translateY(-14px); }

.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cap { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; gap: 16px; align-items: flex-start; transition: border-color .25s, box-shadow .35s; }
.cap:hover { border-color: var(--p1); box-shadow: 0 20px 40px -26px rgba(11,31,58,.35); }
.cap .code { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--p1); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 12px; }
.cap strong { display: block; font-size: 17px; margin-bottom: 4px; }
.cap span { color: var(--muted); font-size: 15px; line-height: 1.7; }

.monitor {
  position: relative; overflow: hidden; border-radius: 26px; padding: 40px;
  display: flex; flex-wrap: wrap; gap: 36px; align-items: center;
  background: linear-gradient(160deg, #0a2447, var(--ink) 60%, #082a2a); color: #D5DAD2;
}
.monitor > div:first-child { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.monitor .mono { color: var(--p1); }
.monitor h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); }
.monitor p { color: var(--muted-dark); line-height: 1.8; }
.mon-panel { flex: 1 1 420px; background: rgba(19,41,74,.75); border: 1px solid var(--ink-line); border-radius: 18px; padding: 20px; font-family: var(--mono); font-size: 13px; direction: ltr; text-align: left; }
.mon-head { display: flex; justify-content: space-between; color: #9FB3D6; margin-bottom: 10px; }
.mon-graph svg { width: 100%; height: 120px; display: block; }
.mon-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid rgba(120,170,255,.12); }
.mon-row b { color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.mon-note { font-size: 12px; color: #8294B5; margin-top: 10px; font-family: var(--font); }
[dir="rtl"] .mon-note { direction: rtl; text-align: right; }

/* ---------- من نحن ---------- */
.story { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.story-quote {
  flex: 1 1 380px; font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.5;
  background: linear-gradient(90deg, var(--p1d), var(--p2d)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.story-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; color: var(--muted); line-height: 1.9; font-size: 17px; }
.mv { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.mv-card { position: relative; overflow: hidden; border-radius: 22px; padding: 34px; background: #fff; border: 1px solid var(--line); display: flex; gap: 20px; align-items: flex-start; }
.mv-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--p1), var(--p2)); }
.mv-card svg { flex: 0 0 64px; width: 64px; height: 64px; }
.mv-card .mono { color: var(--p1d); }
.mv-card h3 { font-size: 24px; margin: 6px 0 10px; }
.mv-card p { color: var(--muted); line-height: 1.8; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.pillar {
  display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--p1) 8%, #fff)); border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .35s;
}
.pillar:hover { border-color: var(--p1); box-shadow: 0 24px 46px -28px color-mix(in srgb, var(--p1d) 60%, transparent); }
.pillar .mono { color: var(--p1d); }
.pillar h3 { font-size: 21px; }
.pillar p { color: var(--muted); line-height: 1.7; font-size: 15px; }
.pillar .go { font-weight: 700; color: var(--p1d); display: inline-flex; gap: 8px; align-items: center; margin-top: auto; }
.pillar .go i { font-style: normal; transition: transform .3s var(--ease); }
.pillar:hover .go i { transform: translateX(calc(var(--dir) * 6px)); }
[dir="rtl"] .pillar .go i { transform: scaleX(-1); }
[dir="rtl"] .pillar:hover .go i { transform: scaleX(-1) translateX(6px); }

.team-xl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tm { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color .25s, box-shadow .35s; }
.tm:hover { border-color: var(--p1); box-shadow: 0 24px 46px -28px color-mix(in srgb, var(--p1d) 60%, transparent); }
.tm img { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; padding: 4px; background: linear-gradient(135deg, var(--p1), var(--p2)); margin-bottom: 8px; }
.tm strong { font-size: 19px; }
.tm span { color: var(--muted); font-size: 14px; }

/* ---------- موبايل ---------- */
@media (max-width: 700px) {
  .page-hero { padding: 120px 0 64px; }
  .svc-row, .cta-band, .monitor, .tl-card, .mv-card { padding: 24px; }
  .timeline::before, .timeline::after { inset-inline-start: 27px; }
  .tl-item { grid-template-columns: 56px 1fr; gap: 14px; }
  .tl-dot { width: 56px; height: 56px; }
  .tl-dot svg { width: 34px; height: 34px; }
  .mv-card { flex-direction: column; }
}
