/* ============================================================
   Consultation popup — "תיאום שיחת ייעוץ"
   Figma: desktop 2072-3001 · mobile 2111-811
   ============================================================ */

.consult-pop,
.consult-pop * { box-sizing: border-box; }

.consult-pop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    direction: rtl;
    font-family: var(--ff-he, 'Heebo', sans-serif);
}
.consult-pop.is-open { display: block; }
body.consult-open { overflow: hidden; }

.consult-pop__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.consult-pop__card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(827px, 94vw);
    max-height: 94vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    -webkit-overflow-scrolling: touch;
}

/* close button (top-left, gold circle X) */
.consult-pop__x {
    position: absolute;
    top: 15px;
    left: 14px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 6;
    transition: transform .15s ease;
}
.consult-pop__x img { display: block; width: 100%; height: 100%; }
.consult-pop__x:hover { transform: scale(1.06); }

/* ===== body: form (right) + media (left) ===== */
.consult-pop__body { display: flex; flex-direction: row; align-items: stretch; }
.consult-pop__panel { position: relative; width: 50%; }

/* ----- FORM panel (white, right) ----- */
.consult-pop__panel--form {
    background: #fff;
    padding: 36px 54px 34px;
    border-radius: 0 6px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.consult-pop__title {
    margin: 0;
    font-weight: 300;          /* Heebo Light */
    font-size: 40px;
    line-height: 46px;
    color: #1d1d1b;
}
.consult-pop__title strong { font-weight: 600; }   /* "פינוי בינוי?" SemiBold */
.consult-pop__sub {
    margin: 16px 0 0;
    font-weight: 400;
    font-size: 21px;
    line-height: 28px;
    color: #1d1d1b;
    max-width: 303px;
}
.consult-pop__form {
    width: 303px;
    max-width: 100%;
    margin-top: 22px;
    text-align: right;
}
.consult-pop__field { position: relative; margin-bottom: 13px; }
.consult-pop__field input,
.consult-pop__field select {
    width: 100%;
    height: 52px;
    border: 1px solid transparent;
    background: #e4e4e4;
    border-radius: 0;
    padding: 0 18px;
    font-family: inherit;
    font-weight: 300;
    font-size: 17px;
    color: #1d1d1b;
    text-align: right;
    direction: rtl;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.consult-pop__field input::placeholder { color: #5e6163; opacity: 1; }
.consult-pop__field select { color: #5e6163; cursor: pointer; }
.consult-pop__field--select .consult-pop__chev {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    pointer-events: none;
}
/* validation error (Hebrew, reusable pattern) */
.consult-pop__field.has-error input,
.consult-pop__field.has-error select { border-color: #d33; background: #fff4f4; }
.consult-pop__field .consult-pop__err {
    display: none;
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 11px;
    color: #d33;
    font-weight: 500;
}
.consult-pop__field.has-error .consult-pop__err { display: block; }

.consult-pop__consent {
    display: flex;
    flex-direction: row-reverse;   /* checkbox on the right */
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 18px;
    font-size: 13px;
    line-height: 1.35;
    color: #1d1d1b;
    cursor: pointer;
}
.consult-pop__consent input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--c-gold-flat, #ab8444); flex: 0 0 15px; }
.consult-pop__consent a { color: #1d1d1b; text-decoration: underline; }
.consult-pop__consent.has-error span { color: #d33; }

.consult-pop__hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.consult-pop__submit {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    min-width: 163px;
    height: 52px;
    padding: 0 22px;
    margin-right: auto;     /* RTL: push button to the LEFT */
    margin-left: 0;
    border: 0;
    background: #1d1d1b;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    transition: background .2s ease;
}
.consult-pop__submit:hover { background: var(--c-gold-flat, #ab8444); }
.consult-pop__submit img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.consult-pop__submit[disabled] { opacity: .6; cursor: default; }
.consult-pop__msg { margin: 12px 0 0; font-size: 14px; min-height: 18px; }
.consult-pop__msg.is-ok  { color: #1f7a33; }
.consult-pop__msg.is-err { color: #d33; }

/* ----- MEDIA panel (dark, left) — 2 stacked photos + stamp ----- */
.consult-pop__panel--media {
    background: #353535;
    border-radius: 6px 0 0 0;
    overflow: hidden;
}
.consult-pop__photo {
    display: block;
    width: 100%;
    height: 50%;
    object-fit: cover;
}
.consult-pop__photo--a { object-position: center top; }
.consult-pop__photo--b { object-position: center bottom; }
.consult-pop__stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 156px;
    height: 156px;
    z-index: 3;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

/* ===== gold stats footer ===== */
.consult-pop__stats {
    display: flex;
    flex-direction: row;
    direction: ltr;            /* Figma order L→R: 350 · 15,689 · 20 */
    align-items: center;
    justify-content: space-around;
    gap: 0;
    height: 108px;
    padding: 0 24px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(154.6deg, #8c672c 8.38%, #d3b077 67.85%, #8c672c 95.49%);
    color: #fff;
}
.consult-pop__stat { flex: 1 1 0; text-align: center; }
.consult-pop__statnum {
    display: block;
    font-family: var(--ff-he, 'Heebo', sans-serif);
    font-weight: 700;
    font-size: 48px;
    line-height: 1;
    color: #fff;
}
.consult-pop__statlabel {
    display: block;
    margin-top: 6px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    color: #fff;
}
.consult-pop__statdiv {
    flex: 0 0 1px;
    align-self: center;
    width: 1px;
    height: 70px;
    background: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   MOBILE  (≤768) — stack: form → media(+stamp) → gold stats
   ============================================================ */
@media (max-width: 768px) {
    .consult-pop__card { width: 94vw; max-width: 380px; }
    .consult-pop__body { flex-direction: column; }
    .consult-pop__panel { width: 100%; }

    .consult-pop__panel--form {
        order: 1;
        padding: 40px 24px 22px;
        border-radius: 6px 6px 0 0;
    }
    .consult-pop__title { font-size: 27px; line-height: 33px; }
    .consult-pop__sub { font-size: 16px; line-height: 22px; margin-top: 12px; }
    .consult-pop__form { width: 100%; margin-top: 18px; }
    .consult-pop__field input,
    .consult-pop__field select { font-size: 16px; height: 50px; }

    .consult-pop__panel--media {
        order: 2;
        height: 200px;
        border-radius: 0;
    }
    .consult-pop__photo--a { width: 100%; height: 100%; }
    .consult-pop__photo--b { display: none; }     /* mobile: single photo */
    .consult-pop__stamp { width: 116px; height: 116px; }

    .consult-pop__stats { order: 3; height: 78px; padding: 0 12px; }
    .consult-pop__statnum { font-size: 30px; }
    .consult-pop__statlabel { font-size: 11px; margin-top: 3px; }
    .consult-pop__statdiv { height: 44px; }

    .consult-pop__x { top: 10px; left: 10px; width: 34px; height: 34px; }
}
