/* Marconi Immobiliare - tema 2026 */
:root {
	--ink: #111a2e;
	--ink-soft: #46506a;
	--paper: #faf8f4;
	--card: #ffffff;
	--line: #e4dfd5;
	--navy: #16254a;
	--navy-deep: #0d1730;
	--accent: #b3202f;
	--accent-dark: #8f1927;
	--ok: #1f6b45;
	--ok-bg: #e6f3ec;
	--err: #9b1c28;
	--err-bg: #fbe9ea;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(17, 26, 46, .06), 0 8px 24px rgba(17, 26, 46, .06);
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root {
		--ink: #eceff6; --ink-soft: #aab2c6; --paper: #0e1424; --card: #172036; --line: #2a3452;
		--navy: #0a1124; --navy-deep: #060b19; --accent: #e0505f; --accent-dark: #ee6b79;
		--ok: #7fd2a4; --ok-bg: #12301f; --err: #ff9aa4; --err-bg: #3a1419;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--paper); color: var(--ink);
	font: 17px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 56px 0; }
.narrow { width: min(460px, 100% - 32px); margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.muted { color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: .92rem; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { text-decoration: none; color: var(--navy); display: flex; flex-direction: column; line-height: 1.1; }
@media (prefers-color-scheme: dark) { .brand { color: var(--ink); } }
.brand-name { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; letter-spacing: .08em; }
.brand-a { color: var(--accent); }
.brand-sub { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.nav { display: flex; gap: 6px; }
.nav a { padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 500; border-radius: 6px; font-size: .97rem; }
.nav a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.nav a.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; font: inherit; background: none; border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 6px; cursor: pointer; }
@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
	.nav.open { display: flex; }
	.nav a.active { box-shadow: none; background: color-mix(in srgb, var(--accent) 10%, transparent); }
}
.adminbar { background: var(--navy-deep); color: #fff; font-size: .88rem; }
.adminbar-in { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 8px 0; }
.adminbar a, .adminbar .linklike { color: #fff; }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

/* hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; padding: clamp(64px, 12vw, 140px) 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -8%; top: -30%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(179, 32, 47, .35), transparent 65%); pointer-events: none; }
/* con immagine: l'immagine e il velo scuro sono impostati in linea da pages/chisiamo.php */
.hero-img {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.hero-img::after { display: none; }
.hero h1 { max-width: 18ch; }
.hero .lead { color: #c9d0e4; }
.hero .eyebrow { color: #ff8b97; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.page-title { padding: 40px 0 8px; }
.page-title h1 { margin-bottom: .2em; }

/* buttons */
.btn { display: inline-block; padding: 12px 22px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 999px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-dark); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: #eee; color: var(--navy); border-color: #eee; }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }

/* cards */
.cards { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-soft); margin: 0; }
.card img { margin-bottom: 12px; border-radius: 6px; }
.band { background: var(--navy); color: #fff; }
.band-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 36px 0; }
.band-in p { margin: 0; font-size: 1.1rem; }

/* contatti / dove siamo */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.contact-list strong { display: inline-block; min-width: 70px; color: var(--ink-soft); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.map { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

/* forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form small { font-weight: 400; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
	width: 100%; font: 1rem var(--sans); padding: 11px 13px; color: var(--ink); background: var(--card);
	border: 1px solid var(--line); border-radius: 8px;
}
input[type=file] { font: .9rem var(--sans); }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.check { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; font-size: .88rem !important; color: var(--ink-soft); gap: 10px !important; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 8px; margin: 18px 0; font-weight: 500; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }

/* ricerca */
.search { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 16px 0 32px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.search label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.search select, .search input { text-transform: none; letter-spacing: 0; font-weight: 400; }
.search-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* annunci */
.listing { display: grid; gap: 24px; }
.listing-card { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 760px) { .listing-card { grid-template-columns: 1fr; } }
.listing-media { position: relative; background: #0002; min-height: 220px; }
.listing-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-media a { display: block; height: 100%; }
.more-photos { position: absolute; right: 12px; bottom: 12px; background: rgba(13, 23, 48, .85); color: #fff; font-size: .78rem; padding: 5px 11px; border-radius: 999px; }
.listing-body { padding: 24px 26px; display: flex; flex-direction: column; }
.listing-code { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.listing-body h2 { margin-bottom: .4em; }
.listing-desc { color: var(--ink-soft); }
.facts { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.facts li { display: flex; flex-direction: column; }
.facts span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.facts strong { font-family: var(--serif); font-size: 1.1rem; }
.listing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 36px 0 12px; color: var(--ink-soft); }

/* galleria */
.gallery-main { width: 100%; max-height: 70vh; object-fit: contain; background: #0001; border-radius: var(--radius); margin-bottom: 14px; }
.gallery-thumbs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-thumbs img { height: 84px; width: auto; border-radius: 6px; border: 2px solid transparent; }
.gallery-thumbs a:hover img, .gallery-thumbs a:focus img { border-color: var(--accent); }

/* admin */
.admin-form h2 { margin-top: 24px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.photo-slot { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; align-content: start; }
.photo-slot img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.danger-zone { margin-top: 48px; padding: 20px; border: 1px dashed var(--err); border-radius: var(--radius); }

/* footer */
.site-footer { background: var(--navy-deep); color: #c9d0e4; margin-top: 72px; font-size: .93rem; }
.site-footer a { color: #fff; }
.footer-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; padding: 44px 0 28px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 0 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.footer-bottom .muted { color: #8a94b0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
