/* ==========================================================================
   SITI AGENZIA — struttura comune ai tre template.
   Ogni template ridefinisce i token qui sotto e aggiunge il proprio carattere.
   ========================================================================== */
:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --soft: #f3f4f6;
    --ink: #1c1f23;
    --muted: #5b636d;
    --line: #e3e5e8;
    --radius: 10px;
    --radius-lg: 16px;
    --font-head: Georgia, serif;
    --font-body: system-ui, sans-serif;
    --btn-bg: var(--c1);
    --btn-ink: var(--c1-ink, #fff);
    --wrap: 1200px;
    --focus: 0 0 0 3px color-mix(in srgb, var(--c1) 35%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { flex: 0 0 auto; vertical-align: -4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.section { padding-block: clamp(48px, 7vw, 88px); }
.page-pad { padding-block: 72px; }
.center { text-align: center; }
.note { font-size: 14px; color: var(--muted); }

/* ---------- Pulsanti ---------- */
.btn, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius); font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn { background: var(--btn-bg); color: var(--btn-ink); }
.btn:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-ghost:hover { background: var(--soft); }
.btn-ghost.light { color: #fff; }
.btn-ghost.light:hover { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Header ---------- */
.hd { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.logo-img { max-height: var(--logo-h, 48px); max-width: min(260px, 52vw); width: auto; height: auto; object-fit: contain; }
.logo-img.logo-pill { background: #fff; padding: 6px 10px; border-radius: 8px; box-sizing: content-box; max-height: calc(var(--logo-h, 48px) - 12px); }
.ft-logo { display: inline-flex; margin-bottom: 12px; }
@media (max-width: 640px) { .hd .logo-img { max-height: min(var(--logo-h, 48px), 44px); } }
.logo-txt { font: 600 22px/1 var(--font-head); }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; }
.nav a { text-decoration: none; padding: 8px 9px; font-size: 15px; font-weight: 500; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { color: var(--c1-text, var(--c1)); }
.hd-tel, .hd-cta { white-space: nowrap; text-decoration: none; font-weight: 600; }
.nav-btn { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; }

/* ---------- Ricerca ---------- */
.search { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.sf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sf label { font-size: 13px; font-weight: 600; color: var(--muted); }
.sf select, .sf input, .ff input, .ff select, .ff textarea, .sort select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: calc(var(--radius) - 2px); background: var(--surface); color: var(--ink); font: 16px var(--font-body); }
.ff textarea { min-height: 110px; resize: vertical; }
.search .btn { min-width: 130px; }

/* ---------- Elenchi ---------- */
.page-head { padding-block: clamp(36px, 6vw, 64px) 24px; }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; font-size: 18px; max-width: 62ch; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-title { font-size: clamp(26px, 3.4vw, 38px); margin: 0; }
.sec-lead { max-width: 62ch; color: var(--muted); margin: -10px 0 26px; }
.more { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.list-tools { display: flex; justify-content: flex-end; margin: 22px 0 18px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.sort select { min-height: 42px; width: auto; }
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }

.card-imm { display: flex; flex-direction: column; background: var(--surface); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.card-media img, .card-media .ph-empty { width: 100%; height: 100%; object-fit: cover; }
.card-media .tag { position: absolute; left: 12px; top: 12px; }
.card-body { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-kind { font-size: 14px; color: var(--muted); margin: 0; }
.card-title { font-size: 21px; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-place { margin: 0; color: var(--muted); font-size: 15px; }
.card-price { margin: 8px 0 0; font-weight: 700; font-size: 19px; }
.card-price small { font-weight: 500; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; color: var(--ink); margin-top: 6px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts .ic { color: var(--c1-text, var(--c1)); }
.band .facts { color: inherit; }
@media (min-width: 1081px) { .search:has(> :nth-child(4):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; } }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); }
.tag-warn { background: #fff3cd; color: #6b4e00; }
.ph-empty { display: grid; place-items: center; color: color-mix(in srgb, var(--muted) 60%, transparent); background: var(--soft); width: 100%; height: 100%; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pager a[aria-current] { background: var(--c1); border-color: var(--c1); color: var(--c1-ink, #fff); }
.empty-box { max-width: 640px; margin: 24px auto; }

/* ---------- Scheda immobile ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a::after, .crumbs span::before { content: "/"; margin: 0 8px; opacity: .5; }
.crumbs span::before { display: none; }
.imm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 14px 0 24px; flex-wrap: wrap; }
.imm-head h1 { font-size: clamp(28px, 4vw, 46px); margin: 0 0 6px; max-width: 24ch; }
.imm-place { color: var(--muted); margin: 0; display: flex; align-items: center; gap: 6px; }
.imm-price { font: 700 clamp(26px, 3vw, 34px)/1.1 var(--font-head); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.imm-price small { font: 500 16px var(--font-body); color: var(--muted); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 220px); gap: 8px; position: relative; }
.g-item { overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.g-item:hover img { transform: scale(1.03); }
.g0 { grid-row: span 2; }
.gallery:has(.g3):not(:has(.g4)) .g3 { grid-column: span 2; }
.gallery:has(.g1):not(:has(.g2)) .g1 { grid-row: span 2; grid-column: span 2; }
.gallery:has(.g2):not(:has(.g3)) .g2 { grid-column: 2 / 4; }
.gallery:has(.g2):not(:has(.g3)) .g1 { grid-column: 2 / 4; }
.gallery:has(.g-item:only-child) { grid-template-columns: 1fr; }
.gallery:has(.g-item:only-child) .g0 { grid-row: span 2; }
.gallery:has(.g3):not(:has(.g4)) .g3 { grid-column: span 2; }
.gallery:has(.g1):not(:has(.g2)) .g1 { grid-row: span 2; grid-column: span 2; }
.gallery:has(.g2):not(:has(.g3)) .g2 { grid-column: 2 / 4; }
.gallery:has(.g2):not(:has(.g3)) .g1 { grid-column: 2 / 4; }
.g-more { position: absolute; right: 16px; bottom: 16px; background: var(--surface); color: var(--ink); border: 0; border-radius: var(--radius); padding: 10px 16px; font: 600 14px var(--font-body); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.imm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; padding-block: 32px 40px; align-items: start; }
.imm-main > .facts { font-size: 17px; gap: 10px 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin: 0 0 8px; }
.imm-sec { padding-top: 26px; }
.imm-sec h2, .imm-main h2 { font-size: 26px; }
.lead { font-size: 20px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 26px; margin-top: 1.4em; }
.prose h3 { font-size: 21px; margin-top: 1.2em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose a { color: var(--c1-text, var(--c1)); }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; text-align: right; }
.ratio { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map { border-radius: var(--radius); overflow: hidden; height: 340px; background: var(--soft); }
.map iframe { width: 100%; height: 100%; border: 0; }
.imm-side { position: sticky; top: 96px; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.quick-contact, .book-links { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.book-links { margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.quick-contact .btn-ghost, .book-links .btn-ghost { min-height: 44px; font-size: 15px; }
.sticky-cta { display: none; }

/* ---------- Moduli ---------- */
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.form-title { font-size: 22px; margin: 0 0 4px; }
.row2, .row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
.ff { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ff label { font-size: 14px; font-weight: 600; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; }
.chk input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; accent-color: var(--c1); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-err { background: #fde8e8; color: #8a1c1c; padding: 10px 12px; border-radius: 8px; margin: 0; }

/* ---------- Pagine ---------- */
.split-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 56px; align-items: start; padding-bottom: 72px; }
.steps-list { padding-left: 1.2em; }
.steps-list li { margin-bottom: .8em; }
.contact-info p { display: flex; gap: 14px; align-items: flex-start; }
.contact-info p span { display: flex; flex-direction: column; }
.contact-info .ic { color: var(--c1-text, var(--c1)); margin-top: 3px; }
.contact-info .map { margin-top: 18px; }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.service h3 { font-size: 21px; margin-bottom: 6px; }
.service p { color: var(--muted); margin: 0; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.team img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.team figure { margin: 0; }
.team figcaption { padding-top: 10px; display: flex; flex-direction: column; }
.team figcaption span { color: var(--muted); font-size: 15px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--c1-text, var(--c1)); margin-top: 3px; }
.avail { display: inline-block; font-weight: 700; color: var(--c1-text, var(--c1)); }
.rooms { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.room { display: grid; grid-template-columns: 1fr 2fr 1.4fr 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 15px; }
.room .room-state { font-weight: 700; color: var(--c1-text, var(--c1)); text-align: right; }
.room.is-off { opacity: .55; }
.room.is-off .room-state { color: var(--muted); }
.thanks { text-align: center; }
.thanks-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--c1); color: var(--c1-ink, #fff); }
.thanks-ic .ic { width: 32px; height: 32px; }

/* ---------- Blog ---------- */
.grid-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.post-card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.post-card img, .post-card .ph-empty { aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); width: 100%; }
.post-card h3 { font-size: 21px; margin: 4px 0 0; }
.post-card p { color: var(--muted); margin: 0; font-size: 15px; }
.post-date { font-size: 14px; color: var(--muted); }
.post-head { padding-block: 8px 24px; }
.post-head h1 { font-size: clamp(32px, 4.6vw, 50px); }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 36px; }
.post-cta { margin-block: 40px 72px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-cta p { margin: 0; font-weight: 600; }

/* ---------- Recensioni ---------- */
.reviews .rating { font-size: 20px; }

/* ---------- Footer ---------- */
.ft { margin-top: 0; }
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px 32px; }
.ft h2 { font: 700 15px var(--font-body); margin-bottom: 12px; }
.ft p { margin: 0 0 6px; }
.ft a { text-decoration: none; }
.ft a:hover { text-decoration: underline; }
.ft-social { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px !important; }
.legal { border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 18%, transparent); padding-block: 20px 28px; font-size: 13px; opacity: .85; }
.legal p { margin: 0 0 4px; }
.legal-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px !important; }

/* ---------- Cookie / lightbox / WhatsApp ---------- */
/* "hidden" deve sempre vincere sugli stili (banner cookie, lightbox, campi facoltativi) */
[hidden] { display: none !important; }
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.18); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cookie-bar p { margin: 0; flex: 1 1 320px; font-size: 15px; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn, .cookie-actions .btn-ghost { min-height: 42px; font-size: 15px; }
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 14, .94); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lb[hidden] { display: none; }
.lb img { max-height: 86vh; max-width: 100%; margin: auto; object-fit: contain; }
.lb button { background: none; border: 0; color: #fff; cursor: pointer; height: 64px; display: grid; place-items: center; }
.lb .lb-x { position: absolute; top: 12px; right: 12px; }
.lb .ic { width: 30px; height: 30px; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #cfd3d8; font-size: 14px; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.wa-float .ic { width: 28px; height: 28px; }

/* Menu che non sta su una riga (logo grande, tante voci): il sito passa da solo al pulsante ☰ (classe messa da sito.js) */
.hd.compact .hd-in { position: relative; }
.hd.compact .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; gap: 0; z-index: 30; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.hd.compact .nav.open { display: flex; }
.hd.compact .nav a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.hd.compact .nav-btn { display: grid; }
.hd.compact .hd-tel, .hd.compact .hd-cta { margin-left: auto; }
.hd.compact .hd-tel + .nav-btn, .hd.compact .hd-cta + .nav-btn { margin-left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; gap: 0; }
    .nav.open { display: flex; }
    .nav a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav-btn { display: grid; }
    .hd-tel, .hd-cta { margin-left: auto; }
    .hd-tel + .nav-btn, .hd-cta + .nav-btn { margin-left: 0; }
    .grid-cards, .grid-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .imm-grid, .split-page { grid-template-columns: 1fr; gap: 32px; }
    .imm-side { position: static; }
    .search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search .btn { grid-column: 1 / -1; }
    .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    body { font-size: 16px; }
    .hd-in { min-height: 64px; gap: 12px; }
    .hd-tel { display: none; }
    .hd-cta { font-size: 14px; }
    .grid-cards, .grid-posts, .services, .ticks, .spec, .ft-grid { grid-template-columns: 1fr; }
    .search { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 110px; }
    .g0 { grid-column: 1 / -1; grid-row: auto; }
    .g3, .g4 { display: none; }
    .row2, .row3 { grid-template-columns: 1fr; }
    .room { grid-template-columns: 1fr 1fr; }
    .imm-price { align-items: flex-start; }
    .sticky-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; min-height: 52px; align-items: center; justify-content: center; background: var(--btn-bg); color: var(--btn-ink); border-radius: var(--radius); font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
    .pg-immobile .wa-float, .pg-struttura .wa-float { bottom: 76px; }
    .pg-immobile .ft, .pg-struttura .ft { padding-bottom: 70px; }
}

/* Persone del team (Chi siamo) */
.team { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.person img, .person-initials { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); display: block; }
.person-initials { display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 12%, #fff); color: var(--c1-text, var(--c1)); font: 600 clamp(40px, 6vw, 64px) var(--font-head); letter-spacing: .02em; }
.person figcaption { gap: 2px; }
.person figcaption strong { font: 600 19px var(--font-head); }
.person-role { color: var(--muted); font-size: 15px; }
.person-bio { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.person-contacts { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 15px; }
.person-contacts a { display: inline-flex; align-items: center; gap: 8px; color: var(--c1-text, var(--c1)); text-decoration: none; overflow-wrap: anywhere; }
.person-contacts a:hover { text-decoration: underline; }
.person-contacts svg { width: 16px; height: 16px; flex: none; }
.sec-title + .team { margin-top: 24px; }

/* QR code nel piè di pagina */
.ft-qr { margin: 22px 0 0; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ft-qr img { width: 150px; height: 150px; object-fit: contain; background: #fff; padding: 10px; border-radius: 10px; box-sizing: content-box; image-rendering: pixelated; }
.ft-qr figcaption { font-size: 14px; opacity: .85; max-width: 22ch; }
@media (max-width: 640px) { .ft-qr img { width: 170px; height: 170px; } }

/* Home senza annunci */
.home-empty { border: 1px dashed var(--line); border-radius: var(--radius-lg, 12px); padding: clamp(24px, 4vw, 44px); background: var(--surface); max-width: 760px; }
.home-empty h2 { margin: 0 0 10px; color: var(--c1-text, var(--c1)); }
.home-empty p:last-child { margin-bottom: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.imm-collab { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Menu mobile: con il telefono nascosto, il pulsante ☰ va comunque a destra */
@media (max-width: 680px) { .hd-tel + .nav-btn { margin-left: auto; } }
/* Immagine quadrata nel piè di pagina (QR code caricato come logo): grande e su fondo bianco */
.ft .logo-img.logo-square { max-height: none; max-width: none; width: 150px; height: 150px; object-fit: contain; background: #fff; padding: 10px; border-radius: 10px; box-sizing: content-box; image-rendering: pixelated; }
@media (max-width: 640px) { .ft .logo-img.logo-square { width: 170px; height: 170px; } }

/* ---------- Pagina personale (/agente/…) ---------- */
.ag-hero { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(32px, 6vw, 72px) clamp(24px, 4vw, 40px); }
.ag-foto img, .ag-foto .person-initials { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 28%; border-radius: var(--radius-lg, 16px); display: block; }
.ag-foto .person-initials { display: grid; place-items: center; font: 600 clamp(48px, 8vw, 96px)/1 var(--font-head); background: var(--soft); color: var(--c1-text); }
.ag-kicker { margin: 0 0 8px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.ag-kicker a { color: inherit; }
.ag-intro h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; margin: 0 0 14px; text-wrap: balance; }
.ag-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; margin: 0 0 22px; max-width: 58ch; color: var(--ink); }
.ag-azioni { display: flex; flex-wrap: wrap; gap: 10px; }
.ag-azioni .btn, .ag-azioni .btn-ghost { min-height: 46px; padding: 0 18px; font-size: 15px; }
.ag-azioni .ic { width: 18px; height: 18px; }
.ag-numeri { margin: 18px 0 0; color: var(--muted); }
.ag-numeri a { color: var(--c1-text); text-decoration: none; }
.ag-numeri strong { font-size: 20px; }
.ag-dettagli { display: grid; grid-template-columns: 1fr 260px; gap: clamp(24px, 5vw, 72px); align-items: start; padding-block: clamp(16px, 3vw, 32px); border-top: 1px solid var(--line); }
.ag-testo .sec-title { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 12px; }
.ag-testo .prose { max-width: 68ch; }
.ag-sotto { margin-top: 32px; }
.ag-link { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ag-link a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface, #fff); transition: border-color .15s; }
.ag-link a:hover { border-color: var(--c1); }
.ag-link a span { display: grid; min-width: 0; }
.ag-link small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-link .ic { flex: none; color: var(--c1-text); }
.ag-link-app { grid-column: 1 / -1; border-color: var(--c1) !important; }
.ag-qr { text-align: center; position: sticky; top: 100px; }
.ag-qr-box { width: 200px; margin: 0 auto 12px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 6px; }
.ag-qr-box svg { display: block; width: 100%; height: 100%; }
.ag-qr p { margin: 0; font-size: 14px; color: var(--muted); }
.ag-qr strong { color: var(--ink); }
.ag-barra { display: none; }
.person-media { display: block; text-decoration: none; }
.person-link { color: inherit; text-decoration: none; }
.person-link:hover { text-decoration: underline; }
.person-more { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--c1-text); }
/* box "Ti segue" nella scheda immobile */
.agente-box { display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface, #fff); }
.agente-box:hover { border-color: var(--c1); }
.agente-box img, .agente-box .person-initials { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; flex: none; display: grid; place-items: center; background: var(--soft); font-weight: 700; }
.agente-box span { display: grid; line-height: 1.3; }
.agente-box small { color: var(--muted); font-size: 13px; }
.agente-box em { font-style: normal; color: var(--muted); font-size: 14px; }
@media (max-width: 780px) {
    .ag-hero { grid-template-columns: 1fr; text-align: left; }
    .ag-hero { padding-top: 24px; gap: 18px; }
    .ag-foto { max-width: 168px; }
    .ag-lead { font-size: 17px; }
    body:has(.ag-barra) .wa-float { display: none; }
    .ag-dettagli { grid-template-columns: 1fr; }
    .ag-qr { position: static; }
    .ag-azioni .btn-ghost[data-condividi] { display: none; }
    .ag-barra { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface, #fff); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
    .ag-barra a, .ag-barra button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font: 600 12px/1.2 var(--font-body); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
    .ag-barra .ic { color: var(--c1-text); }
    body:has(.ag-barra) { padding-bottom: 72px; }
    body:has(.ag-barra) .sticky-cta, body:has(.ag-barra) .cookie-bar { bottom: 72px; }
}
