/* assets/css/timeline.css */

:root {
    --card-color: #fddc7a;
    --line-color: #3a3d53;
    --text-color: #3a3d53;
    --progress-track: #e0dcd3;
}

.timeline-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.timeline-row.space-between {
    justify-content: space-between;
}

.timeline-card {
    background-color: var(--card-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card-content h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.progress-circle {
    width: 50px;
    height: 50px;
    position: relative;
    flex-shrink: 0; /* Prevents circle from shrinking */
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-track {
    stroke: var(--progress-track);
}

.progress-value {
    stroke: var(--line-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.connector {
    width: 100%;
    height: 120px;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
}

.connector svg {
    width: 100%;
    height: 100%;
}

.connector-path {
    stroke: var(--line-color);
    stroke-width: 3px;
    fill: none;
    transition: stroke-dashoffset 2s cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    .timeline-row, 
    .timeline-row.space-between {
        flex-direction: column; /* Stack all cards vertically */
        align-items: center;   /* Center them horizontally */
        gap: 2rem;             /* Increase the gap between cards in the same row */
        margin-bottom: 0;      /* Remove bottom margin as gap is used now */
    }

    .timeline-card {
        width: 90%; /* Make cards wider on mobile */
        max-width: 400px; /* Set a max-width for larger mobile screens */
    }

    .connector {
        height: 80px; /* Reduce the space between rows */
        margin-top: 0;
        margin-bottom: 2rem;
    }
    
    /* Hide the complex curved connectors on mobile */
    .connector svg {
        display: none;
    }
    
    /* Replace with a simple vertical line */
    .connector::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
        background-color: var(--line-color);
        height: 0; /* Start with height 0 */
        transition: height 1s linear; /* Animate the height */
    }

    /* Animate the line when the connector becomes visible */
    .connector.is-visible::before {
         height: 100%;
    }
}

@media (max-width: 480px) {
    .card-content h3 {
        font-size: 1rem; /* Slightly smaller font for small devices */
    }
    .timeline-card {
        padding: 1rem;
    }
}
