/* =============================================================
   SECTION 7 — THE TESTING JOURNEY
   All rules scoped under .testing-journey
   ============================================================= */

.testing-journey {
  --tj-navy-900: #071b31;
  --tj-navy-800: #0a2f52;
  --tj-teal-500: #14b8a6;
  --tj-teal-300: #5eead4;
  --tj-teal-050: #eefbf9;
  --tj-cyan-300: #67e8f9;
  --tj-ink: #0a2f52;
  --tj-ink-soft: #5b7186;
  --tj-border: #e7eef2;
  --tj-white: #ffffff;
  --tj-bg: #f5f8fa;
  --tj-font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --tj-font-body: "Inter", sans-serif;

  position: relative;
  background: var(--tj-bg);
  padding-top: 6.5rem;
  padding-bottom: 6.5rem;
  font-family: var(--tj-font-body);
  overflow: hidden;
}

/* ---------- Header ---------- */
.testing-journey-header {
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}

.testing-journey-header.is-visible {
  animation: testing-journey-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes testing-journey-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testing-journey-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tj-teal-500);
  margin-bottom: 0.85rem;
}

.testing-journey-title {
  font-family: var(--tj-font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  color: var(--tj-ink);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.testing-journey-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--tj-ink-soft);
}

/* ---------- Panel ---------- */
.testing-journey-panel {
  position: relative;
  background: var(--tj-white);
  border: 1px solid var(--tj-border);
  border-radius: 1.5rem;
  padding: 3.5rem 3rem 2.75rem;
  box-shadow: 0 30px 60px -30px rgba(10, 47, 82, 0.18);
}

.testing-journey-panel::before {
  content: "";
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tj-teal-300) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Track (connecting line) ---------- */
.testing-journey-container {
  position: relative;
}

.testing-journey-track {
  position: absolute;
  top: 2rem;
  left: 10%;
  right: 10%;
  height: 2px;
  z-index: 0;
}

.testing-journey-track-line {
  position: absolute;
  inset: 0;
  background: var(--tj-border);
  border-radius: 999px;
}

.testing-journey-track-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tj-teal-500), var(--tj-cyan-300));
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.testing-journey-container.is-visible .testing-journey-track-progress {
  width: 100%;
}

/* ---------- Steps ---------- */
.testing-journey-steps {
  position: relative;
  z-index: 1;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.testing-journey-step {
  flex: 1;
  text-align: center;
  padding: 0 0.75rem;
  opacity: 0;
  transform: translateY(18px);
}

.testing-journey-step.is-visible {
  animation: testing-journey-step-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1)
    forwards;
}

@keyframes testing-journey-step-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testing-journey-step-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--tj-white);
  border: 1px solid var(--tj-border);
  box-shadow: 0 10px 24px -14px rgba(10, 47, 82, 0.3);
  margin-bottom: 1.35rem;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.35s ease;
}

.testing-journey-step.is-visible .testing-journey-step-marker {
  animation: testing-journey-marker-glow 1.6s ease-out 0.3s;
}

@keyframes testing-journey-marker-glow {
  0% {
    box-shadow: 0 10px 24px -14px rgba(10, 47, 82, 0.3);
  }
  40% {
    box-shadow:
      0 0 0 8px rgba(20, 184, 166, 0.16),
      0 10px 24px -14px rgba(10, 47, 82, 0.3);
  }
  100% {
    box-shadow: 0 10px 24px -14px rgba(10, 47, 82, 0.3);
  }
}

.testing-journey-step:hover .testing-journey-step-marker {
  transform: translateY(-3px);
  border-color: var(--tj-teal-500);
}

.testing-journey-icon {
  font-size: 1.4rem;
  color: var(--tj-navy-800);
}

.testing-journey-number {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tj-font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tj-white);
  background: linear-gradient(135deg, var(--tj-teal-500), #0ea5a0);
  box-shadow: 0 4px 10px -2px rgba(20, 184, 166, 0.5);
}

.testing-journey-step-title {
  font-family: var(--tj-font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--tj-ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.testing-journey-step-description {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--tj-ink-soft);
  margin: 0 auto;
  max-width: 13rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .testing-journey {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .testing-journey-panel {
    padding: 3rem 1.75rem 2.25rem;
  }

  .testing-journey-step-description {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .testing-journey-title {
    font-size: 1.7rem;
  }

  .testing-journey-panel {
    padding: 2.25rem 1.5rem;
  }

  .testing-journey-steps {
    flex-direction: column;
    gap: 2.25rem;
  }

  .testing-journey-step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1.1rem;
    padding: 0;
  }

  .testing-journey-step-marker {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0;
  }

  .testing-journey-icon {
    font-size: 1.2rem;
  }

  .testing-journey-step-description {
    margin: 0;
  }

  .testing-journey-track {
    top: 0;
    bottom: 0;
    left: 1.625rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .testing-journey-track-progress {
    width: 2px;
    height: 0;
    transition: height 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .testing-journey-container.is-visible .testing-journey-track-progress {
    width: 2px;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testing-journey-header,
  .testing-journey-step,
  .testing-journey-step-marker,
  .testing-journey-track-progress {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .testing-journey-container.is-visible .testing-journey-track-progress {
    width: 100%;
  }

  @media (max-width: 767.98px) {
    .testing-journey-container.is-visible .testing-journey-track-progress {
      width: 2px;
      height: 100%;
    }
  }
}
