    :root {
      /* QUI METTI IL COLORE PRINCIPALE DEL LOGO (HEX) */
      --primary: #17426b;        /* Sostituisci con il colore principale del logo Baglivo */
      --primary-dark: #0d2a42;   /* Versione leggermente più scura */
      --accent: #e4b455;         /* Colore di accento (secondo colore del logo, se ne hai uno) */

      --bg-light: #f4f6f8;
      --text-main: #1f2933;
      --text-muted: #6b7280;
      --radius-lg: 1rem;
      --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
      --max-width: 1200px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text-main);
      background: #ffffff;
      line-height: 1.6;
    }

    img {
      max-width: 100%;
      display: block;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font-family: inherit;
    }

    .container {
      width: 100%;
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 0 1.5rem;
    }

    /* HEADER */

    header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    }

    .nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.9rem 0;
      gap: 1.5rem;
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 0.9rem;
    }

    .logo-img {
      height: 100px;
      width: auto;
      object-fit: contain;
    }

    .logo-fallback {
      font-weight: 700;
      font-size: 1.2rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--primary);
    }

    .logo-sub {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: var(--text-muted);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 1.25rem;
      font-size: 0.9rem;
    }

    .nav-links a {
      position: relative;
      padding: 0.25rem 0;
      color: var(--text-muted);
      font-weight: 500;
    }

    .nav-links a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -0.2rem;
      width: 0;
      height: 2px;
      background: var(--accent);
      transition: width 0.2s ease;
    }

    .nav-links a:hover {
      color: var(--primary);
    }

    .nav-links a:hover::after {
      width: 100%;
    }

    .nav-cta {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: 0.85rem;
    }

    .nav-phone {
      font-weight: 500;
      color: var(--primary-dark);
      white-space: nowrap;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      border-radius: 999px;
      border: none;
      cursor: pointer;
      padding: 0.6rem 1.4rem;
      font-size: 0.9rem;
      font-weight: 600;
      transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
      white-space: nowrap;
    }

    .btn-primary {
      background: var(--primary);      /* Bottoni nel colore del logo */
      color: #ffffff;
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      background: var(--primary-dark);
      box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    }

    .btn-outline {
      background: transparent;
      color: var(--primary);
      border: 1px solid rgba(148, 163, 184, 0.7);
    }

    .btn-outline:hover {
      background: #e5ecf3;
      transform: translateY(-1px);
    }

    .hamburger {
      display: none;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
    }

    .hamburger span {
      width: 20px;
      height: 2px;
      background: var(--primary);
      border-radius: 999px;
      transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-open .hamburger span:nth-child(1) {
      transform: translateY(6px) rotate(45deg);
    }

    .mobile-open .hamburger span:nth-child(2) {
      opacity: 0;
    }

    .mobile-open .hamburger span:nth-child(3) {
      transform: translateY(-6px) rotate(-45deg);
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }

    .nav-mobile-panel {
      display: none;
    }

    /* HERO */

    .hero {
      padding: 3.2rem 0 3rem;
      background: radial-gradient(circle at top left, #e4edf7, #ffffff 50%);
    }

    .hero-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
      gap: 2.5rem;
      align-items: center;
    }

    .eyebrow {
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: var(--accent);
      font-weight: 600;
      margin-bottom: 0.75rem;
    }

    .hero h1 {
      font-size: clamp(2.3rem, 3vw, 2.8rem);
      line-height: 1.12;
      margin-bottom: 1rem;
      color: #0b1723;
    }

    .hero h1 span {
      color: var(--primary);
    }

    .hero-sub {
      font-size: 0.98rem;
      color: var(--text-muted);
      max-width: 520px;
      margin-bottom: 1.8rem;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.9rem;
      align-items: center;
      margin-bottom: 1.5rem;
    }

    .hero-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .badge {
      padding: 0.32rem 0.75rem;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.03);
      border: 1px solid rgba(148, 163, 184, 0.6);
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-weight: 500;
    }

    .badge-dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #10b981;
    }

    .hero-card {
      background: #ffffff;
      border-radius: var(--radius-lg);
      padding: 1.4rem 1.5rem;
      box-shadow: var(--shadow-soft);
      border: 1px solid rgba(148, 163, 184, 0.12);
    }

    .hero-card-title {
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 0.7rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
    }

    .hero-card-sub {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 1rem;
    }

    .search-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.7rem;
      margin-bottom: 0.8rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.32rem;
      font-size: 0.8rem;
    }

    .form-label {
      font-weight: 500;
      color: var(--text-muted);
    }

    .input,
    select {
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.8);
      padding: 0.55rem 0.9rem;
      font-size: 0.85rem;
      outline: none;
      transition: border 0.15s ease, box-shadow 0.15s ease;
      background: #ffffff;
    }

    .input:focus,
    select:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 1px rgba(23, 66, 107, 0.12);
    }

    .price-range {
      display: flex;
      gap: 0.4rem;
      flex-wrap: wrap; /* importante per evitare overflow */
    }

    .price-range .input {
      flex: 1 1 140px;
      min-width: 0;  /* evita che il campo "strabordi" orizzontalmente */
    }

    .hint {
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-top: 0.45rem;
    }

    /* SECTIONS */

    section {
      padding: 2.8rem 0;
    }

    section:nth-of-type(even) {
      background: var(--bg-light);
    }

    .section-header {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1.8rem;
    }

    .section-title-group {
      max-width: 520px;
    }

    .section-title {
      font-size: 1.4rem;
      margin-bottom: 0.4rem;
    }

    .section-sub {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    /* IMMOBILI */

    .properties-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.4rem;
    }

    .property-card {
      background: #ffffff;
      border-radius: 1rem;
      overflow: hidden;
      box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
      border: 1px solid rgba(148, 163, 184, 0.24);
      display: flex;
      flex-direction: column;
      min-height: 100%;
    }

    .property-media {
      position: relative;
      height: 180px;
      background: linear-gradient(135deg, #e5f0ff, #d1e4ff);
      display: flex;
      align-items: flex-end;
      justify-content: flex-start;
      padding: 0.9rem 1rem;
      color: #0b1723;
      font-size: 0.85rem;
      font-weight: 500;
    }

    .property-badge {
      position: absolute;
      top: 0.9rem;
      left: 0.9rem;
      background: rgba(23, 66, 107, 0.96);
      color: #ffffff;
      font-size: 0.73rem;
      padding: 0.3rem 0.7rem;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .property-badge-alt {
      background: rgba(16, 185, 129, 0.95);
    }

    .property-body {
      padding: 1rem 1.1rem 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      flex: 1;
    }

    .property-title {
      font-size: 0.98rem;
      font-weight: 600;
    }

    .property-location {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .property-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      font-size: 0.78rem;
      margin-top: 0.2rem;
    }

    .pill {
      padding: 0.28rem 0.55rem;
      border-radius: 999px;
      background: #f3f4f6;
      border: 1px solid rgba(148, 163, 184, 0.7);
    }

    .property-bottom {
      padding: 0.8rem 1.1rem 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.6rem;
      border-top: 1px solid rgba(148, 163, 184, 0.2);
      font-size: 0.82rem;
    }

    .property-price {
      font-weight: 700;
      color: var(--primary-dark);
      font-size: 0.93rem;
    }

    .property-link {
      font-weight: 500;
      font-size: 0.8rem;
      color: var(--primary);
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      border: none;
      background: transparent;
      cursor: pointer;
    }

    /* SERVIZI */

    .services-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.3rem;
    }

    .service-card {
      background: #ffffff;
      border-radius: var(--radius-lg);
      padding: 1.1rem 1.1rem 1.2rem;
      border: 1px solid rgba(148, 163, 184, 0.36);
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }

    .service-title {
      font-size: 0.98rem;
      font-weight: 600;
      margin-bottom: 0.4rem;
    }

    .service-text {
      font-size: 0.84rem;
      color: var(--text-muted);
      margin-bottom: 0.5rem;
    }

    .service-list {
      list-style: none;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .service-list li::before {
      content: "•";
      margin-right: 0.35rem;
      color: var(--accent);
    }

    /* CHI SIAMO & PERCHÉ NOI */

    .two-col {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
      gap: 2rem;
      align-items: start;
    }

    .highlight-box {
      background: #ffffff;
      border-radius: var(--radius-lg);
      padding: 1.2rem 1.3rem;
      border: 1px solid rgba(148, 163, 184, 0.32);
      box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
      font-size: 0.86rem;
      color: var(--text-muted);
    }

    .list-check {
      list-style: none;
      font-size: 0.86rem;
      color: var(--text-muted);
      display: grid;
      gap: 0.45rem;
      margin-top: 0.5rem;
    }

    .list-check li::before {
      content: "✓";
      margin-right: 0.35rem;
      color: #059669;
      font-weight: 600;
    }

    /* TESTIMONIALS */

    .testimonials-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.3rem;
    }

    .testimonial-card {
      background: #ffffff;
      border-radius: var(--radius-lg);
      padding: 1.1rem 1.2rem;
      border: 1px solid rgba(148, 163, 184, 0.3);
      box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
      font-size: 0.84rem;
      display: flex;
      flex-direction: column;
      gap: 0.6rem;
    }

    .testimonial-name {
      font-weight: 600;
      font-size: 0.9rem;
    }

    .testimonial-role {
      font-size: 0.76rem;
      color: var(--text-muted);
    }

    .stars {
      font-size: 0.78rem;
      color: #f59e0b;
    }

    /* CONTATTI */

    .contact-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
      gap: 1.8rem;
      align-items: start;
    }

    .contact-card {
      background: #ffffff;
      border-radius: var(--radius-lg);
      padding: 1.4rem 1.4rem 1.6rem;
      border: 1px solid rgba(148, 163, 184, 0.4);
      box-shadow: var(--shadow-soft);
    }

    .contact-row {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      font-size: 0.86rem;
      margin-bottom: 0.7rem;
    }

    .contact-label {
      font-weight: 500;
      color: var(--text-muted);
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .contact-value a {
      color: var(--primary);
      font-weight: 500;
    }

    .map-placeholder {
      margin-top: 0.9rem;
      border-radius: 0.9rem;
      border: 1px dashed rgba(148, 163, 184, 0.7);
      padding: 0.7rem 0.9rem;
      font-size: 0.78rem;
      color: var(--text-muted);
      background: #f9fafb;
    }

    .contact-form {
      display: grid;
      gap: 0.7rem;
      font-size: 0.85rem;
    }

    .contact-form textarea {
      border-radius: 0.9rem;
      border: 1px solid rgba(148, 163, 184, 0.8);
      padding: 0.6rem 0.9rem;
      resize: vertical;
      min-height: 115px;
      font-family: inherit;
      font-size: 0.86rem;
    }

    .privacy-row {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-top: 0.3rem;
    }

    .privacy-row input[type="checkbox"] {
      margin-top: 0.13rem;
    }

    /* CTA FINALE */

    .cta-final {
      text-align: center;
      padding: 2.6rem 0 2.4rem;
      background: radial-gradient(circle at top, #e8f0fb, #ffffff 55%);
    }

    .cta-final h2 {
      font-size: 1.5rem;
      margin-bottom: 0.6rem;
    }

    .cta-final p {
      font-size: 0.92rem;
      color: var(--text-muted);
      max-width: 540px;
      margin: 0 auto 1.4rem;
    }

    /* FOOTER */

    footer {
      padding: 1.8rem 0 1.6rem;
      background: #0b1723;
      color: #cbd5f5;
      font-size: 0.8rem;
    }

    .footer-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 1rem;
      align-items: center;
    }

    .footer-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.9rem;
    }

    .footer-links a {
      color: #94a3b8;
    }

    .footer-links a:hover {
      color: #e5e7eb;
    }

    /* RESPONSIVE */

    @media (max-width: 960px) {
      .hero-grid,
      .two-col,
      .contact-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .hero {
        padding-top: 2.3rem;
      }

      .properties-grid,
      .services-grid,
      .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 768px) {
      .nav-right {
        display: none;
      }

      .hamburger {
        display: flex;
      }

      .nav-mobile-panel {
        display: none;
        border-top: 1px solid rgba(148, 163, 184, 0.3);
        padding-bottom: 0.8rem;
      }

      .nav-mobile-inner {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        padding-top: 0.5rem;
      }

      .nav-mobile-links {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        font-size: 0.88rem;
      }

      .nav-mobile-links a {
        color: var(--text-muted);
      }

      .nav-mobile-cta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        margin-top: 0.6rem;
      }

      .hero {
        padding-bottom: 2.4rem;
      }

      .hero-card {
        margin-top: 0.7rem;
      }

      .properties-grid,
      .services-grid,
      .testimonials-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      section {
        padding: 2.2rem 0;
      }

      .cta-final {
        padding: 2.1rem 0 2rem;
      }

      footer {
        padding-top: 1.4rem;
      }
    }

    @media (max-width: 480px) {
      /* Sui telefoni i campi budget vanno uno sotto l'altro: zero problemi di overflow */
      .price-range {
        flex-direction: column;
      }
    }

    /* =========================
   FIX FORM MOBILE (PATCH)
========================= */

/* evita micro-overflow su iOS */
html, body { overflow-x: hidden; }

/* input/select/textarea sempre dentro al contenitore */
input, select, textarea, button { max-width: 100%; }

/* iOS: evita zoom e migliora layout */
@media (max-width: 768px){
  input, select, textarea { font-size: 16px; }
}

/* ---- QUICK SEARCH (hero) ---- */
@media (max-width: 768px){
  .search-grid { grid-template-columns: 1fr; }
  .price-range { flex-direction: column; }
  .price-range .input { width: 100%; flex: 1 1 auto; }
}

/* ---- CONTATTI ---- */
/* assicura che i campi non sfondino */
.contact-form .input,
.contact-form select,
.contact-form textarea{
  width: 100%;
  display: block;
  min-width: 0;
}

/* PRIVACY: fix definitivo (non deve rompere mai) */
.privacy-row{
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;          /* <— questo è il fix */
  width: 100%;
}

.privacy-row input[type="checkbox"]{
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
}

.privacy-row label{
  flex: 1 1 240px;          /* va a capo senza spaccare layout */
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* bottone form full width su mobile */
@media (max-width: 768px){
  .contact-form .btn{ width: 100%; }
}
