/* ==========================================================================
   URS 6-STAGE RESEARCH WORKFLOW — SMOOTH SCIENTIFIC PIPELINE ANIMATION
   Clean, Elegant, Perfectly Aligned, Eye-Catchy & Smooth
   ========================================================================== */

.workflow-section {
  position: relative;
  background: radial-gradient(ellipse at 50% 20%, #0c1c36 0%, #060e1d 60%, #03070f 100%);
  color: #ffffff;
  padding: 5.5rem 0 6rem;
  overflow: hidden;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

/* Subtle Ambient Lab Glows */
.workflow-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 1;
}
.workflow-bg-glow-1 {
  width: 500px;
  height: 350px;
  top: 10%;
  left: -100px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
}
.workflow-bg-glow-2 {
  width: 500px;
  height: 350px;
  bottom: 5%;
  right: -100px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
}

.workflow-section .container {
  position: relative;
  z-index: 2;
}

/* Header Tag */
.workflow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.workflow-badge i {
  color: #38bdf8;
}

/* Explicit Bright Section Title & Subtitle on Dark Background */
.workflow-section .section-title {
  color: #ffffff !important;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.workflow-section .section-subtitle {
  color: #94a3b8 !important;
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────────────────────────────────────
   THE 6-STAGE PIPELINE (CLEAN HORIZONTAL TRACK WITH NO BULKY BOXES)
   ────────────────────────────────────────────────────────────────────────── */
.workflow-track-wrapper {
  position: relative;
  margin-top: 4rem;
  padding: 0 1rem;
}

/* Connecting Line Running Behind All Bubbles */
.workflow-conduit-svg {
  position: absolute;
  top: 36px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  width: calc(100% - (100% / 6));
  height: 8px;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

/* Inactive Conduit Base Track */
.conduit-base-line {
  stroke: rgba(56, 189, 248, 0.2);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Animated Flowing Laser Beam with Gradient */
.conduit-energy-line {
  stroke: url(#laserEnergyGradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9));
}

/* Traveling Glowing Photon Bead */
.conduit-photon {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px #38bdf8) drop-shadow(0 0 16px #06b6d4);
  transition: transform 0.05s linear;
}

/* 6 Column Grid */
.workflow-steps-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

/* Single Step Unit — Clean & Uncluttered */
.workflow-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0 0.25rem;
}

.workflow-step-node:hover {
  transform: translateY(-6px);
}

/* Circular Node Bubble Container */
.node-bubble-anchor {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer Soft Aura Ring */
.node-aura {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.4s ease;
  pointer-events: none;
}

.workflow-step-node.active .node-aura,
.workflow-step-node:hover .node-aura {
  opacity: 1;
  transform: scale(1.15);
  animation: auraPulse 2.4s ease-in-out infinite alternate;
}

@keyframes auraPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 1; }
}

/* Expanding Sonar Ping Wave */
.node-sonar {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  opacity: 0;
  pointer-events: none;
}

.workflow-step-node.active .node-sonar {
  animation: sonarWave 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes sonarWave {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Bubble Center Circle */
.node-circle {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0b172a;
  border: 2px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: #38bdf8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 3px rgba(255, 255, 255, 0.15);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.workflow-step-node:hover .node-circle {
  border-color: #38bdf8;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.65), inset 0 0 8px rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.workflow-step-node.active .node-circle {
  border-color: #7dd3fc;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.4);
  transform: scale(1.12);
}

/* Node Icon Micro-Movements */
.node-circle i {
  transition: transform 0.3s ease;
}

.workflow-step-node:hover .node-circle i,
.workflow-step-node.active .node-circle i {
  transform: scale(1.1);
}

/* Step Number Tag */
.node-phase-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 0.45rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.workflow-step-node.active .node-phase-tag {
  color: #7dd3fc;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.workflow-step-node:hover .node-phase-tag {
  transform: scale(1.15);
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}

/* Step Title — Crisp, Bold, Magnifies on Hover for Easy Reading */
.node-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: -0.01em;
  transform-origin: center center;
  position: relative;
  z-index: 5;
}

.workflow-step-node.active .node-title {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Magnification Effect on Hover: Text pops out large & crisp with soft cyan backlight */
.workflow-step-node:hover .node-title,
.node-title:hover {
  transform: scale(1.22);
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.01em;
  z-index: 10;
}

/* Magnifier Glass Glow Badge */
.workflow-step-node:hover::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  box-shadow: 0 0 10px #38bdf8;
  border-radius: 9999px;
  animation: lensGlow 1.2s ease-in-out infinite alternate;
}

@keyframes lensGlow {
  from { opacity: 0.5; width: 28px; }
  to { opacity: 1; width: 44px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .workflow-steps-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 1.5rem;
  }
  .workflow-conduit-svg {
    display: none; /* Hide single continuous horizontal SVG when wrapping to 2 rows */
  }
  .node-title {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .workflow-section {
    padding: 3.5rem 0 4rem;
  }
  .workflow-section .section-title {
    font-size: clamp(1.6rem, 5vw, 2.1rem);
  }
  .workflow-track-wrapper {
    margin-top: 2.25rem;
    padding: 0;
  }
  .workflow-steps-row {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    width: 100%;
    margin: 0 auto;
  }
  .workflow-step-node {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.15rem;
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
  }
  .workflow-step-node.active {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 4px 22px rgba(2, 132, 199, 0.22);
  }
  .node-bubble-anchor {
    width: 54px;
    height: 54px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .node-circle {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }
  .node-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
  }
  .node-phase-tag {
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
  }
  .workflow-step-node:hover .node-title,
  .node-title:hover {
    transform: none !important;
    color: #38bdf8 !important;
  }
  .workflow-step-node:hover::after {
    display: none;
  }
}

@media (max-width: 380px) {
  .workflow-step-node {
    padding: 0.75rem 0.85rem;
    gap: 0.85rem;
  }
  .node-bubble-anchor {
    width: 46px;
    height: 46px;
  }
  .node-circle {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  .node-title {
    font-size: 0.94rem;
  }
}
