/* Coldwell Banker San Marino. Colori dal manuale: CB Blue #012169, Bright Blue #1F69FF (pulsanti e
   link), Icy Blue #F0F5FB e Glacier #DAE1E8 (fondi tenui), Smoky Gray #58718D, Midnight #0A1730,
   Slate #1B3C55. Font: Coldwell Sans (licenza di Coldwell Banker, file nostri). */

@font-face { font-family: "Coldwell Sans"; src: url("/assets/fonts/ColdwellSans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Coldwell Sans"; src: url("/assets/fonts/ColdwellSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Coldwell Sans"; src: url("/assets/fonts/ColdwellSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Coldwell Sans"; src: url("/assets/fonts/ColdwellSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Coldwell Sans"; src: url("/assets/fonts/ColdwellSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root { --ink: #434342; --grey: #67687A; --cream: #F3F1EA; --blue: #012169; --bright: #1F69FF; --icy: #F0F5FB; --glacier: #DAE1E8; --mist: #BECAD7; --smoky: #58718D; --midnight: #0A1730; --slate: #1B3C55; --wine: #7A1F2B; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Coldwell Sans", Roboto, Arial, sans-serif; color: #000; background: #fff; line-height: 1.5; font-size: 16px; }
a { color: var(--bright); }
a:hover { color: var(--blue); }
h1, h2, h3 { color: var(--blue); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--smoky); } .small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.test-strip { background: #fff3b0; color: #000; text-align: center; font-size: .875rem; padding: 6px 16px; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #c9a400; }
.top { border-bottom: 1px solid var(--glacier); background: #fff; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.logo img { display: block; height: 24px; width: auto; } /* logo "San Marino" più lungo di "Italy" (17/11) */
.menu { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.menu a { color: #000; text-decoration: none; font-weight: 500; padding: 10px 0; }
.menu a[aria-current] { color: var(--blue); border-bottom: 2px solid var(--blue); }
.lang { color: var(--smoky); text-decoration: none; }

.btn { display: inline-block; background: var(--bright); color: #fff; border: 0; padding: 12px 20px; font: 500 1rem "Coldwell Sans", Roboto, Arial, sans-serif; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--blue); color: #fff; }
.btn-wide { width: 100%; }

.hero { position: relative; }
/* Foto della home: per cambiarla si cambia anche il NOME del file (es. home-2.jpg) qui e in templates/home.php,
   perché il CSS non ha l'impronta e i browser tengono la vecchia una settimana. */
.hero-photo { position: relative; overflow: hidden; height: 75vh; height: min(75vh, calc(100vh - 230px)); min-height: 420px; max-height: 900px; background: var(--glacier) url("/assets/media/home.jpg") center / cover no-repeat; }
.video-toggle { position: absolute; right: 20px; top: 20px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(1, 33, 105, .75); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video-toggle:hover, .video-toggle:focus-visible { background: var(--blue); }
.video-toggle[hidden] { display: none; }
.hero-photo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .wrap { position: relative; margin-top: -120px; }
.hero-box { background: #fff; padding: 28px; max-width: 1000px; box-shadow: 0 2px 12px rgba(10, 23, 48, .12); }
.filters select { -webkit-appearance: none; appearance: none; padding-right: 36px; border-radius: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23012169' stroke-width='2'/%3E%3C/svg%3E") right 14px center no-repeat; }
.filters .f-where { flex: 1 1 220px; }
.sel select, .filters select, .filters input, .req input, .req textarea { font: inherit; border: 1px solid var(--mist); padding: 10px; background: #fff; min-height: 44px; }
.sell-strip { display: flex; justify-content: space-between; margin: 24px 0; padding: 18px 20px; background: var(--icy); color: var(--blue); font-weight: 500; text-decoration: none; }

.block { margin: 32px 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: #000; }
.ph { position: relative; aspect-ratio: 4 / 3; background: var(--glacier); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-empty { background: var(--icy); border: 1px solid var(--glacier); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--slate); }
.badge { position: absolute; left: 10px; top: 10px; background: var(--midnight); color: #fff; font-size: .8rem; font-weight: 500; padding: 4px 9px; z-index: 2; }
.card-place { color: var(--smoky); font-size: .875rem; }
.card-title { font-weight: 500; }
.card-price { color: var(--blue); font-weight: 700; font-size: 1.15rem; }
.card-facts { color: var(--slate); font-size: .9rem; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--icy); padding: 14px 16px; margin: 16px 0; }
.filters label { display: flex; flex-direction: column; font-size: .85rem; color: var(--slate); gap: 4px; }
.results-head { font-size: 1.3rem; }
.note { background: var(--icy); padding: 10px 14px; color: var(--slate); }
.results { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; margin-bottom: 48px; }
.results-map { position: sticky; top: 16px; }
.map { height: 560px; background: var(--glacier); }
.map-small { height: 280px; margin: 24px 0; }
.pin span { position: relative; display: inline-block; background: var(--blue); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 7px; white-space: nowrap; transform: translate(-50%, calc(-100% - 7px)); }
/* La punta sotto il prezzo indica il luogo: senza, il riquadro copriva la costa e sembrava in mare (Raffaella, 17/11). */
.pin span::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--blue); }
/* Gruppi di immobili sulla mappa nel blu del marchio, non nel giallo/verde di serie (Raffaella, 17/11: "la mappa ha qualcosa di strano"). L'id vince sul foglio della libreria, caricato dopo. */
#map .marker-cluster-small, #map .marker-cluster-medium, #map .marker-cluster-large { background-color: rgba(1, 33, 105, .25); }
#map .marker-cluster-small div, #map .marker-cluster-medium div, #map .marker-cluster-large div { background-color: var(--blue); color: #fff; font-weight: 700; }
.pager { display: flex; gap: 16px; align-items: center; margin: 24px 0; }
.empty { padding: 32px 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

.back { display: inline-block; margin: 28px 0 22px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 8px; }
.gallery .g { position: relative; display: block; overflow: hidden; background: var(--glacier); }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-main { grid-column: span 2; grid-row: span 2; }
.gallery > .ph { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
.gallery-more { display: flex; gap: 16px; margin: 8px 0; }
.head-row { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin: 20px 0; flex-wrap: wrap; }
.big-price { color: var(--blue); font-size: 1.6rem; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; }
.big-price .pl { font-size: 1.15rem; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; margin-bottom: 48px; }
.col-side { border: 1px solid var(--glacier); padding: 20px; position: sticky; top: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 0 0 24px; }
.facts div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--icy); padding: 6px 0; }
.facts dt { color: var(--smoky); } .facts dd { margin: 0; text-align: right; }
.desc { line-height: 1.6; }
.bio p { max-width: 42rem; } /* righe di circa 70 caratteri sul computer (UX 18/11) */
.feats { columns: 2; padding-left: 18px; }

.req { display: flex; flex-direction: column; gap: 12px; }
.req label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.req .check { flex-direction: row; gap: 8px; align-items: flex-start; }
.hp { position: absolute; left: -9999px; }
.msg { padding: 14px 16px; margin: 12px 0; }
.msg-test { background: #fff3b0; border: 1px solid #c9a400; }
.msg-error { border: 2px solid var(--wine); color: var(--wine); font-weight: 500; }
.msg:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.recap dt { font-weight: 500; } .recap dd { margin: 0 0 8px; }
.sticky-cta { display: none; }
.agency-card { background: var(--icy); padding: 24px; margin-bottom: 28px; }
.agency-card h2 { margin-top: 0; }
.agency-card p { margin: 6px 0; }
.agency-head { margin-top: 36px; }
.agency-head h1 { font-weight: 300; text-transform: uppercase; letter-spacing: .03em; color: var(--blue); font-size: 1.9rem; line-height: 1.2; margin: 0 0 14px; }
@media (max-width: 600px) { .agency-head h1 { font-size: 1.4rem; } }
.agency-head.has-logo { display: flow-root; }
.agency-logo { float: right; width: 220px; height: auto; margin: 0 0 12px 24px; mix-blend-mode: multiply; } /* il logo di Gestim ha il fondo bianco nel file: "multiply" lo fonde col riquadro (Raffaella: "orrore hai preso il logo jpg con sfondo?") */
@media (max-width: 600px) { .agency-logo { float: none; display: block; width: 140px; margin: 0 0 12px; } }
.agency-contacts { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 20px; }
.people li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.people img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: center 20%; background: var(--glacier); margin-bottom: 6px; }
.person-name { font-weight: 600; color: var(--blue); }
.person-mail { font-size: .85rem; overflow-wrap: anywhere; }
@media (max-width: 600px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.legal mark { background: #fff3b0; padding: 0 2px; }
.status { padding: 14px 16px; font-weight: 700; font-size: 1.1rem; }
.status-verde { background: #e3f4e6; color: #12521f; }
.status-giallo { background: #fff3b0; color: #5c4600; }
.status-rosso { background: #f8e0e3; color: var(--wine); }
.status-lines li { margin: 8px 0; }
.error-page { padding-top: 64px; }



@media (max-width: 900px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results { grid-template-columns: 1fr; }
  .results-map { position: static; }
  .map { height: 360px; }
  .cols { grid-template-columns: 1fr; }
  .col-side { position: static; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .menu { gap: 14px; order: 3; width: 100%; }
  .lang { margin-left: auto; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .facts { grid-template-columns: 1fr; }
  .feats { columns: 1; }
  .hero-photo { height: 240px; min-height: 0; background-image: url("/assets/media/home-tel.jpg"); }
  .hero .wrap { margin-top: -60px; }
  .big-price { align-items: flex-start; }
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--bright); z-index: 900; }
  .sticky-cta a { flex: 1; color: #fff; text-align: center; padding: 14px; font-weight: 500; text-decoration: none; }
  .sticky-cta .sc-call { background: var(--blue); }
  body { padding-bottom: 56px; }
}
@media (max-width: 600px) { .logo img { height: 16px; } }
.sticky-cta.hidden { display: none !important; }
.req-mark { color: var(--smoky); font-size: .8rem; }
.req .check input { width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 2px; flex: none; }
.req .check span { flex: 1; min-width: 0; }
.all-photos { display: none; }
.all-photos:target, .all-photos:has(:target) { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 32px; }
.all-photos img { width: 100%; height: auto; }
.status-verde { background: #e3f4e6; }

/* Il titolo della pagina non sta attaccato al menu. */
.wrap > h1:first-child, .wrap.narrow > h1:first-child { margin-top: 36px; }

/* ---- Aspetto come coldwellbanker.it (17/11/2026): Coldwell Sans; maiuscolo sottile solo dai 20px
   in su, sotto i 20px maiuscolo Regular (UX: il Light piccolo al telefono non si legge). ---- */
body { color: var(--ink); }
.menu a { color: var(--ink); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }
.menu a[aria-current] { color: var(--blue); }
.lang { text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.block > .block-head h2, .block > h2, .wrap > h1:first-child, .results-head, .narrow > h1:first-child {
  font-weight: 300; text-transform: uppercase; letter-spacing: .03em; color: var(--blue); }
.wrap > h1:first-child, .narrow > h1:first-child { font-size: 2.25rem; }
.block > .block-head h2, .block > h2 { font-size: 1.75rem; }
.results-head { font-size: 1.6rem; }
.hero-box h1 { font-weight: 300; text-transform: uppercase; letter-spacing: .03em; font-size: 2rem; }

/* Etichette sulle foto: una sola; Venduto/Affittato grigio scuro, così non si confonde con Vendita. */
.badge { background: var(--blue); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 400; }
.badge-sold { background: var(--ink); }
.card-title { color: var(--blue); font-weight: 400; font-size: 1.15rem; }
.card-place { color: var(--grey); }
.card-price { color: #464C56; }
.card-facts { color: var(--grey); }
.card-code { color: var(--grey); font-size: .75rem; }

/* Ricerca della home, presa da Engel nei nostri colori. */
.tabs { border: 0; margin: 0 0 14px; padding: 0; display: flex; gap: 28px; }
.tabs label { cursor: pointer; }
.tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tabs span { display: inline-block; padding: 6px 0; text-transform: uppercase; letter-spacing: .12em; font-size: 15px; color: var(--ink); border-bottom: 3px solid transparent; }
.tabs input:checked + span { color: var(--blue); border-bottom-color: var(--blue); }
.tabs input:focus-visible + span { outline: 2px solid var(--bright); outline-offset: 2px; }
.sbox { display: flex; align-items: stretch; border: 1px solid var(--ink); background: #fff; min-height: 64px; }
.sbox-type { display: flex; align-items: center; gap: 6px; padding: 0 0 0 16px; border-right: 1px solid var(--mist); color: var(--blue); flex: 0 0 230px; }
.sbox-type select { font: inherit; color: var(--ink); border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23434342' stroke-width='1.5'/%3E%3C/svg%3E") right 14px center no-repeat;
  -webkit-appearance: none; appearance: none; height: 100%; width: 100%; padding: 0 40px 0 6px; border-radius: 0; cursor: pointer; }
/* Niente bordino azzurro del browser al clic (Raffaella); con la tastiera resta, nel blu del marchio. */
.sbox select:focus, .sbox input:focus { outline: none; }
/* Safari tratta il clic su un menu come "da tastiera" (:focus-visible vero anche col mouse): la cornice
   compare solo quando la persona si muove davvero col tasto Tab (classe "kbd", messa da site.js). */
.kbd .sbox select:focus { outline: 2px solid var(--blue); outline-offset: -6px; }
.sbox-where { flex: 1; display: flex; min-width: 0; }
.sbox-where .suggest-wrap { flex: 1; }
.sbox-where input { font: inherit; font-size: 1.15rem; border: 0; width: 100%; height: 100%; padding: 0 44px 0 18px; background: #fff; border-radius: 0; color: var(--ink); }
.sbox-where input::-webkit-search-cancel-button { display: none; }
.sbox-go { flex: 0 0 auto; width: 56px; margin: 6px; border: 0; background: var(--bright); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sbox-go:hover { background: var(--blue); }

/* Suggerimenti mentre si scrive. */
.suggest-wrap { position: relative; display: flex; }
.suggest-wrap input { flex: 1; }
.suggest-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink); cursor: pointer; padding: 6px 8px; }
.filters .suggest-wrap input { padding-right: 36px; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; margin: 1px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--mist); box-shadow: 0 8px 24px rgba(10, 23, 48, .14); max-height: 60vh; overflow-y: auto; }
.sbox .suggest { left: -1px; right: -63px; }
.suggest li { padding: 12px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--icy); }
.suggest-name { color: var(--ink); }
.suggest-name b { color: var(--blue); }
.suggest-kind { color: var(--grey); font-size: .85rem; }
.suggest .suggest-none { color: var(--grey); cursor: default; }
.suggest .suggest-none:hover { background: none; }

/* Footer come coldwellbanker.it: crema, colonne con titoli maiuscoli sottili, link maiuscoli Regular. */
.foot { background: var(--cream); color: var(--ink); margin-top: 64px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 16px 32px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .06em; font-size: 22px; color: var(--blue); margin: 0 0 8px; }
.foot-col a { color: var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.foot-col a:hover { color: var(--blue); }
.foot-brand p { color: var(--grey); max-width: 340px; margin: 12px 0 0; }
.foot-logo { height: 26px; width: auto; align-self: flex-start; }
.foot-copy { border-top: 1px solid #DDD8C9; padding: 16px; color: var(--grey); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* Visore delle foto della scheda. */
.viewer-open, .viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 2000; background: #fff; display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.v-top { display: flex; align-items: center; justify-content: center; position: relative; padding: 12px 64px; min-height: 64px; }
.v-tabs { display: flex; gap: 8px; }
.v-tabs button { font: inherit; background: none; border: 1px solid transparent; padding: 8px 16px; color: var(--ink); cursor: pointer; border-bottom: 3px solid transparent; }
.v-tabs button[aria-pressed="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.v-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.v-track { flex: 1; display: flex; gap: 2vw; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 12vw; scrollbar-width: none; align-items: center; }
.v-track::-webkit-scrollbar { display: none; }
.v-track[hidden] { display: none; }
.v-slide { flex: 0 0 76vw; height: 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; opacity: .35; transition: opacity .2s; cursor: pointer; }
.v-slide.on { opacity: 1; cursor: default; }
.v-slide img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; display: block; background: var(--icy); min-width: 40px; min-height: 40px; }
.v-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.v-arrow:disabled { opacity: .25; cursor: default; }
.v-prev { left: 20px; } .v-next { right: 20px; }
.v-slide { flex-direction: column; gap: 10px; }
.v-slide figcaption a { font-size: .9rem; }
.hero-nophoto .hero-photo { height: 60px; min-height: 0; }
.hero-nophoto .wrap { margin-top: -30px; }
.v-count { text-align: right; padding: 12px 24px; color: var(--ink); min-height: 48px; }
/* Telefono: foto una sotto l'altra, a larghezza piena, scorrimento verticale (Raffaella, 17/11/2026). */
@media (max-width: 600px) {
  .v-top { justify-content: flex-start; padding: 8px 56px 8px 4px; min-height: 56px; }
  .v-tabs { gap: 0; }
  .v-tabs button { padding: 8px 10px; }
  .v-track { position: relative; flex-direction: column; align-items: stretch; overflow-x: hidden; overflow-y: auto; scroll-snap-type: none; padding: 0 0 24px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .v-slide { flex: none; width: 100%; height: auto; opacity: 1; cursor: default; }
  .v-slide img { width: 100%; height: auto; max-height: none; min-height: 120px; }
  .v-slide figcaption { padding: 0 16px; }
  .v-arrow { display: none; }
  .v-count { min-height: 0; padding: 8px 16px; font-size: .9rem; }
}

@media (max-width: 600px) {
  .tabs { gap: 22px; }
  .sbox-type { display: none; }  /* sul telefono la tipologia sta nei filtri, non in home (UX) */
  .sbox { min-height: 56px; }
  .sbox .suggest { right: -57px; }
  .menu a { font-size: 14px; letter-spacing: .04em; }
  .hero-box h1 { font-size: 1.5rem; }
  .wrap > h1:first-child, .narrow > h1:first-child { font-size: 1.6rem; }
  .block > .block-head h2, .block > h2, .results-head { font-size: 1.35rem; }
  .foot-in { grid-template-columns: 1fr; gap: 24px; }
  .hero-nophoto .hero-photo { height: 24px; }
  .hero-nophoto .wrap { margin-top: -12px; }
  .v-tabs button { font-size: 14px; } /* il resto del visore al telefono sta nel blocco "una sotto l'altra" */
}

/* Header: logo a sinistra, voci a destra (Raffaella, 17/11/2026); sotto i 1180 px il pulsante MENU. */
.menu { flex: 1; justify-content: flex-end; gap: 26px; }
.lang { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--glacier); }
.menu-toggle { display: none; }
@media (max-width: 1180px) { /* sei voci + lingua + logo San Marino: sotto i 1180px non stanno in una riga */
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; background: none; border: 1px solid var(--mist); color: var(--ink);
    font: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; cursor: pointer; min-height: 40px; }
  .js .lang { margin-left: 0; order: 2; border-left: 0; padding-left: 8px; }
  .js .menu-toggle { order: 1; }
  .js .menu { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; padding: 0 0 12px; }
  .js .menu.open { display: flex; }
  .js .menu a { padding: 14px 0; border-bottom: 1px solid var(--glacier); font-size: 15px; }
  .js .menu a[aria-current] { border-bottom: 2px solid var(--blue); }
  .top-in { gap: 12px; }
}

/* Scheda agenzia ed elenco. */
.agency-link { display: block; text-decoration: none; color: var(--ink); }
.agency-link h2 { color: var(--blue); }
.agency-card .btn { margin-top: 8px; }

/* Chi siamo, sulla struttura di coldwellbanker.it: fasce alterne, due colonne, valori sfalsati. */
.about-hero img { display: block; width: 100%; height: 520px; object-fit: cover; }
.band { padding: 72px 0; }
.band-cream { background: var(--cream); }
.band + .wrap > .sell-strip { margin-top: 40px; }
.about h2, .about-title { font-weight: 300; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); font-size: 2.1rem; line-height: 1.2; margin: 0 0 28px; max-width: 760px; }
.about p { color: var(--grey); line-height: 1.75; }
.two-col { columns: 2; column-gap: 56px; }
.two-col p { break-inside: avoid; margin-top: 0; }
.justify, .justify p { text-align: justify; hyphens: auto; }
.letter-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 28px; }
.letter-head h2 .role { display: block; font-size: 1rem; letter-spacing: .08em; margin-top: 10px; color: var(--grey); }
.letter-head img { width: 220px; height: 220px; object-fit: cover; flex: none; }
.about-sign { color: var(--ink) !important; margin-top: 24px; }
.mission { display: grid; grid-template-columns: 1fr 380px; gap: 72px; align-items: start; }
.mission img { width: 100%; height: auto; display: block; }
.quote { font-weight: 300; font-size: 1.9rem; line-height: 1.35 !important; color: var(--blue) !important; margin: 28px 0; }
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; align-items: start; }
.vcol { display: flex; flex-direction: column; gap: 24px; }
.vimg { width: 100%; height: 200px; object-fit: cover; display: block; }
.value h3 { text-transform: uppercase; letter-spacing: .08em; font-weight: 500; color: var(--ink); font-size: 1.05rem; margin: 0 0 12px; }
.value p { text-align: justify; hyphens: auto; margin: 0 0 12px; }
@media (max-width: 1100px) {
  .values { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .vcol { display: contents; }
  .vimg { display: none; }
}
@media (max-width: 900px) {
  .mission { grid-template-columns: 1fr; gap: 32px; }
  .mission img { max-width: 360px; }
  .two-col { columns: 1; }
}
@media (max-width: 600px) {
  .about-hero img { height: 250px; }
  .band { padding: 44px 0; }
  .about h2, .about-title { font-size: 1.45rem; }
  .letter-head { flex-direction: column-reverse; gap: 16px; }
  .letter-head img { width: 140px; height: 140px; }
  .quote { font-size: 1.4rem; }
  .values { grid-template-columns: 1fr; }
}
.agency-all { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 32px; } /* aria fra i link e le foto sotto (Raffaella) */
.menu-lang { display: none; }
@media (max-width: 600px) {
  .js .top-in > .lang { display: none; }
  .js .menu .menu-lang { display: block; color: var(--grey); }
}
@media (min-width: 901px) { .only-narrow { display: none; } } /* al computer il modulo è già nella colonna di destra */

/* Collegamenti di servizio (torna ai risultati, vedi tutte le foto, vedi tutti…): maiuscolo leggero,
   senza sottolineatura (Raffaella, 17/11/2026). Regular con spaziatura: il Light piccolo non si legge. */
.back, .gallery-more a, .block-head > a, .agency-all a, .filters > a {
  text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 400; color: var(--blue); text-decoration: none; }
.back:hover, .gallery-more a:hover, .block-head > a:hover, .agency-all a:hover, .filters > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.gallery-more { gap: 28px; margin: 24px 0 32px; }
.filters > a { align-self: center; }

/* Schede agenti come coldwellbanker.it: foto verticale su fondo crema, testo a destra, bordo crema. */
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.agent-card { display: flex; gap: 22px; border: 2px solid var(--cream); padding: 12px; align-items: flex-start; }
.agent-img { flex: none; width: 150px; height: 180px; background: var(--cream); }
.agent-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agent-info { min-width: 0; padding-top: 8px; }
.agent-info p { margin: 0 0 6px; }
.agent-name { font-size: 1.2rem; color: var(--ink); }
.agent-role { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); margin-bottom: 14px !important; }
.agent-mail a { font-size: .9rem; overflow-wrap: anywhere; }
.agent-count a { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; text-decoration: none; color: var(--blue); }
.agent-compact { border: 0; padding: 0; gap: 14px; margin-bottom: 20px; }
.agent-compact .agent-img { width: 64px; height: 77px; }
.agent-compact .agent-name { font-size: 1rem; }
.agent-compact .agent-role { margin-bottom: 6px !important; }
.about .wrap > h1.about-title { color: var(--ink); font-size: 2.1rem; margin-top: 0; }
@media (max-width: 900px) { .agents { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .agent-card:not(.agent-compact) .agent-img { width: 96px; height: 115px; }
  .agent-card { gap: 14px; }
  .about .wrap > h1.about-title { font-size: 1.45rem; }
}
.letter-head > div { min-width: 0; }
@media (max-width: 600px) { .letter-head h2 .role { letter-spacing: .04em; } }
.listing-code { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); }
.listing-code strong { color: var(--ink); font-weight: 500; letter-spacing: .04em; }

/* Home, "Vendi il tuo immobile" (modello Engel, nei nostri caratteri e colori). */
.sell-home { text-align: center; margin-top: 0; }
.sell-home .eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; color: var(--grey); margin: 0 0 14px; }
.sell-home h2 { font-weight: 300; font-size: 2.6rem; color: var(--ink); margin: 0 auto 24px; max-width: 900px; line-height: 1.2; }
.sell-lead { max-width: 820px; margin: 0 auto; font-size: 1.15rem; line-height: 1.7; color: var(--ink); }
.sell-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin: 64px 0 40px; }
.sell-points svg { color: var(--ink); }
.sell-points h3 { font-weight: 300; font-size: 1.6rem; color: var(--ink); margin: 18px 0 10px; }
.sell-points p { color: var(--grey); line-height: 1.7; max-width: 340px; margin: 0 auto; }
.sell-cta { margin: 0; }
@media (max-width: 900px) { .sell-points { grid-template-columns: 1fr; gap: 36px; margin: 44px 0 32px; } }
@media (max-width: 600px) { .sell-home h2 { font-size: 1.7rem; } .sell-lead { font-size: 1.02rem; } .sell-points h3 { font-size: 1.35rem; } }
@media (max-width: 600px) { .home-latest .grid3 > .card:nth-child(n+5) { display: none; } } /* al telefono 4 immobili */
.more-mobile { display: none; text-align: center; margin: 28px 0 0; }
@media (max-width: 600px) { .more-mobile { display: block; } }
.feats-box { background: var(--cream); padding: 28px 32px; margin: 32px 0; }
.feats-box h2 { margin-top: 0; }
.feats-box .feats { margin-bottom: 0; }
@media (max-width: 600px) { .feats-box { padding: 20px 16px; margin: 24px -16px; } }
.foot-addr { color: var(--ink) !important; font-size: .95rem; line-height: 1.6; }
.foot-addr a { color: var(--blue); text-transform: none; letter-spacing: 0; font-size: inherit; }
.foot-social { display: flex; gap: 18px; margin-top: 14px !important; }
.foot-social a { color: var(--ink); }
.foot-social a:hover { color: var(--blue); }
.foot-copy p { margin: 0 0 6px; text-transform: none; letter-spacing: 0; font-size: 12px; line-height: 1.5; }
/* Contatti, struttura di coldwellbanker.it/contatti. */
.contact-band { text-align: center; }
.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-cols h2 { font-weight: 500; font-size: 1.35rem; color: var(--ink); margin: 0 0 14px; }
.contact-cols p { margin: 0 0 6px; color: var(--ink); }
.contact-form { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; align-items: start; }
.contact-title { font-weight: 300; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); font-size: 2.1rem; margin: 0 0 24px; }
.contact-form .req { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.contact-form .req > label:has(textarea), .contact-form .req > .check, .contact-form .req > .btn, .contact-form .req > p, .contact-form .req > .hp { grid-column: 1 / -1; }
.contact-map .map { height: 520px; }
@media (max-width: 900px) {
  .contact-form { grid-template-columns: 1fr; gap: 32px; }
  .contact-map .map { height: 300px; }
}
@media (max-width: 600px) {
  .contact-cols { grid-template-columns: 1fr; gap: 24px; }
  .contact-form .req { grid-template-columns: 1fr; }
  .contact-title { font-size: 1.45rem; }
}
/* Striscia di foto dell'agenzia: scorre di lato; al telefono si vede il bordo della successiva (UX). */
.agency-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.agency-strip img { flex: 0 0 auto; width: 440px; height: 380px; object-fit: cover; scroll-snap-align: start; display: block; background: var(--cream); }
@media (max-width: 600px) { .agency-strip img { width: 85vw; height: 220px; } }

/* Pagina della persona (17/11/2026), come coldwellbanker.it: foto a sinistra, chi è e come raggiungerla a destra. */
.agent-name a { color: inherit; text-decoration: none; }
.agent-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
a.agent-img { display: block; }
.agent-more a { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--blue); text-decoration: none; }
.person { display: flex; gap: 40px; align-items: flex-start; margin: 8px 0 40px; }
.person-img { flex: none; width: 300px; aspect-ratio: 34 / 41; background: var(--cream); }
.person-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-info { min-width: 0; padding-top: 4px; }
.person-info h1 { font-weight: 300; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); font-size: 2.1rem; line-height: 1.15; margin: 0 0 10px; }
.person-agency { margin: 16px 0 18px; }
.person-agency a { color: var(--blue); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.person-contacts { list-style: none; padding: 0; margin: 18px 0 0; }
.person-contacts li { margin: 0 0 8px; }
.person-contacts .muted { display: inline-block; min-width: 200px; }
.person-team { margin: 40px 0 0; }
.person-team a { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--blue); text-decoration: none; }
@media (max-width: 600px) {
  .person { gap: 16px; margin-bottom: 28px; }
  .person-img { width: 104px; }
  .person-info h1 { font-size: 1.35rem; }
  .person-contacts .muted { display: block; min-width: 0; font-size: .85rem; }
}

/* Chi siamo per le macchine e per le persone (GEO, 18/11/2026): fatti in elenco e domande scritte per esteso. */
.geo .wrap { max-width: 860px; }
.geo-lead { font-size: 1.2rem; line-height: 1.7; color: var(--ink); margin: 0 0 40px; }
.geo h2 { margin-top: 48px; }
.geo-brief { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 12px 24px; margin: 0 0 8px; }
.geo-brief dt { color: var(--grey); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; padding-top: 3px; }
.geo-brief dd { margin: 0; color: var(--ink); }
.geo-q { font-size: 1.1rem; font-weight: 500; color: var(--blue); margin: 28px 0 6px; }
.geo-q + p { margin-top: 0; }
.geo-end { margin: 40px 0 0; font-size: 1.05rem; }
.geo-agency-link { margin: 18px 0 0; }
.geo-agency-link a, .geo-end a { display: inline-block; padding: 6px 0; }
.geo-updated { margin-top: 24px; font-size: .9rem; }
.guide-index { margin: 24px 0 0; padding: 16px 20px; background: var(--icy); }
.guide-index h2 { margin: 0 0 8px; font-size: 1rem; }
.guide-index ol { margin: 0; padding-left: 1.3em; }
.guide-index a { display: inline-block; padding: 6px 0; }
.geo .guide-q { font-size: 1.25rem; margin: 40px 0 10px; scroll-margin-top: 90px; }
.guide-steps { margin: 0 0 16px; padding-left: 1.4em; }
.guide-steps li { margin: 0 0 10px; }
.geo-src { margin: 4px 0 0; color: var(--grey); }
.guide-cta { margin: 20px 0 0; }
.guide-cta-first { margin-top: 40px; }
@media (max-width: 600px) { .geo-brief { grid-template-columns: 1fr; gap: 2px; } .geo-brief dd { margin-bottom: 12px; } }
.about-hero { margin: 0; }
.hero-credit { text-align: right; font-size: 12px; color: var(--grey); padding: 6px 16px 0; max-width: 1280px; margin: 0 auto; }
figure.about-hero img { object-position: center 18%; }
/* La foto della reception ha il logo a destra: al telefono, dove si ritaglia ai lati, si tiene la parte destra. */
.hero-reception img { object-position: center 18%; }
@media (max-width: 600px) { .hero-reception img { object-position: 80% center; } }

.hero-vendi img { object-position: center 30%; }

/* Pannello Filtri (26/11/2026): sul computer una finestra sotto il pulsante, sul telefono a tutto schermo con i pulsanti sempre visibili. */
.filters .f-more { position: relative; align-self: end; }
.f-toggle { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; background: #fff; border: 1px solid var(--mist); color: var(--blue); font-weight: 500; }
.f-toggle::-webkit-details-marker { display: none; }
.f-toggle::before { content: ""; width: 18px; height: 18px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23012169' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='8' cy='17' r='2'/%3E%3C/svg%3E"); }
.f-count { background: var(--bright); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .8rem; line-height: 20px; }
.f-panel { display: none; position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; left: auto; width: 400px; max-width: 92vw; box-sizing: border-box; background: #fff; box-shadow: 0 6px 24px rgba(10, 23, 48, .2); text-align: left; }
.f-more[open] .f-panel { display: block; }
.f-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--icy); color: var(--ink, #000); }
.f-close { border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; width: 44px; height: 44px; color: var(--blue); }
.f-panel-body { padding: 8px 16px; max-height: 60vh; overflow-y: auto; }
.f-panel fieldset { border: 0; border-bottom: 1px solid var(--mist); margin: 0; padding: 14px 0; position: relative; }
.f-panel legend { font-weight: 700; padding: 0 0 8px; float: left; width: 100%; }
.f-panel fieldset > *:not(legend) { clear: both; }
.f-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-pair input { width: 100%; box-sizing: border-box; }
.f-steps { grid-column: 1 / -1; margin: 6px 0 0; padding: 0; list-style: none; max-height: 190px; overflow-y: auto; border: 1px solid var(--mist); }
.f-steps button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 12px 14px; font: inherit; cursor: pointer; min-height: 44px; }
.f-steps button:hover, .f-steps button:focus-visible { background: var(--icy); color: var(--blue); }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chips label { flex-direction: row; font-size: 1rem; color: inherit; }
.f-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.f-chips span { display: inline-block; min-width: 44px; min-height: 44px; box-sizing: border-box; line-height: 24px; padding: 10px 14px; border: 1px solid var(--mist); border-radius: 8px; cursor: pointer; text-align: center; }
.f-chips input:checked + span { background: var(--icy); border-color: var(--blue); color: var(--blue); font-weight: 500; }
.f-chips input:focus-visible + span { outline: 2px solid var(--bright); outline-offset: 2px; }
.f-switch { padding: 14px 0; }
.f-switch label { flex-direction: row; align-items: center; gap: 12px; font-size: 1rem; color: inherit; font-weight: 700; }
.f-switch input { width: 22px; height: 22px; min-height: 0; accent-color: var(--blue); }
.f-switch .small { margin: 4px 0 0 34px; font-size: .85rem; color: var(--slate); }
.f-panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--mist); background: #fff; }
.f-panel-foot a { color: var(--slate); }
.f-chiplist { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.f-chiplist a { display: inline-block; padding: 8px 12px; background: var(--icy); color: var(--blue); text-decoration: none; border-radius: 16px; font-size: .9rem; }
.f-chiplist a:hover { background: var(--glacier); }
.sortbar { margin: 4px 0 16px; color: var(--slate); font-size: .95rem; }
.sortbar a { margin-left: 12px; color: var(--blue); }
.sortbar a[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink, #000); }
@media (max-width: 600px) {
  .f-panel { position: fixed; inset: 0; top: 0; width: auto; max-width: none; z-index: 1100; display: none; flex-direction: column; box-shadow: none; }
  .f-more[open] .f-panel { display: flex; }
  .f-panel-body { flex: 1 1 auto; max-height: none; }
  .f-panel-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .f-panel-foot .btn { flex: 1 1 auto; }
  html.f-lock, html.f-lock body { overflow: hidden; }
}

/* Pannello Filtri: campi, locali su una riga, Ordina senza andare a capo a metà (UX, 26/11/2026). */
.f-pair input { font: inherit; border: 1px solid var(--mist); padding: 10px; background: #fff; min-height: 44px; border-radius: 0; color: var(--ink, #000); }
.f-switch label, .f-chips label { display: flex; }
.f-chips { gap: 6px; flex-wrap: wrap; }
.f-chips legend { flex: 0 0 100%; }
.f-chips span { min-width: 40px; padding: 10px 9px; white-space: nowrap; }
.f-chips label:first-of-type span { padding-left: 11px; padding-right: 11px; }
.sortbar a { white-space: nowrap; display: inline-block; }
@media (max-width: 600px) { .f-chips span { padding: 10px 7px; min-width: 36px; } }

/* Pagina interna delle statistiche (/numeri, solo staging). */
.stats h2 { margin-top: 32px; }
.stats-periods { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.stats-periods a { padding: 8px 14px; border: 1px solid var(--mist); color: var(--blue); text-decoration: none; min-height: 20px; }
.stats-periods a[aria-current] { background: var(--icy); border-color: var(--blue); font-weight: 700; }
.stats-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.stats-big > div { background: var(--icy); padding: 16px; }
.stats-n { display: block; font-size: 2.4rem; line-height: 1.1; color: var(--blue); font-weight: 300; }
.stats-l { display: block; font-weight: 700; margin: 4px 0; }
.stats-big small { color: var(--slate); }
.stats-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; margin: 12px 0 4px; border-bottom: 1px solid var(--mist); }
.stats-bar { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.stats-bar .v, .stats-bar .p, .stats-key.v, .stats-key.p { display: inline-block; flex: 1 1 0; background: var(--bright); }
.stats-bar .p, .stats-key.p { background: var(--midnight, #012169); }
.stats-key { width: 12px; height: 12px; flex: none; margin-left: 8px; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table td { padding: 8px 4px; border-bottom: 1px solid var(--mist); }
.stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; width: 90px; }
@media (max-width: 600px) { .stats-big { grid-template-columns: 1fr; } .stats-n { font-size: 2rem; } }
.stats-demo { background: #fff3b0; color: #000; border-left: 6px solid #c9a600; padding: 14px 16px; font-size: 1.1rem; }
