/* ==========================================================
   TD Progress — Timeline Pills + Motion
   "أنت تتقدم... الرحلة بدأت تتشكل"
   ========================================================== */

.td-progress {
  direction: rtl;
  padding: 0;
  position: relative;
  top: auto;
  z-index: 49;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "Cairo", sans-serif;
  margin-top: 8px;
}
/* Override theme/elementor font/link styles inside progress */
.td-progress *,
.td-progress a {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "Cairo", sans-serif !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* ── Inset Frame ── */
.td-progress-frame {
  width: min(600px, 90vw);
  margin: 14px auto 16px;
  padding: 18px 28px 22px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    inset 0 -1px 0 rgba(0,0,0,.15);
}

/* ── Title ── */
.td-progress-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: rgba(234,240,255,.35);
  letter-spacing: .03em;
  margin-bottom: 20px;
}

.td-progress-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

/* ── Gradient Connector Track — below circles ── */
.td-progress-track {
  position: absolute;
  top: 52px;
  right: 60px;
  left: 60px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.06);
  z-index: 0;
  overflow: hidden;
}

.td-progress-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  background: linear-gradient(
    270deg,
    #f2b14b 0%,
    #7dd3fc 50%,
    #34d399 100%
  );
  background-size: 200% 100%;
  animation: td-shimmer 3s ease-in-out infinite;
}

@keyframes td-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Step Node ── */
.td-progress-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Entry animation */
  opacity: 0;
  transform: translateY(8px);
  animation: td-fadeUp .5s ease forwards;
}
.td-progress-node:hover {
  text-decoration: none !important;
  color: inherit !important;
}
a.td-progress-node,
a.td-progress-node:visited,
a.td-progress-node:hover,
a.td-progress-node:active {
  text-decoration: none !important;
  color: inherit !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
.td-progress-node:nth-child(2) { animation-delay: .12s; }
.td-progress-node:nth-child(3) { animation-delay: .24s; }
.td-progress-node.future { cursor: default; }

@keyframes td-fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Circle ── */
.td-progress-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  position: relative;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
}

/* Future — hollow */
.td-progress-node.future .td-progress-circle {
  background: rgba(255,255,255,.03);
  border: 2px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.22);
}

/* Completed — green check */
.td-progress-node.completed .td-progress-circle {
  background: rgba(52,211,153,.14);
  border: 2px solid rgba(52,211,153,.45);
  color: #34d399;
}

/* Current — brand halo + pulse */
.td-progress-node.current .td-progress-circle {
  background: rgba(242,177,75,.16);
  border: 2.5px solid rgba(242,177,75,.65);
  color: #f2b14b;
  box-shadow:
    0 0 0 6px rgba(242,177,75,.07),
    0 0 22px rgba(242,177,75,.18);
  animation: td-pulse 2.8s ease-in-out infinite;
}

@keyframes td-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(242,177,75,.07),
      0 0 22px rgba(242,177,75,.15);
  }
  50% {
    box-shadow:
      0 0 0 11px rgba(242,177,75,.03),
      0 0 32px rgba(242,177,75,.25);
  }
}

/* ── Label ── */
.td-progress-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
  line-height: 1.3;
  transition: color .3s ease;
}
.td-progress-node.future .td-progress-text { color: rgba(234,240,255,.2); }
.td-progress-node.completed .td-progress-text { color: rgba(234,240,255,.45); }
.td-progress-node.current .td-progress-text { color: #eaf0ff; font-weight: 700; }

/* ── Mobile Tooltip ── */
.td-progress-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(242,177,75,.92);
  color: #161616;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 10;
}
.td-progress-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(242,177,75,.92);
}
.td-progress-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Mobile ≤ 420: compact ── */
@media (max-width: 420px) {
  .td-progress { top: auto; }
  .td-progress-frame {
    width: 92vw;
    padding: 14px 16px 16px;
    margin: 10px auto 12px;
    border-radius: 16px;
  }
  .td-progress-title { font-size: 13px; margin-bottom: 14px; }
  .td-progress-text { display: none; }
  .td-progress-circle { width: 38px; height: 38px; font-size: 16px; }
  .td-progress-track { right: 25px; left: 25px; top: 37px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .td-progress-node,
  .td-progress-fill,
  .td-progress-circle,
  .td-progress-tip {
    animation: none !important;
    transition: none !important;
  }
  .td-progress-node { opacity: 1; transform: none; }
}