/*
Theme Name: Delli Carri
Theme URI: https://www.immobiliaredellicarri.it
Author: Immobiliare Delli Carri srls
Description: Tema su misura per Immobiliare Delli Carri – Benevento. Homepage, gestione immobili, valutazione gratuita, guida ai quartieri.
Version: 1.0.1
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: delli-carri
*/

/* ---------- Caratteri (ospitati nel tema, nessun collegamento a Google) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("assets/fonts/BricolageGrotesque-500-800.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/InstrumentSans-400-700.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/Cinzel-700.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/Mulish-600.woff2") format("woff2"); }

:root {
	--blue: #1670A8;
	--green: #0E7A5A;
	--green-dark: #0A5C44;
	--green-logo: #3FA874;
	--green-text: #2E8F5E;
	--ink: #0F2530;
	--night: #0B4A73;
	--text-2: #3B4A52;
	--muted: #52616A;
	--bg-2: #EEF6F9;
	--line: #DCE6EA;
	--line-2: #C5D3D9;
	--ph: #CFE3EA;
	--ph-2: #DDECF1;
	--gold: #C8902E;
	--display: "Bricolage Grotesque", system-ui, sans-serif;
	--body: "Instrument Sans", system-ui, sans-serif;
	--radius: 20px;
	--wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin: 0 0 8px; }
.h2 { font-weight: 800; font-size: clamp(32px, 4vw, 48px); }
.lead { color: var(--text-2); font-size: 19px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn--dark { background: var(--ink); }
.btn--dark:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn--pill { border-radius: 999px; min-height: 44px; font-size: 15px; padding: 0 18px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: "Cinzel", serif; font-weight: 700; font-size: 22px; letter-spacing: 0.04em; color: var(--blue); }
.brand__sub { font-family: "Mulish", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--green-text); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 16px; padding: 10px 0; display: inline-block; }
.main-nav a:hover { color: var(--green); }
.header-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
@media (max-width: 1080px) {
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { padding: 12px 0; display: block; border-bottom: 1px solid var(--line); }
	.header-cta .btn--ghost { display: none; }
}
@media (max-width: 560px) {
	.header-cta { display: none; }
	.brand__name { font-size: 19px; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.hero__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--green); }
.hero h1 { font-weight: 800; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.hero .lead { font-size: 20px; max-width: 40ch; }
.search { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 8px; box-shadow: 0 10px 30px rgba(15, 37, 48, 0.08); }
.search__field { flex: 1 1 140px; display: flex; flex-direction: column; padding: 8px 14px; }
.search__field + .search__field { border-left: 1px solid var(--line); }
.search__field--wide { flex: 2 1 200px; }
.search label { font-size: 13px; font-weight: 600; color: var(--muted); }
.search input, .search select { border: 0; font: inherit; font-size: 16px; padding: 4px 0; background: transparent; color: var(--ink); width: 100%; }
.search .btn { min-height: 56px; padding: 0 28px; border-radius: 10px; }
@media (max-width: 640px) {
	.search__field + .search__field { border-left: 0; border-top: 1px solid var(--line); }
	.search__field, .search__field--wide { flex-basis: 100%; }
	.search .btn { width: 100%; margin-top: 6px; }
}

.collage-wrap { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.collage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: 250px 250px; gap: 10px; }
.collage figure { margin: 0; border-radius: 18px; overflow: hidden; position: relative; background: var(--ph); }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage figcaption { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(255, 255, 255, 0.94); border-radius: 999px; padding: 5px 8px; font-size: 12px; font-weight: 600; color: var(--ink); text-align: center; }
.collage__main { grid-column: 2; grid-row: 1 / 3; border-radius: 22px !important; }
.collage__main figcaption { background: var(--ink); color: #fff; font-size: 13px; padding: 7px 10px; left: 10px; right: 10px; bottom: 10px; }
.collage-credit { margin-top: -6px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .collage { grid-template-rows: 190px 190px; } .collage figcaption { font-size: 11px; } }
.talk { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; display: flex; gap: 14px; align-items: center; }
.talk img { width: 52px; height: 52px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.talk strong { display: block; font-weight: 600; }
.talk span { font-size: 15px; color: var(--muted); }

/* ---------- Percorsi ---------- */
.paths { padding: 24px 0 72px; }
.paths__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.path { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.path--accent { background: var(--green); color: #fff; border-color: var(--green); }
.path__title { font-family: var(--display); font-weight: 700; font-size: 24px; }
.path__text { color: var(--muted); }
.path--accent .path__text { color: #E3EEF3; }
.path__link { font-weight: 600; color: var(--green); }
.path--accent .path__link { color: #fff; }
.lift { transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }
@media (hover: hover) { .lift:hover { transform: scale(1.03); box-shadow: 0 14px 32px rgba(15, 37, 48, 0.12); } }
.lift:focus-visible { transform: scale(1.03); box-shadow: 0 14px 32px rgba(15, 37, 48, 0.12); }
@media (prefers-reduced-motion: reduce) { .lift { transition: none; } html { scroll-behavior: auto; } }

/* ---------- Immobili ---------- */
.section { padding: 88px 0; }
.section--tint { background: var(--bg-2); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.section:not(.section--tint) .card { border: 1px solid var(--line); }
.card__media { height: 210px; background: var(--ph); position: relative; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip { position: absolute; top: 14px; left: 14px; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.chip--status { left: auto; right: 14px; background: var(--ink); color: #fff; }
.chip--sold { background: #B42318; }
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.card__price { font-family: var(--display); font-weight: 700; font-size: 26px; }
.card__title { font-weight: 600; }
.card__zone { color: var(--muted); font-size: 15px; }
.card__specs { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.empty { padding: 32px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; background: #fff; }

/* ---------- Valutazione ---------- */
.valuta { background: var(--night); color: #fff; border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.valuta__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.valuta .eyebrow { color: #7DD3FC; }
.valuta h2 { font-weight: 800; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; }
.valuta .lead { color: #C5D6DE; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: #E3EEF3; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.form-card { flex: 1 1 380px; min-width: 0; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.form-card__title { font-family: var(--display); font-weight: 700; font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { padding: 12px 14px; min-height: 96px; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 480px) { .fields-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; }
.notice { border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.notice--ok { background: #E2F4EA; color: #1E5E3E; }
.notice--err { background: #FDECEA; color: #8A1C12; }

/* ---------- Quartieri ---------- */
.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .zones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .zones { grid-template-columns: 1fr; } }
.zone { border-radius: 18px; border: 1px solid var(--line); background: #fff; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.zone__name { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; }
.zone__label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
.zone__avg { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--green); }
.zone__range { font-size: 15px; }
.zone__note { font-size: 14px; color: var(--muted); }
.zone--city { background: var(--blue); border-color: var(--blue); color: #fff; justify-content: center; }
.zone--city .zone__label, .zone--city .zone__note { color: #E3EEF3; }
.zone--city .zone__avg { color: #fff; font-size: 40px; line-height: 1; }
.zone--city a { color: #fff; font-weight: 600; margin-top: 8px; }
.source { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- Chi siamo ---------- */
.about { display: flex; flex-wrap: wrap; gap: 48px; }
.about__media { flex: 1 1 420px; min-width: 0; }
.about__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; }
.about__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.about__text h2 { font-weight: 800; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.reviews { display: flex; flex-wrap: wrap; gap: 16px; }
.review { margin: 0; flex: 1 1 260px; background: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.review blockquote { margin: 0; font-size: 16px; }
.review figcaption { font-size: 14px; color: var(--muted); }
.stars { display: flex; gap: 2px; }
.rating { flex: 1 1 260px; background: var(--blue); color: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.rating__big { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; }
.rating a { color: #fff; font-weight: 600; font-size: 15px; }

/* ---------- Guide (articoli) ---------- */
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.guide { text-decoration: none; color: var(--ink); border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.guide__cat { font-size: 13px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; }
.guide__title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #E3EEF3; padding: 64px 0 32px; }
.site-footer a { color: #7DD3FC; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer__col { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; }
.footer__col--wide { flex-basis: 320px; gap: 12px; }
.footer__big { font-family: var(--display); font-weight: 800; font-size: 32px; color: #fff; }
.footer__title { font-weight: 600; color: #fff; }
.footer__bottom { margin-top: 40px; border-top: 1px solid #26414D; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: #A7BBC5; }
.footer__bottom a { color: #A7BBC5; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 999px; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.wa-float:hover { color: #fff; transform: scale(1.05); }

/* ---------- Archivio immobili ---------- */
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-weight: 800; font-size: clamp(34px, 4.5vw, 54px); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--bg-2); border-radius: 16px; padding: 16px; margin-bottom: 28px; }
.filters .field { flex: 1 1 170px; }
.filters .btn { flex: 0 0 auto; }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 10px; text-decoration: none; color: var(--ink); padding: 0 12px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Scheda immobile ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 20px 0 32px; }
.gallery__main { grid-column: 1 / -1; height: clamp(280px, 45vw, 520px); border-radius: 24px; overflow: hidden; position: relative; background: var(--ph); }
.gallery__main img, .gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb { height: 200px; border-radius: 18px; overflow: hidden; display: block; background: var(--ph-2); }
.gallery__tools { position: absolute; left: 20px; bottom: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.gallery__tools a { min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.gallery__tools a.is-dark { background: var(--ink); color: #fff; }
.detail { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-bottom: 88px; }
.detail__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.detail__aside { flex: 1 1 340px; min-width: 0; border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 30px rgba(15, 37, 48, 0.06); position: sticky; top: 100px; }
.detail__ref { align-self: flex-start; background: var(--bg-2); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.detail h1 { font-weight: 800; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.fact { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.fact span { display: block; font-size: 14px; color: var(--muted); }
.fact strong { font-weight: 600; font-size: 20px; }
.h3 { font-family: var(--display); font-weight: 700; font-size: 28px; margin-bottom: 12px; }
.prose { color: var(--text-2); font-size: 18px; }
.prose p { margin: 0 0 1em; }
.opinion { background: var(--bg-2); border-radius: var(--radius); padding: 24px; }
.opinion__label { font-size: 14px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; }
.opinion p { font-size: 18px; margin-top: 6px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }
.calc { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.calc__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.calc__out { font-size: 18px; }
.calc__out strong { font-family: var(--display); font-size: 26px; }
.price-big { font-family: var(--display); font-weight: 800; font-size: 36px; }
.price-sub { font-size: 15px; color: var(--muted); }
.aside-form { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .detail__aside { position: static; } }

/* ---------- Pagine generiche ---------- */
.content { padding: 48px 0 88px; max-width: 820px; }
.content h1 { font-weight: 800; font-size: clamp(32px, 4vw, 48px); margin-bottom: 24px; }
.content .entry { font-size: 18px; color: var(--text-2); }
.content .entry p { margin: 0 0 1em; }
.content .entry img { border-radius: 16px; }


/* === Venduto / Affittato (filigrana) === */
.card__media,.gallery__main{position:relative}
.card__media.is-sold img,.gallery__main.is-sold img{filter:grayscale(.35) brightness(.92)}
.card__media.is-sold::after,.gallery__main.is-sold::after{content:attr(data-sold);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-16deg);padding:.2em .8em;border:4px solid #fff;border-radius:10px;background:rgba(180,35,24,.85);color:#fff;font-weight:800;letter-spacing:.14em;font-size:clamp(1.4rem,4.5vw,2.8rem);line-height:1.2;white-space:nowrap;pointer-events:none;z-index:2;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.card__media.is-sold::after{font-size:1.15rem;border-width:3px}
.sold-banner{margin:0 0 1rem;padding:.9rem 1.1rem;border-radius:12px;background:#FEF3F2;border:1px solid #FECDCA;color:#B42318}
.sold-banner a{color:#B42318;font-weight:600;text-decoration:underline}



/* === Galleria a carosello + schermo intero === */
.gallery--carousel{display:block}
.gallery--carousel .gallery__thumb{display:none!important}
.gallery__main.has-carousel > img{display:none}
.gcar{display:flex;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;overscroll-behavior-x:contain}
.gcar::-webkit-scrollbar{display:none}
.gcar__slide{flex:0 0 100%;width:100%;height:100%;scroll-snap-align:center;scroll-snap-stop:always}
.gcar__slide img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in;user-select:none;-webkit-user-drag:none}
.gcar__count{position:absolute;right:16px;bottom:20px;z-index:3;background:rgba(15,23,42,.72);color:#fff;font-size:14px;font-weight:600;padding:6px 12px;border-radius:999px;pointer-events:none}
.gcar__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:46px;height:46px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#0f172a;font-size:30px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.gcar__prev{left:14px}.gcar__next{right:14px}
.gallery__main .gallery__tools{z-index:3}
.gallery__main.is-sold::after{z-index:2}
.glb{position:fixed;inset:0;z-index:100000;background:#0b0d10;display:none}
.glb.is-open{display:block}
.glb .gcar__slide img{object-fit:contain;cursor:default}
.glb .gcar__count{bottom:24px;left:50%;right:auto;transform:translateX(-50%)}
.glb__close{position:absolute;top:14px;right:14px;z-index:4;width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:34px;line-height:1;cursor:pointer}
@media (max-width:767px){
  .gcar__nav{display:none}
  .glb .gcar__nav{display:flex;background:rgba(255,255,255,.15);color:#fff}
}


/* === Mutuo: importo === */
.calc__importo{margin:4px 0 0;font-size:15px;color:var(--muted,#475467);font-weight:600}

/* ---------- Schede dei comuni (collage homepage) ---------- */
.collage figure.is-cliccabile { cursor: pointer; }
.collage figure.is-cliccabile img { transition: transform .5s ease; }
.collage figure.is-cliccabile:hover img,
.collage figure.is-cliccabile:focus-visible img { transform: scale(1.05); }
.collage figure.is-cliccabile:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.collage figure.is-cliccabile figcaption::after { content: " →"; color: var(--green); transition: margin .2s ease; }
.collage__main.is-cliccabile figcaption::after { color: var(--green-logo); }

html.borgo-modal-open { overflow: hidden; }
.borgo-modal { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius); background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(15, 37, 48, .35); overflow: hidden; }
.borgo-modal[open] { display: flex; flex-direction: column; animation: borgo-in .28s ease; }
.borgo-modal::backdrop { background: rgba(15, 37, 48, .6); backdrop-filter: blur(3px); }
@keyframes borgo-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.borgo-modal__media { position: relative; flex: 0 0 auto; height: 220px; background: var(--ph); }
.borgo-modal__media img { width: 100%; height: 100%; object-fit: cover; }
.borgo-modal__close { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); cursor: pointer; }
.borgo-modal__close:hover { background: #fff; color: var(--green); }
.borgo-modal__body { padding: 26px 30px 30px; overflow-y: auto; }
.borgo-modal__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green-text); margin-bottom: 6px; }
.borgo-modal h2 { font-size: 34px; }
.borgo-modal__meta { margin-top: 8px; font-size: 15px; color: var(--muted); }
.borgo-modal__text { margin-top: 18px; color: var(--text-2); font-size: 16px; }
.borgo-modal__text p + p { margin-top: 12px; }
.borgo-modal__text strong { color: var(--ink); }
.borgo-modal__label { margin-top: 22px; font-family: var(--display); font-weight: 700; font-size: 17px; }
.borgo-modal__tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.borgo-modal__label span { font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--muted); }
.borgo-modal__tags button { padding: 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font: inherit; font-size: 14px; font-weight: 600; color: var(--night); cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.borgo-modal__tags button::after { content: " +"; color: var(--green); }
.borgo-modal__tags button:hover { border-color: var(--green); color: var(--green-dark); }
.borgo-modal__tags button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.borgo-modal__tags button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.borgo-modal__tags button[aria-pressed="true"]::after { content: " −"; color: #fff; }

.borgo-spot { margin-top: 14px; display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-2); animation: borgo-spot-in .3s ease; }
.borgo-spot[hidden] { display: none; }
@keyframes borgo-spot-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.borgo-spot__img { position: relative; min-height: 160px; background: var(--ph); }
.borgo-spot__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.borgo-spot__img.is-loading img { opacity: 0; }
.borgo-spot__img.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ph) 0%, var(--ph-2) 50%, var(--ph) 100%); background-size: 200% 100%; animation: borgo-shimmer 1.2s linear infinite; }
@keyframes borgo-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.borgo-spot__txt { padding: 16px 18px; }
.borgo-spot__txt h3 { font-size: 19px; }
.borgo-spot__txt p { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.borgo-spot__credit { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.borgo-spot__credit[hidden] { display: none; }
.borgo-modal__actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 600px) {
	.borgo-modal { max-height: calc(100vh - 24px); }
	.borgo-modal__media { height: 170px; }
	.borgo-modal__body { padding: 20px 20px 24px; }
	.borgo-modal h2 { font-size: 28px; }
	.borgo-modal__actions .btn { flex: 1 1 100%; }
	.borgo-spot { grid-template-columns: 1fr; }
	.borgo-spot__img { min-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
	.borgo-modal[open], .borgo-spot { animation: none; }
	.collage figure.is-cliccabile img { transition: none; }
}
