/* ==========================================================================
   Immobiliare Paradisi — V3 "clean"
   Inter Tight per titoli, testi e interfaccia.
   Rosso    Pantone 2347 C        #C90500  (versione scurita per lo schermo; il 2347 "pieno" è #E10600)
   Petrolio Pantone 19-4524 TCX  #00585E
   ========================================================================== */

:root {
  --white: #FFFFFF;
  --paper: #F1F5F4;
  --paper-2: #E3ECEB;
  --ink: #0E1F20;
  --muted: #4A5D5F;
  --petrol: #00585E;
  --petrol-ink: #00454A;
  --deep: #0B2B2E;
  --tint: #A9D2CF;
  --red: #C90500;
  --red-deep: #A30400;
  --amber: #7A4E0E;
  --amber-bg: #FBEFD9;

  --display: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ui: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-small: 14px;
  --fs-body: clamp(16px, 15.5px + .15vw, 17px);
  --fs-lead: clamp(19px, 17px + .4vw, 22px);
  --fs-head: clamp(28px, 22px + 1vw, 38px);
  --fs-hero: clamp(36px, 26px + 2.6vw, 60px);

  --m: clamp(16px, 2.6vw, 32px);
  --gap: clamp(72px, 7vw, 112px);
  --r: 8px;
  --header-h: 76px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* l'attributo hidden vince sempre sugli stili dei componenti */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0 0 1em; }
figure { margin: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bar { width: 100%; max-width: 1760px; margin: 0 auto; padding-inline: var(--m); }
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding-inline: var(--m); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--petrol); color: #fff; }
section[id], [id="contatta"], [id="posizione"], [id="video"] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Bottoni e link ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border: 0; border-radius: var(--r);
  font: 600 15px/1 var(--ui); letter-spacing: .01em; white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-ink { background: var(--deep); color: #fff; }
.btn-ghost { background: var(--paper-2); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-red:hover { background: var(--red-deep); }
  .btn-ink:hover { background: var(--petrol); }
  .btn-ghost:hover { background: var(--deep); color: #fff; }
  .btn-light:hover { background: var(--paper); }
}
.link {
  display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1.3 var(--ui); color: var(--petrol);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .3em; text-decoration-color: transparent;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
.link .icon { transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .link:hover .icon { transform: translateX(4px); }
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; height: var(--header-h); background: var(--white); transition: box-shadow var(--t-ui) ease; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--paper-2); } /* taste-skill-ignore: barra fissa */
.site-header .bar { height: 100%; display: flex; align-items: center; gap: 40px; max-width: 1360px; }
.brand { flex: none; }
.brand img { height: 44px; width: auto; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { font: 600 15px/1 var(--ui); color: var(--ink); padding: 8px 0; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 8px; text-decoration-thickness: 2px; transition: text-decoration-color var(--t-hover) ease; }
.main-nav a[aria-current] { text-decoration-color: var(--red); }
@media (hover: hover) and (pointer: fine) { .main-nav a:hover { text-decoration-color: var(--ink); } }
.main-nav .nav-phone { display: none; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-phone { font: 600 15px/1 var(--ui); color: var(--petrol); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; }


/* ---------- Hero con ricerca ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  min-height: min(760px, calc(100svh - var(--header-h))); display: grid; place-items: center;
  padding: 72px var(--m) 120px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; opacity: 0; transition: opacity 1.4s var(--ease-soft); }
.hero-bg.is-on { opacity: 1; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(6, 26, 28, .5); }
.hero-inner { width: 100%; max-width: 1040px; text-align: center; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 14px; }
.hero-lead { font-size: var(--fs-lead); color: rgba(255, 255, 255, .92); margin: 0 auto 36px; max-width: 62ch; text-wrap: balance; }
.hero-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 22px 0 0; font-size: 15px; font-weight: 600; }
.hero-quick a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: .3em; transition: text-decoration-color var(--t-hover) ease; }
.hero-quick a:hover { text-decoration-color: #fff; }
.hero-stats {
  position: absolute; left: 0; right: 0; bottom: 0; list-style: none; margin: 0; padding: 18px var(--m);
  display: flex; justify-content: center; gap: 40px; font-size: 15px; color: rgba(255, 255, 255, .88); background: rgba(6, 26, 28, .45);
}
.hero-stats b { font: 500 22px/1 var(--display); color: #fff; margin-right: 6px; }

/* Blocco di ricerca */
.search { text-align: left; }
.search-tabs { display: inline-flex; gap: 2px; padding: 4px; background: rgba(255, 255, 255, .18); border-radius: var(--r) var(--r) 0 0; }
.search-tabs label { position: relative; padding: 9px 18px; border-radius: 6px; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.search-tabs label:has(input:checked) { background: #fff; color: var(--ink); }
.search-tabs label:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.search-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.search-box {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: stretch;
  background: #fff; color: var(--ink); border-radius: 0 var(--r) var(--r) var(--r); padding: 8px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); /* taste-skill-ignore: il blocco di ricerca galleggia sulla foto */
}
.sf { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 18px; min-width: 0; border-radius: 6px; transition: background-color var(--t-hover) ease; }
.sf:hover, .sf:focus-within { background: var(--paper); }
.sf > label { font-size: 13px; font-weight: 700; color: var(--muted); }
.sf-control { display: flex; align-items: center; gap: 8px; }
.sf-control .icon { color: var(--red); }
.sf input { width: 100%; min-width: 0; border: 0; padding: 4px 0; background: transparent; font-size: 16px; font-weight: 600; outline: none; }
.sf input::placeholder { color: #6E8183; font-weight: 500; }
.search-go { height: auto; min-height: 58px; padding: 0 28px; margin-left: 8px; }

/* Select personalizzato (il <select> resta nel form per l'invio) */
.sel { position: relative; }
.sel select { position: absolute; inset: 0; width: 100%; opacity: 0; pointer-events: none; }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; padding: 4px 0; font-size: 16px; font-weight: 600; text-align: left; color: var(--ink); }
.sel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn .icon { width: 16px; height: 16px; color: var(--muted); transition: transform var(--t-ui) var(--ease-out); }
.sel.open .sel-btn .icon { transform: rotate(180deg); }

/* Pannello suggerimenti e opzioni (montato nel body, posizione fissa) */
.pop-panel {
  position: fixed; z-index: 2500; background: #fff; color: var(--ink); border-radius: 12px; padding: 8px;
  box-shadow: 0 24px 60px -18px rgba(6, 26, 28, .42), 0 0 0 1px rgba(6, 26, 28, .06); /* taste-skill-ignore: pannello che galleggia */
  max-height: min(460px, 62vh); overflow-y: auto; font-family: var(--ui); text-align: left;
}
.pop-panel[hidden] { display: none; }
.pop-panel.in { animation: pop var(--t-ui) var(--ease-out); }
.pp-group { padding: 10px 12px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pp-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.pp-opt[aria-selected="true"] { background: var(--paper); }
@media (hover: hover) and (pointer: fine) { .pp-opt:hover { background: var(--paper); } }
.pp-opt > .icon { color: var(--red); }
.pp-opt mark { background: none; color: var(--petrol); font-weight: 700; }
.pp-opt .s-kind { font-size: 13px; color: var(--muted); font-weight: 500; }
.pp-opt > span:first-of-type:not(.tx) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-opt .n { margin-left: auto; padding-left: 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pp-opt.chosen { color: var(--petrol); font-weight: 700; }
.pp-opt .ok { margin-left: auto; color: var(--red); }
.pp-home img, .pp-home .pp-ph { width: 60px; height: 45px; border-radius: 6px; object-fit: cover; flex: none; background: var(--paper-2); }
.pp-home .pp-ph { background: var(--paper) url(../img/Immobiliare_Logo_Symbol.svg) center / 50% no-repeat; }
.pp-home .tx { min-width: 0; }
.pp-home .t { display: block; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-home .s { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-home .p { margin-left: auto; padding-left: 12px; font-weight: 700; white-space: nowrap; }
.pp-empty { padding: 14px 12px; font-size: 15px; color: var(--muted); }

/* ---------- Sezioni ---------- */
.section { padding-block: var(--gap); }
.section-soft { background: var(--paper); }
.section-tight { padding-block: calc(var(--gap) * .6); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-intro h2 { font-size: var(--fs-head); margin-bottom: 8px; }
.section-intro p { margin: 0; max-width: 60ch; }
.section-intro .link { flex: none; }

/* ---------- Servizi ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { background: var(--paper); border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; transition: background-color var(--t-hover) ease; }
.service:hover { background: var(--paper-2); }
.service h3 { font-size: 24px; margin-bottom: 10px; }
.service p { flex: 1; }

/* ---------- Valutazione ---------- */
.valuta { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 16px; overflow: hidden; background: var(--deep); color: #fff; }
.valuta-photo { min-height: 380px; }
.valuta-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.valuta-text { padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.valuta-text h2 { font-size: var(--fs-head); margin-bottom: 14px; }
.valuta-text p { color: rgba(255, 255, 255, .86); max-width: 46ch; }
.valuta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- Sedi e team ---------- */
.sedi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sede { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 16px; overflow: hidden; }
.sede-map { min-height: 280px; background: var(--paper-2); }
.sede-foto { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.sede-orari { color: var(--muted); font-size: 15px; }
.sede-info { padding: 28px; }
.sede-info h3 { font-size: 28px; margin-bottom: 12px; color: var(--petrol); }
.sede-info p { margin-bottom: 12px; }
.sede-info a:not(.link) { text-decoration: underline; text-decoration-color: #B9CCCB; text-underline-offset: .2em; }
.team-title { font-size: 24px; margin: 64px 0 20px; }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: 14px; background: var(--paper-2); }
.team span { display: block; font-weight: 600; margin-top: 10px; }
.team small { display: block; color: var(--muted); font-size: 14px; }
.team-iniziale { display: grid !important; place-items: center; width: 100%; aspect-ratio: 1; margin: 0 !important; border-radius: 14px; background: var(--paper-2); font: 600 48px/1 var(--display) !important; color: var(--petrol); }
.team .is-evidenza img, .team .is-evidenza .team-iniziale { box-shadow: 0 0 0 3px var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, .8); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-logo { height: 44px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-brand p { max-width: 34ch; }
.site-footer h4 { font: 700 15px/1.3 var(--ui); color: #fff; letter-spacing: 0; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.footer-social { margin-top: 14px !important; padding-top: 14px !important; border-top: 1px solid rgba(255, 255, 255, .14); }
.footer-bottom { margin-top: 56px; font-size: 13px; color: rgba(255, 255, 255, .62); }
.footer-bottom p { margin: 0 0 4px; max-width: 90ch; }
.footer-bottom b { color: #fff; }


/* ---------- Card immobile ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
/* "In evidenza" a carosello (home): 3 schede per volta, 2 sotto i 1200px, una e un pezzo della successiva sotto i 640px */
.ev-carosello { position: relative; }
.ev-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.ev-track::-webkit-scrollbar { display: none; }
.ev-slide { scroll-snap-align: start; min-width: 0; }
.ev-nav { position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--paper-2); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); z-index: 2; transition: opacity .2s; }
.ev-nav:hover { background: var(--paper-2); }
.ev-nav[disabled] { opacity: 0; pointer-events: none; }
.ev-prev { left: 4px; }
.ev-next { right: 4px; }
@media (max-width: 1200px) { .ev-track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .ev-track { grid-auto-columns: 85%; gap: 16px; } .ev-nav { display: none; } }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); border-radius: var(--r); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-soft); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-media img { transform: scale(1.04); } }
.card-tags { position: absolute; left: 10px; top: 10px; right: 56px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 4px; background: var(--white); font: 600 15px/1 var(--ui); color: var(--ink); white-space: nowrap; }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-oh { background: var(--petrol); color: #fff; }
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--white); display: grid; place-items: center; color: var(--ink);
  transition: transform var(--t-press) var(--ease-out), color var(--t-hover) ease;
}
.fav:active { transform: scale(.9); }
.fav.on { color: var(--red); }
.fav.on .icon { fill: var(--red); }
.card-body { padding-top: 16px; }
.card-price { position: relative; z-index: 2; pointer-events: none; font-family: var(--display); font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 6px; }
.card-price small { font: 400 15px/1 var(--display); color: var(--muted); letter-spacing: 0; }
.card-title { font-family: var(--ui); font-weight: 600; letter-spacing: 0; font-size: 16px; font-weight: 400; line-height: 1.3; margin: 0; }
.card-addr { font: 500 15px/1.4 var(--ui); color: var(--muted); margin: 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-facts { font: 600 15px/1.4 var(--ui); color: var(--ink); margin: 4px 0 0; }
.card .stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card.hl .card-media { outline: 3px solid var(--petrol); outline-offset: -3px; }
.placeholder-media { width: 100%; height: 100%; display: grid; place-items: center; background: var(--paper); }
.placeholder-media img { width: 46%; max-width: 260px; height: auto; }
.section-soft .placeholder-media, .explorer .placeholder-media { background: var(--white); }

/* ---------- Explorer (mappa + lista) ---------- */
.explorer { display: flex; flex-direction: column; background: var(--paper); font-family: var(--ui); }
.explorer-embed { height: 760px; border-radius: 14px; overflow: hidden; }
.explorer-full { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.filters { display: flex; align-items: center; gap: 8px; padding: 16px 20px; flex-wrap: wrap; background: var(--paper); position: relative; z-index: 500; }
.seg { display: inline-flex; background: var(--paper-2); padding: 4px; border-radius: var(--r); }
.seg button { border: 0; background: none; height: 34px; padding: 0 16px; border-radius: 6px; font: 600 15px/1 var(--ui); color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.seg button.active { background: var(--white); color: var(--ink); }
.f-search { position: relative; flex: 1 1 220px; max-width: 320px; }
.f-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.f-search input { width: 100%; height: 42px; border: 1px solid var(--paper-2); border-radius: var(--r); padding: 0 12px 0 40px; font: 500 15px/1 var(--ui); outline: none; background: var(--white); }
.f-search input:focus { border-color: var(--petrol); }
.dd { position: relative; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: var(--r);
  background: var(--paper-2); font: 600 15px/1 var(--ui); color: var(--ink); white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: #D3E2E0; } }
.chip.set { background: var(--petrol); color: #fff; }
.chip .icon { width: 14px; height: 14px; transition: transform var(--t-ui) var(--ease-out); }
.dd.open > .chip .icon:last-child { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; background: var(--white); border-radius: 10px;
  box-shadow: 0 24px 48px -16px rgba(11, 43, 46, .32); padding: 20px; display: none; z-index: 600; /* taste-skill-ignore: menu a tendina, sta sopra la pagina */
}
.dd.open .dd-panel { display: block; animation: pop var(--t-ui) var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.dd-panel h5.mt { margin-top: 18px; }
.dd-wide { min-width: 300px; }
.btn-text-petrol { color: var(--petrol); }
.dd-panel h5 { margin: 0 0 10px; font: 700 15px/1.2 var(--ui); color: var(--ink); }
.dd-panel .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-panel select, .results-head select {
  width: 100%; height: 42px; border: 1px solid var(--paper-2); border-radius: var(--r); padding: 0 10px; background: var(--white); font: 500 15px/1 var(--ui);
}
.dd-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; font: 500 15px/1.3 var(--ui); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.check .n { margin-left: auto; color: var(--muted); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { min-width: 48px; height: 40px; border: 0; border-radius: 6px; background: var(--paper-2); font: 600 15px/1 var(--ui); transition: background-color var(--t-hover) ease; }
.pill.active { background: var(--petrol); color: #fff; }
.btn-text { border: 0; background: none; color: var(--muted); font: 600 15px/1 var(--ui); padding: 6px 4px; }
@media (hover: hover) and (pointer: fine) { .btn-text:hover { color: var(--red); } }
.dd-foot .btn { height: 40px; padding: 0 16px; font-size: 15px; background: var(--deep); color: #fff; }

.explorer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.results { overflow-y: auto; padding: 4px 20px 32px; scroll-behavior: smooth; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.results-count { font: 600 15px/1 var(--ui); margin: 0; }
.results-count b { font: 500 var(--fs-lead)/1 var(--display); margin-right: 4px; }
.results-head select { width: auto; padding-right: 30px; }
.results .cards { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
.results .card-price { font-size: 22px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 12px; color: var(--red); }
.empty h4 { color: var(--ink); font: 500 var(--fs-lead)/1.2 var(--display); margin-bottom: 6px; }

.map-wrap { position: relative; }
.map { position: absolute; inset: 0; background: var(--paper-2); }
.map-tools { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 450; }
.map-tools label { display: inline-flex; align-items: center; gap: 8px; background: var(--white); padding: 10px 16px; border-radius: 999px; font: 600 15px/1 var(--ui); cursor: pointer; white-space: nowrap; }
.map-tools input { accent-color: var(--red); width: 16px; height: 16px; }
.view-toggle { display: none; }

/* Leaflet */
.leaflet-container { font-family: var(--ui); }
.price-pin {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 6px; background: var(--white); color: var(--ink);
  font: 700 15px/1 var(--ui); white-space: nowrap; box-shadow: 0 2px 6px rgba(11, 43, 46, .28); /* taste-skill-ignore: segnaposto sulla mappa */
  transform: translate(-50%, calc(-100% - 7px)); position: relative;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-hover) var(--ease-out);
}
.price-pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); z-index: -1; }
.price-pin.affitto { color: var(--petrol); }
.price-pin.trattativa { color: var(--muted); }
.pin-wrap.hl { z-index: 9999 !important; }
.pin-wrap.hl .price-pin, .price-pin:hover { background: var(--deep); color: #fff; transform: translate(-50%, calc(-100% - 7px)) scale(1.08); }
.pin-wrap.visited .price-pin { background: var(--paper-2); }
.cluster {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 15px/1 var(--ui);
  background: var(--red); box-shadow: 0 0 0 6px rgba(201, 5, 0, .22); /* taste-skill-ignore: gruppo sulla mappa */
}
.cluster.lg { width: 48px; height: 48px; }
.leaflet-popup-content-wrapper { border-radius: 10px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; background: rgba(11, 43, 46, .6); width: 28px; height: 28px; top: 8px; right: 8px; font: 18px/26px var(--ui); text-align: center; }
.pop > img, .pop .placeholder-media { width: 100%; height: 160px; object-fit: cover; }
.pop .placeholder-media { height: 120px; }
.pop-body { padding: 14px 16px 16px; }
.pop-price { font: 500 var(--fs-lead)/1.1 var(--display); color: var(--ink); }
.pop-title { font: 600 15px/1.3 var(--ui); margin: 4px 0 2px; color: var(--ink); }
.pop-addr, .pop-facts { font: 500 15px/1.4 var(--ui); color: var(--muted); }
.pop-facts { color: var(--ink); margin-top: 6px; }
.house-pin { position: relative; width: 34px; height: 34px; background: var(--red); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.house-pin span { position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.osm-soft { filter: grayscale(.9) contrast(.92) brightness(1.06); }

/* ---------- Pagina immobile ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 500 15px/1.4 var(--ui); color: var(--muted); padding: 24px 0 20px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.crumbs .icon { width: 13px; height: 13px; }

.gallery { position: relative; display: grid; border-radius: 14px; overflow: hidden; grid-template-columns: 2.4fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: min(640px, 62vh); }
.gallery button { border: 0; padding: 0; background: var(--paper-2); overflow: hidden; cursor: zoom-in; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-soft); }
@media (hover: hover) and (pointer: fine) { .gallery button:hover img { transform: scale(1.03); } }
.gallery button:first-child { grid-row: span 2; }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery-actions { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 6px; }
.gallery-actions .btn { background: var(--white); color: var(--ink); height: 44px; }
.gallery-empty { position: relative; height: 380px; border-radius: 14px; overflow: hidden; }

.prop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 80px; padding: 56px 0 var(--gap); }
.prop-kicker { font: 600 15px/1.4 var(--ui); color: var(--petrol); margin: 8px 0 0; }
.prop-kicker .amber { color: var(--amber); }
.prop-head h1 { font-size: var(--fs-head); line-height: 1.05; max-width: 20ch; }
.prop-head .tagline { font-size: var(--fs-lead); color: var(--petrol); margin: 12px 0 0; }
.prop-head .addr { display: flex; gap: 6px 16px; align-items: baseline; flex-wrap: wrap; margin-top: 16px; font: 500 15px/1.4 var(--ui); color: var(--muted); }
.prop-head .addr a { color: var(--petrol); text-decoration: underline; text-underline-offset: .2em; }
.prop-price { display: flex; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin: 40px 0 0; }
.prop-price .v { font-family: var(--display); font-size: var(--fs-head); font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.prop-price .s { font: 500 15px/1.4 var(--ui); color: var(--muted); }
.prop-price .tools { margin-left: auto; display: flex; gap: 6px; }
.prop-price .tools .btn { font-size: 15px; }
.fav-inline { position: static; width: auto; height: 42px; border-radius: var(--r); padding: 0 18px; gap: 8px; display: inline-flex; font: 600 15px/1 var(--ui); background: var(--paper-2); }
.fav-inline.on { background: #FDE8E7; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 40px 0 0; }
.fact { background: var(--paper); padding: 20px 22px; border-radius: 10px; }
.fact small { display: block; font: 600 15px/1.3 var(--ui); color: var(--muted); margin-bottom: 6px; }
.fact b { font-size: var(--fs-lead); font-weight: 500; line-height: 1.1; }

.prop-section { padding-top: 88px; }
.prop-section > h2 { font-size: var(--fs-head); margin-bottom: 28px; line-height: 1.05; }
.desc { position: relative; max-width: 68ch; }
.desc.clamp { max-height: 360px; overflow: hidden; }
.desc.clamp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: rgba(255, 255, 255, .86); }
.desc h4 { font-size: var(--fs-lead); margin: 28px 0 8px; }
.desc ul { padding-left: 20px; margin: 0 0 1em; }
.desc li { margin-bottom: 4px; }
.desc li::marker { color: var(--red); }
.desc-toggle { margin-top: 16px; border: 0; background: none; padding: 0; font: 600 15px/1 var(--ui); color: var(--petrol); display: inline-flex; gap: 6px; align-items: center; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--paper); border-radius: 6px; font: 500 15px/1.4 var(--ui); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.energy { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 8px; color: #fff; font: 700 15px/1 var(--ui); background: var(--muted); }

.video-wrap { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.video-frame { width: 300px; aspect-ratio: 9 / 16; overflow: hidden; background: var(--deep); border-radius: 14px; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-frame.wide { width: 100%; aspect-ratio: 16 / 9; }
.video-wrap:has(.wide) { grid-template-columns: 1fr; }
.video-play { all: unset; cursor: pointer; display: grid; place-items: center; width: 100%; height: 100%; background: var(--deep) center / cover no-repeat; }
.video-play span { width: 76px; height: 76px; border-radius: 50%; background: var(--red); display: grid; place-items: center; color: #fff; transition: transform var(--t-hover) var(--ease-out); }
.video-play:hover span { transform: scale(1.08); }

.prop-map { height: 440px; background: var(--paper-2); border-radius: 14px; overflow: hidden; }
.map-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

.mortgage { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 14px; overflow: hidden; }
.mortgage > div:first-child { background: var(--paper); padding: 28px; font-family: var(--ui); }
.mortgage label { display: block; font: 600 15px/1.3 var(--ui); color: var(--muted); }
.mortgage .row { margin-bottom: 20px; }
.mortgage .row:last-child { margin-bottom: 0; }
.mortgage .val { display: flex; justify-content: space-between; align-items: baseline; font: 700 15px/1.3 var(--ui); margin-bottom: 6px; }
.mortgage input[type=range] { width: 100%; accent-color: var(--red); }
.mortgage .result { background: var(--deep); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.mortgage .result small { font: 600 15px/1.3 var(--ui); color: var(--tint); }
.mortgage .result strong { display: block; font: 500 var(--fs-head)/1.1 var(--display); margin: 0 0 4px; }
.mortgage .result small { display: block; margin-bottom: 16px; }
.mortgage .result p { font: 500 15px/1.45 var(--ui); color: var(--tint); margin: 0; }
.mortgage .result b { color: #fff; }

.aside { position: relative; }
.mobile-bar, .sheet-chiudi, .sheet-velo { display: none; }
.contact-card { position: sticky; top: calc(var(--header-h) + 24px); background: var(--paper); padding: 32px; border-radius: 14px; }
@media (min-width: 961px) {
  /* Il form resta accessibile anche quando supera l'altezza della finestra. */
  .contact-card {
    max-height: calc(100vh - var(--header-h) - 48px);
    max-height: calc(100dvh - var(--header-h) - 48px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}
.contact-card .cc-price { font-family: var(--display); font-size: var(--fs-head); font-weight: 500; line-height: 1.05; }
.contact-card .cc-sub { font: 500 15px/1.4 var(--ui); color: var(--muted); margin: 8px 0 24px; }
.agent { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.agent img, .agent .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; background: var(--paper-2); flex: none; }
.agent .avatar { display: grid; place-items: center; font: 500 24px/1 var(--display); color: var(--petrol); }
.agent b { display: block; font-size: var(--fs-body); font-weight: 500; }
.agent small { font: 500 15px/1.4 var(--ui); color: var(--muted); }
.intent { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; }
.intent label { position: relative; text-align: center; padding: 12px 8px; border-radius: var(--r); background: var(--paper-2); font: 600 15px/1 var(--ui); color: var(--muted); cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.intent input { position: absolute; opacity: 0; }
.intent label:has(input:checked) { background: var(--deep); color: #fff; }
.intent label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.field { margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; border: 1px solid transparent; border-radius: var(--r); padding: 14px 16px; font: 500 15px/1.4 var(--ui); outline: none; background: var(--white); resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--petrol); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.privacy { display: flex; gap: 10px; font: 500 15px/1.45 var(--ui); color: var(--muted); margin: 12px 0 16px; }
.privacy input { accent-color: var(--red); margin-top: 2px; }
.privacy a { text-decoration: underline; }
/* Riquadro contatti: Open House, call, avvisami */
.cc-title { font: 600 20px/1.25 var(--display); margin: 0 0 6px; }
.cc-text { font: 500 15px/1.5 var(--ui); color: var(--muted); margin: 0 0 16px; }
.cc-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--r); background: var(--amber-bg); color: var(--amber); font: 700 18px/1.1 var(--ui); }
/* Open House al completo: avviso grande sotto il prezzo della scheda */
.prop-soldout { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 16px 18px; border-radius: var(--r); background: var(--amber-bg); color: var(--amber); border-left: 4px solid var(--amber); }
.prop-soldout b { display: block; font: 700 20px/1.2 var(--ui); margin-bottom: 4px; }
.prop-soldout p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--amber); }
.prop-soldout a { color: inherit; font-weight: 600; text-decoration: underline; }
.prop-soldout .icon-lg { flex: none; margin-top: 2px; }
.field select { width: 100%; border: 1px solid transparent; border-radius: var(--r); padding: 14px 12px; font: 500 15px/1.4 var(--ui); background: var(--white); color: var(--ink); }
.oh-form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.oh-form legend { font: 600 14px/1 var(--ui); color: var(--muted); margin-bottom: 8px; padding: 0; }
.oh-giorni { display: grid; gap: 6px; }
.oh-giorno, .oh-fascia { position: relative; cursor: pointer; background: var(--white); border: 1px solid transparent; border-radius: var(--r); transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease; }
.oh-giorno { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.oh-giorno input, .oh-fascia input { position: absolute; opacity: 0; pointer-events: none; }
.oh-quando { display: grid; gap: 2px; }
.oh-quando b { font: 600 16px/1.2 var(--ui); }
.oh-quando span { font: 500 14px/1.2 var(--ui); color: var(--muted); }
.oh-posti { font: 600 13px/1 var(--ui); color: var(--red); white-space: nowrap; }
.oh-fasce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.oh-fascia { display: grid; gap: 2px; padding: 10px 8px; text-align: center; }
.oh-fascia b { font: 600 14px/1.2 var(--ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.oh-fascia small { font: 500 12px/1.2 var(--ui); color: var(--muted); }
.oh-giorno:has(input:checked), .oh-fascia:has(input:checked) { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.oh-giorno:has(input:focus-visible), .oh-fascia:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.oh-giorno.is-full, .oh-fascia.is-full { cursor: not-allowed; background: transparent; border-color: var(--paper-2); color: var(--muted); }
.oh-giorno.is-full .oh-posti, .oh-fascia.is-full small { color: var(--red-deep); }
.oh-form fieldset.is-bad .oh-fascia:not(.is-full) { border-color: var(--red); }
@media (hover: hover) and (pointer: fine) { .oh-giorno:not(.is-full):hover, .oh-fascia:not(.is-full):hover { border-color: var(--petrol); } }
.cc-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
.field .is-bad { border-color: var(--red); }
.privacy.is-bad { color: var(--red); }
.form-err { margin: 10px 0 0; font: 500 14px/1.45 var(--ui); color: var(--red-deep); }
.form-err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-ok { text-align: center; padding: 20px 6px; }
.form-ok .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.form-ok h4 { font-size: var(--fs-lead); margin-bottom: 6px; }
.form-ok p { font: 500 15px/1.5 var(--ui); color: var(--muted); }

.similar { background: var(--paper); padding-block: var(--gap); }
.similar .section-intro { margin-bottom: 40px; }


/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(8, 22, 24, .97); display: none; color: #fff; font-family: var(--ui); }
.lightbox.open { display: flex; flex-direction: column; animation: pop var(--t-ui) var(--ease-out); }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font: 600 15px/1 var(--ui); }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 88px 24px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.lb-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; transition: background-color var(--t-hover) ease; }
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-thumbs { display: flex; gap: 6px; justify-content: center; padding: 0 20px 20px; overflow-x: auto; }
.lb-thumbs button { width: 76px; height: 54px; flex: none; border: 0; overflow: hidden; padding: 0; opacity: .45; background: none; transition: opacity var(--t-hover) ease; }
.lb-thumbs button.active { opacity: 1; outline: 2px solid #fff; outline-offset: -2px; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* 404 */
.notfound { padding: var(--gap) var(--m); min-height: 70svh; }
.notfound h1 { font-size: var(--fs-head); line-height: 1.05; max-width: 18ch; margin-bottom: 20px; }
.notfound p { max-width: 44ch; }
.annulla-box { display: inline-block; margin: 0 0 20px; padding: 18px 22px; border-radius: 14px; background: var(--paper); }
.annulla-box p { margin: 0; font-size: var(--fs-lead); line-height: 1.45; }
.annulla-azioni { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ---------- Motion ---------- */
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(16px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 100ms + 120ms); }
  .hero-bg { animation: hero-zoom 18s var(--ease-soft) both; }
  .js:not(.no-reveal) [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 650ms var(--ease-out), transform 800ms var(--ease-out); }
  .js:not(.no-reveal) [data-reveal].is-in { opacity: 1; transform: none; }
  .js:not(.no-reveal) .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1000ms var(--ease-in-out); }
  .js:not(.no-reveal) .shutter img { transform: scale(1.1); transition: transform 1400ms var(--ease-soft); }
  .js:not(.no-reveal) .shutter.is-in { clip-path: inset(0); }
  .js:not(.no-reveal) .shutter.is-in img { transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: none; } }
.shutter { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .main-nav { gap: 20px; }
  .header-phone { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .results .cards { grid-template-columns: 1fr; }
  .prop-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .sedi { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .brand img { height: 38px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; gap: 0;
    padding: 24px var(--m); margin: 0; transform: translateX(100%); transition: transform var(--t-ui) var(--ease-out);
  }
  .main-nav.open { transform: none; }
  .main-nav a { font: 500 28px/1.2 var(--display); padding: 10px 0; text-decoration: none; }
  .main-nav a[aria-current] { color: var(--red); }
  .main-nav .nav-phone { display: block; margin-top: auto; font: 600 18px/1 var(--ui); color: var(--petrol); }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }

  .hero { padding: 48px var(--m) 100px; min-height: 0; }
  .search-box { grid-template-columns: 1fr 1fr; gap: 4px; }
  .sf-where { grid-column: 1 / -1; }
  .sf { background: var(--paper); }
  .search-go { grid-column: 1 / -1; margin: 4px 0 0; min-height: 52px; }
  .hero-stats { gap: 18px; font-size: 14px; }

  .section-intro { flex-direction: column; align-items: flex-start; }
  .valuta { grid-template-columns: 1fr; }
  .valuta-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .sede { grid-template-columns: 1fr; }
  .sede-map { min-height: 220px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .prop-layout { grid-template-columns: 1fr; padding-bottom: 48px; gap: 0; }

  /* Telefono: il contatto è un pannello che sale dal basso, aperto dalla barra sempre in vista */
  /* Spazio per la barra in fondo al footer: scuro come lui, senza fascia bianca sotto */
  body:has(.mobile-bar) { --sb: env(safe-area-max-inset-bottom, 36px); }
  body:has(.mobile-bar) .site-footer { padding-bottom: calc(28px + 68px + var(--sb)); }
  .aside {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
    transform: translateY(100%); visibility: hidden;
    transition: transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
  }
  .aside.show { transform: none; visibility: visible; transition: transform var(--t-ui) var(--ease-out); }
  .aside .contact-card {
    position: static; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 24px var(--m) calc(20px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0;
    box-shadow: 0 -16px 40px -20px rgba(8, 22, 24, .5); /* taste-skill-ignore: pannello sopra la pagina */
  }
  .sheet-chiudi {
    display: grid; place-items: center; position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer;
  }
  .sheet-velo {
    display: block; position: fixed; inset: 0; z-index: 1900; background: rgba(8, 22, 24, .55);
    opacity: 0; visibility: hidden; transition: opacity var(--t-ui) ease, visibility 0s linear var(--t-ui);
  }
  .sheet-velo.show { opacity: 1; visibility: visible; transition: opacity var(--t-ui) ease; }

  .mobile-bar {
    /* Schema della guida Chrome "edge-to-edge": il fondo della barra è sempre alto quanto la zona di sistema e
       cambia solo `bottom`. Con `bottom: 0` e un padding variabile, quando la barra del browser spariva
       su Chrome si vedeva la pagina sotto la barra. */
    display: grid; grid-template-columns: 48px 48px 1fr; gap: 6px; position: fixed; left: 0; right: 0; z-index: 900;
    bottom: calc(env(safe-area-inset-bottom, 0px) - var(--sb));
    background: var(--white); padding: 8px 12px calc(8px + var(--sb));
    box-shadow: 0 -6px 20px -14px rgba(8, 22, 24, .45); /* taste-skill-ignore: barra fissa sopra la pagina */
  }
  /* Fondo bianco anche sotto la barra: mentre il browser ritira le sue barre non deve vedersi la pagina */
  .mobile-bar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 160px; background: var(--white); }
  /* Chrome e gli altri browser su iPhone (classe da immobile.js): ritirando le barre lasciano la pagina scoperta sotto
     gli elementi fixed e tagliano quello che ne esce. Con sticky la barra è parte della pagina e il fondo bianco si vede. */
  html.ios-barre .mobile-bar { position: sticky; bottom: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  html.ios-barre body .site-footer { position: relative; z-index: 901; padding-bottom: 28px; }
  .mobile-bar .btn { height: 52px; padding: 0 12px; }
  .mb-ic { padding: 0; }
  .mb-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; line-height: 1.15; }
  .mb-cta small { font: 500 12px/1.2 var(--ui); opacity: .9; }

  .explorer-embed { height: 720px; margin-inline: calc(var(--m) * -1); border-radius: 0; }
  .explorer-body { grid-template-columns: 1fr; position: relative; }
  .map-wrap { position: absolute; inset: 0; visibility: hidden; }
  .explorer.show-map .map-wrap { visibility: visible; }
  .explorer.show-map .results { visibility: hidden; }
  .view-toggle {
    display: inline-flex; position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 700;
    background: var(--deep); color: #fff; border: 0; height: 48px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 var(--ui); gap: 8px; align-items: center;
  }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 12px var(--m); }
  .filters::-webkit-scrollbar { display: none; }
  .f-search { flex: 0 0 220px; }
  .dd-panel { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
  .results { padding-inline: var(--m); }
  .results .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards, .results .cards { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .search-tabs label { padding: 9px 14px; }
  .hero-stats li:last-child { display: none; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 320px; margin: 0 calc(var(--m) * -1); border-radius: 0; }
  .gallery button:not(:first-child) { display: none; }
  .gallery-actions { top: 8px; bottom: auto; right: 8px; }
  .gallery-actions a[href="#video"] { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact { padding: 16px; }
  .specs { grid-template-columns: 1fr; }
  .video-wrap { grid-template-columns: 1fr; }
  .video-frame { margin: 0 auto; width: 260px; }
  .mortgage { grid-template-columns: 1fr; }
  .lb-stage { padding: 0 0 16px; }
  .lb-prev, .lb-next { display: none; }
  .prop-price .tools { margin-left: 0; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Finestra di dialogo (valutazione) ---------- */
.dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); }
.dlg::backdrop { background: rgba(11, 43, 46, .55); }
.dlg-box { position: relative; padding: 32px; }
.dlg h2 { font-size: 28px; margin: 0 40px 8px 0; }
.dlg-lead { font: 500 15px/1.5 var(--ui); color: var(--muted); margin-bottom: 20px; }
.dlg-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--paper-2); }
.dlg-x:hover { background: var(--deep); color: #fff; }
.dlg[open] { animation: dlg-in var(--t-ui) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 560px) {
  .dlg-box { padding: 24px 18px; }
  .dlg .field-2 { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { .dlg[open] { animation: none; } }
@media (prefers-reduced-motion: reduce) { .aside, .aside.show, .sheet-velo, .sheet-velo.show { transition: none; } }

/* ---------- Proposta di affitto (proposta.php) ---------- */
.pa { padding: 40px var(--m) var(--gap); background: var(--white); }
.pa-wrap { max-width: 640px; margin: 0 auto; }
.pa-kicker { font: 600 14px/1 var(--ui); color: var(--red); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.pa h1 { font-size: var(--fs-head); line-height: 1.1; margin-bottom: 8px; }
.pa-imm { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.pa-intro { color: var(--muted); font-size: 15px; }
.pa-passi { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 24px; padding: 0; counter-reset: none; }
.pa-passi li { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: var(--r); background: var(--paper); font: 600 14px/1.2 var(--ui); color: var(--muted); }
.pa-passi span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2); font-size: 13px; flex: none; }
.pa-passi .is-on { background: var(--deep); color: #fff; }
.pa-passi .is-on span { background: #fff; color: var(--deep); }
.pa-passi .is-fatto span { background: var(--petrol); color: #fff; }
.pa-form fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.pa-form legend { font: 600 18px/1.3 var(--display); margin-bottom: 10px; padding: 0; }
.pa-form .field label, .pa-label { display: block; font: 600 13px/1.3 var(--ui); color: var(--muted); margin: 0 0 5px; }
.pa-form .field input, .pa-form .field select, .pa-form .field textarea { background: var(--paper); border: 1px solid transparent; }
.pa-form .field input:focus, .pa-form .field select:focus, .pa-form .field textarea:focus { border-color: var(--petrol); background: var(--white); }
.pa-form .field .is-bad { border-color: var(--red); }
.pa-scelta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.pa-scelta .pa-label { width: 100%; }
.pa-scelta label { display: inline-flex; gap: 6px; align-items: center; font: 500 15px/1 var(--ui); color: var(--ink); margin: 0; }
.pa-scelta input { accent-color: var(--red); }
.pa-form .btn-block + .btn-block { margin-top: 6px; }
.pa-persona { font: 600 18px/1.3 var(--display); margin: 22px 0 10px; }
.pa-persona:first-child { margin-top: 0; }
.pa-doc { padding: 16px; margin-bottom: 10px; border-radius: 12px; background: var(--paper); border: 1px solid transparent; }
.pa-doc.is-ok { border-color: var(--tint); }
.pa-doc-testa { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pa-doc-badge { font: 600 12px/1 var(--ui); color: var(--muted); white-space: nowrap; }
.pa-doc.is-ok .pa-doc-badge { color: var(--petrol); }
.pa-doc.is-serve .pa-doc-badge { color: var(--red-deep); }
.pa-doc p { font-size: 14px; color: var(--muted); margin: 4px 0 10px; }
.pa-doc ul { list-style: none; margin: 0 0 10px; padding: 0; }
.pa-doc li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--paper-2); font-size: 14px; }
.pa-doc li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-doc li button { border: 0; background: none; padding: 0; color: var(--red-deep); font: 600 13px/1 var(--ui); }
.pa-carica { cursor: pointer; background: var(--white); }
.pa-doc-msg { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.pa-riepilogo { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 18px; padding: 18px; border-radius: 12px; background: var(--paper); font-size: 15px; }
.pa-riepilogo dt { color: var(--muted); font-weight: 600; }
.pa-riepilogo dd { margin: 0; }
.pa-manca { padding: 14px 16px; border-radius: 12px; background: var(--amber-bg); color: var(--amber); margin-bottom: 14px; }
.pa-manca ul { margin: 6px 0 0; padding-left: 18px; }
.pa-manca button { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; font: inherit; }
.pa-pronta { color: var(--petrol); font-weight: 600; }
.pa-fatto { text-align: center; padding: 32px 16px; border-radius: 14px; background: var(--paper); }
.pa-fatto .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.pa-piccolo { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .pa { padding-top: 24px; }
  .pa .field-2 { grid-template-columns: 1fr; gap: 0; }
  .pa-passi li { flex-direction: column; text-align: center; font-size: 12px; padding: 8px 4px; }
}

/* ---------- Pagine legali (privacy.php) ---------- */
.legale { padding: 40px var(--m) var(--gap); }
.legale-wrap { max-width: 760px; margin: 0 auto; }
.legale h1 { font-size: var(--fs-head); line-height: 1.1; margin-bottom: 14px; }
.legale-lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); }
.legale-indice { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 8px; }
.legale-indice a { padding: 7px 12px; border-radius: 999px; background: var(--paper); font: 600 14px/1 var(--ui); }
.legale-indice a:hover { background: var(--paper-2); }
.legale section { padding-top: 28px; scroll-margin-top: calc(var(--header-h) + 12px); }
.legale h2 { font-size: 22px; margin-bottom: 10px; }
.legale p, .legale li { line-height: 1.65; }
.legale ul { padding-left: 20px; }
.legale li { margin-bottom: 6px; }
.legale a:not(.btn) { color: var(--petrol); text-decoration: underline; text-underline-offset: .15em; }
.legale-tabella { overflow-x: auto; margin: 14px 0 18px; border-radius: 12px; border: 1px solid var(--paper-2); }
.legale-tabella table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.legale-tabella th, .legale-tabella td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--paper-2); }
.legale-tabella th { background: var(--paper); font: 600 14px/1.3 var(--ui); }
.legale-tabella tr:last-child td { border-bottom: 0; }
.legale-data { margin-top: 36px; font-size: 14px; color: var(--muted); }
.da-completare { background: var(--amber-bg); color: var(--amber); padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* ---------- Home: accessi rapidi, chi siamo, recensioni ---------- */
.kicker { font: 600 14px/1 var(--ui); color: var(--red); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.accessi { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.accesso { position: relative; display: grid; gap: 6px; padding: 24px 22px 22px; border-radius: 14px; background: var(--paper); transition: background-color var(--t-hover) ease, transform var(--t-hover) var(--ease-out); }
.accesso-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--white); color: var(--red); margin-bottom: 8px; }
.accesso b { font: 600 19px/1.25 var(--display); }
.accesso > span:not(.accesso-ic) { color: var(--muted); font-size: 15px; line-height: 1.45; }
.accesso > .icon:last-child { position: absolute; top: 24px; right: 22px; color: var(--muted); transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .accesso:hover { background: var(--paper-2); } .accesso:hover > .icon:last-child { transform: translateX(4px); color: var(--red); } }
.chisiamo { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.chisiamo-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
.chisiamo-mosaico { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chisiamo-mosaico img { aspect-ratio: 1; border-radius: 12px; object-position: 50% 30%; }
.chisiamo-testo h2 { font-size: var(--fs-head); margin-bottom: 14px; }
.chisiamo-testo p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.5; }
.titolari { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 22px 0 26px; padding: 0; }
.titolari li { display: flex; align-items: center; gap: 12px; }
.titolari img, .titolari .team-iniziale { width: 56px !important; height: 56px; aspect-ratio: auto; border-radius: 50%; object-fit: cover; object-position: 50% 30%; font-size: 22px !important; }
.titolari b { display: block; font-weight: 600; }
.titolari small { color: var(--muted); font-size: 14px; }
.rating { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.rating b { font: 600 22px/1 var(--display); color: var(--ink); margin-right: 4px; }
.stelle { color: #E7A400; letter-spacing: 2px; }
.recensioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.recensione { margin: 0; padding: 24px; border-radius: 14px; background: var(--paper); display: grid; gap: 12px; align-content: start; }
.recensione blockquote { margin: 0; font-size: 16px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.recensione figcaption { color: var(--muted); font-size: 14px; }
.recensione figcaption b { color: var(--ink); }
.social-riga { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }
.social-riga span { font: 600 14px/1 var(--ui); color: var(--muted); margin-right: 6px; }
.social-riga a { padding: 9px 14px; border-radius: 999px; background: var(--paper); font: 600 14px/1 var(--ui); }
.social-riga a:hover { background: var(--deep); color: #fff; }

/* ---------- Pagina Chi siamo ---------- */
.pagina-testa { padding: clamp(40px, 6vw, 80px) 0 0; }
.pagina-testa-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.pagina-testa h1 { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.02em; }
.pagina-testo p { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); }
.foto-gruppo { width: 100%; max-height: 620px; object-fit: cover; border-radius: 18px; margin-top: clamp(28px, 4vw, 48px); }
.team-titolari { grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); margin-bottom: 8px; }
.team-titolari span { font-size: 20px; }
.sede-dettaglio { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--white); border-radius: 16px; overflow: clip; margin-bottom: 24px; }
.sede-media { display: grid; grid-auto-rows: minmax(220px, 1fr); background: var(--paper-2); }
.sede-media img { width: 100%; height: 100%; object-fit: cover; }
.sede-dettaglio .sede-info { padding: clamp(24px, 3vw, 40px); }
.sede-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 22px; }
.sede-info dt { color: var(--muted); font-weight: 600; font-size: 15px; }
.sede-info dd { margin: 0; }
.sede-info dd a { text-decoration: underline; text-decoration-color: #B9CCCB; text-underline-offset: .2em; }
.sede-azioni { display: flex; flex-wrap: wrap; gap: 8px; }
.sede-social { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 0; font-weight: 600; }
.sede-social a { color: var(--petrol); }
/* Desktop: il blocco info resta fermo mentre si scorre foto + mappa della sede */
@media (min-width: 901px) {
  .sede-dettaglio .sede-info { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
}
.contatti-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.contatti-grid h2 { font-size: var(--fs-head); margin-bottom: 12px; }
.contatti-grid > div > p { color: var(--muted); font-size: var(--fs-lead); }
.contatti-diretti { display: grid; gap: 10px; font-weight: 600; }
.contatti-diretti a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink) !important; }
.contatti-form { position: static; }
@media (max-width: 900px) {
  .chisiamo, .pagina-testa-grid, .sede-dettaglio, .contatti-grid { grid-template-columns: 1fr; }
  .team-titolari { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pagina Vendere ---------- */
.pagina-azioni { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.punti { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.punti article { padding: 26px 24px; border-radius: 14px; background: var(--paper); }
.punti h3 { font-size: 20px; margin: 12px 0 8px; }
.punti p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }
.passi-lavoro { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: passo; }
.passi-lavoro li { position: relative; padding: 52px 20px 22px; border-radius: 14px; background: var(--white); counter-increment: passo; }
.passi-lavoro li::before { content: counter(passo); position: absolute; top: 18px; left: 20px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--deep); color: #fff; font: 600 13px/1 var(--ui); }
.passi-lavoro b { display: block; font: 600 17px/1.3 var(--display); margin-bottom: 6px; }
.passi-lavoro span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.vendere-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.vendere-lato h2 { font-size: var(--fs-head); margin-bottom: 12px; }
.vendere-lato > p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.5; }
.cc-punti { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.cc-punti li { display: flex; gap: 10px; align-items: flex-start; font: 500 16px/1.4 var(--ui); }
.cc-punti .icon { color: var(--red); flex: none; margin-top: 2px; }
@media (max-width: 560px) { [data-cerca-casa] .field-2 { grid-template-columns: 1fr; gap: 0; } }
.hero-cerca { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: #fff; font: 600 16px/1.3 var(--ui); text-decoration: underline; text-underline-offset: 4px; }
.vendere-sedi { margin-top: 28px; padding: 20px 22px; border-radius: 14px; background: var(--paper); }
.vendere-sedi p { margin: 0 0 8px; }
.vendere-sedi span { display: inline-block; min-width: 130px; color: var(--muted); font-weight: 600; font-size: 15px; }
.vendere-sedi a { font-weight: 600; color: var(--petrol); }

/* Valutazione a passi */
.vw { position: static; }
.vw-progresso { height: 6px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin-bottom: 10px; }
.vw-progresso span { display: block; height: 100%; width: 0; background: var(--red); border-radius: inherit; transition: width var(--t-ui) var(--ease-out); }
.vw-conta { font: 600 13px/1 var(--ui); color: var(--muted); margin-bottom: 14px; }
.vw-passo { border: 0; margin: 0; padding: 0; min-width: 0; }
.vw-passo legend { font: 600 22px/1.25 var(--display); margin-bottom: 16px; padding: 0; }
.vw .field label { display: block; font: 600 13px/1.3 var(--ui); color: var(--muted); margin: 0 0 5px; }
.vw-sotto { color: var(--muted); font-size: 15px; margin: 6px 0 10px; }
.vw-scelte { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.vw-scelte-4 { grid-template-columns: repeat(2, 1fr); }
.vw-scelta { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--white); border: 1px solid transparent; cursor: pointer; font: 600 15px/1.25 var(--ui); transition: border-color var(--t-hover) ease; }
.vw-scelta input { position: absolute; opacity: 0; pointer-events: none; }
.vw-scelta .icon { color: var(--red); flex: none; }
.vw-scelta:has(input:checked) { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.vw-scelta:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .vw-scelta:hover { border-color: var(--petrol); } }
.vw-passo.is-bad .vw-scelta { border-color: var(--red); }
.vw-azioni { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.vw-azioni [data-vw-avanti], .vw-azioni [data-vw-invia] { margin-left: auto; min-width: 180px; }
@media (max-width: 900px) {
  .vendere-grid { grid-template-columns: 1fr; }
  .passi-lavoro { grid-template-columns: 1fr; }
}

/* ---------- Lavora con noi ---------- */
.posizioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.posizione { padding: 28px; border-radius: 14px; background: var(--paper); }
.posizione-meta { font: 600 13px/1 var(--ui); color: var(--petrol); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.posizione h3 { font-size: 22px; margin-bottom: 12px; }
.posizione p, .posizione li { color: var(--muted); font-size: 15px; line-height: 1.55; }
.posizione h4 { font-size: 16px; margin: 16px 0 6px; }
.posizione ul { padding-left: 18px; margin: 0 0 18px; }
.lc-nota { padding: 16px 18px; border-radius: 12px; background: var(--white); font-size: 15px; color: var(--muted); }
.lc-domanda { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.lc-domanda legend { font: 600 14px/1.4 var(--ui); color: var(--ink); margin-bottom: 8px; padding: 0; }
.lc-opzioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.lc-opzioni .vw-scelta { padding: 11px 12px; font-size: 14px; }
.lc-domanda.is-bad .vw-scelta { border-color: var(--red); }
.vw .field textarea { min-height: 84px; }
.vw input[type=file] { width: 100%; padding: 12px; border-radius: var(--r); background: var(--white); font-size: 14px; }
.lc-avanzamento { font-weight: 600; color: var(--petrol); margin: 8px 0 0; }

/* ---------- Servizi ---------- */
.servizi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.servizio { display: flex; flex-direction: column; padding: 32px; border-radius: 16px; background: var(--paper); }
.servizio-chi { font: 600 13px/1 var(--ui); color: var(--petrol); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.servizio h2 { font-size: 26px; margin-bottom: 10px; }
.servizio > p:not(.servizio-chi) { color: var(--muted); font-size: 16px; line-height: 1.55; }
.servizio ul { list-style: none; margin: 6px 0 22px; padding: 0; display: grid; gap: 9px; }
.servizio li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; }
.servizio li .icon { flex: none; color: var(--red); margin-top: 2px; }
.servizio .link { margin-top: auto; }
.servizi-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(28px, 4vw, 48px); border-radius: 16px; background: var(--deep); color: #fff; }
.servizi-cta h2 { font-size: var(--fs-head); margin-bottom: 8px; color: #fff; }
.servizi-cta p { color: rgba(255, 255, 255, .78); margin: 0; }

/* ---------- Dicono di noi ---------- */
.rating-grande { font-size: var(--fs-lead) !important; line-height: 1.4 !important; }
.rating-grande b { font-size: 56px; line-height: 1; vertical-align: -6px; }
.rating-grande .stelle { font-size: 26px; }
.testimonianze { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.testimonianza { margin: 0; }
.testimonianza .video-frame { width: 100%; }
.testimonianza figcaption { display: grid; gap: 4px; margin-top: 12px; }
.testimonianza figcaption span { color: var(--muted); font-size: 15px; }
.testimonianza q { font-size: 16px; line-height: 1.5; margin-top: 4px; }
.recensione-bianca { background: var(--white); }
.pagina-vuota { font-size: var(--fs-lead); color: var(--muted); }
.pagina-vuota a { color: var(--petrol); text-decoration: underline; }
.social-gruppi { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.social-gruppo h3 { font-size: 18px; margin-bottom: 10px; }
.social-link { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; margin-bottom: 8px; border-radius: 12px; background: var(--paper); }
.social-link b { font-weight: 600; }
.social-link span { grid-column: 1; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-link .icon { grid-row: 1 / 3; grid-column: 2; color: var(--muted); }
.social-link:hover { background: var(--paper-2); }
@media (max-width: 900px) { .servizi { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
 * Assistente virtuale (inc/footer.php, assets/js/assistente.js)
 * ------------------------------------------------------------------------ */
.ai { position: fixed; right: 20px; bottom: 20px; z-index: 1500; font-family: var(--ui); } /* taste-skill-ignore: chat fissa, sta sopra la pagina */
.ai-fab {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
  background: var(--deep); color: #fff; font: 600 15px/1 var(--ui); cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(11, 43, 46, .55); transition: transform var(--t-press) var(--ease-out), background var(--t-hover) ease;
}
.ai-fab .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.ai-fab:hover { background: var(--petrol-ink); }
.ai-fab:active { transform: scale(.97); }
.ai.is-aperto .ai-fab { display: none; }

.ai-pannello {
  position: absolute; right: 0; bottom: 0; width: min(390px, calc(100vw - 40px)); height: min(620px, calc(100dvh - 120px));
  display: flex; flex-direction: column; background: var(--white); border-radius: 16px; overflow: hidden;
  box-shadow: 0 28px 64px -18px rgba(11, 43, 46, .45), 0 0 0 1px rgba(11, 43, 46, .06);
}
.ai-pannello[hidden] { display: none; }
.ai-testa { display: flex; align-items: center; gap: 8px; padding: 14px 12px 14px 18px; background: var(--deep); color: #fff; }
.ai-testa > div { flex: 1; min-width: 0; }
.ai-testa b { display: block; font-size: 16px; font-weight: 600; }
.ai-testa span { display: block; font-size: 13px; color: var(--tint); }
.ai-nuova { border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: 500 13px/1 var(--ui); padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.ai-nuova:hover { background: rgba(255, 255, 255, .2); }
.ai-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; }
.ai-x:hover { background: rgba(255, 255, 255, .12); }
.ai-x .icon { width: 20px; height: 20px; stroke: currentColor; }

.ai-messaggi { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); overscroll-behavior: contain; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg p { margin: 0; }
.ai-msg p + p, .ai-msg p + ul, .ai-msg ul + p { margin-top: 8px; }
.ai-msg ul { margin: 4px 0 0; padding-left: 18px; }
.ai-msg li + li { margin-top: 4px; }
.ai-msg-assistente { align-self: flex-start; background: var(--white); color: var(--ink); border-bottom-left-radius: 4px; }
.ai-msg-assistente a { color: var(--petrol); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ai-msg-utente { align-self: flex-end; background: var(--petrol); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-errore { background: var(--amber-bg); color: var(--amber); }
.ai-scrive { display: inline-flex; gap: 5px; padding: 14px 16px; }
.ai-scrive span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; animation: ai-punti 1.2s infinite ease-in-out; }
.ai-scrive span:nth-child(2) { animation-delay: .15s; }
.ai-scrive span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-punti { 0%, 80%, 100% { opacity: .35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.ai-suggerimenti { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; background: var(--paper); }
.ai-suggerimenti:empty { display: none; }
.ai-suggerimenti button { border: 1px solid var(--tint); background: var(--white); color: var(--petrol-ink); font: 500 14px/1.2 var(--ui); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.ai-suggerimenti button:hover { background: var(--paper-2); }

.ai-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--paper-2); }
.ai-form[hidden] { display: none; }
.ai-form textarea { flex: 1; resize: none; border: 1px solid var(--paper-2); border-radius: 12px; padding: 10px 12px; font: 400 16px/1.4 var(--ui); color: var(--ink); max-height: 120px; overflow-y: hidden; }
.ai-form textarea:focus { outline: 2px solid var(--petrol); outline-offset: -1px; border-color: transparent; }
.ai-form button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--red); color: #fff; cursor: pointer; }
.ai-form button:disabled { opacity: .5; cursor: default; }
.ai-form button .icon { width: 20px; height: 20px; stroke: currentColor; }
.ai-nota { margin: 0; padding: 0 14px 10px; font-size: 12px; color: var(--muted); }
.ai-nota a { color: inherit; }

@media (max-width: 639px) {
  .ai { right: 14px; bottom: 14px; }
  .ai-fab span { display: none; }
  .ai-fab { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .ai.is-aperto { inset: 0; }
  .ai-pannello { position: fixed; inset: 0; width: 100%; height: 100dvh; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  html.ai-aperto { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ai-scrive span { animation: none; } }

/* Banner consenso statistiche (Google Analytics solo dopo "Accetta") */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 720px; margin: 0 auto; padding: 14px 18px;
  background: var(--white); border: 1px solid var(--paper-2); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(11, 43, 46, .18); /* taste-skill-ignore: pannello flottante */
}
.cookie-bar p { margin: 0; font: 500 14px/1.45 var(--ui); color: var(--ink); flex: 1 1 320px; }
.cookie-bar a { color: var(--petrol); text-decoration: underline; text-underline-offset: .15em; }
.cookie-bar-azioni { display: flex; gap: 8px; flex: none; }
/* Sopra la barra della scheda immobile: chat e cookie non devono coprire il tasto di prenotazione */
@media (max-width: 960px) {
  body:has(.mobile-bar) .ai { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:has(.mobile-bar) .cookie-bar { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Mappa: selettore Trieste | Udine (explorer.js) */
.map-citta { display: flex; background: #fff; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.18); padding: 3px; }
.map-citta button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: 600 14px/1 var(--ui); color: var(--ink); cursor: pointer; }
.map-citta button.is-on { background: var(--petrol); color: #fff; }
