:root {
    --journey-title-size: clamp(32px, 5vw, 48px);
    --journey-label-size: clamp(18px, 2.5vw, 24px);
    --step-depth: 30%;
    /* --step-overlap: -28%; */
}

.learning-journey-container {
    background-color: #ececf9;
    padding: clamp(20px, 4vw, 40px) 20px;
    border-radius: 20px;
    text-align: center;
    margin: 20px auto;
    width: 100%;
    max-width: 1200px;
}

.learning-journey-title {
    font-size: var(--journey-title-size);
    font-weight: 700;
    color: #4a2b7c;
    margin-bottom: 30px;
}

.learning-journey-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
}

.learning-journey-steps::-webkit-scrollbar {
    display: none;
}

.learning-journey-step {
    flex: 1;
    min-width: 180px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.learning-journey-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3; /* Consistent aspect ratio */
    overflow: hidden;
    margin-bottom: 25px;
}

.learning-journey-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LTR Interlocking Arrows */
.learning-step-learn .learning-journey-image-wrapper {
    clip-path: polygon(
        0% 0%,
        calc(100% - var(--step-depth)) 0%,
        100% 50%,
        calc(100% - var(--step-depth)) 100%,
        0% 100%
    );
}

.learning-step-understand .learning-journey-image-wrapper,
.learning-step-apply .learning-journey-image-wrapper,
.learning-step-support .learning-journey-image-wrapper {
    clip-path: polygon(
        0% 0%,
        calc(100% - var(--step-depth)) 0%,
        100% 50%,
        calc(100% - var(--step-depth)) 100%,
        0% 100%,
        var(--step-depth) 50%
    );
    margin-left: var(--step-overlap);
}

/* RTL Adjustments */
.rtl .learning-journey-steps {
    flex-direction: row-reverse;
}

.rtl .learning-step-learn .learning-journey-image-wrapper {
    clip-path: polygon(
        var(--step-depth) 0%,
        100% 0%,
        100% 100%,
        var(--step-depth) 100%,
        0% 50%
    );
    margin-left: 0;
}

.rtl .learning-step-understand .learning-journey-image-wrapper,
.rtl .learning-step-apply .learning-journey-image-wrapper,
.rtl .learning-step-support .learning-journey-image-wrapper {
    clip-path: polygon(
        var(--step-depth) 0%,
        100% 0%,
        calc(100% - var(--step-depth)) 50%,
        100% 100%,
        var(--step-depth) 100%,
        0% 50%
    );
    margin-right: var(--step-overlap);
    margin-left: 0;
}

.learning-journey-label {
    font-size: var(--journey-label-size);
    font-weight: 700;
    color: #4a2b7c;
    margin-top: 10px;
}

@media (max-width: 991px) {
    .learning-journey-step {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .learning-journey-steps {
        flex-wrap: wrap;
        gap: 30px;
        overflow: visible;
    }

    .learning-journey-step {
        flex: 0 0 calc(50% - 15px); /* 2 per row on tablets/large phones */
        max-width: none;
        min-width: 0;
    }

    .learning-journey-image-wrapper {
        clip-path: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 15px;
        aspect-ratio: 16/9; /* Better for vertical stack */
    }

    .learning-journey-label {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .learning-journey-step {
        flex: 0 0 100%; /* 1 per row on small phones */
    }

    .learning-journey-container {
        padding: 25px 15px;
    }
}
