/* ============================================================
   RE/MAX Stella Polare — Forms UI 2.0
   Un solo sistema visivo per CF7, contatto agente e ricerca.
   ============================================================ */

:root {
    --rxf-blue: #004C98;
    --rxf-blue-dark: #003B77;
    --rxf-red: #E11C2A;
    --rxf-red-dark: #C81725;
    --rxf-ink: #172435;
    --rxf-text: #334155;
    --rxf-muted: #718096;
    --rxf-line: #DCE4EC;
    --rxf-line-strong: #CAD5E1;
    --rxf-soft: #F5F8FB;
    --rxf-white: #FFFFFF;
    --rxf-focus: rgba(0, 76, 152, .13);
    --rxf-radius: 14px;
    --rxf-radius-lg: 24px;
    --rxf-shadow: 0 18px 55px rgba(15, 42, 70, .10);
}

/* ---------- RESET LOCALE ---------- */
body .wpcf7,
body .wpcf7 *,
body .rx-contact-form-box,
body .rx-contact-form-box *,
body #form-ricerca-avanzata,
body #form-ricerca-avanzata * {
    box-sizing: border-box;
}

body .wpcf7 p {
    margin: 0 0 16px;
}

/* ---------- CF7: BASE ---------- */
body .wpcf7 label {
    display: block;
    margin: 0;
    /* Il colore NON è globale: eredita dal contesto oppure dalle classi
       .si-on-light / .si-on-color definite in fondo a questo file. */
    color: inherit;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;
}

body .wpcf7 input[type="text"],
body .wpcf7 input[type="email"],
body .wpcf7 input[type="tel"],
body .wpcf7 input[type="number"],
body .wpcf7 input[type="url"],
body .wpcf7 input[type="date"],
body .wpcf7 select,
body .wpcf7 textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    margin: 7px 0 0;
    padding: 0 17px;
    border: 1px solid var(--rxf-line);
    border-radius: var(--rxf-radius);
    background: var(--rxf-white);
    color: var(--rxf-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

body .wpcf7 textarea {
    min-height: 128px;
    padding-top: 15px;
    padding-bottom: 15px;
    resize: vertical;
}

body .wpcf7 input::placeholder,
body .wpcf7 textarea::placeholder {
    color: #9AA8B7;
    opacity: 1;
}

body .wpcf7 input[type="text"]:focus,
body .wpcf7 input[type="email"]:focus,
body .wpcf7 input[type="tel"]:focus,
body .wpcf7 input[type="number"]:focus,
body .wpcf7 input[type="url"]:focus,
body .wpcf7 input[type="date"]:focus,
body .wpcf7 select:focus,
body .wpcf7 textarea:focus {
    border-color: var(--rxf-blue);
    background: #fff;
    box-shadow: 0 0 0 4px var(--rxf-focus), 0 5px 16px rgba(15, 42, 70, .06);
}

body .wpcf7 input[type="checkbox"],
body .wpcf7 input[type="radio"] {
    width: 19px;
    height: 19px;
    margin: 0 8px 0 0;
    accent-color: var(--rxf-blue);
    vertical-align: -4px;
}

body .wpcf7 .wpcf7-list-item {
    margin-left: 0;
}

body .wpcf7 input[type="submit"],
body .wpcf7 button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: var(--rxf-radius);
    background: var(--rxf-red);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(225, 28, 42, .18);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

body .wpcf7 input[type="submit"]:hover,
body .wpcf7 button[type="submit"]:hover {
    background: var(--rxf-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(225, 28, 42, .24);
}

body .wpcf7 .wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    color: #B4232E;
    font-size: 12px;
    font-weight: 700;
}

body .wpcf7 form .wpcf7-response-output {
    margin: 18px 0 0;
    padding: 13px 15px;
    border-width: 1px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   FORM CTA — PAGINA IMMOBILE
   ============================================================ */
body .rx-sell-lead {
    position: relative;
    width: 100%;
    padding: 72px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 15%, rgba(255,255,255,.10), transparent 26%),
        linear-gradient(135deg, #003F80 0%, #004C98 55%, #0057AD 100%);
}

body .rx-sell-lead::after {
    content: "";
    position: absolute;
    right: -130px;
    bottom: -210px;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255,255,255,.035), 0 0 0 110px rgba(255,255,255,.025);
    pointer-events: none;
}

body .rx-sell-lead__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr);
    gap: clamp(38px, 5vw, 72px);
    align-items: center;
    width: min(1180px, 100%);
    margin: 0 auto;
}

