/* ===================================================
   VISA STEPS — Mobile first
   =================================================== */

.visa-steps {
  width: 100%;
  padding: 48px 0;
}

/* Header */

.visa-steps__header {
  text-align: center;
  margin-bottom: 2rem;
}

.visa-steps__intro {
  margin: 1rem auto 0;
  /*max-width: 48rem;*/
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(13, 21, 50, 0.7);
}

/* ===================================================
   TRACK BAR — mobile: vertical stack
   =================================================== */

.visa-steps__tracks {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.visa-steps__track-label {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  color: rgba(13, 21, 50, 0.5);
  transition: color 0.25s;
  text-align: center;
}

.visa-steps__track-label--active {
  color: #0d1532;
}

.visa-steps__track-line {
  position: relative;
  height: 2rem;
  width: 6rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visa-steps__track-line::before {
  content: "";
  width: calc(100% - 4rem);
  height: 2px;
  background: #2d2e83;
}

.visa-steps__track-node {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #5455a7;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.25s;
}

.visa-steps__track-node::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(45, 46, 131, 0.35);
  transition: background 0.25s;
}

.visa-steps__track-node--left {
  left: 0;
  border-color: #0d1532;
}

.visa-steps__track-node--left::after {
  background: linear-gradient(321.06deg, #2d2e83 -40.98%, #0d1532 157.1%);
}

.visa-steps__track-node--right {
  right: 0;
  border-color: #5455a7;
}

.visa-steps--phase-after .visa-steps__track-node--right::after {
  background: linear-gradient(321.06deg, #2d2e83 -40.98%, #0d1532 157.1%);
}

.visa-steps--phase-after .visa-steps__track-node--right {
  border-color: #0d1532;
}

.visa-steps--phase-after .visa-steps__track-node--left::after {
  background: rgba(45, 46, 131, 0.35);
}

.visa-steps--phase-after .visa-steps__track-node--left {
  border-color: #5455a7;
}

.visa-steps__track-dot {
  position: absolute;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #2d2e83;
}

/* ===================================================
   TIMELINE — mobile: single column
   =================================================== */

.visa-steps__timeline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 86.25rem;
  margin: 0 auto;
  position: relative;
}

.visa-steps__timeline[hidden] {
  display: none;
}

/* Vertical line — hidden on mobile */
.visa-steps__line {
  display: none;
}

/* Row — flex column on mobile */
.visa-steps__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Node column — hidden on mobile */
.visa-steps__center {
  display: none;
}

/* Col — full width on mobile; hide desc-only columns */
.visa-steps__col {
  width: 100%;
}

.visa-steps__col:has(.visa-steps__desc) {
  display: none;
}

/* Card */
.visa-steps__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.875rem;
  box-shadow: 0 4px 14px rgba(13, 21, 50, 0.24);
  background: linear-gradient(321deg, #2d2e83 -40.98%, #0d1532 157.1%);
  overflow: hidden;
  position: relative;
}

.visa-steps__number {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.2;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(251, 251, 251, 0.28) 0%, rgba(251, 251, 251, 0.04) 94.6%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.visa-steps__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.visa-steps__card-title {
  font-size: 1.03125rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fbfbfb;
  margin: 0;
}

.visa-steps__card-desc {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.1;
  color: #fbfbfb;
}

.visa-steps__card-desc a {
  color: inherit;
}

/* Description */
.visa-steps__desc {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(13, 21, 50, 0.5);
}

/* Node */
.visa-steps__node {
  width: 2.34375rem;
  height: 2.34375rem;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(321deg, #2d2e83 -40.98%, #0d1532 157.1%) border-box;
  position: relative;
  z-index: 1;
}

/* Middle fill — gradient at 30% opacity */
.visa-steps__node::before {
  content: '';
  position: absolute;
  inset: 0.25rem;
  border-radius: 50%;
  background: linear-gradient(321deg, rgba(45, 46, 131, 0.3), rgba(13, 21, 50, 0.3));
}

/* Center dot */
.visa-steps__node::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: linear-gradient(321deg, #2d2e83 -40.98%, #0d1532 157.1%);
}

/* ===================================================
   DESKTOP (768px+)
   =================================================== */

@media (min-width: 768px) {
  .visa-steps {
    padding: 64px 0;
  }

  /* Header */
  .visa-steps__header {
    margin-bottom: 2.5rem;
  }

  /* Track bar: horizontal */
  .visa-steps__tracks {
    gap: 1.3125rem; /* 28px × 0.75 */
    margin-bottom: 3.75rem;
  }

  .visa-steps__track-label {
    font-size: 1.59375rem; /* 34px × 0.75 */
  }

  .visa-steps__track-line {
    /* 540px × 0.75 = 405px */
    height: 2.8125rem;
    width: 25.3125rem;
  }

  .visa-steps__track-line::before {
    /* desktop: 2 × 2.8125rem nodes */
    width: calc(100% - 5.625rem);
  }

  .visa-steps__track-node {
    width: 2.8125rem; /* 45px = 60px × 0.75 */
    height: 2.8125rem;
  }

  /* Timeline: grid */
  .visa-steps__timeline {
    display: grid;
    grid-template-columns: 1fr 2.375rem 1fr;
    row-gap: 1rem;
    column-gap: 1.875rem;
  }

  /* Row: display:contents so children flow into parent grid */
  .visa-steps__row {
    display: contents;
  }

  /* Show center column — draws its segment of the vertical line */
  .visa-steps__center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  /* Line segment — z-index: 2 renders above the node (z-index: 1) */
  .visa-steps__center::before {
    content: '';
    position: absolute;
    top: -0.6rem;
    bottom: -0.5rem;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #2d2e83, #0d1532);
    z-index: 2;
  }

  /* First row: line starts at dot center */
  .visa-steps__row:nth-child(2) .visa-steps__center::before {
    top: 50%;
  }

  /* Last row: line ends at dot center */
  .visa-steps__row:last-child .visa-steps__center::before {
    bottom: 50%;
  }

  /* Col: flex container to vertically center children */
  .visa-steps__col {
    display: flex;
    align-items: center;
    width: auto;
  }

  .visa-steps__col:has(.visa-steps__desc) {
    display: flex;
  }

  /* Card: full row height */
  .visa-steps__card {
    padding: 1.575rem 1.875rem;
    gap: 1.425rem;
    width: 100%;
    flex: 1;
    min-height: unset;
    border-radius: 1.3125rem;
  }

  .visa-steps__number {
    font-size: 3.386rem;
  }

  .visa-steps__card-title {
    font-size: 1.116rem;
  }

  .visa-steps__card-desc {
    display: none;
  }

  .visa-steps__desc {
    font-size: 1.125rem;
    flex: 1;
  }

  .visa-steps__desc--right {
    text-align: right;
  }
}
