:root {
  --bg: #f8f7f2;
  --surface: rgba(255,255,255,.82);
  --surface-strong: #ffffff;
  --text: #111827;
  --muted: #5b6474;
  --line: rgba(17,24,39,.12);
  --gold: #d8a928;
  --gold-2: #f3d36b;
  --blue: #0057b8;
  --yellow: #ffd700;
  --green: #009246;
  --red: #ce2b37;
  --shadow: 0 28px 80px rgba(17,24,39,.16);
  --radius: 26px;
  --hero-grad: radial-gradient(circle at top left, rgba(0,87,184,.20), transparent 34%), radial-gradient(circle at 82% 10%, rgba(255,215,0,.20), transparent 28%), radial-gradient(circle at bottom right, rgba(0,146,70,.14), transparent 30%);
}

[data-theme="dark"] {
  --bg: #070a12;
  --surface: rgba(17,24,39,.76);
  --surface-strong: #101622;
  --text: #f8fafc;
  --muted: #a7b0c0;
  --line: rgba(255,255,255,.12);
  --shadow: 0 28px 90px rgba(0,0,0,.42);
  --hero-grad: radial-gradient(circle at top left, rgba(0,87,184,.32), transparent 34%), radial-gradient(circle at 82% 10%, rgba(255,215,0,.22), transparent 28%), radial-gradient(circle at bottom right, rgba(206,43,55,.18), transparent 30%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(127,127,127,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(127,127,127,.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 75%);
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.logo-wrap img { width: 48px; height: 48px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.2)); }
.logo-title { font-weight: 800; letter-spacing: .02em; line-height: 1.05; }
.logo-sub { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.langs a { padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
.langs a.active { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #111827; }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-width: 42px;
  height: 42px;
  cursor: pointer;
}
.menu-toggle { display: none; }
.cta-small {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #111827; font-weight: 800; font-size: 14px;
  box-shadow: 0 14px 28px rgba(216,169,40,.22);
}

.hero { position: relative; overflow: hidden; padding: 86px 0 72px; background: var(--hero-grad); }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 50px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; }
h1 { margin: 20px 0 18px; font-size: clamp(42px, 6.4vw, 78px); line-height: .94; letter-spacing: -.055em; }
.gradient-text { background: linear-gradient(100deg, var(--blue), var(--gold), var(--green), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 20px; border-radius: 17px; border: 1px solid var(--line);
  font-weight: 800; cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #111827; box-shadow: 0 20px 50px rgba(216,169,40,.24); border: none; }
.btn-secondary { background: var(--surface); color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 720px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 28px; line-height: 1; color: var(--gold); }
.stat span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }

.hero-visual { perspective: 1200px; min-height: 540px; position: relative; }
.orb { position: absolute; border-radius: 999px; filter: blur(1px); opacity: .72; animation: float 7s ease-in-out infinite; }
.orb-blue { width: 160px; height: 160px; left: 8%; top: 7%; background: radial-gradient(circle, rgba(0,87,184,.85), transparent 70%); }
.orb-gold { width: 110px; height: 110px; right: 4%; top: 16%; background: radial-gradient(circle, rgba(255,215,0,.9), transparent 70%); animation-delay: 1.1s; }
.orb-red { width: 125px; height: 125px; right: 18%; bottom: 7%; background: radial-gradient(circle, rgba(206,43,55,.62), transparent 70%); animation-delay: .6s; }
.property-stack { position: absolute; inset: 40px 18px 20px; transform-style: preserve-3d; animation: tilt3d 9s ease-in-out infinite; }
.floating-card { position: absolute; border: 1px solid var(--line); background: var(--surface); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; transform-style: preserve-3d; }
.floating-card.main { left: 50px; right: 35px; top: 54px; transform: rotateY(-10deg) rotateX(8deg) translateZ(42px); }
.floating-card.side { width: 250px; right: 0; bottom: 58px; padding: 18px; transform: rotateY(-18deg) rotateX(7deg) translateZ(82px); }
.floating-card.note { width: 230px; left: 0; bottom: 10px; padding: 18px; transform: rotateY(12deg) rotateX(8deg) translateZ(65px); }
.visual-img { height: 310px; width: 100%; background: url('../img/hero-progress.svg') center/cover no-repeat; }
.visual-body { padding: 20px; }
.visual-title { font-size: 22px; font-weight: 900; }
.visual-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; background: color-mix(in srgb, var(--surface-strong) 60%, transparent); }

section { padding: 82px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-head h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.04; letter-spacing: -.035em; }
.section-head p { color: var(--muted); max-width: 620px; }
.label { color: var(--gold); text-transform: uppercase; letter-spacing: .26em; font-size: 12px; font-weight: 900; }

.search-panel { display: grid; grid-template-columns: 1.2fr .8fr .8fr .7fr auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); margin-top: -35px; position: relative; z-index: 5; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 17px; padding: 13px 14px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent); color: var(--text); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216,169,40,.14); }
.textarea { min-height: 120px; resize: vertical; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; transform: translateZ(0); transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.card-img { height: 215px; background-size: cover; background-position: center; position: relative; }
.badge { position: absolute; left: 14px; top: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(17,24,39,.75); color: white; font-size: 12px; font-weight: 800; backdrop-filter: blur(8px); }
.card-body { padding: 20px; }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.price { font-size: 22px; color: var(--gold); font-weight: 900; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.card p { color: var(--muted); margin: 0; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); gap: 12px; }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-height: 220px; }
.service-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--blue), var(--gold)); color: white; font-size: 24px; margin-bottom: 18px; box-shadow: 0 18px 30px rgba(0,87,184,.19); }
.service h3 { margin: 0 0 10px; }
.service p { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: 42px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); padding: 28px; }
.checklist { display: grid; gap: 12px; margin-top: 22px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.check::before { content: "✓"; flex: 0 0 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, var(--green), var(--gold)); color: white; font-weight: 900; font-size: 13px; }

