/* --- WORKFLOW SECTION: DEEP HYDRO --- */

.workflow-section {
  position: relative;
  padding: 8rem 0;
  background-color: var(--bg);
  overflow: hidden;
  font-family: inherit;
}

/* Background Effect */
.wf-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--brand) 5%, transparent) 0%, transparent 60%);
}

/* --- HEADER --- */
.wf-header {
  text-align: center; max-width: 700px; margin: 0 auto 5rem; position: relative; z-index: 2;
}
.wf-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--brand); margin-bottom: 1rem;
  background: color-mix(in srgb, var(--brand) 8%, transparent); padding: 6px 14px; border-radius: 100px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
}
.pulse-dot {
  width: 6px; height: 6px; background: currentColor; border-radius: 50%;
  box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite;
}
.wf-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--text); margin-bottom: 1rem;
}
.text-gradient-timeline {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.wf-subtitle { color: var(--text-muted); font-size: 1.1rem; }

/* --- WORKFLOW INTERFACE GRID --- */
.workflow-interface {
  position: relative; max-width: 900px; margin: 0 auto 4rem;
  display: flex; gap: 2rem;
}

/* TIMELINE TRACK (Left Line) */
.timeline-track {
  position: relative; width: 40px; flex-shrink: 0;
}
.track-line {
  position: absolute; top: 20px; bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 2px; background: var(--glass-border);
  border-radius: 2px; overflow: hidden;
}
/* Data Packets (Animation) */
.data-packet {
  position: absolute; width: 4px; height: 30px; left: 50%; margin-left: -2px;
  background: linear-gradient(to bottom, transparent, var(--brand), transparent);
  animation: dropData 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0;
}
.delay-1 { animation-delay: 1.5s; }

/* STEPS CONTAINER */
.steps-container {
  flex: 1; display: flex; flex-direction: column; gap: 2rem;
}

/* INDIVIDUAL STEP CARD */
.wf-step {
  display: flex; gap: 1.5rem; opacity: 0.4; transform: translateX(20px);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* The unselected steps are dim and pushed slightly right */
}

/* ACTIVE STEP styling */
.wf-step.active {
  opacity: 1; transform: translateX(0);
}

/* Marker (Number) */
.step-marker {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--glass-border);
  color: var(--text-muted); font-family: monospace; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2; transition: 0.3s;
}
.wf-step.active .step-marker {
  border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent);
  box-shadow: 0 0 20px var(--brand-glow);
}

/* Card Styling */
.step-card {
  flex: 1; background: color-mix(in srgb, var(--elev-2) 40%, transparent); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 1.5rem; transition: 0.3s;
  backdrop-filter: blur(10px);
}
.wf-step.active .step-card {
  border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: 0 10px 40px -10px rgba(0,0,0,0.4);
}

/* Card Header */
.card-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.step-icon {
  width: 32px; height: 32px; color: var(--text-muted); transition: 0.3s;
}
.wf-step.active .step-icon { color: var(--brand); transform: scale(1.1); }
.step-icon svg { width: 100%; height: 100%; stroke-width: 2; }

.card-head h3 {
  flex: 1; font-size: 1.25rem; margin: 0; color: var(--text);
}

.status-tag {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 100px;
  background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 20%, transparent);
  opacity: 0; transform: translateY(-5px); transition: 0.3s;
}
.status-tag.pending { background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }

.wf-step.active .status-tag { opacity: 1; transform: translateY(0); }

/* Card Body */
.card-body p {
  color: var(--text-muted); margin: 0; line-height: 1.6; font-size: 0.95rem;
}
.card-body {
  max-height: 0; overflow: hidden; opacity: 0; transition: all 0.5s ease;
}
.wf-step.active .card-body {
  max-height: 200px; opacity: 1; margin-top: 1rem;
}

.metric-row {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-highlight);
  display: flex; gap: 1.5rem; font-size: 0.85rem; color: var(--text-muted);
}
.metric-row strong { color: var(--text); }
.metric-row strong.ok { color: var(--ok); }

/* --- CONTROLS --- */
.wf-controls {
  max-width: 400px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem;
}
.wf-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--elev-2) 40%, transparent); border: 1px solid var(--glass-border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.3s;
}
.wf-btn:hover:not(:disabled) {
  border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.wf-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wf-btn svg { width: 20px; height: 20px; stroke-width: 2; }

.wf-progress { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prog-bar { width: 100%; height: 4px; background: var(--glass-border); border-radius: 2px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--brand); transition: width 0.4s ease; }
.prog-label { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }

/* Animations */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
@keyframes dropData { 
  0% { top: 0; opacity: 0; } 
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .workflow-interface { gap: 1rem; }
  .timeline-track { display: none; } /* Hide timeline line on mobile to save space */
  .wf-step { transform: translateX(0); opacity: 1; } /* Show all on mobile or change logic */
  .step-marker { display: none; }
  .wf-step.active .card-body { max-height: 500px; } /* Allow more height */
}