/* ==========================================================================
   WILA Journey Timeline — scoped entirely under .wila-journey-timeline
   No global resets, no body/*, no external fonts/icons loaded here.
   ========================================================================== */

.wila-journey-timeline {
    --wila-jt-dark: #1B3A0A;
    --wila-jt-green: #8DC63F;
    --wila-jt-gold: #D4A843;
    --wila-jt-progress-start: #8DC63F;
    --wila-jt-progress-end: #D4A843;
    --wila-jt-active-scale: 1.15;
    position: relative;
    font-family: inherit;
}

.wila-journey-timeline .wila-jt-mobile {
    display: none;
}

/* ===== DESKTOP ===== */
.wila-journey-timeline .wila-jt-desktop {
    position: relative;
    padding-top: 10px;
}

.wila-journey-timeline .wila-jt-track {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.wila-journey-timeline .wila-jt-progress-rail {
    position: absolute;
    top: 26px;
    left: 30px;
    right: 30px;
    height: 5px;
    background: #e5e9e8;
    border-radius: 8px;
    z-index: 0;
    overflow: visible;
}

.wila-journey-timeline .wila-jt-progress-fill {
    height: 100%;
    width: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--wila-jt-progress-start), var(--wila-jt-progress-end));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease-out;
    position: relative;
    box-shadow: 0 0 12px rgba(141, 198, 63, 0.25);
    will-change: transform;
}

.wila-journey-timeline .wila-jt-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 13px;
    height: 13px;
    background: var(--wila-jt-progress-end);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(212, 168, 67, 0.5);
    border: 2px solid #fff;
}

.wila-journey-timeline .wila-jt-step {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font: inherit;
    transition: transform 0.25s ease;
    z-index: 1;
}

.wila-journey-timeline .wila-jt-step:hover {
    transform: translateY(-3px);
}

.wila-journey-timeline .wila-jt-step:focus-visible {
    outline: 2px solid var(--wila-jt-green);
    outline-offset: 4px;
    border-radius: 8px;
}

.wila-journey-timeline .wila-jt-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin: 0 auto 10px auto;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 3px solid transparent;
    background: #eef2ef;
    color: #6B7280;
}

.wila-journey-timeline .wila-jt-color-dark { background: var(--wila-jt-dark); color: #fff; }
.wila-journey-timeline .wila-jt-color-green { background: var(--wila-jt-green); color: #fff; }
.wila-journey-timeline .wila-jt-color-gold { background: var(--wila-jt-gold); color: #1B3A0A; }
.wila-journey-timeline .wila-jt-color-inactive { background: #eef2ef; color: #b0b8b5; }

.wila-journey-timeline .wila-jt-step.is-active .wila-jt-circle {
    transform: scale(var(--wila-jt-active-scale));
    box-shadow: 0 6px 24px rgba(27, 58, 10, 0.2);
    border-color: #fff;
}

.wila-journey-timeline .wila-jt-step.is-active .wila-jt-color-gold {
    box-shadow: 0 6px 24px rgba(212, 168, 67, 0.4);
}

.wila-journey-timeline .wila-jt-step-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: #1A2332;
    margin-bottom: 2px;
}

.wila-journey-timeline .wila-jt-step-sub {
    font-size: 0.68rem;
    color: #6B7280;
}

.wila-journey-timeline .wila-jt-panel {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2rem 2.2rem;
    box-shadow: 0 8px 32px rgba(27, 58, 10, 0.07);
    border: 1px solid #ecf0ed;
    margin-top: 2.5rem;
    min-height: 190px;
}

.wila-journey-timeline .wila-jt-panel.is-animating {
    animation: wila-jt-fade-slide 0.4s ease;
}

.wila-journey-timeline .wila-jt-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 0.25rem 0.9rem;
    border-radius: 40px;
    background: #E8F5D3;
    color: #1B3A0A;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.wila-journey-timeline .wila-jt-badge.is-gold {
    background: #F5E6C0;
    color: #7a621f;
}

.wila-journey-timeline .wila-jt-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A2332;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.wila-journey-timeline .wila-jt-panel-desc {
    color: #4a5568;
    line-height: 1.7;
    max-width: 600px;
    margin: 0;
}

.wila-journey-timeline .wila-jt-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eef2ee;
}

.wila-journey-timeline .wila-jt-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #2c3545;
}