.agent-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.agent-city { padding: 18px; border-radius: 24px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 62%, transparent); }
.agent-city strong { display: block; font-size: 18px; }
.agent-city span { color: var(--muted); font-size: 13px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.hidden-field { display: none !important; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; right: 18px; top: 10px; font-size: 52px; font-weight: 950; color: color-mix(in srgb, var(--gold) 24%, transparent); line-height: 1; }
.step h3 { margin: 0 0 10px; }
.step p { color: var(--muted); margin: 0; }

.footer { padding: 48px 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 35%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .9fr; gap: 28px; }
.footer p, .footer a { color: var(--muted); }
.footer h4 { margin: 0 0 10px; }
.footer-links { display: grid; gap: 8px; }

.whatsapp {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 999px; background: #25d366; color: #062e14; font-weight: 900; box-shadow: 0 20px 45px rgba(37,211,102,.3);
}

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes tilt3d { 0%, 100% { transform: rotateX(0) rotateY(0); } 50% { transform: rotateX(3deg) rotateY(-4deg); } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .nav-links { position: fixed; inset: 78px 16px auto 16px; display: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface-strong); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; border-radius: 14px; }
  .menu-toggle { display: inline-flex; }
  .cta-small { display: none; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .floating-card.main { left: 6%; right: 4%; top: 30px; }
  .floating-card.side { right: 2%; bottom: 30px; }
  .floating-card.note { left: 2%; bottom: 0; }
  .search-panel { grid-template-columns: 1fr 1fr; }
  .cards, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 22px, 1180px); }
  .logo-wrap { min-width: auto; }
  .logo-title { font-size: 14px; }
  .logo-sub { font-size: 9px; }
  .langs a { padding: 5px 7px; font-size: 11px; }
  .theme-toggle, .menu-toggle { min-width: 38px; height: 38px; }
  .hero { padding: 54px 0 50px; }
  .hero-grid { gap: 22px; }
  .hero-visual { min-height: 360px; }
  .visual-img { height: 210px; }
  .floating-card.side, .floating-card.note { display: none; }
  .stats, .cards, .service-grid, .steps, .agent-map, .form-grid, .search-panel { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .section-head { display: block; }
  .card-foot { align-items: stretch; flex-direction: column; }
  .btn { width: 100%; }
  .whatsapp { left: 14px; right: 14px; justify-content: center; }
}


