/* ==========================================================================
   Q-DASH HOW WE WORK — 4-STEP PROJECT JOURNEY STYLING
   Visual Identity: Clean Light Background, Deep Navy (#0F2034 / #1E2D3D),
   Vibrant Orange (#FF6A2A), Soft Glows, Generous Whitespace
   ========================================================================== */

:root {
  --qd-wf-navy: #0F2034;
  --qd-wf-orange: #FF6A2A;
  --qd-wf-orange-glow: rgba(255, 106, 42, 0.4);
  --qd-wf-blue: #00B4D8;
  --qd-wf-border: #E8EDF3;
  --qd-wf-tx-title: #0F2034;
  --qd-wf-tx-desc: #64748B;
  --qd-wf-radius-lg: 24px;
  --qd-wf-radius-md: 16px;
}

/* ── Full-Width Section Environment ────────────────────────────────── */
#how-we-work.qd-workflow-section {
  width: 100% !important;
  max-width: 100% !important;
  background: radial-gradient(circle at 50% 20%, rgba(255, 106, 42, 0.04) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(0, 180, 216, 0.03) 0%, transparent 50%),
              linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #FFFFFF 100%) !important;
  padding: 76px 4% 80px !important;
  position: relative !important;
  overflow: hidden !important;
  color: var(--qd-wf-tx-title) !important;
  box-sizing: border-box !important;
  border-top: 1px solid #E8EDF3 !important;
  border-bottom: 1px solid #E8EDF3 !important;
}

.qd-workflow-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ── Section Header ────────────────────────────────────────────────── */
.qd-workflow-header {
  text-align: center;
  margin-bottom: 48px;
}

.qd-workflow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 106, 42, 0.1);
  border: 1px solid rgba(255, 106, 42, 0.28);
  color: var(--qd-wf-orange);
  font-size: 13px;
  font-weight: 850;
  padding: 5px 18px;
  border-radius: 30px;
  margin-bottom: 12px;
}

.qd-workflow-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: var(--qd-wf-navy);
  margin: 0 0 10px;
  line-height: 1.25;
}

.qd-workflow-title .hl-orange {
  color: var(--qd-wf-orange);
}

.qd-workflow-subtitle {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--qd-wf-tx-desc);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── 4-STAGE HORIZONTAL PROJECT JOURNEY ────────────────────────────── */
.qd-workflow-track-wrap {
  position: relative;
  margin-bottom: 48px;
  padding-top: 10px;
}

/* Four Stages Grid (RTL: 1 on Right, 4 on Left) */
.qd-workflow-stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 3;
}

.qd-workflow-stage-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* ── Custom Dimensional Illustrations (Above Timeline) ────────────── */
.qd-workflow-visual-box {
  width: 170px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 24px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.qd-workflow-stage-col:hover .qd-workflow-visual-box,
.qd-workflow-stage-col.is-active .qd-workflow-visual-box {
  transform: translateY(-6px);
}

/* Continuous Timeline Track */
.qd-workflow-timeline-svg {
  position: absolute;
  top: 168px;
  left: 8%;
  right: 8%;
  width: 84%;
  height: 30px;
  pointer-events: none;
  z-index: 1;
}

.qd-workflow-line-bg {
  stroke: #E2E8F0;
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.qd-workflow-line-glow {
  stroke: var(--qd-wf-orange);
  stroke-width: 3;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 6px rgba(255, 106, 42, 0.6));
}

.qd-workflow-line-pulse {
  fill: #FF6A2A;
  filter: drop-shadow(0 0 6px #FF874D);
}

/* Numbered Timeline Nodes */
.qd-workflow-node-wrap {
  position: relative;
  z-index: 4;
  margin-bottom: 16px;
}

.qd-workflow-node-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--qd-wf-orange);
  color: var(--qd-wf-orange);
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 106, 42, 0.25);
  transition: all 0.3s ease;
}

.qd-workflow-stage-col.is-active .qd-workflow-node-num {
  background: var(--qd-wf-orange);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 106, 42, 0.6);
  transform: scale(1.15);
}

/* Stage Typography */
.qd-workflow-stage-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--qd-wf-navy);
  margin-bottom: 8px;
}

.qd-workflow-stage-desc {
  font-size: 13.5px;
  color: #64748B;
  line-height: 1.65;
  max-width: 220px;
  margin: 0;
}

/* ── 1. STAGE 1 VISUAL (التواصل - Communication) ──────────────────── */
.qd-wf-chat-wrap {
  position: relative;
  width: 130px;
  height: 110px;
}

.qd-wf-chat-navy {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 76px;
  height: 54px;
  background: #0F2034;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 10px 24px rgba(15, 32, 52, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.qd-wf-chat-orange {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  width: 66px;
  height: 46px;
  background: linear-gradient(135deg, #FF6A2A 0%, #E05C2A 100%);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 8px 20px rgba(255, 106, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.qd-wf-chat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFFFFF;
}

.qd-wf-avatar-bubble {
  position: absolute;
  top: -4px;
  inset-inline-end: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFF7ED;
  border: 1.5px solid #FF874D;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF6A2A;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(255, 106, 42, 0.2);
}

/* ── 2. STAGE 2 VISUAL (التخطيط - Planning) ───────────────────────── */
.qd-wf-plan-wrap {
  position: relative;
  width: 140px;
  height: 120px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 32, 52, 0.08);
  overflow: hidden;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.qd-wf-plan-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.qd-wf-plan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.qd-wf-plan-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}

.qd-wf-target-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFF7ED;
  border: 1.5px solid #FF6A2A;
  color: #FF6A2A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.qd-wf-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qd-wf-check-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qd-wf-check-line {
  width: 36px;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
}

