/* Timeline Section */
.timeline-section {
    padding: 5rem 0;
    background: var(--bg-color);
    min-height: 100vh;
    /* Ensure section is tall enough for all steps */
}

/* Dark Mode Styles */
[data-theme="dark"] .step .content h3,
[data-theme="dark"] .step .content p {
    color: #ffffff;
}

.timeline-container {
    position: relative;
    padding-left: 3rem;
}

.timeline {
    position: relative;
}

/* Progress Line */
.progress-line {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    width: 0.25rem;
    height: 0;
    background: var(--benefit-active-bg);
    /* Uses #d7942e */
    transition: height 0.5s ease-in-out;
}

/* Steps */
.step {
    display: flex;
    align-items: center;
    margin-bottom: 3.75rem;
    position: relative;
    opacity: 0.3;
    transform: translateY(1.25rem);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Icons */
.step .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--benefit-active-bg);
    /* Uses #d7942e */
    color: var(--benefit-active-text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.125rem;
    margin-right: 1.25rem;
    position: relative;
    z-index: 2;
    border: 0.1875rem solid var(--bg-color);
    box-shadow: 0 0 0.5rem var(--feature-shadow);
    /* Uses rgba(215, 148, 46, 0.1) */
}

/* Dashed Line */
.step::before {
    content: "";
    position: absolute;
    left: 1.125rem;
    top: 3.125rem;
    height: 3rem;
    width: 0.25rem;
    background: var(--hero-circle);
    /* Uses rgba(215, 148, 46, 0.3) */
    z-index: 0;
}

/* Content */
.step .content {
    background: var(--pricing-card-bg);
    padding: 0.9375rem 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 0 0.3125rem var(--pricing-card-shadow);
    max-width: 31.25rem;
    transition: background 0.3s ease;
}

.step .content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.625rem;
}

.step .content p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Sticky Image */
.timeline-section .sticky {
    position: sticky;
    top: 13rem;
    /* Matches top-32 (32 * 0.25rem = 8rem) */
    width: 100%;
    max-width: 500px;
    height: 350px;
    overflow: hidden;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 0.625rem var(--pricing-card-shadow);
}

.timeline-section .sticky img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Changed from 'contain' to 'cover' to fill the container */
    object-position: center;
    /* Center the image to avoid awkward cropping */
    border-radius: 0.625rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .timeline-container {
        padding-left: 2rem;
    }

    .progress-line {
        left: 0.75rem;
    }

    .step::before {
        left: 0.625rem;
    }

    .step .icon {
        margin-right: 0.75rem;
    }

    .timeline-section .sticky {
        position: static !important;
        margin-bottom: 1.875rem;
        height: auto;
        /* Allow image to scale naturally */
    }

    .timeline-section .sticky img {
        height: auto;
        /* Ensure image scales naturally on smaller screens */
        object-fit: cover;
        /* Maintain cover for consistency */
    }
}

@media (max-width: 767px) {
    .timeline-section {
        padding: 3rem 0;
        min-height: auto;
        /* Adjust for smaller screens */
    }

    .step .content h3 {
        font-size: 1.125rem;
    }

    .step .content p {
        font-size: 0.875rem;
    }

    .step .icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .step::before {
        height: 2.5rem;
    }

    .timeline-section .sticky {
        max-width: 100%;
        height: 200px;
        /* Smaller height for mobile */
    }

    .timeline-section .sticky img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Maintain cover for mobile */
    }
}

@media (max-width: 576px) {
    .timeline-section {
        padding: 2.5rem 0;
    }

    .timeline-container {
        padding-left: 1.5rem;
    }

    .progress-line {
        left: 0.5rem;
    }

    .step::before {
        left: 0.375rem;
    }

    .step .icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }

    .timeline-section .sticky {
        max-width: 100%;
        height: 200px;
        /* Smaller height for mobile */
    }

    .timeline-section .sticky img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Maintain cover for mobile */
    }
}