.project-steps {
    text-align: center;
    padding: 50px var(--projects-steps-section-inline-padding) 50px;
    background: var(--projects-steps-background-color);
}

.project-steps .section-title {
    font-size: 35px;
    font-weight: 800;
    margin-bottom: 10px;
}

.project-steps .section-subtitle {
    margin-bottom: 10px;
    color: var(--muted-color);
}

.timeline {
    width: 70%;
    margin: auto;
    position: relative;
    padding-block: 30px;

    /* line in center from top to bottom */
    &:before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 5px;
        height: 100%;
        border-radius: 25px;
        background: var(--orange-color);
        transform: translateX(-50%);
    }
}

.timeline .timeline-item {
    gap: 10px;
    margin-bottom: 50px;

    & > div:nth-child(2) {
        width: auto;
        min-width: 150px;
        justify-items: center;
    }

    & > div > div {
        width: fit-content;
        text-align: center;
    }

    & > div:first-child,
    & > div:last-child {
        width: 40%;
    }

    & > div:first-child {
        text-align: end;
    }
}

.timeline .timeline-item .step-label .label {
    width: 64%;
    padding: 15px;
    font-size: 24px;
    border-radius: 12px;
    text-wrap: nowrap;
    box-shadow: 0 10px 26px rgba(244, 180, 42, 0.28);
    position: relative;
    z-index: 10;

    &:before {
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        z-index: -1;
        border-radius: inherit;
        transform: translate(-50%, -50%);
        background: var(--orange-color);
    }

    &:after {
        content: "";
        width: 30px;
        height: 30px;
        position: absolute;
        top: 50%;
        right: calc((30px / 2) * -1);
        left: auto;
        z-index: -1;
        transform: translateY(-50%) rotate(45deg);
        background: var(--orange-color);
    }

    & .arrow-icon {
        font-size: 30px;
        position: absolute;
        top: 50%;
        left: 20px;
        right: auto;
        transform: translateY(-50%) scaleX(-1);
        color: var(--light-color);
    }
}

.timeline .timeline-item {
    &:nth-child(odd) {
        flex-direction: row-reverse;
    }

    &:nth-child(even) {
        & .step-label .label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-direction: row-reverse;

            &:after {
                right: auto;
                left: calc((30px / 2) * -1);
                transform: translateY(-50%) rotate(45deg);
            }

            & .arrow-icon {
                right: 20px;
                left: auto;
            }
        }
    }
}

html[lang="en"] {
    .timeline .timeline-item .step-label .label {
        &:after {
            right: auto;
            left: calc((30px / 2) * -1);
        }

        & .arrow-icon {
            transform: translateY(-50%) scaleX(1);
        }
    }

    .timeline .timeline-item {
        &:nth-child(even) {
            & .step-label .label {
                &:after {
                    right: calc((30px / 2) * -1);
                    left: auto;
                    transform: translateY(-50%) rotate(45deg);
                }
            }
        }

        &:nth-child(even) {
            & .step-label .label {
                & .arrow-icon {
                    left: 20px;
                    right: auto;
                }
            }
        }

        &:nth-child(odd) {
            & .step-label .label {
                & .arrow-icon {
                    left: auto;
                    right: 20px;
                }
            }
        }

        /* &:nth-child(odd) .step-label .label {
            & .arrow-icon {
                left: 20px;
                right: auto;
            }
        } */
    }
}

