.steps__headlines {
    margin-bottom: 35px;
}

.steps__title {
    margin-bottom: 20px;
}

.steps__wrapper {
    display: flex; 
    flex-wrap: wrap;
    margin: 0 -16px;
    row-gap: 25px;
}

.step {
    width: 100%; 
    padding: 0 16px;
    position: relative;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__col {
    position: relative;
    height: 94px;
    cursor: pointer;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__col img {
    border-radius: 10px;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.step__col::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    top: 0;
    left: 0;
    background: var(--color-bg-dark-blue);
    opacity: 0.55;
    z-index: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__hover {
    position: relative;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    z-index: 2;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__details p {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0s,
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.step__count {
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 75px;
    font-weight: 600;
    line-height: 1em;
    width: 42px;
    text-align: center;
    transform-origin: center center;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step__details {
    width: 152px;
    margin-left: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__details h4 {
    color: #FFF;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.2em;
    margin-bottom: 0;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.step__hover::after {
    content: '\e921';
    font-family: 'lyon-icon';
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translate(0, -50%);
    font-size: 20px;
    line-height: 1em;
    color: #fff;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step__col::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    top: 0;
    left: 0;
    background: var(--color-bg-light-blue);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step--active .step__col {
    height: auto;
}

.step--active .step__col::before {
    opacity: 0.3;
}

.step--active .step__col::after {
    opacity: 0.85;
}

.step--active .step__hover {
    padding: 10px 25px 25px;
}

.step--active .step__details p {
    opacity: 1;
    font-size: 16px;
    max-height: 145px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

/* Webkit scrollbar styling for step description */
.step--active .step__details p::-webkit-scrollbar {
    width: var(--scrollbar-width);
}

.step--active .step__details p::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color);
    border-radius: var(--scrollbar-border-radius);
}

.step--active .step__details p::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: var(--scrollbar-border-radius);
}

.step--active .step__details p::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover-color);
}

.step--active .step__hover::after {
    content: '\e91e';
    top: 25px;
    right: 30px;
    transform: translate(0, 0);
    color: var(--color-link);
}

.step--active .step__count {
    color: var(--color-link);
    font-size: 100px;
    width: 100%;
    text-align: left;
    margin-bottom: 0;
    transform: scale(1.02);
}

.step--active .step__details {
    width: 100%;
    margin-left: 0;
}

.step--active .step__details h4 {
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

@media (min-width: 768px) {

    .steps-homepage {
        margin-bottom: 50px;
    }
    
    .steps__headlines {
        margin-bottom: 50px;
    }

    .steps__title {
        margin-bottom: 25px;
    }

    .step__col {
        height: 92px;
    }

    .step__details {
        width: calc(100% - 42px);
        margin-left: 0;
        padding-left: 12px;
    }

    .step__details h4 {
        font-size: 38px;
    }

    .step--active .step__hover {
        padding: 68px 25px 10px 15px;
    }

    .step--active .step__count {
        font-size: 142px;
        width: 84px;
        text-align: center;
    }

    .step--active .step__details {
        width: calc(100% - 84px);
        padding-left: 0px;
    }

    .step--active .step__details h4 {
        color: var(--color-text-primary);
        margin-bottom: 6px;
        font-size: 28px;
    }

    .step--active .step__details p {
        max-height: 75px;
    }
}

@media (min-width: 1200px) {
    .steps__headlines {
        display: flex;
        align-items: flex-end;
        flex-wrap: wrap;
    }

    .steps-homepage:has(+ .logo-banner) {
        padding-bottom: 0;
    }

    .steps__bttn {
        width: 210px;
    }

    .steps__title {
        width: calc(100% - 210px);
        margin: 0;
        padding-right: 115px;
    }

    .steps--2--items .step {
        width: 45%;
    }

    .steps--3--items .step {
        width: 26.853%;
    }

    .steps--4--items .step {
        width: 17.902%;
    }

    .steps--5--items .step {
        width: 13.4265%;
    }

    .step.step--active {
        width: 46.294%;
    }

    .steps--2--items .step.step--active {
        width: 55%;
    }

    .step__col,
    .step--active .step__col {
        height: 461px;
    }

    .step__col img {
        position: relative;
    }

    .step__hover {
        position: absolute;
        padding: 0 30px 35px;
        height: auto;
        bottom: 0;
        left: 0;
        width: 100%;
    }

    .step__details {
        opacity: 0;
        width: calc(100% - 125px);
        min-width: 0;
        transform: translateY(10px);
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0s,
                    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0s,
                    width 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    }

    .step__hover::after {
        display: none;
    }

    .step__count {
        font-size: 100px;
        width: 100%;
        flex-shrink: 0;
        text-align: center;
        opacity: 0.7;
        transform: scale(1);
        transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .step__col::before {
        opacity: 0.2;
    }

    .step__details h4 {
        font-size: 38px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .step--active .step__hover {
        padding: 68px 50px 40px 20px;
        flex-direction: row-reverse;
        align-items: flex-end;
    }

    .step__hover {
        column-gap: 20px;
    }

    .step--active .step__count {
        font-size: 100px;
        text-align: right;
        width: auto;
        min-width: 80px;
        opacity: 1;
        transform: scale(1.05);
        transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
                    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .step--active .step__details {
        opacity: 1;
        width: calc(100% - 125px);
        padding-left: 0px;
        transform: translateY(0);
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
                    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
                    width 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    }

    .step--active .step__details h4 {
        font-size: 38px;
        white-space: normal;
        overflow: visible;
    }

    .step--active .step__details p {
        font-size: 18px;
        max-height: 200px;
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.35s,
                    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
    }

    .steps--innerpage .steps__title {
        padding-right: 15px;
    }
}