.how_to {
    padding: 90px 0;
    background-color: #ffff;
}

@media (max-width: 1200px) {
    .how_to {
        padding: 70px 0;
    }
}

@media (max-width: 768px) {
    .how_to {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .how_to {
        padding: 40px 15px;
    }
}

.how_to_wrapper {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

@media (max-width: 992px) {
    .how_to_wrapper {
        flex-direction: column;
        gap: 30px;
    }
}

.instructions {
    flex: 1;
    padding-right: 20px;
    width: 49%;
}

@media (max-width: 992px) {
    .instructions {
        width: 100%;
        padding-right: 0;
        order: 2;
    }
}

.instructions h2 {
    color: #000;
    font-size: 40px;
    margin-bottom: 40px;
    line-height: 1.2;
}

@media (max-width: 1200px) {
    .instructions h2 {
        font-size: 36px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .instructions h2 {
        font-size: 32px;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .instructions h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }
}

.how_to_steps_list {
    counter-reset: my-counter;
    list-style: none;
    padding: 0;
    margin: 0;
}

.buy-button {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 40px;
    background-color: #fa1b7a;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    transition: 0.5s;
    border: 2px solid #fa1b7a;
    text-align: center;
}

.buy-button:hover {
    background-color: #e0166d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(250, 27, 122, 0.3);
}

@media (max-width: 768px) {
    .buy-button {
        padding: 14px 35px;
        font-size: 18px;
        width: 100%;
        max-width: 300px;
        margin: 20px auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .buy-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100%;
    }
}

.step {
    margin-bottom: 20px;
    padding: 20px;
    border-bottom: 1px solid #fa1b7a;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    cursor: pointer;
    flex-wrap: wrap;
    transition: all 0.3s ease;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eaeaea;
}

.step:hover {
    border-color: #fa1b7a;
    box-shadow: 0 4px 12px rgba(250, 27, 122, 0.1);
}

@media (max-width: 768px) {
    .step {
        padding: 15px;
        margin-bottom: 15px;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .step {
        padding: 12px;
        margin-bottom: 12px;
    }
}

.step.active {
    background: #fa1b7a;
    border-radius: 10px;
    border-color: #fa1b7a;
    box-shadow: 0 4px 15px rgba(250, 27, 122, 0.2);
}

.step.active span {
    background-color: #fff;
}

.step.active h3 {
    color: #fff;
}

.step.active p {
    color: #fff;
}

.step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fa1b7a;
    color: #fff;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 16px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    font-weight: bold;
}

@media (max-width: 768px) {
    .step span {
        margin-right: 0;
        margin-bottom: 12px;
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 15px;
    }
}

.step.active span {
    color: #000;
}

.how_to_steps_list .step span::before {
    counter-increment: my-counter;
    content: counter(my-counter) "";
}

.step-content {
    flex: 1;
    width: calc(100% - 50px);
}

@media (max-width: 768px) {
    .step-content {
        width: 100%;
    }
}

.step h3 {
    color: rgba(0, 0, 0, .7);
    font-size: 20px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .step h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .step h3 {
        font-size: 16px;
    }
}

.step p {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 0;
    line-height: 1.6;
    color: rgba(0, 0, 0, .7);
}

@media (max-width: 768px) {
    .step p {
        font-size: 15px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .step p {
        font-size: 14px;
    }
}

.mobile_img_how {
    display: none;
    max-width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .mobile_img_how {
        display: block;
        margin: 15px auto 0;
    }
}

.image-section {
    flex: 1;
    text-align: center;
    width: 49%;
    position: relative;
}

@media (max-width: 992px) {
    .image-section {
        width: 100%;
        order: 1;
        margin-bottom: 30px;
    }
}

.image-section img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
    transition: transform 0.3s ease;
}

.image-section img:hover {
    transform: translateY(-5px);
}

@media (max-width: 992px) {
    .image-section img {
        position: static;
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .image-section img {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .image-section img {
        max-width: 100%;
    }
}

/* Дополнительные улучшения для лучшего UX */
@media (max-width: 768px) {
    .step {
        position: relative;
        padding-left: 20px;
    }
    
    .step-content {
        padding-left: 45px;
    }

    .image-section {
        display: none;
    }
}

/* Планшетная адаптация */
@media (min-width: 769px) and (max-width: 992px) {
    .instructions h2 {
        text-align: center;
    }
    
    .buy-button {
        display: block;
        margin: 30px auto 0;
    }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .how_to_wrapper {
        flex-direction: row;
    }
    
    .instructions,
    .image-section {
        width: 48%;
    }
    
    .image-section img {
        position: sticky;
        top: 20px;
    }
}

/* Анимация для лучшего UX */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step {
    animation: fadeIn 0.5s ease forwards;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
.step:nth-child(5) { animation-delay: 0.5s; }