.timeline .timeline-item .timeline-content {
    padding: 15px;
    font-size: 15px;
    line-height: 1.8;
    border-radius: 20px;
    text-align: start;
    background: var(--light-color);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.timeline .timeline-item .timeline-icon {
    width: 90px;
    height: 90px;
    min-width: 90px;
    min-height: 90px;
    display: flex;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    position: relative;
    z-index: 54;

    & i,
    & svg {
        font-size: 28px;
        color: var(--orange-color);
    }

    &:before {
        content: "";
        width: calc(100% - 30px);
        height: calc(100% - 30px);
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        z-index: -1;
        border-radius: inherit;
        transform: translate(-50%, -50%);
        background: var(--bg-text);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    }

    &:after {
        content: "";
        width: calc(100% + 15px);
        height: calc(100% + 15px);
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        z-index: -1;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        border-style: solid;
        border-width: 7px;
        border-color: var(--orange-color) var(--orange-color) transparent
            transparent;
    }
}

.timeline .timeline-item:hover .timeline-icon {
    & i,
    & svg {
        animation: scale 1s linear infinite;
    }

    &:after {
        animation: rotate 20s linear infinite;
    }
}

@keyframes scale {
    0% {
        transform: translateY(-2px) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.1);
    }

    100% {
        transform: translateY(-2px) scale(1);
    }
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(9turn);
    }
}

@media (max-width: 1440px) {
    .timeline {
        width: 90%;
    }

    .timeline .timeline-item .timeline-content {
        font-size: 18px;
    }

    .timeline .timeline-item .step-label .label {
        font-size: 20px;
    }

    .timeline .timeline-item .step-label .label {
        & .arrow-icon {
            font-size: 24px;
        }
    }
}

@media (max-width: 1180px) {
    .timeline {
        width: 100%;
    }
}

@media (max-width: 1080px) {
    .timeline .timeline-item .step-label .label {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .timeline {
        padding-inline: var(--main-inline-padding);
    }

    .timeline .timeline-item {
        margin-bottom: 100px;
        flex-direction: column !important;
    }

    .timeline .timeline-item .timeline-content {
        font-size: 12px;
    }

    .timeline .timeline-item .timeline-icon {
        margin-block: 20px;
    }

    .timeline .timeline-item .step-label .label {
        width: 200px;
        font-size: 20px;
    }

    .timeline .timeline-item {
        position: relative;
        z-index: 56;

        & > div:first-child,
        & > div:last-child {
            width: 100%;
        }
    }

    .timeline .timeline-item .timeline-icon {
        order: -1;
    }

    .timeline .timeline-item .step-label .label {
        width: 100%;
        right: auto !important;
        left: auto !important;

        &:after {
            display: none;
        }

        & i,
        & svg {
            display: none;
        }
    }
}

@media (max-width: 768px) {
    .project-steps {
        padding: 100px var(--inline-padding);
    }

    .project-steps .section-title {
        text-align: start;
        font-size: 24px;
    }

    .project-steps .section-subtitle {
        text-align: start;
        font-size: 16px;
        margin-bottom: 30px;
        color: var(--muted-color);
    }

    .timeline .timeline-item .timeline-icon {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;

        &:after {
            border-width: 5px;
        }

        & i,
        & svg {
            font-size: 20px;
        }
    }
}

@media (max-width: 768px) {
    .timeline {
        padding-inline: 0;
    }

    .faqs-section {
        & > .title {
            font-size: 18px;

            & > .title-badge {
                padding: 1px 15px;

                &::before {
                    border-radius: 7px;
                }
            }
        }
    }
}

@media (max-width: 425px) {
    .project-steps {
        padding: 50px var(--inline-padding);
    }

    .timeline {
        &:before {
            width: 3px;
        }
    }

    .timeline .timeline-item {
        gap: 0;
        margin-bottom: 50px;
    }

    .timeline .timeline-item .timeline-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        margin: 0;

        &:after {
            border-width: 3px;
        }

        & i,
        & svg {
            font-size: 12px;
        }
    }

    .timeline .timeline-item .step-label .label,
    .timeline .timeline-item .timeline-content {
        border-radius: 7px;
    }

    .timeline .timeline-item .step-label .label {
        padding: 8px;
        font-size: 12px;
    }

    .timeline .timeline-item {
        & > div:first-child {
            margin-block: 10px;
        }

        & > div:nth-child(2) {
            order: -1;
        }
    }

    .faqs-section {
        & > .title {
            font-size: 12px;
        }
    }
}