.qd-wf-bars-group {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.qd-wf-bar-mini {
  width: 6px;
  border-radius: 2px 2px 0 0;
}

/* ── 3. STAGE 3 VISUAL (التنفيذ - Execution) ──────────────────────── */
.qd-wf-exec-wrap {
  position: relative;
  width: 150px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qd-wf-gear-bg {
  position: absolute;
  top: -6px;
  inset-inline-start: 10px;
  font-size: 38px;
  color: #E2E8F0;
  animation: qdWFGearSpin 18s linear infinite;
  z-index: 1;
}

.qd-wf-laptop {
  position: relative;
  width: 120px;
  height: 78px;
  background: #0F2034;
  border: 2px solid #334155;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 10px 24px rgba(15, 32, 52, 0.25);
  padding: 8px;
  z-index: 2;
}

.qd-wf-laptop-base {
  position: absolute;
  bottom: 12px;
  width: 138px;
  height: 8px;
  background: #CBD5E1;
  border-radius: 0 0 8px 8px;
  z-index: 2;
}

.qd-wf-code-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qd-wf-code-line {
  height: 3.5px;
  border-radius: 2px;
}

.qd-wf-code-tag {
  position: absolute;
  bottom: 24px;
  inset-inline-start: -6px;
  background: #FF6A2A;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(255, 106, 42, 0.35);
  z-index: 3;
}

.qd-wf-mini-chart-window {
  position: absolute;
  bottom: 24px;
  inset-inline-end: -6px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

/* ── 4. STAGE 4 VISUAL (التسليم - Delivery & Launch) ───────────────── */
.qd-wf-delivery-wrap {
  position: relative;
  width: 140px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qd-wf-box-base {
  position: absolute;
  bottom: 6px;
  width: 84px;
  height: 54px;
  background: #0F2034;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 32, 52, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qd-wf-box-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF6A2A;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.qd-wf-rocket {
  position: absolute;
  top: 0;
  font-size: 38px;
  color: #FF6A2A;
  filter: drop-shadow(0 6px 14px rgba(255, 106, 42, 0.4));
  animation: qdWFRocketFloat 3.5s ease-in-out infinite;
}

/* ── BOTTOM PROJECT STATUS CONSOLE ─────────────────────────────────── */
.qd-workflow-console {
  background: #FFFFFF;
  border: 1.5px solid #E8EDF3;
  border-radius: var(--qd-wf-radius-lg);
  padding: 24px 32px;
  box-shadow: 0 10px 30px rgba(15, 32, 52, 0.04);
  position: relative;
  margin-bottom: 24px;
}

.qd-workflow-console-title {
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  color: var(--qd-wf-navy);
  margin-bottom: 22px;
}

.qd-workflow-console-title .hl-orange {
  color: var(--qd-wf-orange);
}

.qd-workflow-console-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* Dynamic Status Milestones Flow */
.qd-workflow-status-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  position: relative;
  padding: 0 10px;
}

.qd-workflow-status-line {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2.5px;
  background: #E2E8F0;
  z-index: 1;
}

.qd-workflow-status-progress {
  position: absolute;
  top: 14px;
  height: 2.5px;
  background: var(--qd-wf-orange);
  transition: width 0.4s ease;
  z-index: 2;
}

.qd-workflow-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 3;
}

.qd-workflow-ms-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.3s ease;
}

.qd-workflow-milestone.is-active .qd-workflow-ms-node {
  border-color: var(--qd-wf-orange);
  background: #FFF7ED;
  color: var(--qd-wf-orange);
  box-shadow: 0 0 12px rgba(255, 106, 42, 0.4);
  transform: scale(1.15);
}

.qd-workflow-milestone.is-complete .qd-workflow-ms-node {
  border-color: var(--qd-wf-orange);
  background: var(--qd-wf-orange);
  color: #FFFFFF;
}

.qd-workflow-ms-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #64748B;
}

.qd-workflow-milestone.is-active .qd-workflow-ms-lbl,
.qd-workflow-milestone.is-complete .qd-workflow-ms-lbl {
  color: var(--qd-wf-navy);
}

/* Success Growth Indicator (Bottom Left) */
.qd-workflow-growth-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFF7ED;
  border: 1px solid rgba(255, 106, 42, 0.25);
  border-radius: 14px;
  padding: 10px 16px;
}

.qd-workflow-growth-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
}

.qd-workflow-growth-bar {
  width: 7px;
  border-radius: 2px 2px 0 0;
  background: #CBD5E1;
  transition: height 0.6s ease;
}

.qd-workflow-growth-bar.active {
  background: var(--qd-wf-orange);
}

.qd-workflow-growth-arrow {
  font-size: 20px;
  color: var(--qd-wf-orange);
  animation: qdGrowthPulse 2s infinite ease-in-out;
}

/* ── FINAL TRUST LINE ──────────────────────────────────────────────── */
.qd-workflow-trust-line {
  text-align: center;
  font-size: 13px;
  font-weight: 750;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── Keyframe Animations ───────────────────────────────────────────── */
@keyframes qdWFGearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes qdWFRocketFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes qdGrowthPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ── Responsive Adaptations ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .qd-workflow-stages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }
  .qd-workflow-timeline-svg {
    display: none;
  }
  .qd-workflow-console-body {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  #how-we-work.qd-workflow-section {
    padding: 48px 4% 56px !important;
  }
  .qd-workflow-stages-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .qd-workflow-status-flow {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }
  .qd-workflow-status-line,
  .qd-workflow-status-progress {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qd-wf-gear-bg,
  .qd-wf-rocket,
  .qd-workflow-growth-arrow {
    animation: none !important;
    transition: none !important;
  }
}
