/* Landing roadmap (formerly view) */
.roadmap-page {
    padding: 3rem 1.5rem 3.5rem;
    background: transparent !important;
    min-height: auto !important;
    padding-bottom: 3rem !important;
    background-color: #f3f4f6;
}

.roadmap-page .roadmap-content {
    padding-top: 1.75rem;
}

.roadmap-image {
    margin-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1100px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.roadmap-header {
    margin-bottom: 1.5rem;
}

.roadmap-kicker {
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0e7490;
}

.roadmap-title {
    font-weight: 800;
    color: #0f172a;
}

.roadmap-image-block {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background-color: #f8fafc;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    padding: 0;
}

.roadmap-step-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
}

.roadmap-step-card {
    background: #ffffff;
    border: 1px solid #e6edf5;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 28px rgba(12, 126, 160, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.roadmap-step-card.roadmap-step-only {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
}

.roadmap-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(12, 126, 160, 0.12);
}

.roadmap-step-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.roadmap-step-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 12px;
    background: #e9f6ff;
    color: #0c7ea0;
    font-weight: 700;
    font-size: 0.9rem;
}

.roadmap-step-type {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f5f9;
    color: #6b7a90;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.roadmap-step-body {
    gap: 12px;
    margin-bottom: 10px;
}

.roadmap-step-icon {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}



.roadmap-step-icon-start {
    width: 100px;
    height: 60px;
    background-size: cover;
    background-repeat: no-repeat;
    border: 0;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
    transform: scale(var(--roadmap-start-scale, 0.9));
    transform-origin: center;
    animation: roadmap-start-pulse 2.4s ease-in-out infinite;
    will-change: transform;
}

.roadmap-nextstep-0 {
    position: absolute;
    top: 69.5%;
    left: -15%;
}

.roadmap-certificate-0 {
    position: absolute;
    top: 77%;
    left: -40%;
}

.roadmap-certificate-1 {
    position: absolute;
    top: 76%;
    left: 51%;
}

.roadmap-nextstep-0 .roadmap-step-icon-next {
    width: 100px;
    height: 45px;
    background-size: cover;
    background-repeat: no-repeat;
    border: 0;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
}

.roadmap-step-icon-next {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #e6edf5;
    background-color: #eef3f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
}

.roadmap-step-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    padding: 4px;
    border-radius: 999px;
    position: relative;
    pointer-events: auto;
}
.roadmap-step-link[data-roadmap-disabled="true"] {
    pointer-events: none;
    cursor: default;
}

.roadmap-step-link:focus-visible {
    outline: 2px solid #0c7ea0;
    outline-offset: 3px;
}

.roadmap-step-link:hover .roadmap-step-icon,
.roadmap-step-link:focus-visible .roadmap-step-icon {
    transform: scale(1.08);
}

.roadmap-steptype-start:hover .roadmap-step-icon-start,
.roadmap-steptype-start:focus-visible .roadmap-step-icon-start,
.roadmap-nextstep-0 .roadmap-step-link:hover .roadmap-step-icon-next,
.roadmap-nextstep-0 .roadmap-step-link:focus-visible .roadmap-step-icon-next {
    transform: scale(calc(var(--roadmap-start-scale, 0.9) * 1.08));
    animation-play-state: paused;
}

.roadmap-steptype-nextstep .roadmap-step-icon-next {
    z-index: 10;
}

.roadmap-step-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0c7ea0;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(12, 126, 160, 0.24);
}