body .rx-sell-lead__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

body .rx-sell-lead__eyebrow::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: var(--rxf-red);
}

body .rx-sell-lead__copy h2 {
    max-width: 520px;
    margin: 0 0 18px !important;
    color: #fff !important;
    font-size: clamp(38px, 4.2vw, 58px) !important;
    line-height: .98 !important;
    font-weight: 900 !important;
    letter-spacing: -.035em;
}

body .rx-sell-lead__copy p {
    max-width: 500px;
    margin: 0 !important;
    color: rgba(255,255,255,.82) !important;
    font-size: 17px !important;
    line-height: 1.65 !important;
}

body .rx-sell-lead__form-card {
    position: relative;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 26px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 28px 70px rgba(0, 25, 60, .27);
}

body .rx-sell-lead__form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 23px;
    padding-bottom: 19px;
    border-bottom: 1px solid #E8EEF4;
}

body .rx-sell-lead__form-head h3 {
    margin: 0 0 5px !important;
    color: var(--rxf-ink) !important;
    font-size: 22px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
}

body .rx-sell-lead__form-head p {
    margin: 0 !important;
    color: var(--rxf-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body .rx-sell-lead__mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #EEF5FC;
    color: var(--rxf-blue);
    font-size: 21px;
    font-weight: 900;
}

body .rx-lead-form .wpcf7 form.wpcf7-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 16px !important;
}

body .rx-lead-form .wpcf7 p {
    margin: 0 !important;
    min-width: 0;
}

body .rx-lead-form .wpcf7 p:has(textarea),
body .rx-lead-form .wpcf7 p:has(.wpcf7-acceptance),
body .rx-lead-form .wpcf7 p:has(.wpcf7-submit),
body .rx-lead-form .wpcf7 p:last-of-type {
    grid-column: 1 / -1;
}

body .rx-lead-form .wpcf7 label,
body .rx-lead-form .wpcf7 .wpcf7-list-item-label,
body .rx-lead-form .wpcf7 .wpcf7-acceptance label {
    color: var(--rxf-text) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
}

body .rx-lead-form .wpcf7 input[type="text"],
body .rx-lead-form .wpcf7 input[type="email"],
body .rx-lead-form .wpcf7 input[type="tel"],
body .rx-lead-form .wpcf7 input[type="number"],
body .rx-lead-form .wpcf7 select,
body .rx-lead-form .wpcf7 textarea {
    min-height: 54px !important;
    margin-top: 6px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    border: 1px solid var(--rxf-line) !important;
    border-radius: 13px !important;
    background: #F8FAFC !important;
    color: var(--rxf-ink) !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

body .rx-lead-form .wpcf7 textarea {
    min-height: 108px !important;
    padding-top: 14px !important;
}

body .rx-lead-form .wpcf7 input:focus,
body .rx-lead-form .wpcf7 select:focus,
body .rx-lead-form .wpcf7 textarea:focus {
    border-color: var(--rxf-blue) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px var(--rxf-focus) !important;
}

body .rx-lead-form .wpcf7 .wpcf7-acceptance {
    display: block;
    padding: 3px 0 2px;
}

body .rx-lead-form .wpcf7 .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--rxf-muted) !important;
    font-weight: 600 !important;
}

body .rx-lead-form .wpcf7 .wpcf7-submit {
    width: 100% !important;
    min-height: 56px !important;
    margin-top: 2px !important;
    border-radius: 13px !important;
    background: var(--rxf-red) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
}

/* ============================================================
   FORM CONTATTO AGENTE
   ============================================================ */
body .rx-contact-form-box {
    flex: 0 1 560px !important;
    width: min(560px, 100%);
    padding: clamp(26px, 3vw, 38px) !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    border-radius: var(--rxf-radius-lg) !important;
    background: #fff !important;
    color: var(--rxf-ink) !important;
    box-shadow: 0 30px 70px rgba(0, 27, 68, .28) !important;
}

