/* JuntoVerse Visual Spanish Learning Roadmap */
/* Dedicated page styling. Existing pages remain unaffected. */

body:has(.jvr-journey) .jv2-hero {
    padding-top: 52px;
    padding-bottom: 24px;
}

body:has(.jvr-journey) .jv2-hero h1 {
    max-width: 900px;
    font-size: clamp(2.7rem, 5.5vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

body:has(.jvr-journey) .jv2-hero p {
    max-width: 750px;
}

body:has(.jvr-journey) .jv2-panel {
    border-color: rgba(148, 183, 237, .23);
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(105, 234, 214, .055),
            transparent 42%
        ),
        linear-gradient(145deg, #172344, #101a34 85%);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
}

body:has(.jvr-journey) .jv2-stat {
    min-width: 0;
    background: rgba(8, 17, 39, .48);
    border: 1px solid rgba(148, 183, 237, .14);
    padding: 18px;
}

body:has(.jvr-journey) .jv2-stat strong {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    overflow-wrap: anywhere;
}

#roadmap-progress {
    margin: 22px 0 14px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(8, 17, 39, .65);
    border: 1px solid rgba(148, 183, 237, .18);
}

#roadmap-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #aa8dff,
        #69ead6,
        #ffad98
    );
    transition: width .8s ease;
}

.jvr-journey {
    position: relative;
    max-width: 1040px;
    margin: 45px auto 55px;
    padding-left: 92px;
}

.jvr-journey::before {
    content: "";
    position: absolute;
    top: 65px;
    bottom: 65px;
    left: 37px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        #aa8dff,
        #69ead6 35%,
        #ffad98 68%,
        #aa8dff
    );
    opacity: .65;
}

.jvr-stage {
    --stage-color: #aa8dff;
    position: relative;
    margin: 0 0 30px;
    padding: 30px;
    border-radius: 24px;
    transition:
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

.jvr-stage:nth-child(2) {
    --stage-color: #69ead6;
}

.jvr-stage:nth-child(3) {
    --stage-color: #ffad98;
}

.jvr-stage:nth-child(4) {
    --stage-color: #bba5ff;
}

.jvr-stage:nth-child(5) {
    --stage-color: #7ce3b5;
}

.jvr-stage::before {
    content: "";
    position: absolute;
    top: 35px;
    left: -76px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid var(--stage-color);
    background: #101a34;
    box-shadow:
        0 0 0 7px #090e20,
        0 0 24px rgba(105, 234, 214, .15);
    z-index: 1;
}

.jvr-stage::after {
    content: "";
    position: absolute;
    top: 56px;
    left: -34px;
    width: 34px;
    height: 2px;
    background: var(--stage-color);
    opacity: .55;
}

.jvr-stage:hover {
    transform: translateY(-2px);
    border-color: var(--stage-color);
}

.jvr-stage > .jv2-kicker {
    color: var(--stage-color);
    letter-spacing: .14em;
}

.jvr-stage > h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 8px 0;
    letter-spacing: -.025em;
}

.jvr-stage > p {
    max-width: 700px;
    margin-bottom: 24px;
}

.jvr-stage.is-complete {
    border-color: rgba(105, 234, 214, .5);
}

.jvr-stage.is-complete::before {
    background: #69ead6;
    box-shadow:
        0 0 0 7px #090e20,
        0 0 25px rgba(105, 234, 214, .4);
}

.jvr-stage.is-current {
    border-color: var(--stage-color);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, .18),
        0 0 28px rgba(105, 234, 214, .07);
}

.jvr-milestones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.jvr-milestone {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 19px;
    border: 1px solid rgba(148, 183, 237, .18);
    border-radius: 17px;
    background: rgba(8, 17, 39, .42);
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.jvr-milestone:hover {
    background: rgba(105, 234, 214, .045);
    border-color: rgba(105, 234, 214, .45);
    transform: translateY(-2px);
}

.jvr-milestone.is-earned {
    border-color: rgba(105, 234, 214, .38);
    background:
        linear-gradient(
            145deg,
            rgba(105, 234, 214, .11),
            rgba(8, 17, 39, .42)
        );
}

.jvr-milestone-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(170, 141, 255, .13);
    color: #cbbaff;
    font-size: 1.45rem;
}

