/**
 * Rescue process stepper — #protection / .journey-stepper only.
 * Visual: level white cards + dashed wave path (reference). Auto-cycle via JS.
 */

/* —— Scenic band (header + journey + pillars) —— */
#protection.protect {
  padding-block: 0;
  background: #fff;
}
#protection .protect__scenic {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.25rem);
  background: #e8eef4;
}
#protection .protect__scenic::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #d4e0ea;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(255, 255, 255, 0.28) 14%,
      rgba(255, 255, 255, 0.08) 38%,
      rgba(255, 255, 255, 0.32) 74%,
      rgba(255, 255, 255, 0.9) 100%
    ),
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.48) 0%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 236, 210, 0.18) 100%
    ),
    url("../images/demo/opt/contact-hero-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
  /* Keep hiker / peaks visible on the right like the reference */
  background-position: center, center, 82% 38%;
}
#protection .protect__scenic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 12% 10%, rgba(255, 255, 255, 0.55) 0%, transparent 60%),
    linear-gradient(180deg, transparent 0%, transparent 85%, rgba(255, 255, 255, 0.98) 100%);
}
#protection .protect__scenic-inner {
  position: relative;
  z-index: 1;
}
#protection .protect__head {
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
  max-width: 36rem;
}
#protection .protect__head .kicker {
  color: #ff6528;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
  margin-bottom: 0.35rem;
}
#protection .protect__head h2 {
  color: var(--navy);
  font-size: clamp(1.375rem, 1.15rem + 0.85vw, 1.875rem);
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}
#protection .protect__head h2 .accent {
  color: #ff6528;
  background: none;
  -webkit-text-fill-color: currentColor;
}
#protection .protect__head p {
  margin-top: 0.5rem;
  color: #3d4b5c;
  font-size: clamp(0.875rem, 0.82rem + 0.14vw, 1rem);
  line-height: 1.45;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* —— Stepper shell —— */
#protection .journey-stepper {
  --journey-card-radius: 16px;
  --journey-panel: #fff;
  --journey-shadow: 0 8px 28px -12px rgba(11, 27, 46, 0.28);
  position: relative;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  padding-top: 0;
}

/* Hide legacy straight track on desktop; keep fill for JS progress */
#protection .journey-stepper__track {
  display: none;
}

#protection .journey-stepper__wave {
  display: none;
  pointer-events: none;
}

/* —— Cards row: ALWAYS one baseline (no zig-zag) —— */
#protection .journey-stepper .journey {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  counter-reset: none;
}

#protection .journey-stepper .journey > li {
  position: relative;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: default;
  outline: none;
  border-radius: 0;
  /* Kill legacy styles.css journey rules */
  padding-left: 0 !important;
  padding-bottom: 0 !important;
}
#protection .journey-stepper .journey > li::before {
  display: none !important;
  content: none !important;
}

#protection .journey-stepper .journey__n {
  position: relative;
  left: auto;
  top: auto;
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--navy);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(11, 27, 46, 0.12);
  transition:
    background-color 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.45s ease,
    box-shadow 0.55s ease,
    transform 0.35s ease;
}

#protection .journey-stepper .journey__card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  min-height: 0;
  padding: 18px 14px 16px;
  border-radius: var(--journey-card-radius);
  background: var(--journey-panel);
  border: 1.5px solid rgba(232, 234, 237, 0.95);
  box-shadow: var(--journey-shadow);
  transition:
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    transform 0.35s ease;
}

#protection .journey-stepper .journey__ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 101, 40, 0.1);
}
#protection .journey-stepper .journey > li:nth-child(1) .journey__ico { background: rgba(255, 101, 40, 0.12); }
#protection .journey-stepper .journey > li:nth-child(2) .journey__ico { background: rgba(90, 160, 210, 0.14); }
#protection .journey-stepper .journey > li:nth-child(3) .journey__ico { background: rgba(230, 80, 70, 0.1); }
#protection .journey-stepper .journey > li:nth-child(4) .journey__ico { background: rgba(255, 101, 40, 0.12); }
#protection .journey-stepper .journey > li:nth-child(5) .journey__ico { background: rgba(90, 120, 200, 0.12); }
#protection .journey-stepper .journey__ico img,
#protection .journey-stepper .journey__ico svg {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

#protection .journey-stepper .journey__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

#protection .journey-stepper .journey h3 {
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  transition: color 0.4s ease;
}

#protection .journey-stepper .journey p {
  margin: 0;
  color: #5b6570;
  font-size: 0.75rem;
  line-height: 1.4;
  max-width: 22ch;
}

