/* ==========================================================================
   MASTERY SKILL PATH
   Hero visual: animated learning path from beginner to expert.
   Winding SVG path with 5 stations that light up sequentially.
   ========================================================================== */

/* --- Wrapper --- */
.mspath-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mastery-skillpath {
    position: relative;
    width: 440px;
    height: 580px;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.2));
}

/* --- SVG Path --- */
.mspath-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mspath-trail {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 3;
    stroke-linecap: round;
}

.mspath-line {
    fill: none;
    stroke: url(#mspath-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: var(--mspath-length, 900);
    stroke-dashoffset: var(--mspath-length, 900);
    transition: stroke-dashoffset 2.5s ease-out;
}

.mspath-line.is-animated {
    stroke-dashoffset: 0;
}

/* --- Station Circles --- */
.mspath-station {
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mspath-station.is-visible {
    opacity: 1;
    transform: scale(1);
}

.mspath-station-ring {
    fill: rgba(255, 255, 255, 0.06);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
}

.mspath-station-dot {
    fill: #1a1a2e;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.mspath-station.is-active .mspath-station-dot {
    fill: var(--donamic-primary, #63e526);
    stroke: rgba(99, 229, 38, 0.4);
}

.mspath-station-icon {
    fill: rgba(255, 255, 255, 0.3);
    transition: fill 0.3s ease;
}

.mspath-station.is-active .mspath-station-icon {
    fill: #111;
}

/* --- Station Labels --- */
.mspath-label {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.3);
    transition: fill 0.4s ease;
}

.mspath-station.is-active .mspath-label {
    fill: rgba(255, 255, 255, 0.95);
}

.mspath-sublabel {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 9px;
    font-weight: 400;
    fill: rgba(255, 255, 255, 0.15);
    transition: fill 0.4s ease;
}

.mspath-station.is-active .mspath-sublabel {
    fill: rgba(255, 255, 255, 0.5);
}

/* --- Expert Station (endpoint) --- */
.mspath-station-expert .mspath-station-dot {
    transition: fill 0.3s ease, stroke 0.3s ease, filter 0.3s ease;
}

.mspath-station-expert.is-active .mspath-station-dot {
    fill: var(--donamic-primary, #63e526);
    stroke: rgba(99, 229, 38, 0.5);
    filter: drop-shadow(0 0 12px rgba(99, 229, 38, 0.5));
}

.mspath-expert-glow {
    fill: none;
    stroke: var(--donamic-primary, #63e526);
    stroke-width: 1.5;
    opacity: 0;
}

.mspath-station-expert.is-active .mspath-expert-glow {
    animation: mspath-glow 2s ease-in-out infinite;
}

/* --- Start marker --- */
.mspath-start-badge {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 9px;
    font-weight: 700;
    fill: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mspath-end-badge {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 700;
    fill: var(--donamic-primary, #63e526);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.mspath-station-expert.is-active ~ .mspath-end-badge,
.mspath-end-badge.is-visible {
    opacity: 1;
}

/* --- Animations --- */
@keyframes mspath-glow {
    0%, 100% {
        opacity: 0;
        r: 22;
    }
    50% {
        opacity: 0.5;
        r: 30;
    }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .mastery-skillpath {
        width: 360px;
        height: 480px;
    }
}

@media (max-width: 1024px) {
    .mastery-skillpath {
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .mspath-wrap {
        display: none;
    }
}

/* --- Accessibility: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .mspath-line {
        stroke-dashoffset: 0;
        transition: none;
    }

    .mspath-station {
        opacity: 1;
        transform: scale(1);
        transition: none;
    }

    .mspath-station.is-active .mspath-station-dot {
        filter: none;
    }

    .mspath-expert-glow {
        animation: none;
        opacity: 0;
    }

    .mspath-end-badge {
        opacity: 1;
        transition: none;
    }
}
