.contact-form-1{
    margin-bottom: 70px;
}

.contact-form-1 p {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    width: 90%;
    max-width: 1440px;
    margin: auto;
    align-items: start;
    flex-wrap: wrap;
}

.contact-form-1 input[type="text"],
.contact-form-1 input[type="tel"],
.contact-form-1 textarea {
    border-radius: 20px;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-weight: var(--W-400);
}

.contact-form-1 input[type="submit"] {
    border-radius: 20px;
    padding: 10px 20px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: var(--W-700);
    color: black;
}

.contact-form-1 input[type="submit"]::after {
    content: "→";
    font-size: 40px;
}

.wpcf7-spinner {
    background-color: unset;
}

.wpcf7-response-output{
    width: 90%;
    max-width: 1440px;
    margin: auto !important;
    margin-bottom: 10px !important;
    border-color: #9e1313 !important;
}



/*---------- form on contact page --------------*/

.contacts-page-section-2 .fields-group p{
    display: flex !important;
    flex-direction: row;
    gap: 1px;
    width: 100%;
}

.contacts-page-section-2 .contact-form-1 p{
    margin: unset;
    display: unset;
}

.contacts-page-section-2 .contact-form-1 textarea {
    width: 100%;
    margin-top: 30px;
}

.contacts-page-section-2 .contact-form-1 span {
    width: 49%;
}

.contacts-page-section-2 .contact-form-1 input[type="text"],
.contacts-page-section-2 .contact-form-1 input[type="tel"] {
    box-sizing: border-box;
    width: 100%;
}

.contacts-page-section-2 .contact-form-1 input[type="submit"] {
    margin-top: 60px;
}

.contacts-page-section-2 .wpcf7-response-output {
    width: 100%;
}

.contacts-page-section-2 .contact-form-1 {
    margin-bottom: 0;
}


/*---------------- Popup ----------------*/

#modal {
    position: fixed;
    height: calc(100vh - 250px);
    width: 100vw;
    display: flex;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-content {
    position: absolute;
    right: 0;
    left: 0;
    background: #010504;
    color: white;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.modal-content .bg-img-top,
.modal-content .bg-img-bottom {
    width: 100%;
    position: absolute;
}

.modal-content .bg-img-top {
    transform: translateY(-96%);
}

.modal-content .bg-img-bottom {
    transform: translateY(-5%);
}

.modal-content .top-block div {
    width: 50%;
    position: relative;
    display: flex;
    align-items: end;
    justify-content: start;
}

.modal-content .top-block h2 {
    font-size: 90px;
    font-weight: var(--W-700);
    letter-spacing: 0;
    line-height: 90px;
    text-transform: uppercase;
}

.modal-content .top-block {
    width: 90%;
    display: flex;
    height: 265px;
    max-width: 1440px;
    margin: auto;
    margin-bottom: 70px;
    position: relative;
}

.modal-content .top-block span {
    font-size: var(--S-20);
    font-weight: var(--W-400);
    max-width: 250px;
    margin-left: 10%;
}

.modal-content .top-block button {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 60px;
}

.modal-content .top-block button:hover img{
    content: url('../img/close-btn-hover.png');
}

.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.show .modal-content {
    transform: scale(1);
}

/* Блюр фону */
body.modal-open {
    overflow: hidden;
}

body.modal-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.3);
    z-index: 9;
}




/*------------------------------------*/

@media (max-width: 1400px){
    .contact-form-1 p{
        flex-wrap: nowrap;
        flex-direction: column;
    }

    .modal-content .top-block{
        margin: 70px auto;
    }
}

@media (max-width: 1000px){
    .contact-form-1 p{
        gap: unset;
    }

    .contact-form-1 input[type="text"],
    .contact-form-1 input[type="tel"] {
        box-sizing: border-box;
        width: 99%;
    }
}

@media (max-width: 870px){
    .modal-content .top-block{
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
        height: auto;
    }

    .modal-content .top-block div{
        width: 100%;
    }

    .modal-content .top-block h2{
        font-size: 45px;
        line-height: 45px;
    }

    .modal-content .top-block div:last-child{
        width: 100%;
        justify-content: end;
    }

    .modal-content .top-block span{
        font-size: 18px;
    }

    .modal-content .top-block button{
        top: -136px;
        right: 0;
    }

    .modal-content .top-block button img{
        height: 60px;
    }

    .modal-content .contact-form-1 {
        margin-bottom: 0;
    }

}

@media (max-width: 500px){
    .modal-content .top-block{
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
        height: auto;
    }

    .modal-content .top-block div{
        width: 100%;
    }

    .modal-content .top-block h2{
        font-size: 30px;
        line-height: 30px;
    }

    .modal-content .top-block div:last-child{
        width: 100%;
        justify-content: end;
    }

    .modal-content .top-block span{
        font-size: 18px;
    }

    .modal-content .top-block button{
        top: -136px;
        right: 0;
    }

    .modal-content .top-block button img{
        height: 60px;
    }

}