/* Always show body copy — equal card heights, no expand zig-zag */
#protection .journey-stepper .journey__content > :not(h3) {
  overflow: visible;
  max-height: none !important;
  opacity: 1 !important;
  margin-top: 0 !important;
  visibility: visible !important;
  animation: none !important;
}

#protection .journey-stepper .journey .link-btn {
  margin-top: 4px;
  font-size: 0.6875rem;
  min-height: 28px;
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* States */
#protection .journey-stepper .journey li.is-complete .journey__n {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: none;
}
#protection .journey-stepper .journey li.is-active .journey__n {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 101, 40, 0.28);
}
#protection .journey-stepper .journey li.is-active .journey__card {
  border-color: rgba(255, 101, 40, 0.55);
  box-shadow:
    0 0 0 3px rgba(255, 101, 40, 0.16),
    0 14px 36px -14px rgba(255, 101, 40, 0.35),
    var(--journey-shadow);
}
#protection .journey-stepper .journey li.is-active h3 {
  color: var(--navy);
  font-weight: 700;
}

#protection .journey-stepper .journey li:focus-visible .journey__n {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Kill legacy hover scale from styles.css (keep centering transforms on desktop) */
#protection .journey-stepper .journey li:hover .journey__n {
  box-shadow: 0 2px 8px rgba(11, 27, 46, 0.12);
}
#protection .journey-stepper .journey li.is-active:hover .journey__n {
  box-shadow: 0 0 0 4px rgba(255, 101, 40, 0.28);
}
#protection .journey-stepper .journey li:nth-child(4) .journey__n {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
}
#protection .journey-stepper .journey li:nth-child(4).is-active .journey__n {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
#protection .journey-stepper .journey li:nth-child(4).is-complete .journey__n {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* —— Bottom pillars bar —— */
#protection .protect__pillars {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(232, 234, 237, 0.95);
  box-shadow: 0 8px 28px -14px rgba(11, 27, 46, 0.22);
}
#protection .protect__pillars > li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
#protection .protect__pillar-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ff6528;
}
#protection .protect__pillar-ico svg {
  width: 20px;
  height: 20px;
}
#protection .protect__pillars strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
#protection .protect__pillars small {
  display: block;
  margin-top: 2px;
  font-size: 0.6875rem;
  color: #5b6570;
  line-height: 1.3;
}

/* Caps sit on plain white below scenic band */
#protection .wrap > .caps {
  padding-block: clamp(2rem, 4vw, 3rem);
}

/* —— Mobile / tablet: vertical timeline (reference UI) —— */
@media (max-width: 899px) {
  #protection .protect__scenic {
    background: #f5f6f8;
    padding-block: clamp(1.75rem, 5vw, 2.5rem);
  }
  #protection .protect__scenic::before,
  #protection .protect__scenic::after {
    display: none;
  }
  #protection .protect__head {
    margin-bottom: 1.5rem;
    max-width: none;
  }
  #protection .protect__head h2 {
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    line-height: 1.2;
  }
  #protection .protect__head h2 .accent {
    color: inherit;
  }
  #protection .protect__head p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #3d4b5c;
    text-shadow: none;
    max-width: 36ch;
  }

  #protection .journey-stepper {
    margin-bottom: 1.5rem;
    padding-left: 0;
  }

  /* Vertical rail behind numbered badges */
  #protection .journey-stepper__track {
    display: block;
    position: absolute;
    left: 17px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 101, 40, 0.28);
    z-index: 0;
    overflow: hidden;
  }
  #protection .journey-stepper__fill {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    background: #ff6528;
    border-radius: inherit;
    transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #protection .journey-stepper .journey {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  #protection .journey-stepper .journey > li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    padding: 0 0 22px !important;
    cursor: pointer;
  }
  #protection .journey-stepper .journey > li:last-child {
    padding-bottom: 0 !important;
  }

  #protection .journey-stepper .journey__n {
    width: 36px;
    height: 36px;
    margin: 0;
    font-size: 0.875rem;
    border-width: 1.5px;
    border-color: #1a2b3c;
    background: #fff;
    color: #1a2b3c;
    box-shadow: none;
    z-index: 2;
  }

  #protection .journey-stepper .journey__card {
    display: block;
    padding: 2px 0 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
  }

  #protection .journey-stepper .journey__ico {
    display: none;
  }

  #protection .journey-stepper .journey__content {
    align-items: flex-start;
    gap: 6px;
    text-align: left;
  }

  #protection .journey-stepper .journey h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f1c2a;
    line-height: 1.3;
    padding-top: 6px; /* optically center with 36px badge */
  }

  /* Accordion: only active step shows body */
  #protection .journey-stepper .journey__content > :not(h3) {
    display: none !important;
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
  }
  #protection .journey-stepper .journey li.is-active .journey__content > :not(h3) {
    display: block !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 0 !important;
  }
  #protection .journey-stepper .journey li.is-active .journey__content > .link-btn {
    display: inline-flex !important;
    margin-top: 4px !important;
  }

  #protection .journey-stepper .journey p {
    max-width: none;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: #4a5563;
  }

  #protection .journey-stepper .journey .link-btn {
    font-size: 0.8125rem;
    min-height: 32px;
  }

  #protection .journey-stepper .journey li.is-complete .journey__n {
    background: #fff;
    border-color: #1a2b3c;
    color: #1a2b3c;
  }
  #protection .journey-stepper .journey li.is-active .journey__n {
    background: #ff6528;
    border-color: #ff6528;
    color: #fff;
    box-shadow: none;
    transform: none;
  }
  #protection .journey-stepper .journey li.is-active .journey__card {
    border: 0;
    box-shadow: none;
  }
  #protection .journey-stepper .journey li.is-active h3 {
    color: #0f1c2a;
  }
  #protection .journey-stepper .journey li:hover .journey__n,
  #protection .journey-stepper .journey li.is-active:hover .journey__n {
    transform: none;
    box-shadow: none;
  }
  #protection .journey-stepper .journey li:nth-child(4) .journey__n,
  #protection .journey-stepper .journey li:nth-child(4).is-complete .journey__n {
    background: #fff;
    border-color: #1a2b3c;
    color: #1a2b3c;
  }
  #protection .journey-stepper .journey li:nth-child(4).is-active .journey__n {
    background: #ff6528;
    border-color: #ff6528;
    color: #fff;
  }
}

