/* =====================================================================
   Johannesdal Village - Contact page redesign (contact.css)
   Needs gallery.css (brand variables, .jv-wrap, .jv-btn, .jv-eyebrow, .jv-more).
   Everything is scoped under .jv-contact; Bootstrap Material Design's
   form-field styling is reset inside the form so the fields look like the redesign.
   ===================================================================== */
.jv-contact { background: var(--jv-sand); padding-bottom: 72px; }

/* ---------- header with aerial background ---------- */
.jv-chead {
    --jv-chead-shade: linear-gradient(90deg, rgba(27,31,36,.86) 0%, rgba(27,31,36,.62) 50%, rgba(27,31,36,.3) 100%), linear-gradient(180deg, rgba(27,31,36,.1) 0%, rgba(27,31,36,.5) 100%);
    position: relative; min-height: 340px; display: flex; align-items: flex-end; padding: 64px 0 108px;
    color: #fff; background-color: var(--jv-gunmetal); background-repeat: no-repeat; background-size: cover;
    background-position: center, center, 60% 56%;
    background-image: var(--jv-chead-shade), var(--jv-chead-1280);
}
.jv-chead > .jv-wrap { width: 100%; }
.jv-chead .jv-eyebrow { color: #f2b97a; margin: 0; }
.jv-chead h1 { font-family: 'Josefin Sans', sans-serif; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: .3em 0 .25em; padding: 0; line-height: 1.05; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.jv-chead__lead { font-size: 1.1rem; font-weight: 300; line-height: 1.6; color: rgba(255,255,255,.92); margin: 0; max-width: 36em; }
@media (min-width: 1500px), (min-width: 601px) and (min-resolution: 1.5dppx) {
    .jv-chead { background-image: var(--jv-chead-shade), var(--jv-chead-1728); }
}

/* ---------- body: form card + side column (cards overlap the header) ---------- */
.jv-cbody { margin-top: -72px; position: relative; }
.jv-cbody__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.jv-ccard { background: #fff; border: 1px solid var(--jv-line); border-radius: 14px; padding: 30px 32px; box-shadow: 0 14px 40px rgba(41,47,54,.08); }
.jv-ccard--form { padding: 34px 36px 30px; }
.jv-cside { display: grid; gap: 24px; }
.jv-ccard__title { font-family: 'Josefin Sans', sans-serif; font-size: 1.05rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--jv-shadowblue); margin: 0 0 22px; padding: 0; }

/* ---------- form fields (resets Bootstrap Material Design inside .jv-form) ---------- */
.jv-form { display: grid; gap: 18px; }
.jv-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.jv-form > span.bmd-form-group { display: none; }   /* BMD wraps the hidden CellPhone spam-trap field in a span */
.jv-contact .jv-field, .jv-contact .jv-field.bmd-form-group { margin: 0; padding: 0; position: static; }
.jv-contact .jv-field > label, .jv-contact .jv-field.bmd-form-group > label,
.jv-contact .jv-field.is-focused > label, .jv-contact .jv-field.is-filled > label {
    position: static; transform: none; display: block; margin: 0 0 7px; padding: 0; pointer-events: auto;
    font: 600 .9rem/1.3 'Josefin Sans', sans-serif; letter-spacing: .03em; text-transform: none; color: var(--jv-gunmetal) !important;
}
.jv-req { color: var(--jv-fulvous); font-weight: 700; }
.jv-contact .jv-field .form-control {
    display: block; width: 100%; max-width: none; height: auto; min-height: 52px; margin: 0; padding: 14px 16px 12px;
    font: 400 1.05rem/1.4 'Josefin Sans', sans-serif; color: var(--jv-gunmetal);
    background: #fff none !important; border: 1px solid #cfccc2; border-radius: 10px; box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.jv-contact .jv-field textarea.form-control { min-height: 150px; resize: vertical; }
.jv-contact .jv-field .form-control::placeholder { color: #9a9fa5; }
.jv-contact .jv-field .form-control:hover { border-color: #b2aea2; }
.jv-contact .jv-field .form-control:focus { outline: none; border-color: var(--jv-olive); box-shadow: 0 0 0 3px rgba(97,97,41,.18); }
.jv-contact .jv-field select.form-control {
    -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23292f36' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px !important;
}
.jv-field__hint { display: block; margin-top: 6px; font-size: .8rem; color: #7a8087; text-align: right; }
.jv-field__hint.is-near { color: var(--jv-fulvous); }

/* query type as pills (built by contact.js from the select; the select stays the real form field) */
.jv-qtypes { display: flex; flex-wrap: wrap; gap: 10px; }
.jv-qtype {
    display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.2em .65em; border-radius: 999px; cursor: pointer;
    border: 1px solid #cfccc2; background: #fff; color: var(--jv-gunmetal); font: 500 .95rem/1 'Josefin Sans', sans-serif; letter-spacing: .02em;
    transition: border-color .15s, background .15s, color .15s;
}
.jv-qtype::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #b2aea2; flex: none; transition: all .15s; }
.jv-qtype:hover { border-color: var(--jv-olive); }
.jv-qtype[aria-checked="true"] { background: var(--jv-olive); border-color: var(--jv-olive); color: #fff; }
.jv-qtype[aria-checked="true"]::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px var(--jv-olive); }
.jv-qtype:focus-visible { outline: 2px solid var(--jv-fulvous); outline-offset: 2px; }
.jv-field--type.has-pills select.form-control { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; }

/* inline validation (classes set by jquery.validate.unobtrusive) */
.jv-contact .field-validation-error, .jv-contact .jv-field .text-danger { display: block; margin-top: 7px; font-size: .88rem; line-height: 1.35; color: #b3261e !important; }
.jv-contact .field-validation-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: #b3261e; color: #fff; font-size: .7rem; font-weight: 700; vertical-align: 1px; }
.jv-contact .field-validation-valid { display: none; }
.jv-contact .jv-field .form-control.input-validation-error { border-color: #b3261e; background-color: #fff8f7 !important; }
.jv-contact .jv-field .form-control.input-validation-error:focus { box-shadow: 0 0 0 3px rgba(179,38,30,.15); }
.jv-contact .jv-field .form-control.valid:not(:placeholder-shown) { border-color: #9aa36a; }

/* success / error messages: wrap your existing message in one of these */
.jv-alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 10px; margin: 0 0 18px; font-size: 1rem; line-height: 1.5; border: 1px solid; }
.jv-alert::before { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; margin-top: 1px; }
.jv-alert--success { background: #f1f4e6; border-color: #c9d1a4; color: #3f4618; }
.jv-alert--success::before { content: "\2713"; background: var(--jv-olive); }
.jv-alert--error { background: #fdf0ee; border-color: #f0c4be; color: #8c1d16; }
.jv-alert--error::before { content: "!"; background: #b3261e; }
.jv-alert ul { margin: 0; padding-left: 1.1em; }
.jv-contact .validation-summary-valid { display: none; }

/* reCAPTCHA + submit */
.jv-form__captcha { min-height: 78px; }
.jv-captcha-preview { display: inline-flex; align-items: center; gap: 12px; width: 304px; height: 78px; padding: 0 14px; border: 1px solid #d3d3d3; border-radius: 3px; background: #f9f9f9; font: 400 .95rem/1.2 Roboto, Arial, sans-serif; color: #222; position: relative; box-shadow: 0 0 4px 1px rgba(0,0,0,.08); }
.jv-captcha-preview__box { width: 26px; height: 26px; border: 2px solid #c1c1c1; border-radius: 2px; background: #fff; flex: none; }
.jv-captcha-preview small { position: absolute; right: 8px; bottom: 6px; font-size: .55rem; color: #888; max-width: 120px; text-align: right; }
.jv-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 4px; }
.jv-form__submit { font-size: .9rem; padding: 1.1em 1.9em .95em; border: 0; cursor: pointer; }
.jv-form__submit svg { width: 1.1em; height: 1.1em; }
.jv-form__submit:focus-visible { outline: 2px solid var(--jv-fulvous); outline-offset: 3px; }
.jv-form__submit[disabled] { opacity: .65; cursor: progress; }
.jv-form__privacy { margin: 0; font-size: .85rem; color: #6b7178; flex: 1 1 220px; }
.jv-form__privacy a { color: var(--jv-olive) !important; text-decoration: underline; }

/* text link with arrow (same look as the home page) */
.jv-contact .jv-more { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--jv-olive) !important; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.jv-contact .jv-more:hover { color: var(--jv-fulvous) !important; text-decoration: none; }
.jv-contact .jv-more svg { width: 1em; height: 1em; flex: none; }

/* ---------- agents + address ---------- */
.jv-cagents { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.jv-cagent { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "photo body" "photo logo"; column-gap: 16px; row-gap: 8px; padding: 18px 0; border-top: 1px solid var(--jv-line); }
.jv-cagent:first-child { border-top: 0; padding-top: 0; }
.jv-cagent:last-child { padding-bottom: 0; }
.jv-cagent__photo { grid-area: photo; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.jv-cagent__body { grid-area: body; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jv-cagent__name { font-weight: 600; font-size: 1.05rem; letter-spacing: .03em; color: var(--jv-gunmetal); margin-bottom: 2px; }
.jv-cagent__link { display: inline-flex; align-items: center; gap: .5em; color: var(--jv-olive) !important; font-size: .95rem; padding: 3px 0; overflow-wrap: anywhere; }
.jv-cagent__link:hover { color: var(--jv-fulvous) !important; }
.jv-cagent__link svg { width: 16px; height: 16px; flex: none; }
.jv-cagent__logo { grid-area: logo; display: inline-block; justify-self: start; }
.jv-cagent__logo img { height: 34px; width: auto; display: block; }
.jv-caddress__line { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 1rem; line-height: 1.5; color: var(--jv-gunmetal); }
.jv-caddress__line svg { width: 20px; height: 20px; flex: none; color: var(--jv-olive); margin-top: 1px; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .jv-cbody__grid { grid-template-columns: 1fr; }
    .jv-cside { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 760px) {
    .jv-cside { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .jv-chead { min-height: 0; padding: 40px 0 84px; background-position: center, 58% 50%; background-image: var(--jv-chead-shade), var(--jv-chead-800);
        --jv-chead-shade: linear-gradient(180deg, rgba(27,31,36,.55) 0%, rgba(27,31,36,.8) 100%); }
    .jv-chead h1 { font-size: 2.1rem; }
    .jv-chead__lead { font-size: 1rem; }
    .jv-cbody { margin-top: -56px; }
    .jv-ccard, .jv-ccard--form { padding: 22px 18px; border-radius: 12px; }
    .jv-form__row { grid-template-columns: 1fr; }
    .jv-form__submit { width: 100%; justify-content: center; }
    .jv-contact { padding-bottom: 48px; }
}
@media (max-width: 600px) and (min-resolution: 1.5dppx) {
    .jv-chead { background-image: var(--jv-chead-shade), var(--jv-chead-1280); }
}
@media (max-width: 360px) { .jv-form__captcha { transform: scale(.9); transform-origin: 0 0; } }
@media (prefers-reduced-motion: reduce) { .jv-contact * { transition: none !important; } }
