/* ==========================================================================
   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: #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: 48px; width: auto; }
.logo-txt { font: 600 22px/1 var(--font-head); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 8px 10px; 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); }
.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); }
.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: #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); }
.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); 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); margin-top: 3px; }
.avail { display: inline-block; font-weight: 700; color: 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-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: #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 ---------- */
.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; }

/* ---------- 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; }
}