body .rx-contact-form-head {
    margin-bottom: 25px;
}

body .rx-contact-form-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--rxf-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body .rx-contact-form-head h3 {
    margin: 0 0 7px !important;
    color: var(--rxf-ink) !important;
    font-size: 25px !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
    letter-spacing: -.025em;
}

body .rx-contact-form-head p {
    margin: 0 !important;
    color: var(--rxf-muted) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

body .rx-contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

body .rx-contact-form-box .rx-form-group {
    margin: 0 !important;
    min-width: 0;
}

body .rx-contact-form-box .rx-form-group--full {
    grid-column: 1 / -1;
}

body .rx-contact-form-box .rx-form-label {
    display: block;
    margin: 0 0 7px;
    color: var(--rxf-text);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
}

body .rx-contact-form-box .rx-form-input {
    display: block;
    width: 100% !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 1px solid var(--rxf-line) !important;
    border-radius: var(--rxf-radius) !important;
    background: #F8FAFC !important;
    color: var(--rxf-ink) !important;
    font-size: 15px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    outline: 0 !important;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}

body .rx-contact-form-box textarea.rx-form-input {
    min-height: 132px !important;
    height: 132px !important;
    padding-top: 15px !important;
    resize: vertical !important;
}

body .rx-contact-form-box .rx-form-input:focus {
    border-color: var(--rxf-blue) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px var(--rxf-focus) !important;
}

body .rx-contact-form-box .rx-form-privacy {
    grid-column: 1 / -1;
    margin: 1px 0 0 !important;
    color: var(--rxf-muted) !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
}

body .rx-contact-form-box .rx-form-privacy a {
    color: var(--rxf-blue) !important;
    font-weight: 750;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0,76,152,.25);
}

body .rx-contact-form-box .rx-submit-btn {
    grid-column: 1 / -1;
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    min-height: 58px !important;
    margin: 2px 0 0 !important;
    padding: 0 19px 0 22px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--rxf-red) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
    box-shadow: 0 12px 25px rgba(225,28,42,.20) !important;
}

body .rx-contact-form-box .rx-submit-btn::after {
    content: "→";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255,255,255,.16);
    font-size: 18px;
    line-height: 1;
}

body .rx-contact-form-box .rx-submit-btn:hover {
    background: var(--rxf-red-dark) !important;
    transform: translateY(-2px) !important;
}

/* ============================================================
   RICERCA IMMOBILI
   ============================================================ */
body .rx-filter-section {
    margin: 0 0 44px !important;
    padding: 0 !important;
    background: transparent !important;
}

body #form-ricerca-avanzata {
    width: 100%;
}

body .rx-filter-shell {
    overflow: hidden;
    border: 1px solid #E1E8EF;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(14, 39, 66, .08);
}

body .rx-filter-shell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 25px 28px;
    border-bottom: 1px solid #E8EEF4;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFE 100%);
}

body .rx-filter-shell-head h2 {
    margin: 0 0 5px !important;
    color: var(--rxf-ink) !important;
    font-size: 21px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: -.02em;
}

body .rx-filter-shell-head p {
    margin: 0 !important;
    color: var(--rxf-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

body .rx-filter-shell-badge {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #D8E7F5;
    border-radius: 999px;
    background: #F1F7FD;
    color: var(--rxf-blue);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body .rx-filter-shell-body {
    padding: 28px;
}

body #form-ricerca-avanzata .rx-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 20px !important;
    align-items: end;
}

body #form-ricerca-avanzata .rx-filter-label {
    display: block;
    margin: 0 0 8px !important;
    color: #415166 !important;
    font-size: 11px !important;
    line-height: 1.25;
    font-weight: 850 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body #form-ricerca-avanzata .rx-filter-input,
body #form-ricerca-avanzata .rx-filter-select,
body #form-ricerca-avanzata .rx-sort-wrap select {
    display: block;
    width: 100% !important;
    min-height: 55px !important;
    padding: 0 15px !important;
    border: 1px solid var(--rxf-line) !important;
    border-radius: 13px !important;
    background: #F8FAFC !important;
    color: var(--rxf-ink) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    font-weight: 550 !important;
    box-shadow: none !important;
    outline: 0 !important;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}

body #form-ricerca-avanzata .rx-filter-select {
    appearance: auto !important;
}

