.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9100;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.modal-container {
    width: 529px;
    max-width: calc(100% - 32px);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    width: 100%;
    background: #FFFFFF;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-container {
        width: 320px;
    }

}

.contact-modal .modal-content {
    padding: 53px 75px 296px;
    gap: 31px;
}

.contact-modal .title-container {
    display: flex;
    flex-direction: column;
    gap: 11px;
    align-items: center;
}

.contact-modal .title-container .title {
    color: #282828;
    text-align: center;
    font-size: 34px;
    font-style: normal;
    font-weight: 700;
    line-height: 38px; /* 111.765% */
    text-transform: uppercase;
}

.contact-modal .title-container .text {
    color: #767676;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.contact-modal form {
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 33px;
    align-items: stretch;
}

.contact-modal form .input-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.contact-modal form .input-container input {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    border: 1px solid #CDCDCD;
    background: #F5F5F5;
    padding: 0 24px;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px; /* 144.444% */
}

.contact-modal form .input-container input::placeholder {
    color: rgba(39, 39, 39, 0.50);
}

.contact-modal form .btn-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.contact-modal form .btn-group button {
    display: flex;
    width: 100%;
    height: 60px;
    padding: 15px 50px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    background: #307943;
    box-shadow: 0 -4px 11px 0 rgba(0, 0, 0, 0.20) inset, 0 6px 8px 0 rgba(255, 255, 255, 0.45) inset;
    color: #FFF;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; /* 83.333% */
    white-space: nowrap;
}

.contact-modal form .btn-group button:hover {
    background: #285e36;
}

.modal button {
    outline: none;
    border: none;
    cursor: pointer;
}

.contact-modal form .btn-group p {
    color: #2F2F2F;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px; /* 133.333% */
    opacity: 0.5;
}

.contact-modal form .btn-group p a {
    color: #2F2F2F;
    text-decoration: underline;
}

.contact-modal .modal-content > button {
    position: absolute;
    width: 44px;
    height: 44px;
    top: 18px;
    right: 18px;
    background: transparent;
}

.contact-modal .modal-content > button:hover {
    opacity: 0.8;
}

.contact-modal .modal-content > img {
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
}

@media (max-width: 768px) {
    .contact-modal .modal-content {
        padding: 53px 17px 186px;
        gap: 26px;
    }

    .contact-modal .title-container .title {
        font-size: 28px;
        font-style: normal;
        font-weight: 700;
        line-height: 38px;
        white-space: nowrap;
    }

    .contact-modal .title-container .text {
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        white-space: nowrap;
    }

    .contact-modal form .input-container {
        gap: 12px;
    }

    .contact-modal form .btn-group p {
        width: 320px;
    }

    .contact-modal .modal-content > button {
        top: 6px;
        right: 6px;
    }
}

.success-modal .modal-content {
    height: 547px;
    padding: 42px 47px;
    border-radius: 0;
    background: #021D04;
    justify-content: flex-end;
}

.success-modal .modal-content > img:nth-child(1) {
    width: 609px;
    height: 559px;
    position: absolute;
    top: -12px;
    left: -48px;
}

.success-modal .modal-content > img:nth-child(2) {
    width: 226px;
    flex-shrink: 0;
    position: absolute;
    top: 20px;
    left: 31px;
}

.success-modal .modal-content > button {
    width: 44px;
    height: 44px;
    top: 20px;
    right: 20px;
    background: transparent;
    position: absolute;
}

.success-modal .modal-content > button:hover {
    opacity: 0.8;
}

.success-modal .text-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    z-index: 1;
}

.success-modal .text-container .title {
    color: #FFF;
    text-align: center;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 38px; /* 126.667% */
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .success-modal .modal-content {
        height: 378px;
        padding: 26px 14px;
    }

    .success-modal .modal-content > img:nth-child(2) {
        width: 192px;
        top: 15px;
        left: 10px;
    }

    .success-modal .modal-content > button {
        top: 19px;
        right: 14px;
    }

    .success-modal .text-container .title {
        font-size: 20px;
        font-style: normal;
        font-weight: 700;
        line-height: 120%;
        white-space: nowrap;
    }

    .success-modal .modal-content > img:nth-child(1) {
        top: -45px;
    }
}


#projectModal .title-container .title {
    width: 438px;
    font-size: 28px;
}

#projectModal .title-container .text {
    white-space: unset;
}

@media (max-width: 768px) {
    #projectModal .title-container .title {
        width: 292px;
        font-size: 20px;
        font-style: normal;
        font-weight: 500;
        white-space: unset;
        line-height: 1.2;
    }

    #projectModal .title-container .text {
        white-space: unset;
        font-size: 14px;
    }
}
