/* ==========================================================================
   FRAMER STEPSFLOW PROCESS COMPONENT
   Aider Creative — Alternating 2-Column Curved Pipe Timeline
   ========================================================================== */

/* Main Section */
.sf-section {
  position: relative;
  width: 100%;
  padding: 130px 0;
  background: #06070a;
  overflow: hidden;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ambient Glow Orbs */
.sf-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.sf-bg-glow.glow-top {
  top: 5%;
  right: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 94, 20, 0.12) 0%, rgba(255, 94, 20, 0) 70%);
  filter: blur(100px);
  animation: sfPulseOrb 12s ease-in-out infinite alternate;
}

.sf-bg-glow.glow-middle {
  top: 45%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0) 70%);
  filter: blur(120px);
  animation: sfPulseOrb 16s ease-in-out infinite alternate-reverse;
}

.sf-bg-glow.glow-bottom {
  bottom: 5%;
  right: 10%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(255, 94, 20, 0.1) 0%, rgba(255, 94, 20, 0) 70%);
  filter: blur(110px);
  animation: sfPulseOrb 14s ease-in-out infinite alternate;
}

@keyframes sfPulseOrb {
  0% { transform: scale(1) translateY(0); opacity: 0.7; }
  100% { transform: scale(1.15) translateY(-30px); opacity: 1; }
}

/* Cyber Grid Background Pattern */
.sf-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Container */
.sf-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.sf-header {
  text-align: center;
  margin-bottom: 90px;
}

.sf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 94, 20, 0.1);
  color: #FF5E14;
  border: 1px solid rgba(255, 94, 20, 0.28);
  padding: 8px 20px;
  border-radius: 30px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(255, 94, 20, 0.15);
}

.sf-badge .dot-orange {
  color: #FF5E14;
  font-size: 0.6rem;
}

.sf-main-title {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2.4rem, 2rem + 2.8vw, 4.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin: 0 0 20px 0;
}

.sf-main-title em.accent-serif {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  color: #FF5E14;
  background: linear-gradient(135deg, #FF7A36 0%, #FF5E14 50%, #FF3600 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sf-main-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  color: #9ea4c0;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Timeline Stage & SVG Pipe Overlay */
.sf-flow-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

/* SVG Pipe Stage overlay */
.sf-svg-pipe-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.sf-pipe-path-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-pipe-path-progress {
  fill: none;
  stroke: #FF5E14;
  stroke: url(#sfLineGradient);
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px #FF5E14) drop-shadow(0 0 24px rgba(255, 94, 20, 0.5));
  will-change: stroke-dashoffset;
  transition: stroke-dashoffset 0.1s ease-out;
}

/* Dynamic Step Node Dots on the Pipe Line */
.sf-node-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #06070a;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  z-index: 5;
  transform: translate(-50%, -50%);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.sf-node-dot.active {
  background: #FF5E14;
  border-color: #ffffff;
  box-shadow: 0 0 18px #FF5E14, 0 0 32px rgba(255, 94, 20, 0.85);
  transform: translate(-50%, -50%) scale(1.25);
}

.sf-node-dot.active::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 94, 20, 0.7);
  animation: sfDotPulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes sfDotPulse {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Rows Stage */
.sf-rows-stage {
  position: relative;
  z-index: 4;
}

.sf-step-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
  position: relative;
  margin-bottom: 120px;
}

.sf-step-row:last-child {
  margin-bottom: 0;
}

/* Non-Reversed Rows (Steps 1, 3, 5): Line is on the left, so pad left side by 60px */
.sf-step-row:not(.sf-row-reversed) .sf-content-side {
  padding-left: 60px;
  padding-right: 10px;
}

.sf-step-row:not(.sf-row-reversed) .sf-card-side {
  padding-right: 60px;
  padding-left: 10px;
}

/* Reversed Rows (Steps 2, 4, 6): Line is on the right, so pad right side by 60px */
.sf-step-row.sf-row-reversed .sf-card-side {
  grid-column: 1;
  grid-row: 1;
  padding-left: 60px;
  padding-right: 10px;
}

.sf-step-row.sf-row-reversed .sf-content-side {
  grid-column: 2;
  grid-row: 1;
  padding-right: 60px;
  padding-left: 10px;
}

/* Content Side Styling */
.sf-content-side {
  position: relative;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Big Serif Italic Number (Matches Reference Image) */
.sf-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 5.6rem;
  font-weight: 500;
  line-height: 0.9;
  color: #D4AF37;
  background: linear-gradient(135deg, #F5E5C9 0%, #D4AF37 45%, #B8860B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.25));
  display: inline-block;
}

.sf-step-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sf-step-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #FF5E14;
  margin: 0 0 16px 0;
}

.sf-step-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.02rem;
  line-height: 1.75;
  color: #a3a8c3;
  margin: 0 0 24px 0;
  max-width: 480px;
}

/* Chip Tag */
.sf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 94, 20, 0.08);
  border: 1px solid rgba(255, 94, 20, 0.25);
  color: #e2e6f7;
  padding: 7px 16px;
  border-radius: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.sf-chip-dot {
  color: #FF5E14;
  font-size: 0.75rem;
}

/* Image Card Side Styling (Matches Reference Card Visuals) */
.sf-card-side {
  position: relative;
}

.sf-image-card {
  position: relative;
  width: 100%;
  height: 330px;
  border-radius: 24px;
  overflow: hidden;
  background: #0f111a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(255, 94, 20, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.sf-image-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 94, 20, 0.45);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.8),
    0 0 45px rgba(255, 94, 20, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sf-step-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sf-image-card:hover .sf-step-img {
  transform: scale(1.07);
}

.sf-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 7, 10, 0.15) 0%,
    rgba(6, 7, 10, 0.5) 100%
  );
  pointer-events: none;
}

.sf-image-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(10, 12, 18, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 16px;
  border-radius: 20px;
  color: #FF5E14;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 850px) {
  .sf-section {
    padding: 80px 0;
  }

  .sf-header {
    margin-bottom: 60px;
  }

  .sf-flow-wrapper {
    padding: 10px 0;
  }

  .sf-step-row,
  .sf-step-row.sf-row-reversed {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-left: 45px;
    margin-bottom: 70px;
  }

  .sf-step-row.sf-row-reversed .sf-content-side {
    grid-column: 1;
    grid-row: 1;
  }

  .sf-step-row.sf-row-reversed .sf-card-side {
    grid-column: 1;
    grid-row: 2;
  }

  .sf-step-row:not(.sf-row-reversed) .sf-content-side,
  .sf-step-row:not(.sf-row-reversed) .sf-card-side,
  .sf-step-row.sf-row-reversed .sf-content-side,
  .sf-step-row.sf-row-reversed .sf-card-side {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .sf-number {
    font-size: 4.2rem;
  }

  .sf-step-title {
    font-size: 1.8rem;
  }

  .sf-step-subtitle {
    font-size: 0.95rem;
  }

  .sf-image-card {
    height: 250px;
    border-radius: 18px;
  }
}