.roadmap-icon-congrats {
    width: 80px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 700;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

 .roadmap-icon-cert,
 .roadmap-icon-cert-0,
 .roadmap-icon-cert-1 {
    width: 172px;
    height: 57px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roadmap-certificate-0 .roadmap-icon-cert {
    width: 172px;
    height: 57px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7a90;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

  .roadmap-certificate-1 .roadmap-icon-cert {
      width: 115px;
      height: 130px;
      border-radius: 12px;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      background-color: transparent;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #6b7a90;
      font-weight: 700;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

.roadmap-steps {
    position: relative;
    width: 100%;
    height: auto;
}

.roadmap-steps-columns {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 10.3% minmax(0, 1fr) 14%;
    pointer-events: auto;
    align-items: center;
    justify-items: center;
}

.roadmap-steps-normal-congrats {
    position: relative;
    height: 100%;
    width: 100%;
    pointer-events: auto;
}

.roadmap-steps-normal-congrats .roadmap-step-wrap {
    position: absolute;
    transform: translate(-50%, -50%);
}

.roadmap-steps-start,
.roadmap-steps-nextstep {
    z-index: 1;
}

.roadmap-steps-normal-congrats { grid-column: 2; }
.roadmap-steps-nextstep { grid-column: 3; height: 100%; width: 100%; position: relative; }
.roadmap-steps-nextstep .roadmap-step-wrap {
    position: absolute;
    transform: translate(-50%, -50%);
}

.roadmap-steps {
    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.roadmap-steps .roadmap-step-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 8px;
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: auto;
    flex: 0 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Example for a specific start step */
.roadmap-start-0 {
    position: absolute;
    top: 44%;
    left: 3%;
}

.roadmap-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.roadmap-group-normal,
.roadmap-group-congrats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.roadmap-group-nextstep {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}
/* Position normal steps over the background roadmap image (using zero-based group index per type). */
.roadmap-normal-0 { top: 47.5%; left: 9%; }
.roadmap-normal-1 { top: 75%; left: 14%; }
.roadmap-normal-2 { top: 71%; left: 31%; }
.roadmap-normal-3 { top: 41.8%; left: 31.8%; }
.roadmap-normal-4 { top: 41.8%; left: 52.2%; }
.roadmap-normal-5 { top: 53%; left: 68.5%; }
.roadmap-normal-6 { top: 29.5%; left: 69.5%; }
.roadmap-normal-7 { top: 29.5%; left: 89.5%; }
.roadmap-normal-8 { top: 50.5%; left: 89.5%; }
.roadmap-normal-9 { top: 50.5%; left: 78%; }

.roadmap-congrats-0 { top: 52%; left: 22%; }
.roadmap-congrats-1 { top: 53.5%; left: 43.5%; }
.roadmap-congrats-2 { top: 50%; left: 80%; }

.roadmap-step-icon.placeholder {
    font-size: 1rem;
    background-color: #e5e7eb;
    color: #6b7a90;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.roadmap-step-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #12212f;
}

.roadmap-step-text p {
    color: #6b7a90;
    font-size: 0.95rem;
}

.roadmap-step-courses {
    border-top: 1px dashed #e6edf5;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roadmap-step-courses-title {
    font-weight: 700;
    color: #12212f;
    font-size: 0.95rem;
}

.roadmap-course {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fbfd;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    text-decoration: none !important;
    color: #12212f;
}

.roadmap-course:hover {
    background: #f2f8ff;
    border-color: #d8e6f5;
}

.roadmap-course-name {
    font-weight: 700;
}

.roadmap-course-short {
    font-size: 0.9rem;
}

.roadmap-course-flags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.roadmap-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.roadmap-pill.required {
    background: #0c7ea0;
    color: #ffffff;
    border-color: #0c7ea0;
}

.roadmap-pill.optional {
    background: #eef3f7;
    color: #12212f;
    border-color: #e6edf5;
}

.roadmap-pill.locked {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.roadmap-course-empty {
    font-size: 0.95rem;
    padding: 6px 0;
}

.roadmap-empty {
    margin-top: 1rem;
}

@keyframes roadmap-start-pulse {
    0% {
        transform: scale(calc(var(--roadmap-start-scale, 0.9) * 1));
    }
    55% {
        transform: scale(calc(var(--roadmap-start-scale, 0.9) * 1.08));
    }
    100% {
        transform: scale(calc(var(--roadmap-start-scale, 0.9) * 1));
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .roadmap-image-block {
        margin-left: auto;
        margin-right: auto;
        background-size: contain;
        background-position: top center;
    }
    .roadmap-step-icon {
        width: 62px;
        height: 62px;
    }
    .roadmap-icon-congrats {
        width: 36px;
        height: 50px;
    }
    .roadmap-step-icon-start {
        width: 80px;
        height: 50px;
    }
    .roadmap-start-0 {
        position: absolute;
        top: 42%;
        left: 0%;
    }
    .roadmap-nextstep-0 .roadmap-step-icon-next {
        width: 50px;
        height: 24px;
    }
    .roadmap-nextstep-0 {
        top: 69.7%;
        left: -15%;
    }
    .roadmap-certificate-0 .roadmap-icon-cert {
        width: 100px;
        height: 34px;
    }
    .roadmap-certificate-1 .roadmap-icon-cert {
        width: 75px;
        height: 86px;
    }
    .roadmap-page {
        padding: 0 !important;
    }
}

@media (max-width: 640px) {
    .roadmap-page {
        padding: 0 0 1.25rem !important;
    }
    .roadmap-image-block {
        aspect-ratio: 16 / 9;
        background-size: contain;
    }
    .roadmap-step-icon {
        width: 33.33px;
        height: 33.33px;
    }
    .roadmap-step-icon-start {
        width: 33.33px;
        height: 20px;
        animation: none;
        will-change: auto;
    }
    .roadmap-nextstep-0 .roadmap-step-icon-next {
        width: 25px;
        height: 11px;
    }
    .roadmap-icon-congrats {
        width: 20px;
        height: 24px;
    }
    .roadmap-certificate-0 {
        position: absolute;
        top: 77%;
        left: -35%;
    }
    .roadmap-nextstep-0 {
        position: absolute;
        top: 70.1%;
        left: -15%;
    }
    .roadmap-certificate-1 {
        position: absolute;
        top: 75%;
        left: 42%;
    }
    .roadmap-certificate-0 .roadmap-icon-cert {
        width: 41.33px;
        height: 13px;
    }
    .roadmap-certificate-1 .roadmap-icon-cert {
        width: 33.33px;
        height: 38.33px;
    }
    .roadmap-start-0 {
        position: absolute;
        top: 43.5%;
        left: 3%;
    }
    .roadmap-step-badge {
        width: 13px;
        height: 13px;
        font-size: 0.5rem;
        top: -4px;
        right: -4px;
    }
    .roadmap-section-title {
        font-size: 1rem;
    }
    .roadmap-card-title {
        font-size: 1rem;
        margin-bottom: 0;
    }
    .roadmap-steps-grid {
        grid-template-columns: 1fr;
    }
}