.wila-journey-timeline .wila-jt-meta-icon {
    color: #6ba82a;
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.wila-journey-timeline .wila-jt-meta-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.wila-journey-timeline .wila-jt-panel-inner {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.wila-journey-timeline .wila-jt-panel-content {
    flex: 1 1 auto;
    min-width: 0;
}

.wila-journey-timeline .wila-jt-panel-image {
    flex: 0 0 auto;
    width: 200px;
    max-width: 34%;
}

.wila-journey-timeline .wila-jt-panel-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(27, 58, 10, 0.14);
}

@media (max-width: 767px) {
    .wila-journey-timeline .wila-jt-panel-inner.has-image {
        flex-direction: column-reverse;
    }

    .wila-journey-timeline .wila-jt-panel-image {
        width: 100%;
        max-width: 100%;
    }

    .wila-journey-timeline .wila-jt-panel-image img {
        aspect-ratio: 16 / 9;
    }
}

@keyframes wila-jt-fade-slide {
    0% { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== MOBILE ===== */
.wila-journey-timeline .wila-jt-mobile-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.wila-journey-timeline .wila-jt-mobile-scroll::-webkit-scrollbar {
    width: 3px;
}

.wila-journey-timeline .wila-jt-mobile-scroll::-webkit-scrollbar-track {
    background: #eef2ef;
    border-radius: 10px;
}

.wila-journey-timeline .wila-jt-mobile-scroll::-webkit-scrollbar-thumb {
    background: var(--wila-jt-green);
    border-radius: 10px;
}

.wila-journey-timeline .wila-jt-mobile-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 32px;
    padding-bottom: 4px;
}

.wila-journey-timeline .wila-jt-mobile-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: #e5e9e8;
    border-radius: 4px;
    z-index: 0;
}

.wila-journey-timeline .wila-jt-mobile-fill {
    position: absolute;
    left: 16px;
    top: 6px;
    width: 3px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top center;
    background: linear-gradient(180deg, var(--wila-jt-progress-start), var(--wila-jt-progress-end));
    border-radius: 4px;
    z-index: 1;
    transition: transform 0.4s ease;
    will-change: transform;
}

.wila-journey-timeline .wila-jt-mobile-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 14px 10px 0;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font: inherit;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    border-left: 3px solid transparent;
}

.wila-journey-timeline .wila-jt-mobile-step:focus-visible {
    outline: 2px solid var(--wila-jt-green);
    outline-offset: 2px;
}

.wila-journey-timeline .wila-jt-mobile-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    border: 2px solid transparent;
    margin-top: 2px;
}

.wila-journey-timeline .wila-jt-mobile-title {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: #6B7280;
    line-height: 1.3;
}

.wila-journey-timeline .wila-jt-mobile-sub {
    display: block;
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.3;
}

.wila-journey-timeline .wila-jt-mobile-step.is-active {
    border-left-color: var(--wila-jt-green);
    background: rgba(141, 198, 63, 0.06);
}

.wila-journey-timeline .wila-jt-mobile-step.is-active .wila-jt-mobile-dot {
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(27, 58, 10, 0.15);
    border-color: #fff;
}

.wila-journey-timeline .wila-jt-mobile-step.is-active .wila-jt-mobile-title {
    color: #1B3A0A;
}

.wila-journey-timeline .wila-jt-mobile-panel {
    background: #fff;
    border-radius: 18px;
    padding: 1.4rem 1.4rem 1.6rem;
    box-shadow: 0 8px 28px rgba(27, 58, 10, 0.06);
    border: 1px solid #ecf0ed;
    margin-top: 1.2rem;
}

.wila-journey-timeline .wila-jt-mobile-panel.is-animating {
    animation: wila-jt-fade-slide 0.35s ease;
}

.wila-journey-timeline .wila-jt-mobile-panel :where(.wila-jt-panel-title) {
    font-size: 1.15rem;
}

.wila-journey-timeline .wila-jt-mobile-panel :where(.wila-jt-panel-desc) {
    font-size: 0.88rem;
}

.wila-journey-timeline .wila-jt-mobile-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.wila-journey-timeline .wila-jt-mobile-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e9e8;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: inline-block;
}

.wila-journey-timeline .wila-jt-mobile-dots span.is-active {
    background: var(--wila-jt-green);
    transform: scale(1.2);
}

.wila-journey-timeline .wila-jt-mobile-dots span.is-active.is-gold {
    background: var(--wila-jt-gold);
}

/* ===== RESPONSIVE SWITCH ===== */
@media (max-width: 768px) {
    .wila-journey-timeline .wila-jt-desktop {
        display: none;
    }
    .wila-journey-timeline .wila-jt-mobile {
        display: block;
    }
}

@media (min-width: 769px) {
    .wila-journey-timeline .wila-jt-mobile {
        display: none !important;
    }
}