/* ==========================================================
   Stile delle pagine pubbliche (home, chi siamo, virtual tour,
   valutatore, scheda annuncio). Non serve più style.css.
   ========================================================== */

/* ---------- Base (colori del logo e impostazioni comuni) ---------- */
:root {
    --primary-color: #040F9F;      /* blu */
    --secondary-color: #E40521;    /* rosso */
    --accent-on-dark: #ff9aa6;     /* rosso chiaro leggibile sul blu */
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f4f7f6;
    --border-radius: 6px;
    --transition-speed: .3s;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; line-height: 1.6; color: var(--text-dark); background-color: var(--bg-light); }
a { text-decoration: none; color: var(--primary-color); transition: color var(--transition-speed); }
a:hover { color: var(--secondary-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Icone (disegni SVG da icone.php): prendono colore e grandezza del testo */
.ico { display: inline-block; line-height: 1; }
.ico svg { display: inline-block; height: 1em; vertical-align: -.125em; fill: currentColor; overflow: visible; }

.home {
    --blu-scuro: #020a6e;
    --testo: #1d2233;
    --testo-soft: #5c6375;
    --bordo: #e3e6ee;
    --raggio: 14px;
    --ombra: 0 4px 20px rgba(16, 24, 64, .08);
    background: #f5f6fa;
    color: var(--testo);
}
.home img { max-width: 100%; display: block; }
.home h1, .home h2, .home h3 { line-height: 1.2; }
.h-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.h-header { background: var(--primary-color); position: relative; z-index: 10; }
.h-header-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.h-logo img { width: 210px; height: auto; }
.h-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.h-nav a { color: rgba(255, 255, 255, .9); font-weight: bold; font-size: .95em; padding: 8px 12px; border-radius: 6px; }
.h-nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.h-nav .h-nav-cta { background: var(--secondary-color); color: #fff; border-radius: 50px; padding: 8px 16px; margin-left: 6px; }
.h-nav .h-nav-cta:hover { background: #c4041c; }
.h-tel { display: flex; gap: 8px; }
.h-tel a {
    display: flex; align-items: center; gap: 8px; color: #fff;
    border: 1px solid rgba(255, 255, 255, .3); border-radius: 50px; padding: 6px 14px;
}
.h-tel a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.h-tel i { color: var(--accent-on-dark); }
.h-tel span { display: flex; flex-direction: column; line-height: 1.15; font-weight: bold; font-size: .9em; }
.h-tel small { font-weight: normal; font-size: .72em; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.h-tel small span { font: inherit; letter-spacing: inherit; }   /* "Monzese" uguale a "Cologno" */
.h-tel small .h-lungo { display: inline; }

/* ---------- Hero ---------- */
.h-hero {
    position: relative;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, .12), transparent 60%),
        radial-gradient(800px 400px at 0% 110%, rgba(228, 5, 33, .25), transparent 60%),
        linear-gradient(160deg, var(--primary-color) 0%, var(--blu-scuro) 100%);
    color: #fff;
    padding: 22px 0 22px;
    border-bottom: 4px solid var(--secondary-color);
}
.h-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 28px; align-items: center; margin-bottom: 18px; }
.h-hero-testo { max-width: 760px; }
.h-hero-testo .h-sub { margin-bottom: 0; }
.h-kicker {
    display: inline-block; font-size: .8em; font-weight: bold; letter-spacing: .12em; text-transform: uppercase;
    color: #fff; background: rgba(255, 255, 255, .12); padding: 5px 12px; border-radius: 50px; margin-bottom: 12px;
}
.h-hero h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.01em; }
.h-hero h1 span { color: var(--accent-on-dark); }
.h-sub { font-size: clamp(1rem, 1.4vw, 1.12rem); opacity: .9; margin: 8px 0 0; max-width: 620px; }

/* Riquadro valutazione nel hero */
.h-valuta-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
    background: linear-gradient(135deg, var(--secondary-color), #a30318); color: #fff;
    border-radius: var(--raggio); padding: 14px 16px; box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
    border: 2px solid rgba(255, 255, 255, .25); transition: transform .2s, box-shadow .2s;
}
.h-valuta-card:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.h-valuta-icona { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; font-size: 1.4em; }
.h-valuta-testo strong { display: block; font-size: 1.15em; }
.h-valuta-desc { display: block; font-size: .85em; opacity: .92; margin-top: 2px; line-height: 1.35; }
.h-valuta-btn {
    background: #fff; color: var(--secondary-color); white-space: nowrap;
    font-weight: bold; padding: 10px 16px; border-radius: 50px; display: inline-flex; align-items: center; gap: 8px;
}

/* Ricerca */
.h-search {
    background: #fff; color: var(--testo); border-radius: var(--raggio);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25); padding: 12px 16px 14px;
}
.h-tabs { display: flex; height: 46px; background: #eef0f6; border-radius: 8px; padding: 4px; }
.h-tabs label { flex: 1; }
.h-tabs label { position: relative; cursor: pointer; }
.h-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h-tabs span { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 14px; border-radius: 6px; font-weight: bold; color: var(--testo-soft); transition: all var(--transition-speed); }
.h-tabs input:checked + span { background: var(--primary-color); color: #fff; }
.h-tabs input:focus-visible + span { outline: 3px solid var(--accent-on-dark); }
.h-search-campi { display: grid; grid-template-columns: 190px repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr) auto; gap: 12px; align-items: end; }
.h-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.h-campo > span { font-size: .8em; font-weight: bold; color: var(--testo-soft); text-transform: uppercase; letter-spacing: .04em; }
.h-campo select {
    width: 100%; height: 46px; padding: 0 34px 0 12px; font: inherit; color: var(--testo);
    border: 1px solid var(--bordo); border-radius: 8px; background: #fafbfd;
    appearance: none; -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23040F9F%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-24.8%200L146.2%20205.9%2030.3%2069.4a17.6%2017.6%200%200%200-24.8%2024.8l130.6%20129.5a17.6%2017.6%200%200%200%2024.8%200l130.6-129.5a17.6%2017.6%200%200%200%200-24.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat; background-position: right 12px center; background-size: 10px;
}
.h-campo select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(4, 15, 159, .15); }
.h-locali-scelte { display: flex; height: 46px; border: 1px solid var(--bordo); border-radius: 8px; overflow: hidden; background: #fafbfd; }
.h-locali-scelte label { flex: 1; position: relative; cursor: pointer; }
.h-locali-scelte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h-locali-scelte span {
    display: flex; align-items: center; justify-content: center; height: 100%;
    font-size: .9em; color: var(--testo-soft); border-right: 1px solid var(--bordo); transition: all var(--transition-speed);
}
.h-locali-scelte label:last-child span { border-right: 0; }
.h-locali-scelte input:checked + span { background: var(--primary-color); color: #fff; font-weight: bold; }
.h-locali-scelte input:focus-visible + span { outline: 3px solid var(--accent-on-dark); outline-offset: -3px; }
.h-search-btn {
    height: 46px; padding: 0 26px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--secondary-color); color: #fff; font: inherit; font-weight: bold; font-size: 1.05em;
    display: inline-flex; align-items: center; gap: 8px; transition: background-color var(--transition-speed);
}
.h-search-btn:hover { background: #c4041c; }
.h-piu-filtri { display: none; }


/* ---------- Sezioni ---------- */
.h-sezione { padding: 56px 0; }
#immobili { padding-top: 22px; }
#immobili .h-sezione-testa { margin-bottom: 16px; }
.h-sezione h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--primary-color); }
.h-sezione-testa { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.h-link { font-weight: bold; color: var(--primary-color); }
.h-link i { font-size: .85em; margin-left: 4px; }

/* Card immobili */
.h-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.h-card {
    position: relative; background: #fff; border-radius: var(--raggio); overflow: hidden;
    box-shadow: var(--ombra); transition: transform .25s, box-shadow .25s;
}
.h-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(16, 24, 64, .14); }
.h-card-foto { position: relative; aspect-ratio: 3 / 2; background: #e8eaf0; overflow: hidden; }
.h-card-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.h-card:hover .h-card-foto img { transform: scale(1.04); }
.h-card-contratto {
    position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .95); color: var(--primary-color);
    font-size: .72em; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 50px;
}
.h-badge {
    position: absolute; right: 12px; top: 12px; color: #fff;
    font-size: .72em; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 50px;
}
.hb-venduto    { background: #A00000; }
.hb-trattativa { background: var(--primary-color); }
.hb-nuovo      { background: #008000; }
.hb-riservata  { background: #4B0082; }
.h-card-corpo { padding: 16px 18px 18px; }
.h-card-prezzo { font-size: 1.45em; font-weight: 800; color: #c4041c; }
.h-card-prezzo small { font-size: .55em; font-weight: normal; color: var(--testo-soft); }
.h-card h3 { font-size: 1.08em; margin: 4px 0 6px; }
.h-card-link { color: var(--testo); }
.h-card-link::after { content: ""; position: absolute; inset: 0; }   /* tutta la card è cliccabile */
.h-card-link:hover { color: var(--primary-color); }
.h-card-link:focus-visible { outline: none; }
.h-card:focus-within { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.h-card-zona { color: var(--testo-soft); font-size: .92em; }
.h-card-zona i { color: var(--secondary-color); margin-right: 3px; }
.h-card-dati { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bordo); font-size: .9em; color: var(--testo); }
.h-card-dati i { color: var(--primary-color); margin-right: 4px; }
.h-card-rif { margin-left: auto; color: #6b6f7a; font-size: .9em; }
.h-vuoto { grid-column: 1 / -1; text-align: center; padding: 40px 20px; background: #fff; border-radius: var(--raggio); color: var(--testo-soft); }

.h-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.h-pager a {
    min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--bordo); border-radius: 50px; font-weight: bold; color: var(--primary-color); padding: 0 10px;
}
.h-pager a:hover { border-color: var(--primary-color); }
.h-pager a.is-active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.h-pager-gap { color: #999; padding: 0 4px; }

/* Banda valutatore */
.h-valuta { background: linear-gradient(120deg, var(--secondary-color), #a30318); color: #fff; padding: 40px 0; }
.h-valuta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.h-valuta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.h-valuta p { opacity: .92; max-width: 620px; margin-top: 6px; }
.h-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 50px; font-weight: bold; font-size: 1.05em; transition: transform .15s, box-shadow .2s; }
.h-btn-bianco { background: #fff; color: var(--secondary-color); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.h-btn-bianco:hover { color: var(--secondary-color); transform: translateY(-2px); }

/* Recensioni */
.h-recensioni { background: #fff; }
.h-voto { color: var(--testo-soft); margin-top: 6px; }
.h-voto strong { font-size: 1.3em; color: var(--testo); }
.h-stelle { color: #f5b301; letter-spacing: 2px; }
.h-rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.h-rec { margin: 0; background: #f7f8fc; border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.h-rec blockquote { margin: 0; font-style: italic; color: var(--testo); line-height: 1.65; flex: 1; }
.h-rec figcaption { display: flex; align-items: center; gap: 10px; font-weight: bold; color: var(--primary-color); }
.h-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-color); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .95em; }

/* Uffici */
.h-uffici h2 { margin-bottom: 22px; }
.h-uffici-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.h-ufficio { background: #fff; border-radius: var(--raggio); padding: 24px; box-shadow: var(--ombra); border-top: 4px solid var(--primary-color); }
.h-ufficio h3 { color: var(--primary-color); font-size: 1.25em; margin-bottom: 12px; }
.h-ufficio p { margin: 6px 0; }
.h-ufficio i { color: var(--secondary-color); width: 20px; }
.h-ufficio a { color: var(--testo); }
.h-ufficio a:hover { color: var(--primary-color); }

/* ---------- Footer ---------- */
.h-footer { background: var(--primary-color); color: rgba(255, 255, 255, .85); border-top: 4px solid var(--secondary-color); }   /* stesso blu dello sfondo del logo */
.h-footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-top: 40px; padding-bottom: 30px; }
.h-footer-logo { width: 200px; height: auto; margin-bottom: 12px; }
.h-footer h3 { color: #fff; font-size: .95em; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.h-footer nav a { display: block; color: rgba(255, 255, 255, .8); padding: 3px 0; }
.h-footer nav a:hover { color: #fff; }
.h-copy { text-align: center; padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82em; margin: 0; }

/* ==========================================================
   Pagine pubbliche interne (Chi siamo, Virtual tour...)
   ========================================================== */
.h-nav a.is-active { color: #fff; background: rgba(255, 255, 255, .14); }

.p-hero {
    background:
        radial-gradient(900px 400px at 90% -20%, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(160deg, var(--primary-color) 0%, var(--blu-scuro) 100%);
    color: #fff; padding: 34px 0 32px; border-bottom: 4px solid var(--secondary-color);
}
.p-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
.p-hero .h-sub { margin-top: 8px; }

.p-titolo-centro { text-align: center; max-width: 680px; margin: 0 auto 30px; }
.p-titolo-centro p { color: var(--testo-soft); margin-top: 8px; }

/* Storia */
.p-storia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center; }
.p-foto { margin: 0; border-radius: var(--raggio); overflow: hidden; box-shadow: var(--ombra); background: #e8eaf0; position: relative; }
.p-foto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--secondary-color); }
.p-foto img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.p-testo h2 { margin-bottom: 14px; }
.p-testo p { line-height: 1.75; margin-bottom: 12px; color: var(--testo); }
.p-numeri { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.p-numeri li { background: #fff; border: 1px solid var(--bordo); border-radius: 12px; padding: 14px; box-shadow: var(--ombra); }
.p-numeri strong { display: block; font-size: 1.6em; color: var(--primary-color); line-height: 1.1; }
.p-numeri strong i { color: #f5b301; font-size: .6em; vertical-align: middle; }
.p-numeri span { font-size: .85em; color: var(--testo-soft); }

/* Servizi */
.p-servizi { background: #fff; }
.p-servizi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.p-servizio {
    display: block; background: #f7f8fc; border: 1px solid var(--bordo); border-radius: var(--raggio);
    padding: 24px; color: var(--testo); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.p-servizio:hover { transform: translateY(-3px); box-shadow: var(--ombra); border-color: #cdd2e3; color: var(--testo); }
.p-servizio > i {
    width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: var(--primary-color); color: #fff; font-size: 1.3em; margin-bottom: 14px;
}
.p-servizio h3 { color: var(--primary-color); font-size: 1.12em; margin-bottom: 6px; }
.p-servizio p { color: var(--testo-soft); line-height: 1.6; }
.p-servizio-cta { background: linear-gradient(135deg, var(--secondary-color), #a30318); border-color: transparent; color: #fff; }
.p-servizio-cta:hover { color: #fff; }
.p-servizio-cta > i { background: rgba(255, 255, 255, .2); }
.p-servizio-cta h3, .p-servizio-cta p { color: #fff; }
.p-servizio-cta span { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: bold; background: #fff; color: var(--secondary-color); padding: 7px 16px; border-radius: 50px; }

/* Valori */
.p-valori-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.p-valore { background: #fff; border-radius: var(--raggio); padding: 26px; box-shadow: var(--ombra); border-left: 5px solid var(--secondary-color); }
.p-valore h3 { color: var(--primary-color); font-size: 1.2em; margin-bottom: 12px; }
.p-valore h3 i { color: var(--secondary-color); margin-right: 6px; }
.p-valore p { line-height: 1.7; margin-bottom: 10px; }

@media (max-width: 860px) {
    .p-storia { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 520px) {
    .p-hero { padding: 24px 0; }
    .p-numeri { grid-template-columns: 1fr; }
    .p-numeri li { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; }
    .p-numeri strong { font-size: 1.3em; }
    .p-servizi-grid { grid-template-columns: 1fr; }
    .p-servizio { padding: 18px; }
}

/* Virtual tour */
.v-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; align-items: center; }
.v-demo-testo p { line-height: 1.75; margin-bottom: 12px; }
.v-demo-testo h2 { margin-bottom: 14px; }
.v-prova { background: #eef0fb; border-radius: 10px; padding: 12px 14px; color: var(--primary-color); font-size: .92em; }
.v-prova i { margin-right: 6px; }
.v-player { position: relative; aspect-ratio: 16 / 10; border-radius: var(--raggio); overflow: hidden; background: #11152a; box-shadow: 0 14px 40px rgba(16, 24, 64, .2); }
.v-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v-immobili { background: #fff; }
.v-sottotitolo { color: var(--testo-soft); margin-top: 6px; }
.v-badge-3d { background: var(--primary-color); }
.v-badge-3d i { margin-right: 4px; }
.p-servizi-grid.v-quattro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .p-servizi-grid.v-quattro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .p-servizi-grid.v-quattro { grid-template-columns: 1fr; } }
.v-passi { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.v-passi li { background: #fff; border-radius: var(--raggio); padding: 26px 22px; box-shadow: var(--ombra); position: relative; }
.v-num {
    width: 44px; height: 44px; border-radius: 50%; background: var(--secondary-color); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2em; margin-bottom: 12px;
}
.v-passi h3 { color: var(--primary-color); margin-bottom: 6px; }
.v-passi p { color: var(--testo-soft); line-height: 1.6; }
@media (max-width: 860px) {
    .v-demo { grid-template-columns: 1fr; gap: 22px; }
    .v-player { order: -1; aspect-ratio: 4 / 3; }
    .v-passi { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    /* numeri sempre visibili: niente icona, testo più piccolo */
    .h-header-inner { gap: 14px; }
    .h-logo img { width: 180px; }
    .h-nav a { padding: 6px 8px; font-size: .9em; }
    .h-tel { gap: 6px; }
    .h-tel a { padding: 5px 11px; }
    .h-tel i { display: none; }
    .h-tel span { font-size: .82em; }
    .h-search-campi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .h-locali { grid-column: span 2; }
    .h-search-btn { grid-column: span 2; justify-content: center; }
}
@media (max-width: 1000px) {
    .h-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .h-valuta-card { padding: 12px 16px; }
    .h-valuta-desc { display: none; }
    .h-valuta-btn { padding: 8px 14px; }
}
@media (max-width: 860px) {
    .h-header-inner { flex-wrap: wrap; gap: 12px; }
    .h-logo img { width: 132px; }
    .h-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; justify-content: space-between; }
    .h-nav a { white-space: nowrap; padding: 6px 8px; font-size: .9em; }
    .h-nav .h-nav-cta { margin-left: 0; padding: 6px 12px; }
    .h-lungo, .h-tel small .h-lungo { display: none; }
    .h-tel { margin-left: auto; }
    .h-hero { padding: 20px 0 22px; }
    .h-search-campi { grid-template-columns: 1fr 1fr; }
    .h-locali, .h-search-btn { grid-column: 1 / -1; }
    .h-search-btn { justify-content: center; }
    .h-footer-inner { grid-template-columns: 1fr 1fr; }
    .h-footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .h-nav { display: none; }
    .h-header-inner { flex-wrap: nowrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
    .h-logo { flex: 0 1 140px; min-width: 80px; }          /* il logo si restringe invece di mandare a capo i numeri */
    .h-logo img { width: 100%; max-width: 140px; }
    .h-tel { flex: 0 0 auto; flex-direction: column; gap: 4px; margin-left: auto; }
    .h-tel a { padding: 3px 10px; justify-content: flex-end; }
    .h-tel span { flex-direction: row; align-items: baseline; gap: 6px; font-size: .8em; white-space: nowrap; }
    .h-tel small { font-size: .78em; }
}
@media (max-width: 380px) {
    .h-logo { min-width: 64px; }
    .h-tel span { font-size: min(.74em, 3.6vw); gap: 4px; }
    .h-tel a { padding: 3px 8px; }
    .h-hero h1, .h-sub { overflow-wrap: anywhere; hyphens: auto; }
    .h-valuta-btn { white-space: normal; text-align: center; }
    .h-ufficio a, .h-link, .h-footer a { overflow-wrap: anywhere; }
}
@media (max-width: 520px) {
    .h-wrap { padding-left: 16px; padding-right: 16px; }
    .h-footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .h-footer nav a { overflow-wrap: anywhere; }
    .h-kicker { display: none; }
    .h-sub { font-size: .95rem; }
    .h-valuta-icona { display: none; }
    .h-valuta-card { grid-template-columns: 1fr auto; gap: 10px; }
    .h-valuta-testo strong { font-size: 1.05em; }
    /* filtri secondari nascosti finché non si preme "Più filtri" */
    .h-search:not(.filtri-aperti) .h-extra { display: none; }
    .h-piu-filtri {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
        border: 1px solid var(--bordo); border-radius: 8px; background: #fff; color: var(--primary-color);
        font: inherit; font-weight: bold; cursor: pointer;
    }
    .h-search.filtri-aperti .h-piu-filtri { background: #eef0fb; }
    .h-search-campi { grid-template-columns: 1fr 1fr; }
    .h-search-campi > .h-campo { grid-column: 1 / -1; }
    .h-search-campi .h-search-btn { grid-column: auto; }
    .h-search { padding: 14px; }
    .h-tabs { display: flex; }
    .h-tabs label { flex: 1; text-align: center; }
    .h-grid { grid-template-columns: 1fr; }
    .h-sezione { padding: 40px 0; }
    .h-valuta-inner .h-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .h-card, .h-card-foto img, .h-btn { transition: none; }
}

/* ==========================================================
   Pagine per città (valutazione e vendita): /valutazione-casa-brugherio/ ecc.
   ========================================================== */
.z-briciole { font-size: .85em; opacity: .85; margin-bottom: 10px; }
.z-briciole a { color: #fff; text-decoration: underline; }
.z-briciole a:hover { color: var(--accent-on-dark); }
.z-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.h-btn-rosso { background: var(--secondary-color); color: #fff; box-shadow: 0 6px 20px rgba(228, 5, 33, .3); }
.h-btn-rosso:hover { color: #fff; background: #c4041c; transform: translateY(-2px); }
.h-btn-vuoto { border: 2px solid rgba(255, 255, 255, .7); color: #fff; }
.h-btn-vuoto:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.z-due { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.z-testo h2 { margin-bottom: 14px; }
.z-testo h3 { color: var(--primary-color); font-size: 1.15em; margin: 22px 0 8px; }
.z-testo p { line-height: 1.75; margin-bottom: 12px; }
.z-testo ul { margin: 0 0 14px 20px; line-height: 1.7; }
.z-fonte { font-size: .82em; color: var(--testo-soft); }
.z-fonte a, .z-testo p a, .z-testo li a, .z-passi a, .z-faq a { text-decoration: underline; text-underline-offset: 2px; }

.z-esempio { background: #fff; border-radius: var(--raggio); box-shadow: var(--ombra); padding: 24px; border-top: 4px solid var(--secondary-color); }
.z-esempio h3 { color: var(--primary-color); font-size: 1.1em; margin-bottom: 4px; }
.z-esempio .z-cifra { font-size: 2em; font-weight: 800; color: var(--testo); line-height: 1.2; margin: 8px 0 2px; }
.z-esempio p { color: var(--testo-soft); line-height: 1.6; }
.z-esempio + .z-esempio, .z-esempio + .h-ufficio { margin-top: 18px; }

.z-passi { list-style: none; counter-reset: passo; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.z-passi li { counter-increment: passo; background: #fff; border-radius: var(--raggio); padding: 22px; box-shadow: var(--ombra); }
.z-passi li::before {
    content: counter(passo); width: 38px; height: 38px; border-radius: 50%; background: var(--secondary-color); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 10px;
}
.z-passi h3 { color: var(--primary-color); font-size: 1.05em; margin-bottom: 6px; }
.z-passi p { color: var(--testo-soft); line-height: 1.6; }

.z-check { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; margin: 0; }
.z-check li { display: flex; gap: 10px; line-height: 1.55; }
.z-check li > .ico { color: var(--secondary-color); margin-top: 3px; }

.z-faq { max-width: 860px; }
.z-faq details { background: #fff; border: 1px solid var(--bordo); border-radius: 12px; margin-bottom: 10px; }
.z-faq summary { cursor: pointer; padding: 16px 20px; font-weight: bold; color: var(--primary-color); list-style-position: inside; }
.z-faq details[open] summary { border-bottom: 1px solid var(--bordo); }
.z-faq details p { padding: 14px 20px 18px; line-height: 1.7; }

.z-bianca { background: #fff; }
@media (max-width: 860px) {
    .z-due { grid-template-columns: 1fr; gap: 24px; }
}
.h-card-prezzo.z-venduto { color: var(--testo-soft); }
.z-stretto { max-width: 860px; }

.h-ufficio .h-ufficio-zone { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bordo); font-size: .9em; color: var(--testo-soft); }
.h-ufficio .h-ufficio-zone a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 2px; }
.v-citta { text-align: center; font-size: .85em; color: #5f6470; margin-top: 8px; }
.v-citta a { text-decoration: underline; text-underline-offset: 2px; }

.p-valore p a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Dati dell'agenzia (azienda.php): orari, WhatsApp, voto Google ---------- */
.h-orari-box { display: flex; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bordo, #e3e6ee); font-size: .92em; }
.h-orari-box > .ico { color: var(--secondary-color); margin-top: 3px; }
.h-orari { list-style: none; margin: 0; padding: 0; }
.h-orari li { display: flex; gap: 12px; }
.h-orari li span:first-child { min-width: 64px; font-weight: bold; }
.h-orari-nota { font-size: .9em; color: var(--testo-soft, #5c6375); margin: 4px 0 0; }
.h-wa { position: fixed; right: 18px; bottom: 78px; z-index: 50;   /* sopra il pulsante delle preferenze cookie di iubenda (in basso a destra) */ width: 58px; height: 58px; border-radius: 50%;
        background: #128C7E; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .25); cursor: pointer; list-style: none; transition: transform .15s; }
.h-wa:hover { color: #fff; transform: scale(1.06); }
.h-wa::-webkit-details-marker { display: none; }
.h-wa-menu > div { position: fixed; right: 18px; bottom: 146px; z-index: 50; background: #fff; border-radius: 14px; padding: 8px;
                   box-shadow: 0 10px 30px rgba(0, 0, 0, .2); display: flex; flex-direction: column; min-width: 240px; }
.h-wa-menu > div a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; color: #1d2233; font-weight: bold; }
.h-wa-menu > div a .ico { color: #128C7E; font-size: 1.3em; }
.h-wa-menu > div a:hover { background: #eef7f5; color: #1d2233; }
.h-google { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: inherit; }
.h-google > .ico { color: #4285F4; font-size: 1.1em; }
.h-google em { font-style: normal; font-weight: bold; text-decoration: underline; text-underline-offset: 2px; }
.h-ufficio-google { margin-top: 10px; font-size: .92em; }
@media print { .h-wa, .h-wa-menu { display: none; } }
.h-voto-link { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Chi cerca casa ("Abbiamo già chi compra") e "Cerco casa" ---------- */
.z-chicerca { background: #eef0fb; }
.z-cerca-lista { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0 0 14px; padding: 0; }
.z-cerca-lista li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--bordo); border-radius: 12px; padding: 14px 16px; }
.z-cerca-lista li > .ico { color: var(--secondary-color); font-size: 1.3em; margin-top: 2px; flex-shrink: 0; }
.z-cerca-lista strong { display: block; color: var(--primary-color); line-height: 1.35; }
.z-cerca-lista span { color: var(--testo-soft); font-size: .88em; }
.z-chicerca .z-fonte a { text-decoration: underline; }
.h-cerco { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: #fff; border: 1px solid var(--bordo); border-left: 5px solid var(--secondary-color); border-radius: var(--raggio); padding: 20px 24px; box-shadow: var(--ombra); }
.h-cerco h2 { font-size: 1.3em; color: var(--primary-color); margin-bottom: 4px; }
.h-cerco p { color: var(--testo-soft); }


/* ---------- Ricerca: superficie, servizi e ordinamento ---------- */
.h-search-piu { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bordo); }
.h-campo-mq { width: 190px; }
.h-servizi-scelte { display: flex; flex-wrap: wrap; gap: 8px; }
.h-servizi-scelte label { position: relative; cursor: pointer; }
.h-servizi-scelte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h-servizi-scelte span { display: inline-flex; align-items: center; height: 46px; padding: 0 16px; border: 1px solid var(--bordo); border-radius: 50px; background: #fafbfd; color: var(--testo-soft); font-size: .92em; transition: all var(--transition-speed); }
.h-servizi-scelte span::before { content: '+'; margin-right: 6px; font-weight: bold; }
.h-servizi-scelte input:checked + span { background: var(--primary-color); border-color: var(--primary-color); color: #fff; font-weight: bold; }
.h-servizi-scelte input:checked + span::before { content: '✓'; }
.h-servizi-scelte input:focus-visible + span { outline: 3px solid var(--accent-on-dark); }
.h-risultati-azioni { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.h-ordina { display: flex; align-items: center; gap: 8px; }
.h-ordina label { font-size: .9em; color: var(--testo-soft); font-weight: bold; }
.h-ordina select { height: 40px; padding: 0 10px; font: inherit; color: var(--testo); border: 1px solid var(--bordo); border-radius: 8px; background: #fff; }
.h-prezzi-link { margin-top: 18px; color: rgba(255, 255, 255, .85); font-size: .95em; }
.h-prezzi-link a { color: #fff; text-decoration: underline; }
@media (max-width: 520px) {
    .h-campo-mq { width: 100%; }
    .h-servizi-scelte span { height: 40px; padding: 0 12px; }
}

/* ---------- Pagine "Prezzi delle case" ---------- */
.pz-numeri { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 40px; }
.pz-numeri li { background: #fff; border-radius: var(--raggio); box-shadow: var(--ombra); padding: 20px 22px; border-top: 4px solid var(--primary-color); }
.pz-numeri strong { display: block; font-size: 1.6em; color: var(--primary-color); line-height: 1.2; }
.pz-numeri span { color: var(--testo-soft); font-size: .95em; }
/* Righe con barra (prezzo per zona / per comune) */
.pz-barre { list-style: none; background: #fff; border-radius: var(--raggio); box-shadow: var(--ombra); padding: 6px 22px; margin-bottom: 10px; }
.z-testo .pz-barre { margin-left: 0; }
.pz-barre li { padding: 16px 0; border-bottom: 1px solid var(--bordo); }
.pz-barre li:last-child { border-bottom: 0; }
.pz-barre-testa { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.pz-barre-nome { font-weight: bold; color: var(--testo); }
.pz-barre-nome a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 3px; }
.pz-barre-testa strong { font-size: 1.35em; color: var(--primary-color); white-space: nowrap; line-height: 1.1; }
.pz-barre-testa small { font-size: .62em; font-weight: normal; color: var(--testo-soft); margin-left: 2px; }
.pz-barra { position: relative; height: 10px; border-radius: 10px; background: #eef0f6; }
.pz-forbice { position: absolute; top: 0; bottom: 0; border-radius: 10px; background: rgba(4, 15, 159, .22); }
.pz-punto { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 0 3px #fff; }
.pz-barre-da { margin-top: 8px; font-size: .86em; color: var(--testo-soft); }
.pz-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .84em; color: var(--testo-soft); margin-bottom: 10px; }
.pz-l-forbice { display: inline-block; width: 28px; height: 8px; border-radius: 8px; background: rgba(4, 15, 159, .22); }
.pz-l-punto { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-color); margin-left: 10px; }

/* Schede "Quanto costa una casa" */
.pz-case { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 0 auto; }
.pz-case li { background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 24px; display: flex; flex-direction: column; }
.pz-case-tipo { font-weight: bold; color: var(--primary-color); font-size: 1.1em; display: flex; align-items: center; gap: 8px; }
.pz-case-tipo span { margin-left: auto; font-weight: normal; font-size: .85em; color: var(--testo-soft); background: #eef0f6; border-radius: 50px; padding: 2px 10px; }
.pz-case-prezzo { font-size: 2em; font-weight: 800; color: var(--testo); line-height: 1.15; margin-top: 14px; }
.pz-case-nota { color: var(--testo-soft); font-size: .9em; margin-bottom: 14px; }
.pz-case dl { border-top: 1px solid var(--bordo); margin-bottom: 14px; }
.pz-case dl div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bordo); font-size: .95em; }
.pz-case dt { color: var(--testo-soft); }
.pz-case dd { font-weight: bold; color: var(--testo); white-space: nowrap; }
.pz-case-link { margin-top: auto; font-weight: bold; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) {
    .pz-case { grid-template-columns: 1fr; max-width: 460px; }
}
.pz-blocco .z-testo > h2 { margin-bottom: 14px; }
@media (max-width: 520px) {
    .pz-barre { padding: 4px 16px; }
    .pz-barre-testa strong { font-size: 1.2em; }
    .pz-numeri strong { font-size: 1.35em; }
}
.z-esempio p + p { margin-top: 8px; }
.h-valuta-citta { margin-top: 8px; font-size: .95em; opacity: .9; }
.h-valuta-citta a { color: #fff; text-decoration: underline; }
.h-sfoglia { margin-top: 26px; color: var(--testo-soft); line-height: 1.8; }
.h-sfoglia a { font-weight: bold; text-decoration: underline; text-underline-offset: 2px; }