body #form-ricerca-avanzata .rx-filter-input:focus,
body #form-ricerca-avanzata .rx-filter-select:focus,
body #form-ricerca-avanzata .rx-sort-wrap select:focus {
    border-color: var(--rxf-blue) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px var(--rxf-focus) !important;
}

body #form-ricerca-avanzata .rx-range-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px !important;
    align-items: center;
}

body #form-ricerca-avanzata .rx-range-group input {
    width: 100% !important;
    min-width: 0;
    text-align: left !important;
}

body #form-ricerca-avanzata .rx-range-separator {
    color: #9AABBB !important;
    font-size: 13px;
    font-weight: 700 !important;
}

body .rx-filter-features-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 9px 0 13px;
    color: var(--rxf-ink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body .rx-filter-features-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E8EEF4;
}

body #form-ricerca-avanzata .rx-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px !important;
    margin: 0 !important;
}

body #form-ricerca-avanzata .rx-checkbox-item {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 9px !important;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #E1E8EF;
    border-radius: 12px;
    background: #FBFCFD;
    color: #45566A !important;
    font-size: 12px !important;
    line-height: 1.25;
    font-weight: 700 !important;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

body #form-ricerca-avanzata .rx-checkbox-item:hover {
    border-color: #BED2E5;
    background: #F5F9FD;
    transform: translateY(-1px);
}

body #form-ricerca-avanzata .rx-checkbox-item:has(input:checked) {
    border-color: rgba(0,76,152,.35);
    background: #EFF6FC;
    color: var(--rxf-blue) !important;
}

body #form-ricerca-avanzata .rx-checkbox-item input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: var(--rxf-blue);
}

body #form-ricerca-avanzata .rx-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 24px 0 0 !important;
    padding-top: 22px;
    border-top: 1px solid #E8EEF4;
    text-align: initial !important;
}

body #form-ricerca-avanzata .rx-btn-search,
body #form-ricerca-avanzata .rx-btn-reset {
    min-height: 52px;
    border-radius: 13px !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 850 !important;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body #form-ricerca-avanzata .rx-btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 175px;
    padding: 0 24px !important;
    border: 0 !important;
    background: var(--rxf-red) !important;
    color: #fff !important;
    letter-spacing: .045em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(225,28,42,.18) !important;
}

body #form-ricerca-avanzata .rx-btn-search svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

body #form-ricerca-avanzata .rx-btn-search:hover {
    background: var(--rxf-red-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 13px 27px rgba(225,28,42,.23) !important;
}

body #form-ricerca-avanzata .rx-btn-reset {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 1px solid var(--rxf-line-strong) !important;
    background: #fff !important;
    color: #66768A !important;
    text-decoration: none !important;
}

body #form-ricerca-avanzata .rx-btn-reset:hover {
    border-color: #AFC0D0 !important;
    background: #F8FAFC !important;
    color: var(--rxf-ink) !important;
}

body #form-ricerca-avanzata .rx-results-header {
    margin-top: 8px;
}

