.steps-section {
    background: url("../images/simple-steps-bg.webp") center/cover no-repeat;
    padding: 60px 20px;
    text-align: center;
    color: white;
    width: 100%;
    overflow: hidden;
}

.steps-title,
.steps-subtitle {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 1s ease, transform 1s ease;
}

.steps-title.active,
.steps-subtitle.active {
    opacity: 1;
    transform: translateX(0);
}

.steps-title {
    font-size: 2.4rem;
    font-weight: normal;
    font-style: italic;
    color: white;
    margin-bottom: 10px;
}

.steps-subtitle {
    font-size: 2.8rem;
    font-weight: bold;
    font-style: italic;
    color: white;
    margin-bottom: 50px;
}

.steps-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px; 
    width: 100%;
    flex-wrap: nowrap; 
    padding: 0 20px;
}

.step-item {
    text-align: center;
    flex: 1 1 20%; 
    max-width: 20%; 
}

.step-item img,
.step-item h4,
.step-item p {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.step-item.active img {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.step-item.active h4 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.step-item.active p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.step-item img {
    width: 200px;
    height: auto;
    margin-top: 80px;
    margin-bottom: 15px;
    transition: transform 0.6s ease-in-out;
}

.step-item:hover img {
    animation: spinBackAndForth 1.2s ease-in-out;
}

.step-item h4 {
    font-size: 1.6rem;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 10px;
}

.step-item p {
    font-size: 1.1rem;
    max-width: 280px;
    margin: 0 auto;
}

.step-divider {
    width: 45px;
    height: auto;
    background: none;
    content: url("../images/simple-steps-intersection.png");
}

@keyframes spinBackAndForth {
    0% {
        transform: rotate(0deg);
    }
    40% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@media (max-width: 991px) {
    .steps-title {
        font-size: 2rem;
    }

    .steps-subtitle {
        font-size: 2.2rem;
    }

    .steps-grid {
        flex-wrap: wrap; 
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0;
    }

    .step-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .step-item img {
        width: 180px;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .step-item h4 {
        font-size: 1.8rem;
    }

    .step-item p {
        font-size: 1.2rem;
    }

    .step-divider {
        display: none;
    }
}

@media (max-width: 576px) {
    .steps-title {
        font-size: 1.8rem;
    }

    .steps-subtitle {
        font-size: 2rem;
    }

    .step-item img {
        width: 150px;
        margin-top: 30px; 
        margin-bottom: 15px;
    }

    .step-item h4 {
        font-size: 1.5rem;
    }

    .step-item p {
        font-size: 0.95rem;
        max-width: 90%;
    }
}
