/* ==========================================================================
   Our Approach — Continuous Zigzag Process Timeline
   Bilva Tech Design System
   Combines Reference 1 (continuous dotted zigzag) & Reference 2 (minimal technical dark)
   ========================================================================== */

.zigzag-approach-section {
  position: relative;
  isolation: isolate;
  background: var(--surface-panel, #0b0b0d);
  border: 1px solid var(--line, #252527);
  overflow: hidden;
}

/* Header & Spacing */
.zigzag-section-body {
  padding: clamp(32px, 5vw, 64px);
}

.zigzag-heading-group {
  margin-bottom: clamp(36px, 5vw, 56px);
  max-width: 800px;
}

.zigzag-section-title {
  font-family: var(--font-main, "Space Grotesk", sans-serif);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--ink, #e9e7e8);
  margin: 0;
}

/* Timeline Container */
.zigzag-timeline-wrap {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding-right: 40px; /* Dedicated space for right-side turnaround loop */
}

/* SVG Connector Overlay */
.zigzag-svg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.zigzag-connector-path {
  fill: none;
  stroke: rgba(232, 226, 220, 0.32);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Grid Layout (Desktop: 3 Columns) */
.zigzag-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3.5vw, 52px);
  row-gap: clamp(48px, 6vw, 72px);
  z-index: 2;
}

/* Step Card Order Mapping */
/* Row 1: Left to Right */
.zigzag-step[data-step="1"] { grid-column: 1; grid-row: 1; }
.zigzag-step[data-step="2"] { grid-column: 2; grid-row: 1; }
.zigzag-step[data-step="3"] { grid-column: 3; grid-row: 1; }

/* Row 2: Right to Left (Zigzag flow: 03 -> 04 -> 05 -> 06) */
.zigzag-step[data-step="4"] { grid-column: 3; grid-row: 2; }
.zigzag-step[data-step="5"] { grid-column: 2; grid-row: 2; }
.zigzag-step[data-step="6"] { grid-column: 1; grid-row: 2; }

/* Individual Step Structure */
.zigzag-step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Marker Header - Anchors the continuous connector path */
.zigzag-marker-header {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  height: 42px;
}

/* Numbered Node / Marker */
.zigzag-marker {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-panel, #0b0b0d);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 3;
  box-shadow: 0 0 0 6px var(--surface-panel, #0b0b0d);
  transition: border-color 0.25s ease;
}

.zigzag-marker-num {
  font-family: var(--font-main, "Space Grotesk", sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-rose, #e8e2dc);
  letter-spacing: -0.02em;
}

/* Step Card Box (Inspired by Reference 1 & Reference 2) */
.zigzag-card-box {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  background: rgba(17, 16, 19, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  min-height: 160px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.zigzag-card-box:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(22, 21, 25, 0.85);
}

.zigzag-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zigzag-step-tag {
  font-family: var(--font-secondary, "Inter", sans-serif);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted, #918d92);
}

.zigzag-corner-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.2s ease, transform 0.2s ease;
}

.zigzag-corner-arrow svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.zigzag-card-box:hover .zigzag-corner-arrow {
  color: var(--accent-rose, #e8e2dc);
  transform: translate(1px, -1px);
}

.zigzag-step-title {
  font-family: var(--font-main, "Space Grotesk", sans-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink, #e9e7e8);
  margin: 0 0 14px;
}

.zigzag-card-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.zigzag-step-desc {
  font-family: var(--font-secondary, "Inter", sans-serif);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-secondary, #aaa7ab);
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet (≤ 960px and > 768px): Scale spacing */
@media (max-width: 960px) and (min-width: 769px) {
  .zigzag-section-body {
    padding: 36px 24px;
  }
  .zigzag-timeline-wrap {
    padding-right: 32px;
  }
  .zigzag-grid {
    column-gap: 20px;
    row-gap: 48px;
  }
  .zigzag-card-box {
    padding: 18px 16px;
    min-height: 150px;
  }
  .zigzag-step-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .zigzag-step-desc {
    font-size: 12.5px;
    line-height: 1.6;
  }
}

/* Mobile (≤ 768px): Clean Vertical Sequence */
@media (max-width: 768px) {
  .zigzag-section-body {
    padding: 28px 20px;
  }

  .zigzag-heading-group {
    margin-bottom: 36px;
  }

  .zigzag-timeline-wrap {
    padding-right: 0;
  }

  /* Hide desktop SVG canvas */
  .zigzag-svg-canvas {
    display: none;
  }

  /* Single Column Stack */
  .zigzag-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    padding-left: 54px;
  }

  /* Reset grid placement to natural DOM order */
  .zigzag-step[data-step] {
    grid-column: auto;
    grid-row: auto;
  }

  /* Continuous Vertical Dotted Line */
  .zigzag-grid::before {
    content: "";
    position: absolute;
    left: 20px; /* Center of 40px marker */
    top: 20px;
    bottom: 20px;
    width: 2px;
    border-left: 1.5px dashed rgba(232, 226, 220, 0.28);
    pointer-events: none;
    z-index: 1;
  }

  .zigzag-step {
    position: relative;
    width: 100%;
  }

  .zigzag-marker-header {
    position: static;
    margin-bottom: 0;
    height: auto;
  }

  .zigzag-marker {
    position: absolute;
    left: -54px;
    top: 14px;
    width: 40px;
    height: 40px;
    z-index: 2;
  }

  .zigzag-card-box {
    min-height: auto;
    padding: 18px 16px;
  }

  .zigzag-step-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .zigzag-step-desc {
    font-size: 13px;
  }
}