/* Mobile stability and improved hero visual */
.visual-img { min-height: 310px; }
@media (hover: none) and (pointer: coarse) {
  [data-tilt], .card:hover { transform: none !important; }
}
@media (max-width: 640px) {
  h1 { font-size: clamp(34px, 11vw, 48px); line-height: 1.02; letter-spacing: -.045em; }
  .lead { font-size: 16px; }
  .nav { min-height: 68px; gap: 8px; }
  .logo-wrap img { width: 40px; height: 40px; }
  .nav-actions { gap: 6px; }
  .hero-visual { min-height: 285px; }
  .property-stack { position: relative; inset: auto; min-height: 270px; animation: none; }
  .floating-card.main { left: 0; right: 0; top: 0; transform: none; border-radius: 24px; }
  .visual-img { height: 220px; min-height: 220px; }
  .visual-body { padding: 14px; }
  .visual-title { font-size: 18px; }
  .search-panel { margin-top: 16px; }
  .site-header { backdrop-filter: blur(10px); }
}
@media (max-width: 420px) {
  .logo-title { max-width: 112px; }
  .langs { display: none; }
  .container { width: min(100% - 18px, 1180px); }
}


/* Stable hero visual: no external image required */
.visual-img {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 215, 0, .46), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(0, 87, 184, .42), transparent 26%),
    radial-gradient(circle at 82% 82%, rgba(0, 146, 70, .30), transparent 24%),
    radial-gradient(circle at 16% 82%, rgba(206, 43, 55, .30), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(216,169,40,.22));
}
[data-theme="dark"] .visual-img {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 215, 0, .34), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(0, 87, 184, .42), transparent 26%),
    radial-gradient(circle at 82% 82%, rgba(0, 146, 70, .28), transparent 24%),
    radial-gradient(circle at 16% 82%, rgba(206, 43, 55, .25), transparent 24%),
    linear-gradient(135deg, #111827, #0b1020 56%, rgba(216,169,40,.30));
}
.visual-img::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 26px;
  border: 1px solid rgba(216,169,40,.42);
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.03)),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(255,255,255,.08) 42px 43px),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(255,255,255,.08) 42px 43px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 24px 70px rgba(0,0,0,.18);
}
.visual-img::after {
  content: "Milano • Italia • Network";
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  border-radius: 999px;
  background: rgba(7,10,18,.72);
  color: #f3d36b;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
}
@media (max-width: 640px) {
  .visual-img::before { inset: 16px; border-radius: 22px; }
  .visual-img::after { left: 24px; right: 24px; bottom: 26px; min-height: 48px; font-size: 12px; }
}


/* --- Italy map hero + interactive map --- */
.hero-map-card {
  position: absolute;
  inset: 24px 18px 62px 18px;
  border-radius: 30px;
  border: 1px solid color-mix(in srgb, var(--gold) 25%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 88%, transparent), color-mix(in srgb, var(--surface) 70%, transparent));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-map-image {
  position: absolute;
  inset: 42px 50px 34px 50px;
  width: calc(100% - 100px);
  height: calc(100% - 76px);
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(7,14,28,.18));
  opacity: .96;
}
.hero-label {
  position: absolute;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: white;
  background: rgba(11,16,32,.82);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(8,15,28,.18);
  backdrop-filter: blur(10px);
}
.hero-label-one { left: 22px; top: 28px; }
.hero-label-two { right: 18px; top: 38%; }
.hero-label-three { left: 18%; bottom: 16px; }
.hero-map-dot {
  position: absolute; width: 16px; height: 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  border: 3px solid #fff; box-shadow: 0 0 0 9px rgba(0,87,184,.14), 0 14px 24px rgba(7,14,28,.2);
}
.hero-map-dot.dot-milano { left: 38%; top: 19%; }
.hero-map-dot.dot-roma { left: 52%; top: 53%; }
.hero-map-dot.dot-firenze { left: 45%; top: 40%; }