body #form-ricerca-avanzata .rx-sort-wrap select {
    min-height: 44px !important;
    width: auto !important;
    min-width: 205px;
    background: #fff !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
    body .rx-sell-lead__inner {
        grid-template-columns: 1fr;
    }

    body .rx-sell-lead__copy {
        max-width: 720px;
    }

    body #form-ricerca-avanzata .rx-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body #form-ricerca-avanzata .rx-checkbox-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body .wpcf7 input[type="text"],
    body .wpcf7 input[type="email"],
    body .wpcf7 input[type="tel"],
    body .wpcf7 input[type="number"],
    body .wpcf7 select,
    body .wpcf7 textarea,
    body #form-ricerca-avanzata .rx-filter-input,
    body #form-ricerca-avanzata .rx-filter-select {
        font-size: 16px !important;
    }

    body .rx-sell-lead {
        padding: 52px 16px;
    }

    body .rx-sell-lead__inner {
        gap: 30px;
    }

    body .rx-sell-lead__copy h2 {
        font-size: 38px !important;
    }

    body .rx-sell-lead__form-card {
        padding: 22px 17px;
        border-radius: 20px;
    }

    body .rx-lead-form .wpcf7 form.wpcf7-form {
        grid-template-columns: 1fr;
    }

    body .rx-lead-form .wpcf7 p {
        grid-column: 1 / -1;
    }

    body .rx-contact-form-box {
        padding: 24px 18px !important;
        border-radius: 20px !important;
    }

    body .rx-contact-form-grid {
        grid-template-columns: 1fr;
    }

    body .rx-contact-form-box .rx-form-group,
    body .rx-contact-form-box .rx-form-group--full,
    body .rx-contact-form-box .rx-form-privacy,
    body .rx-contact-form-box .rx-submit-btn {
        grid-column: 1 / -1;
    }

    body .rx-filter-shell {
        border-radius: 20px;
    }

    body .rx-filter-shell-head,
    body .rx-filter-shell-body {
        padding: 20px 16px;
    }

    body .rx-filter-shell-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    body #form-ricerca-avanzata .rx-filter-grid,
    body #form-ricerca-avanzata .rx-checkbox-grid {
        grid-template-columns: 1fr;
    }

    body #form-ricerca-avanzata .rx-filter-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    body #form-ricerca-avanzata .rx-btn-search,
    body #form-ricerca-avanzata .rx-btn-reset {
        width: 100% !important;
    }

    body #form-ricerca-avanzata .rx-sort-wrap {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    body #form-ricerca-avanzata .rx-sort-wrap select {
        width: 100% !important;
    }
}

/* ============================================================
   CF7 IMMOBILE — markup .si-form (v7.4)
   Il template CF7 usa div custom e NON i classici <p>.
   Questi selettori definiscono quindi layout, privacy e CTA reali.
   ============================================================ */
body .rx-lead-form .wpcf7 form.wpcf7-form {
    display: block !important;
}

body .rx-lead-form .si-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

body .rx-lead-form .si-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 0 !important;
}

body .rx-lead-form .si-row-privacy,
body .rx-lead-form .si-row-newsletter,
body .rx-lead-form .si-row-submit {
    grid-template-columns: 1fr;
    gap: 0;
}

body .rx-lead-form .si-field {
    min-width: 0;
}

body .rx-lead-form .si-field-full {
    grid-column: 1 / -1;
}

body .rx-lead-form .si-field > label {
    display: block !important;
    margin: 0 0 7px !important;
    color: var(--rxf-ink) !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 850 !important;
    letter-spacing: .015em !important;
}

body .rx-lead-form .si-field .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

