/**
 * Career Ladder (Progression Steps) Element - UX Builder
 * Category: A Elements
 */

.a-career-ladder {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
}

.a-ladder-track {
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

/* Optional 3D Bottom Slant Curve */
.a-career-ladder.has-bottom-slant .a-ladder-track {
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 22px), 0% 100%);
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 22px), 0% 100%);
}

/* Individual Ladder Pillar / Step */
.a-ladder-step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--a-ladder-bg, rgba(13, 22, 44, 0.75));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--a-ladder-border, rgba(56, 189, 248, 0.18));
  border-bottom: 1px solid var(--a-ladder-border, rgba(56, 189, 248, 0.18));
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  box-sizing: border-box;
  padding: 10px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  z-index: 1;
}

/* Collapse adjacent borders */
.a-ladder-step+.a-ladder-step {
  border-left: none;
}

/* Top Neon Glow Border on each step */
.a-ladder-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--a-top-glow, #38bdf8);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  pointer-events: none;
  opacity: 0.95;
}

/* Step Hover Effect */
.a-ladder-step:hover {
  background: rgba(18, 32, 64, 0.88);
  z-index: 3;
  box-shadow: 0 -4px 25px rgba(56, 189, 248, 0.22),
    0 12px 30px rgba(0, 0, 0, 0.4);
}

.a-ladder-step:hover::before {
  opacity: 1;
  box-shadow: 0 0 22px 4px var(--a-top-glow, #38bdf8),
    0 -3px 12px var(--a-top-glow, #38bdf8);
}

/* Icon Area */
.a-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.a-step-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  stroke: #ffffff;
  fill: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.a-step-icon img {
  max-width: 44px;
  max-height: 44px;
  display: block;
  object-fit: contain;
}

.a-ladder-step:hover .a-step-icon {
  transform: translateY(-3px) scale(1.06);
}

/* Number */
.a-step-num {
  font-family: inherit;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--a-step-color, #38bdf8);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  user-select: none;
}

/* Title */
.a-step-title {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a-step-color, #38bdf8);
  margin: 0 0 5px 0;
  min-height: 42px;
  word-wrap: break-word;
}

/* Bullet List */
.a-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.a-step-list li {
  position: relative;
  padding-left: 15px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
  font-weight: 400;
  word-wrap: break-word;
  margin: 0 !important;
}

.a-step-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: -1px;
  font-size: 14px;
  line-height: 1.4;
  color: #94a3b8;
}

/* Heights for desktop (Staircase) */
@media (min-width: 861px) {
  .a-ladder-step-1 {
    height: var(--a-s1-h, 430px);
  }

  .a-ladder-step-2 {
    height: var(--a-s2-h, 490px);
  }

  .a-ladder-step-3 {
    height: var(--a-s3-h, 550px);
  }

  .a-ladder-step-4 {
    height: var(--a-s4-h, 610px);
  }
}

/* Responsive for Tablet / Mobile */
@media (max-width: 860px) {
  .a-ladder-track {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .a-career-ladder.has-bottom-slant .a-ladder-track {
    clip-path: none;
    -webkit-clip-path: none;
  }

  .a-ladder-step {
    height: auto !important;
    min-height: auto;
    border: 1px solid var(--a-ladder-border, rgba(56, 189, 248, 0.25));
    border-radius: 12px;
    padding: 22px 18px 24px 18px;
  }

  .a-ladder-step+.a-ladder-step {
    border-left: 1px solid var(--a-ladder-border, rgba(56, 189, 248, 0.25));
  }

  .a-ladder-step::before {
    border-radius: 12px 12px 0 0;
  }

  .a-step-title {
    min-height: auto;
    margin-bottom: 14px;
  }
}