/* ============================================
   Horizontal stepper — N numbered nodes on a connector line,
   followed by a single content panel that swaps when a node is
   clicked.

     ●────●────●────●────●────●────●
     01   02   03   04   05   06   07
     Step Step Step Step Step Step Step

   Powered by tabs.js (same [data-tabs] markup contract as the
   pill tabs in tabs.css). Active node = coral fill. On hover,
   the circle + label brighten.

   Mobile (≤767px): nodes overflow horizontally with scroll-snap.
   The desktop ::before connector line is hidden — replaced by a
   background-image w/ background-attachment: local so the line
   scrolls WITH the content (the absolute ::before would stop at
   the viewport-right with overflow: auto). Mask-image gradient
   fades the edges; a "1 of N" position indicator appears below.
   ============================================ */

.gs-wgs-stepper__nodes {
  list-style: none;
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0;
  /* Cap the rail width + auto-center so the nodes don't sprawl
     when the count is small. 880px gives ~60-70px gap per segment
     for 5 nodes and tightens nicely for 7. */
  max-width: 880px;
  margin: 0 auto 3rem;
}

/* Horizontal connector line behind all nodes. The node circles
   sit on top of it (via background-color matching the section
   bg, masking the line at each node). */
.gs-wgs-stepper__nodes::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.gs-wgs-stepper__node {
  position: relative;
  z-index: 1;
  flex: 1;
}

.gs-wgs-stepper__trigger {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  transition: color 0.2s ease;
}

.gs-wgs-stepper__trigger:hover,
.gs-wgs-stepper__trigger:focus-visible {
  color: #fff;
  outline: none;
}

.gs-wgs-stepper__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* bg matches the section's dark navy so the circle masks the
     connector line behind it */
  background: var(--color-bg-dark);
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, transform 0.2s ease;
}

.gs-wgs-stepper__trigger:hover .gs-wgs-stepper__num {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.gs-wgs-stepper__trigger[aria-selected="true"] {
  color: #fff;
}

.gs-wgs-stepper__trigger[aria-selected="true"] .gs-wgs-stepper__num {
  background: var(--color-brand-accent);
  border-color: var(--color-brand-accent);
  color: #fff;
}

.gs-wgs-stepper__label {
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  text-align: center;
}

/* Position indicator — small "1 of N" hint shown only on mobile,
   below the (horizontally-scrollable) stepper. Updated by tabs.js
   when a different tab is selected. */
.gs-wgs-stepper__position {
  display: none;
  text-align: center;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 2rem;
}

/* Glass content panel below the stepper. True glass-effect card
   matching the homepage customer-logos pill recipe (rgba bg + 1px
   translucent border + 20px blur + soft shadow). Narrower max-width
   than the section's content-frame so paragraph copy doesn't span
   too wide for comfortable reading. */
.gs-wgs-stepper__panel {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 3rem 3.5rem;
}

.gs-wgs-stepper__panel[hidden] {
  display: none;
}

.gs-wgs-stepper__panel-badge {
  display: inline-block;
  background: var(--color-brand-accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  white-space: nowrap;
}

.gs-wgs-stepper__panel-title {
  font-size: var(--text-h3);
  color: #fff;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.gs-wgs-stepper__panel-desc {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-wrap: pretty;
}

.gs-wgs-stepper__panel-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gs-wgs-stepper__panel-icon {
  width: 180px;
  height: 180px;
  display: block;
}

/* ============================================
   Mobile / tablet
   ============================================ */

@media (max-width: 767px) {
  /* Nodes scroll horizontally on phones — all reachable via swipe.
     mask-image fades the left + right edges. Position indicator
     ("1 of N") becomes visible below. */
  .gs-wgs-stepper__nodes {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
    mask-image: linear-gradient(
      to right,
      transparent 0,
      black 32px,
      black calc(100% - 32px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      black 32px,
      black calc(100% - 32px),
      transparent 100%
    );

    /* Connector line — DESKTOP uses ::before, but on mobile that
       breaks because the scroll container's containing block is
       the viewport, not the scrollable content. Fix: paint the
       line via background-image w/ background-attachment: local. */
    background-image: linear-gradient(
      rgba(255, 255, 255, 0.15),
      rgba(255, 255, 255, 0.15)
    );
    background-repeat: no-repeat;
    background-position: 22px 22px;
    background-size: calc(100% - 44px) 2px;
    background-attachment: local;
  }
  .gs-wgs-stepper__nodes::-webkit-scrollbar { display: none; }

  /* Hide the desktop ::before line on mobile — bg-image above takes over. */
  .gs-wgs-stepper__nodes::before {
    display: none;
  }
  .gs-wgs-stepper__node {
    flex: 0 0 auto;
    min-width: 80px;
    scroll-snap-align: center;
  }
  .gs-wgs-stepper__position {
    display: block;
  }

  /* Panel collapses to 1-col stack: icon on TOP, content below. */
  .gs-wgs-stepper__panel {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  .gs-wgs-stepper__panel-content {
    text-align: center;
  }
  .gs-wgs-stepper__panel-media {
    order: -1;
  }
  .gs-wgs-stepper__panel-icon {
    width: 120px;
    height: 120px;
  }
}