@media (min-width: 640px) {
  #protection .protect__pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 16px 8px;
  }
  #protection .protect__pillars > li {
    padding: 4px 14px;
  }
  #protection .protect__pillars > li + li {
    border-left: 1px solid rgba(232, 234, 237, 0.95);
  }
}

/* Desktop: 5 equal cards on ONE horizontal baseline + wave path */
@media (min-width: 900px) {
  #protection .journey-stepper__track {
    display: none;
  }

  #protection .journey-stepper {
    padding-top: 8px;
  }

  #protection .journey-stepper__wave {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 78px;
    z-index: 2;
    overflow: visible;
  }
  #protection .journey-stepper__wave-line {
    stroke: #ff6528;
    stroke-width: 2.4;
    stroke-dasharray: 5 7;
    opacity: 0.95;
  }
  #protection .journey-stepper__arrow,
  #protection .journey-stepper__pin {
    pointer-events: none;
  }

  #protection .journey-stepper .journey {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    /* Keep column centers ≈ 10/30/50/70/90% so wave extrema hit badges */
    gap: 0;
    column-gap: 0;
    align-items: stretch; /* cards share ONE baseline — no zig-zag */
    padding-top: 60px; /* room for wave + badges + pin */
  }

  #protection .journey-stepper .journey > li {
    align-items: stretch;
    height: 100%;
    padding-inline: clamp(5px, 0.6vw, 8px);
  }

  /*
   * Badges centered on wave extrema (viewBox peaks y=26 / troughs y=58,
   * mapped into 78px wave + 60px list padding). Cards stay flush.
   */
  #protection .journey-stepper .journey__n {
    position: absolute;
    left: 50%;
    top: -62px;
    margin: 0;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
  }
  #protection .journey-stepper .journey > li:nth-child(odd) .journey__n {
    top: -62px; /* peak y=26 → line through circle center */
  }
  #protection .journey-stepper .journey > li:nth-child(even) .journey__n {
    top: -34px; /* trough y=58 → line through circle center */
  }
  #protection .journey-stepper .journey li.is-complete .journey__n,
  #protection .journey-stepper .journey li:hover .journey__n {
    transform: translateX(-50%);
  }
  #protection .journey-stepper .journey li.is-active .journey__n,
  #protection .journey-stepper .journey li.is-active:hover .journey__n {
    transform: translateX(-50%) scale(1.08);
  }

  #protection .journey-stepper .journey__card {
    height: 100%;
    min-height: 188px;
    padding: 20px 12px 16px;
  }

  #protection .protect__pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 18px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #protection .journey-stepper .journey__n,
  #protection .journey-stepper .journey__card,
  #protection .journey-stepper .journey h3,
  #protection .journey-stepper__fill {
    transition: none !important;
  }
  #protection .journey-stepper .journey li.is-active .journey__n {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) and (min-width: 900px) {
  #protection .journey-stepper .journey li.is-active .journey__n {
    transform: translateX(-50%);
  }
}