body .rx-lead-form .si-field input[type="text"],
body .rx-lead-form .si-field input[type="email"],
body .rx-lead-form .si-field input[type="tel"],
body .rx-lead-form .si-field textarea {
    width: 100% !important;
    min-height: 56px !important;
    margin: 0 !important;
    border: 1px solid #D8E1EA !important;
    border-radius: 12px !important;
    background: #F7F9FC !important;
    color: var(--rxf-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

body .rx-lead-form .si-field input[type="text"],
body .rx-lead-form .si-field input[type="email"],
body .rx-lead-form .si-field input[type="tel"] {
    padding: 0 16px !important;
}

body .rx-lead-form .si-field textarea {
    min-height: 126px !important;
    padding: 15px 16px !important;
    line-height: 1.5 !important;
}

body .rx-lead-form .si-field input:focus,
body .rx-lead-form .si-field textarea:focus {
    border-color: var(--rxf-blue) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px var(--rxf-focus) !important;
}

body .rx-lead-form .si-field input::placeholder,
body .rx-lead-form .si-field textarea::placeholder {
    color: #98A5B4 !important;
    opacity: 1 !important;
}

/* Privacy/newsletter: niente look da checkbox CF7 grezza */
body .rx-lead-form .si-privacy {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #E3EAF1;
    border-radius: 12px;
    background: #F8FAFC;
}

body .rx-lead-form .si-privacy .wpcf7-form-control-wrap,
body .rx-lead-form .si-privacy .wpcf7-acceptance,
body .rx-lead-form .si-privacy .wpcf7-list-item {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

body .rx-lead-form .si-privacy .wpcf7-acceptance label,
body .rx-lead-form .si-privacy > label {
    display: grid !important;
    grid-template-columns: 20px 1fr;
    align-items: start !important;
    gap: 10px !important;
    margin: 0 !important;
    color: #64748B !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    cursor: pointer;
}

body .rx-lead-form .si-privacy input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    margin: 0 !important;
    border: 1.5px solid #B9C6D3 !important;
    border-radius: 6px !important;
    background: #fff !important;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

body .rx-lead-form .si-privacy input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
    transition: transform .12s ease;
    margin-top: -2px;
}

body .rx-lead-form .si-privacy input[type="checkbox"]:checked {
    border-color: var(--rxf-blue) !important;
    background: var(--rxf-blue) !important;
}

body .rx-lead-form .si-privacy input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

body .rx-lead-form .si-privacy input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 4px var(--rxf-focus) !important;
}

body .rx-lead-form .si-privacy a {
    color: var(--rxf-blue) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

body .rx-lead-form .si-privacy a:hover {
    text-decoration: underline !important;
}

body .rx-lead-form .si-row-submit {
    margin-top: 2px !important;
}

body .rx-lead-form .si-row-submit .wpcf7-spinner {
    margin: 10px auto 0 !important;
}

body .rx-lead-form .si-submit,
body .rx-lead-form input.si-submit[type="submit"] {
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #EA2534 0%, #D81726 100%) !important;
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
    box-shadow: 0 12px 24px rgba(225,28,42,.20) !important;
}

body .rx-lead-form .si-submit:hover,
body .rx-lead-form input.si-submit[type="submit"]:hover {
    transform: translateY(-1px) !important;
    background: linear-gradient(180deg, #D91C2A 0%, #C91422 100%) !important;
    box-shadow: 0 16px 30px rgba(225,28,42,.25) !important;
}

body .rx-lead-form .si-form .wpcf7-not-valid-tip {
    margin: 6px 0 0 !important;
}

body .rx-lead-form .si-form ~ .wpcf7-response-output,
body .rx-lead-form .wpcf7 form .wpcf7-response-output {
    margin: 16px 0 0 !important;
}

@media (max-width: 680px) {
    body .rx-lead-form .si-form {
        gap: 14px;
    }

    body .rx-lead-form .si-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body .rx-lead-form .si-field,
    body .rx-lead-form .si-field-full {
        grid-column: 1 / -1;
    }

    body .rx-lead-form .si-field input[type="text"],
    body .rx-lead-form .si-field input[type="email"],
    body .rx-lead-form .si-field input[type="tel"],
    body .rx-lead-form .si-field textarea {
        font-size: 16px !important;
    }
}

/* ============================================================
   CF7 — SCHEMI COLORE PER SINGOLO FORM (v7.5)
   ------------------------------------------------------------
   NON esiste più un colore label imposto a tutti i Contact Form.

   Nel template CF7 usa UNA delle due classi sul contenitore:

   <div class="si-form si-on-light">  -> form su fondo bianco/chiaro
   <div class="si-form si-on-color">  -> form su fondo blu/rosso/scuro

   Le stesse regole funzionano anche su un wrapper esterno del tema:
   .rx-form-on-light / .rx-form-on-color
   ============================================================ */

/* ---------- CAMPI: testo interno sempre scuro ----------
   Gli input hanno fondo bianco/chiaro, quindi ciò che si digita rimane leggibile
   indipendentemente dal colore della sezione. */
body .wpcf7 .si-form.si-on-light input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .wpcf7 .si-form.si-on-light textarea,
body .wpcf7 .si-form.si-on-light select,
body .wpcf7 .si-form.si-on-color input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .wpcf7 .si-form.si-on-color textarea,
body .wpcf7 .si-form.si-on-color select,
body .rx-form-on-light .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .rx-form-on-light .wpcf7 textarea,
body .rx-form-on-light .wpcf7 select,
body .rx-form-on-color .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .rx-form-on-color .wpcf7 textarea,
body .rx-form-on-color .wpcf7 select {
    color: var(--rxf-ink) !important;
}

body .wpcf7 .si-form.si-on-light input::placeholder,
body .wpcf7 .si-form.si-on-light textarea::placeholder,
body .wpcf7 .si-form.si-on-color input::placeholder,
body .wpcf7 .si-form.si-on-color textarea::placeholder,
body .rx-form-on-light .wpcf7 input::placeholder,
body .rx-form-on-light .wpcf7 textarea::placeholder,
body .rx-form-on-color .wpcf7 input::placeholder,
body .rx-form-on-color .wpcf7 textarea::placeholder {
    color: #98A5B4 !important;
    opacity: 1 !important;
}

/* ============================================================
   FORM SU FONDO BIANCO / CHIARO
   ============================================================ */
body .wpcf7 .si-form.si-on-light,
body .wpcf7 .si-form.si-on-light .si-field,
body .wpcf7 .si-form.si-on-light .si-field > label,
body .wpcf7 .si-form.si-on-light label,
body .wpcf7 .si-form.si-on-light .wpcf7-list-item-label,
body .wpcf7 .si-form.si-on-light .wpcf7-acceptance label,
body .wpcf7 .si-form.si-on-light .si-privacy,
body .rx-form-on-light .wpcf7,
body .rx-form-on-light .wpcf7 label,
body .rx-form-on-light .wpcf7 .wpcf7-list-item-label,
body .rx-form-on-light .wpcf7 .wpcf7-acceptance label {
    color: var(--rxf-ink) !important;
}

body .wpcf7 .si-form.si-on-light .si-privacy,
body .wpcf7 .si-form.si-on-light .si-privacy label,
body .wpcf7 .si-form.si-on-light .si-privacy .wpcf7-list-item-label {
    color: #566579 !important;
}

body .wpcf7 .si-form.si-on-light a,
body .rx-form-on-light .wpcf7 a {
    color: var(--rxf-blue) !important;
}

/* ============================================================
   FORM SU FONDO BLU / ROSSO / SCURO
   ============================================================ */
body .wpcf7 .si-form.si-on-color,
body .wpcf7 .si-form.si-on-color .si-field,
body .wpcf7 .si-form.si-on-color .si-field > label,
body .wpcf7 .si-form.si-on-color label,
body .wpcf7 .si-form.si-on-color .wpcf7-list-item-label,
body .wpcf7 .si-form.si-on-color .wpcf7-acceptance label,
body .wpcf7 .si-form.si-on-color .si-privacy,
body .rx-form-on-color .wpcf7,
body .rx-form-on-color .wpcf7 label,
body .rx-form-on-color .wpcf7 .wpcf7-list-item-label,
body .rx-form-on-color .wpcf7 .wpcf7-acceptance label {
    color: #FFFFFF !important;
}

body .wpcf7 .si-form.si-on-color a,
body .rx-form-on-color .wpcf7 a {
    color: #FFFFFF !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* Se il template usa il box .si-privacy su uno sfondo colorato,
   lo rendiamo coerente invece di lasciare una card grigia con testo bianco. */
body .wpcf7 .si-form.si-on-color .si-privacy {
    border-color: rgba(255,255,255,.24) !important;
    background: rgba(255,255,255,.10) !important;
}

body .wpcf7 .si-form.si-on-color .si-privacy label,
body .wpcf7 .si-form.si-on-color .si-privacy .wpcf7-list-item-label {
    color: rgba(255,255,255,.92) !important;
}

/* Messaggi CF7: il testo segue lo schema del singolo form. */
body .wpcf7 .si-form.si-on-light ~ .wpcf7-response-output,
body .rx-form-on-light .wpcf7 .wpcf7-response-output {
    color: var(--rxf-ink) !important;
}

body .wpcf7 .si-form.si-on-color ~ .wpcf7-response-output,
body .rx-form-on-color .wpcf7 .wpcf7-response-output {
    color: #FFFFFF !important;
}


/* ============================================================
   v7.6 — PROPERTY PAGE WHITE CARD: STRICTLY SCOPED LABEL COLOR
   Only the CF7 inside .rx-form-immobile-light is affected.
   Colored-background forms remain untouched.
   ============================================================ */
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form label,
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form .wpcf7-list-item-label,
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form .si-field,
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form .si-privacy,
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form p {
    color: #172435 !important;
}

html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form textarea,
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form select {
    color: #172435 !important;
}

html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form input[type="submit"],
html body .rx-sell-lead .rx-sell-lead__form-card .rx-form-immobile-light .wpcf7 form.wpcf7-form button[type="submit"] {
    color: #FFFFFF !important;
}