#italy-map { padding-top: 24px; }
.map-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
.italy-map-panel, .map-info { border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); }
.italy-map-panel { padding: 18px; }
.map-frame {
  position: relative;
  min-height: 660px;
  border-radius: 26px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(0,87,184,.14), transparent 36%), radial-gradient(circle at bottom right, rgba(214,69,69,.12), transparent 34%), linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 82%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
}
.italy-map-image {
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(72%, 410px); height: auto; max-height: 92%; object-fit: contain;
}
.map-markers { position: absolute; inset: 0; }
.map-marker {
  position: absolute; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 999px;
  border: 3px solid #fff; background: linear-gradient(135deg, var(--blue), var(--gold));
  box-shadow: 0 0 0 9px rgba(0,87,184,.12), 0 18px 30px rgba(6,12,24,.2);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.map-marker::after {
  content: ''; position: absolute; inset: -12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); opacity: .8; animation: pulsePin 2.2s ease-out infinite;
}
.map-marker:hover, .map-marker.active { transform: translate(-50%, -50%) scale(1.14); background: linear-gradient(135deg, var(--green), var(--gold)); }
.map-marker-label {
  position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%);
  white-space: nowrap; font-size: 11px; font-weight: 800; color: white; background: rgba(11,16,32,.85);
  padding: 5px 8px; border-radius: 999px; opacity: 0; transition: opacity .18s ease;
}
.map-marker:hover .map-marker-label, .map-marker.active .map-marker-label { opacity: 1; }
@keyframes pulsePin { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.map-info { padding: 28px; }
.map-info h3 { margin: 10px 0 8px; font-size: 28px; }
.map-info-meta { color: var(--gold); font-weight: 800; margin-bottom: 14px; }
.map-property-list { margin-top: 24px; }
.map-property-list h4 { margin: 0 0 10px; }
.map-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 58%, transparent);
  margin-bottom: 10px; color: inherit; text-align: left;
}
.map-list-item span { display: block; }
.map-list-item small { color: var(--muted); display: block; margin-top: 4px; }
.map-list-item strong { color: var(--gold); white-space: nowrap; }
.map-list-item.active { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); }
.map-link { margin-top: 10px; }

@media (max-width: 980px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-frame { min-height: 540px; }
  .hero-map-card { inset: 10px 0 58px 0; }
}
@media (max-width: 640px) {
  .hero-map-card { position: relative; inset: auto; min-height: 280px; margin-top: 8px; }
  .hero-map-image { inset: 26px 24px 28px 24px; width: calc(100% - 48px); height: calc(100% - 54px); }
  .hero-label { font-size: 12px; padding: 8px 12px; }
  .hero-label-one { left: 14px; top: 14px; }
  .hero-label-two { right: 12px; top: 44%; }
  .hero-label-three { left: 14px; bottom: 12px; }
  .map-frame { min-height: 430px; }
  .map-info h3 { font-size: 24px; }
}


