:root {
    --blue: #00ACCB;
    --pink: #EC008C;
}

#hero .site-width {
    height: 100%;
}

#content.contact {
    position: relative;
    padding: 72px 0 169px;
}

#content.contact:before {
    content: '';
    position: absolute;
    top: 98px;
    left: 0;
    width: 292px;
    height: 193px;
    background-image: url('../img/about-before.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
#content.contact:after {
    content: '';
    position: absolute;
    bottom: 47px;
    right: 48px;
    width: 163px;
    height: 126px;
    background-image: url('../img/contact-after.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

#content.contact .page-title {
    margin-bottom: 38px;
    font-family: 'NextExitRounded', serif;
    font-size: 100px;
    font-weight: 700;
    line-height: normal;
}

#content.contact .form-wrapper form {
    display: flex;
    flex-wrap: wrap;
    gap: 46px 21px;
    direction: rtl;
    position: relative;
    padding-top: 50px;
}
#content.contact .form-wrapper form .form-note {
    position: absolute;
    top: 0;
    right: 0;
}
#content.contact .form-wrapper form .form-note p {
    font-size: 20px;
    color: #000;
}
#content.contact form .form-field {
    position: relative;
}
#content.contact form .form-field.field-quarter {
    width: calc(25% - 16px);
}
#content.contact form .form-field.field-half {
    width: calc(50% - 10.5px);
}
#content.contact form .form-field input,
#content.contact form .form-field textarea,
#content.contact form .form-field select {
    width: 100%;
    padding: 21px 15px;
    font-size: 21px;
}
#content.contact form .form-field input:focus-visible,
#content.contact form .form-field textarea:focus-visible,
#content.contact form .form-field select:focus-visible {
    background: #E9F4F9;
    outline: 2px solid #000;
}
#content.contact form .form-field input[type="number"]::-webkit-outer-spin-button,
#content.contact form .form-field input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
}
#content.contact form .form-field select {
    background: #f6f6f6;
    border: none;
    padding: 21px 20px;
    appearance: none;
    background-image: url('../img/arrow-basic.svg');
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 26px;
}
#content.contact form .form-field input.error,
#content.contact form .form-field select.error {
    background-color: #F7E8F1;
    border-color: #ff0000;
}
.suggestions-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    display: none; /* מוסתרת כברירת מחדל */
}
.suggestions-list li {
    padding: 8px 12px;
    cursor: pointer;
}
.suggestions-list li:hover {
    background: #f0f0f0;
}
.form-field.field-long {
    width: 70%;
}
.form-field.field-long textarea {
    height: 214px;
    resize: none;
}
.file-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    width: calc(30% - 21px);
    height: 214px;
    margin-top: 34px;
    padding: 16px 20px;
    background: #f6f6f6;
}
.file-wrapper:focus-within {
    outline: 2px solid #000;
}
.file-wrapper label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.file-wrapper input {
    width: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
}
.file-wrapper span.plabel {
    position: absolute;
    top: -34px;
    right: 50%;
    transform: translateX(50%);
    width: 100%;
    cursor: pointer;
}
.file-wrapper:before {
    content: '';
    display: block;
    width: 25px;
    height: 25px;
    margin-top: -28px;
    background-image: url('../img/icon-file.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
.file-wrapper span.msg {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 50px;
}
.file-wrapper + p {
    width: 100%;
    text-align: center;
}
.form-wrapper form .wpcf7-not-valid-tip {
    display: none;
}
.form-wrapper form .error-message {
    color: #AC0066;
    font-size: 16px;
    font-weight: 500;
}
.form-wrapper form.invalid .wpcf7-response-output {
    display: none;
}
.wpcf7-spinner {
    display: none;
}
.form-wrapper input[type="submit"]:focus-visible {
    border: 2px solid #000;
}

#form-popup {
    display: none;
}
#form-popup.active {
    display: flex;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}
#form-popup .form-popup-content {
    position: relative;
    width: 868px;
    max-width: 95%;
    margin: auto;
    padding: 95px 60px;
    text-align: center;
    background: #fff;
}

#form-popup .form-popup-content .close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}
#form-popup .form-popup-content .popup-img {
    margin-bottom: 60px;
}
#form-popup .form-popup-content .popup-title {
    margin-bottom: 14px;
    font-family: 'NextExitRounded', serif;
    font-size: 42px;
    font-weight: 700;
}
#form-popup .form-popup-content .popup-text {
    max-width: 400px;
    margin: 0 auto 26px;
    font-size: 17px;
}
body.contact-popup-active > *:not(#header, #form-popup) {
    filter: blur(10px);
}
.wpcf7-response-output {
    display: none;
}


@media (max-width: 1399px) {
    #content.contact:before {
        transform: scale(0.85);
        transform-origin: left top;
    }
    #content.contact:after {
        transform: scale(0.85);
        transform-origin: right;
    }
}

@media (max-width: 1249px) {
    #content.contact:before {
        transform: scale(0.75);
        transform-origin: left top;
    }
    #content.contact:after {
        transform: scale(0.75);
    }
}

@media (max-width: 1023px) {
    #content.contact {
        padding: 50px 0 90;
    }
    #content.contact:before {
        top: 44px;
        width: 180px;
        transform: none;
    }
    #content.contact:after {
        bottom: 20px;
        right: 20px;
        width: 110px;
        transform: none;
    }
    #content.contact .page-title {
        margin-bottom: 20px;
        font-size: 86px;
    }
    #content.contact .subtitle {
        margin-bottom: 32px;
        font-size: 42px;
    }
    #content.contact form .form-field input, 
    #content.contact form .form-field textarea, 
    #content.contact form .form-field select {
        padding: 15px;
    }
}

@media (max-width: 767px) {
    #content.contact {
        padding: 40px 0 109px;
    }
    #content.contact:before {
        top: 24px;
        width: 190px;
        height: 96px;
    }
    #content.contact:after {
        right: 9px;
        width: 113px;
        height: 90px;
        bottom: 33px;
    }
    #content.contact .page-title {
        margin-bottom: 80px;
        font-size: 60px;
    }
    #content.contact form {
        gap: 32px 16px;
    }
    #content.contact form .form-field.field-quarter {
        width: calc(50% - 11px);
    }
    #content.contact form .form-field.field-quarter:nth-child(4),
    #content.contact form .form-field.field-quarter:nth-child(5),
    #content.contact form .form-field.field-half,
    #content.contact form .form-field.field-long,
    #content.contact form .file-wrapper {
        width: 100%;
    }
    #content.contact form .form-field label {
        font-size: 16px;
    }
    #content.contact form textarea {
        height: 250px;
    }
    .file-wrapper {
        height: 110px;
    }
    .file-wrapper:before {
        margin-top: -10px;
    }
    .file-wrapper span.msg {
        margin-top: 10px;
    }
    #content.contact .ampm-button {
        /* margin-top: 20px; */
    }

    .recaptcha + p {
        width: 100%;
        text-align: center;
    }
    #form-popup .form-popup-content {
        padding: 27px 24px;
    }
    #form-popup .form-popup-content .popup-img {
        width: 213px;
        margin-bottom: 24px;
    }
    #form-popup .form-popup-content .popup-title {
        font-size: 36px;
    }
    #form-popup .form-popup-content .popup-text {
        font-size: 16px;
    }
    #form-popup .ampm-button {
        font-size: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    #content.contact .page-title,
    #content.contact form label {
        color: #fff;
    }
    #content.contact form .msg {
        color: #000;
    }
}
