.final_container {
    display: flex;
    justify-content: space-between;
    width: 100vw;
    background-color: rgb(232, 225, 219);
    /* Добавлено для плавности */
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

.ajax-form label {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.final_container form {
    display: flex;
    flex-direction: column;
    width: 50rem;
    gap: 30px;
    margin-top: 30px;
    font-family: Montserrat;
    /* Добавлено для плавности */
    transform: translateX(-20px);
    animation: slideIn 0.8s ease-out 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.final_container form input, .final_container form button {
    height: 70px;
    /* Добавлено для плавности */
    transition: all 0.3s ease;
}

.final_container #phone2 {
    border: 1px solid #d5d5d5;
    outline: none;
    border-radius: 7px;
    width: 100%;
    font-size: 20px;
    color: black;
    padding: 0.8rem;
    box-shadow: 4px 4px 8px 10px rgba(34, 60, 80, 0.1);
    /* Добавлено для плавности */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.final_container #phone2:focus {
    /* Добавлено для плавности */
    box-shadow: 4px 4px 8px 10px rgba(34, 60, 80, 0.2);
    border-color: rgb(23, 93, 131);
}

.final_container .final_first_p {
    margin-bottom: 30px;
}

.final_container p {
    text-align: left;
    color: rgb(27, 25, 26);
    font-size: 22px;
    margin-top: 20px;
}

.final_inner_container {
    padding: 50px;
}

.final_text_with_image {
    display: flex;
    /* Добавлено для плавности */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.final_text_with_image img {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    /* Добавлено для плавности */
    transition: transform 0.3s ease;
}

.final_text_with_image img:hover {
    transform: scale(1.05);
}

.final_text_with_image p {
    font-size: 28px;
    margin: 0;
    align-self: center;
}

.final_image_container img {
    width: 400px;
    height: 100%;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    /* Добавлено для плавности */
    opacity: 0;
    animation: fadeInRight 0.8s ease-out 0.7s forwards;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.final_line {
    display: none;
}

/* Медиазапросы с плавными переходами */
@media (max-width: 1037px) {
    .final_container {
        flex-direction: column;
        /* Добавлено для плавности */
        transition: flex-direction 0.5s ease;
    }

    .final_line {
        display: block;
        color: rgb(27, 25, 26);
        font-size: 70px;
        font-weight: bold;
        /* Добавлено для плавности */
        animation: fadeIn 0.8s ease;
    }

    .final_image_container img {
        border-radius: 15px;
        margin-bottom: 20px;
        /* Добавлено для плавности */
        transition: all 0.5s ease;
    }

    .final_image_container {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
}

@media (max-width: 588px) {
    .final_container form {
        width: 29rem;
        /* Добавлено для плавности */
        transition: width 0.5s ease;
    }

    .final_image_container img {
        width: 300px;
        /* Добавлено для плавности */
        transition: width 0.5s ease;
    }

    .final_inner_container {
        padding-left: 20px;
        /* Добавлено для плавности */
        transition: padding 0.5s ease;
    }

    .final_container p {
        font-size: 19px;
        /* Добавлено для плавности */
        transition: font-size 0.3s ease;
    }
}
