/* Journey Progress Bar Styles */
:root {
    --step-gold: var(--theme2);
    --step-cyan: var(--theme4);
    --step-pink: var(--theme3);
    --step-purple: var(--theme);
    --step-bg: var(--bg6);
}

.journey-progress-container {
    padding: 20px 0 0 0;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.journey-track {
    position: relative;
    height: 4px;
    background: var(--step-bg);
    border-radius: 2px;
    margin: 60px 0 40px 0; /* Increased top margin to lower the bar further */
}

.journey-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--theme); 
    box-shadow: 0 0 10px rgba(174, 134, 37, 0.3);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.milestone-list {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: -45px; /* Moved up a bit more relative to the track */
    left: 0;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.milestone-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    text-align: center;
}

.milestone-illustration {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.illustration-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(10px);
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.milestone-item.active .illustration-glow {
    opacity: 0.3;
    transform: scale(1.2);
    animation: glow-pulse 2s infinite ease-in-out;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1.1); opacity: 0.2; }
    50% { transform: scale(1.3); opacity: 0.4; }
}

.milestone-point {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    color: #adb5bd;
}

.milestone-point i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.milestone-item.completed .milestone-point {
    border-color: currentColor;
    box-shadow: 0 0 20px currentColor;
}

.milestone-item.completed .milestone-point i {
    color: #fff;
}

.milestone-label {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.milestone-item.active .milestone-label,
.milestone-item.completed .milestone-label {
    color: #fff;
    transform: translateX(-50%) translateY(2px);
}

.step-age { color: var(--theme); }
.step-disc { color: var(--theme3); }
.step-blood { color: var(--theme4); }
.step-numerology { color: var(--theme2); }
.step-final { color: var(--theme); }

/* Icon-Specific Animations */
.step-age.active i { animation: float 3s infinite ease-in-out; }
.step-disc.active i { animation: rotate-slow 8s infinite linear; }
.step-blood.active i { animation: heartbeat 1.5s infinite ease-in-out; }
.step-numerology.active i { animation: twinkle 2s infinite ease-in-out; }
.step-final.active i { animation: celebrate 0.5s infinite ease-in-out; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

@keyframes celebrate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Illustrations / Icons Backgrounds */
.milestone-point::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 1px solid transparent;
    opacity: 0;
    transition: 0.3s;
}

.milestone-item.active .milestone-point::after {
    border-color: currentColor;
    opacity: 0.5;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* Light Background Specifics */
.light-mode .milestone-point {
    background: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.light-mode .milestone-point i {
    color: #adb5bd;
}

.light-mode .milestone-label {
    color: #6b7280;
}

.light-mode .milestone-item.active .milestone-label,
.light-mode .milestone-item.completed .milestone-label {
    color: #111827;
}

.light-mode .milestone-item.active .milestone-point,
.light-mode .milestone-item.completed .milestone-point {
    background: #fff;
    border-color: currentColor;
    box-shadow: 0 4px 15px rgba(174, 134, 37, 0.15), 0 0 20px currentColor;
    color: currentColor;
    transform: scale(1.1);
}

.light-mode .milestone-item.completed .milestone-point i {
    color: currentColor;
}

/* Animations using GSAP-like classes if JS fails */
.milestone-item {
    opacity: 1; /* Keep it visible for Alpine */
    transform: translateY(0);
}

.journey-progress-container.in-view .milestone-item {
    transition: all 0.5s ease;
}

.milestone-item:nth-child(1) { animation-delay: 0.1s; }
.milestone-item:nth-child(2) { animation-delay: 0.2s; }
.milestone-item:nth-child(3) { animation-delay: 0.3s; }
.milestone-item:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .journey-progress-container {
        padding: 10px 5px;
    }
    .milestone-illustration {
        width: 60px;
        height: 60px;
    }
    .milestone-point {
        width: 45px;
        height: 45px;
    }
    .milestone-label {
        font-size: 0.7rem;
        top: 65px;
    }
}

@media (max-width: 576px) {
    .milestone-item {
        width: 20%;
    }
    .journey-track {
        margin: 50px 0 50px 0;
    }
    .milestone-list {
        top: -35px;
    }
    .milestone-illustration {
        width: 50px;
        height: 50px;
    }
    .milestone-point {
        width: 38px;
        height: 38px;
    }
    .milestone-point i {
        font-size: 1rem;
    }
    .milestone-label {
        font-size: 0.6rem;
        white-space: normal;
        top: 55px;
        width: 100%;
        line-height: 1.1;
        padding: 0 2px;
    }
    .illustration-glow {
        filter: blur(5px);
    }
}

@media (max-width: 400px) {
    .milestone-label {
        font-size: 0.5rem;
        width: 100%;
        word-break: break-word;
    }
    .milestone-point {
        width: 35px;
        height: 35px;
        border-width: 1.5px;
    }
    .milestone-point i {
        font-size: 0.9rem;
    }
}