.jvr-milestone.is-earned .jvr-milestone-icon {
    color: #69ead6;
    background: rgba(105, 234, 214, .14);
}

.jvr-milestone h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.jvr-milestone p {
    margin: 0;
    color: #b7c8e7;
    font-size: .88rem;
    line-height: 1.55;
}

.jvr-milestone-status {
    margin-top: auto;
    color: #aab9d5;
    font-size: .79rem;
    font-weight: 700;
}

.jvr-milestone.is-earned .jvr-milestone-status {
    color: #69ead6;
}

.jvr-mini-progress {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 183, 237, .15);
}

.jvr-mini-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--stage-color);
    transition: width .6s ease;
}

.jvr-milestone .jv2-btn {
    margin-top: 4px;
    align-self: flex-start;
    padding: 8px 12px;
    font-size: .82rem;
}

body:has(.jvr-journey) a:focus-visible,
body:has(.jvr-journey) button:focus-visible {
    outline: 3px solid #69ead6;
    outline-offset: 4px;
}

@media (max-width: 900px) {
    .jvr-milestones {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .jvr-journey {
        padding-left: 43px;
        margin-top: 30px;
    }

    .jvr-journey::before {
        left: 12px;
        width: 3px;
    }

    .jvr-stage {
        padding: 20px;
        margin-bottom: 22px;
    }

    .jvr-stage::before {
        left: -42px;
        top: 31px;
        width: 24px;
        height: 24px;
        border-width: 3px;
        box-shadow: 0 0 0 5px #090e20;
    }

    .jvr-stage::after {
        left: -18px;
        top: 44px;
        width: 18px;
    }

    .jvr-milestones {
        grid-template-columns: 1fr;
    }

    .jvr-milestone {
        padding: 17px;
    }

    body:has(.jvr-journey) .jv2-stats {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jvr-stage,
    .jvr-milestone,
    #roadmap-progress-fill,
    .jvr-mini-progress > span {
        transition: none !important;
        transform: none !important;
    }
}
/* Phase 7 Step 411: roadmap next step and stage clarity */
.jvr-next{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;margin-top:26px;padding:22px;border:1px solid rgba(105,234,214,.35);border-radius:22px;background:linear-gradient(115deg,rgba(105,234,214,.10),rgba(170,141,255,.10));}
.jvr-next-symbol{display:grid;place-items:center;width:54px;height:54px;border-radius:18px;background:rgba(105,234,214,.15);color:#69ead6;font-size:28px;}
.jvr-next-copy{min-width:0}.jvr-next-copy h3{font-size:clamp(1.25rem,2.3vw,1.65rem);margin:7px 0}.jvr-next-copy p{margin:0 0 7px;max-width:60ch}.jvr-next-progress{font-size:.87rem;color:#b9f5e9;font-weight:700}.jvr-next .jv2-btn{white-space:normal;text-align:center}
.jvr-stage-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;justify-content:space-between;margin:-7px 0 22px;color:#cad5ed;font-size:.88rem}
.jvr-stage-pill{padding:6px 11px;border:1px solid rgba(148,183,237,.3);border-radius:999px;background:rgba(10,20,43,.55);font-weight:700;color:#d6e1fb}
.jvr-stage.is-current .jvr-stage-pill{color:#b9f5e9;border-color:rgba(105,234,214,.5)}
.jvr-stage.is-complete .jvr-stage-pill{color:#b9f5e9}
@media(max-width:700px){.jvr-next{grid-template-columns:1fr;padding:18px;gap:12px}.jvr-next-symbol{width:42px;height:42px;border-radius:14px}.jvr-next .jv2-btn{width:100%}.jvr-stage-meta{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.jvr-next *{transition:none!important}}
