.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-overflow-scrolling: touch;

}

.popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 18px;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.popup-form {
    background: url('/img/pages/realisations/40.jpg') center center no-repeat;
    background-size: cover;
    width: 800px;
    max-width: 90%;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    padding: 35px 120px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.popup-overlay.is-visible .popup-form {
    transform: scale(1);
}

.popup-form::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.popup-content {
    position: relative;
    z-index: 1;
}

#popup-title {
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    color: #ffffff;
    font-weight: 700;
    padding-top: 0;
    font-size: 30px !important;
}

.popup-form form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.popup-form form input,
.popup-form form select {
    width: 100%;
    text-align: left;
    font: 600 15px "Plus Jakarta Sans";
    padding: 13px 16px;
    border-radius: 9px;
    border: 1.5px solid rgba(34, 31, 27, 0.16);
    background: rgb(255, 255, 255);
    color: rgb(18, 50, 95);
}

.popup-form form input:focus,
.popup-form form select:focus {
    outline: none;
    border-color: #3854a4;
    box-shadow: 0 0 0 3px rgba(56, 84, 164, .15);;
}

.popup-form form select:has(.placeholder-option:checked) {
    color: #787878;
    font-size: 14px;
}

.popup-form form input::placeholder,
.popup-form form .placeholder-option {
    color: #787878;
    font-weight: 500;
    font-size: 14px;
}

button[type="submit"] {
    outline: none;
    margin-top: 10px;
    background: #3854a4;
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(56, 84, 164, .28);
    cursor: pointer;
    justify-content: center;
    width: 100%;
    font-size: 17px;
    padding: 17px 26px;
    border: none;
}

button[type="submit"]:hover {
    background: #2e4798;
}

.popup-form button[type="submit"] {
    touch-action: manipulation;
}

@media (max-width: 810px) {
    .popup-form {
        padding: 35px 60px;
    }

    #popup-title {
        font-size: 25px !important;
    }
}

@media (max-width: 510px) {
    #popup-title {
        font-size: 20px !important;
    }

    button[type="submit"] {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 450px) {
    #popup-title {
        font-size: 16px !important;
    }

    .popup-form form input,
    .popup-form form select {
        padding: 8px 16px;
    }

    .popup-form form input::placeholder,
    .popup-form form .placeholder-option {
        font-size: 10px;
    }

    .popup-form form select:has(.placeholder-option:checked) {
        font-size: 10px;
    }

    .popup-form form input,
    .popup-form form select {
        font-size: 10px;
    }

    .popup-form form {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    button[type="submit"] {
        padding: 5px;
        font-size: 8px;
    }
}