/* --- Clear regional Italy map redesign --- */
.hero-visual-map { min-height: 560px; }
.hero-map-only-card {
  position: absolute;
  inset: 16px 8px 18px 8px;
  border-radius: 34px;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(246,249,255,.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-map-full-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.hero-label, .hero-map-dot { display: none !important; }

.map-frame {
  min-height: 780px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,247,253,.96));
}
.italy-map-image {
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92%, 760px);
  height: auto; max-height: 97%; object-fit: contain;
}
.map-marker {
  width: 15px; height: 15px; border-width: 2px;
  background: #ef4444;
  box-shadow: 0 0 0 7px rgba(239,68,68,.14), 0 18px 30px rgba(6,12,24,.17);
}
.map-marker[data-listing="rent"] {
  background: #2563eb;
  box-shadow: 0 0 0 7px rgba(37,99,235,.14), 0 18px 30px rgba(6,12,24,.17);
}
.map-marker:hover, .map-marker.active {
  transform: translate(-50%, -50%) scale(1.18);
}
.map-marker::after { border-color: rgba(15,23,42,.14); }
.map-legend { display:flex; gap:16px; flex-wrap:wrap; margin: 12px 0 4px; color: var(--muted); font-size:14px; }
.map-legend span { display:inline-flex; align-items:center; gap:8px; }
.map-legend i { width:12px; height:12px; border-radius:999px; display:inline-block; }
.map-legend .sale { background:#ef4444; }
.map-legend .rent { background:#2563eb; }
.map-list-item { align-items: flex-start; }
.map-list-item strong { padding-top: 2px; }

@media (max-width: 980px) {
  .hero-visual-map { min-height: 470px; }
  .map-frame { min-height: 620px; }
}
@media (max-width: 640px) {
  .hero-visual-map { min-height: 360px; }
  .hero-map-only-card { position: relative; inset: auto; min-height: 320px; }
  .map-frame { min-height: 480px; }
  .italy-map-image { width: min(96%, 560px); }
}


/* --- Google Maps integration --- */
.google-map-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; align-items: start; }
.google-map-card, .google-map-side { border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.google-map-card { padding: 14px; }
#progress-google-map { width: 100%; min-height: 620px; border-radius: 24px; background: linear-gradient(135deg, rgba(0,87,184,.14), rgba(246,197,79,.12)); }
.google-map-status { padding: 12px 4px 0; color: var(--muted); font-size: 14px; }
.google-map-side { padding: 24px; }
.google-map-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0 18px; color: var(--muted); font-size: 14px; }
.google-map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.google-map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 999px; }
.google-map-legend .sale { background: #ef4444; }
.google-map-legend .rent { background: #2563eb; }
.google-map-list { display: grid; gap: 10px; margin-top: 14px; }
.google-map-list-item { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 55%, transparent); color: inherit; }
.google-map-list-item small { display: block; color: var(--muted); margin-top: 4px; }
.google-map-list-item b { color: var(--gold); white-space: nowrap; }
.gm-card { color: #111827; max-width: 280px; font-family: Arial, sans-serif; }
.gm-card strong { display: block; font-size: 15px; margin-bottom: 6px; }
.gm-card p { margin: 4px 0; }
.gm-card a { display: inline-block; margin-top: 7px; font-weight: 700; color: #0b57d0; }
@media (max-width: 980px) { .google-map-layout { grid-template-columns: 1fr; } #progress-google-map { min-height: 520px; } }
@media (max-width: 640px) { #progress-google-map { min-height: 420px; } .google-map-side { padding: 18px; } .google-map-list-item { flex-direction: column; } }


/* --- Clean Google Maps only version --- */
.hero-clean-panel { min-height: 430px; }
.hero-property-panel {
  position: absolute;
  inset: 54px 24px 46px 24px;
  border-radius: 34px;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 86%, transparent), color-mix(in srgb, var(--surface) 72%, transparent));
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.hero-property-topline { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 900; }
.hero-property-title { font-size: clamp(26px, 4vw, 48px); font-weight: 950; line-height: .98; letter-spacing: -.04em; }
.hero-property-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 18px; padding: 13px 14px; background: color-mix(in srgb, var(--surface-strong) 58%, transparent); }
.hero-property-row strong { color: var(--gold); }
.compact-head { margin-bottom: 18px; }
.google-map-layout { grid-template-columns: 1.45fr .55fr; }
#progress-google-map { min-height: 680px; }
.google-map-status:empty { display: none; }
.google-map-side h3 { margin-top: 8px; }
.google-map-side p { color: var(--muted); margin-bottom: 12px; }
.gm-style .gm-style-iw-c { border-radius: 18px; }

@media (max-width: 980px) {
  .hero-clean-panel { min-height: 330px; }
  .hero-property-panel { position: relative; inset: auto; min-height: 300px; }
  .google-map-layout { grid-template-columns: 1fr; }
  #progress-google-map { min-height: 540px; }
}
@media (max-width: 640px) {
  .hero-clean-panel { min-height: 280px; }
  .hero-property-panel { min-height: 250px; padding: 20px; }
  .hero-property-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  #progress-google-map { min-height: 470px; }
}


/* --- Featured Loreto property with 6 photos --- */
.featured-property {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  align-items: stretch;
}
.featured-property:hover { transform: translateY(-4px); }
.property-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-auto-rows: 145px;
  gap: 8px;
  padding: 12px;
  min-height: 100%;
}
.gallery-photo {
  position: relative;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-main { grid-row: span 2; }
.featured-property .card-body { padding: 26px; align-self: center; }
.investment-note {
  margin-top: 14px !important;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line));
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}
@media (max-width: 980px) {
  .featured-property { grid-template-columns: 1fr; }
  .property-gallery { grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 135px; }
  .gallery-main { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 640px) {
  .property-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 118px; padding: 10px; }
  .gallery-main { grid-column: 1 / -1; grid-row: span 2; }
  .featured-property .card-body { padding: 20px; }
}

/* --- Clickable photo lightbox for property galleries --- */
.gallery-photo {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}
.gallery-photo::after {
  content: "🔍";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  border: 1px solid color-mix(in srgb, white 36%, transparent);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.gallery-photo:hover::after,
.gallery-photo:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.gallery-photo:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 72%, white);
  outline-offset: 3px;
}
body.lightbox-open { overflow: hidden; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}
.image-lightbox.open { display: grid; }
.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px);
}
.image-lightbox-content {
  position: relative;
  width: min(1120px, 100%);
  max-height: 92vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 26%, rgba(255,255,255,.22));
  box-shadow: 0 28px 90px rgba(0,0,0,.45);
}
.image-lightbox-img {
  width: 100%;
  max-height: calc(92vh - 90px);
  object-fit: contain;
  border-radius: 20px;
  background: rgba(0,0,0,.22);
}
.image-lightbox-title {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  font-size: 14px;
}
.image-lightbox-close,
.image-lightbox-arrow {
  position: absolute;
  z-index: 2;
  border: 1px solid color-mix(in srgb, white 24%, transparent);
  background: rgba(0,0,0,.44);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 34px rgba(0,0,0,.32);
  transition: transform .18s ease, background .18s ease;
}
.image-lightbox-close:hover,
.image-lightbox-arrow:hover { transform: scale(1.05); background: rgba(0,0,0,.62); }
.image-lightbox-close:focus-visible,
.image-lightbox-arrow:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.image-lightbox-close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}
.image-lightbox-arrow {
  top: 50%;
  width: 48px;
  height: 58px;
  border-radius: 18px;
  font-size: 42px;
  transform: translateY(-50%);
}
.image-lightbox-arrow:hover { transform: translateY(-50%) scale(1.05); }
.image-lightbox-prev { left: 22px; }
.image-lightbox-next { right: 22px; }
@media (max-width: 640px) {
  .gallery-photo::after { opacity: 1; transform: none; width: 32px; height: 32px; }
  .image-lightbox-content { padding: 10px; border-radius: 22px; }
  .image-lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .image-lightbox-arrow { width: 42px; height: 50px; font-size: 36px; }
  .image-lightbox-prev { left: 12px; }
  .image-lightbox-next { right: 12px; }
}
