/* ============================================================
   MISCIO IMMOBILIARE - PIATTAFORMA PREMIUM
   Design Navy #0a1628 + Gold #c9a84c
   v2.0 - Responsive Fix Complete
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #0a1628;
  --navy-light: #122040;
  --navy-mid: #1a3060;
  --gold: #c9a84c;
  --gold-light: #e0c068;
  --gold-dark: #a8862e;
  --gold-glow: rgba(201,168,76,0.3);
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.18);
  --shadow-gold: 0 8px 32px rgba(201,168,76,0.35);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --navbar-h: 75px;
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body); color: var(--gray-800);
  background: var(--white); line-height: 1.6; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }

/* ====== UTILITY ====== */
.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.bg-navy { background: var(--navy); }
.bg-gray { background: var(--gray-50); }
.hidden { display: none !important; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;        /* NO wrap: evita bottoni alti e brutti */
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: middle;
  text-decoration: none;
}
/* Varianti colore */
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.65); }
.btn-outline:hover { background: var(--white); color: var(--navy); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(255,255,255,0.1); color: var(--white); border-color: rgba(255,255,255,0.22); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
/* WhatsApp button */
.btn-whatsapp { background: #25d366; color: #fff !important; border-color: #25d366; }
.btn-whatsapp:hover { background: #1da851; border-color: #1da851; transform: translateY(-2px); }
/* Outline scuro (su sfondo chiaro) */
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
/* Varianti dimensione – COERENTI con le dimensioni base */
.btn-sm  { padding: 7px 14px;  font-size: 0.8rem;  border-radius: 8px; }
.btn-lg  { padding: 13px 28px; font-size: 0.95rem; }
.btn-xl  { padding: 14px 30px; font-size: 1rem;   border-radius: 10px; }
/* Bottone a larghezza piena (utility) */
.btn-block { width: 100%; }

/* ====== SECTION HEADERS ====== */
.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.05));
  color: var(--gold-dark); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 7px 18px; border-radius: 50px; margin-bottom: 16px;
  border: 1px solid rgba(201,168,76,0.3);
  backdrop-filter: blur(10px);
}
.section-title { color: var(--navy); margin-bottom: 20px; }
.section-title span, .section-title em { color: var(--gold); font-style: normal; }
.section-desc { color: var(--gray-600); font-size: 1rem; max-width: 640px; line-height: 1.9; }
.divider-gold {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px; margin: 16px 0;
}
.divider-gold.centered { margin: 16px auto; }

/* ====== SCROLL REVEAL ====== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ====== NAVBAR ====== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0; transition: var(--transition);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
/* Forza navbar opaco quando mobile menu è aperto */
.navbar.menu-open {
  background: rgba(10, 22, 40, 0.99);
  backdrop-filter: blur(20px);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--navbar-h); padding: 0 24px;
  max-width: 1400px; margin: 0 auto;
}
.navbar-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px; background: var(--gold);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; color: var(--navy);
  font-family: var(--font-display); flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transition: var(--transition);
}
.navbar-logo:hover .logo-icon { transform: rotate(-5deg) scale(1.05); }
.logo-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); display: block; }
.logo-sub { font-size: 0.65rem; color: rgba(255,255,255,0.55); font-weight: 400; letter-spacing: 0.05em; display: block; }
.navbar-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: rgba(255,255,255,0.85); font-size: 0.85rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
  height: 2px; background: var(--gold); border-radius: 2px;
  transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { left: 10px; right: 10px; }
.nav-link:hover, .nav-link.active { color: var(--gold); }
.navbar-cta { display: flex; align-items: center; gap: 10px; }
.navbar-phone { color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 500; white-space: nowrap; }

/* ====== HAMBURGER ====== */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 10px; cursor: pointer; z-index: 1001;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--transition); transform-origin: center;
}
/* Hamburger → X quando aperto */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====== MOBILE MENU ====== */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-h);
  left: 0; right: 0;
  /* Altezza massima con scroll se troppi elementi */
  max-height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  background: rgba(10,22,40,0.99);
  backdrop-filter: blur(20px);
  padding: 16px 20px 24px;
  z-index: 999;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  /* Ombra netta sotto */
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mobile-menu a {
  display: flex; align-items: center; gap: 14px;
  color: var(--white); padding: 13px 16px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500; transition: var(--transition);
}
.mobile-menu a:hover { background: rgba(201,168,76,0.15); color: var(--gold); }
.mobile-menu a i { width: 20px; text-align: center; color: var(--gold); font-size: 0.95rem; }
.mobile-menu.open { display: block; animation: slideDown 0.3s ease; }
/* Separatore nel menu mobile */
.mobile-menu-divider {
  height: 1px; background: rgba(255,255,255,0.08);
  margin: 8px 0;
}
/* Call-to-action nel menu mobile */
.mobile-menu-cta {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.mobile-menu-cta a {
  flex: 1;
  min-width: 120px;        /* evita che si schiaccino troppo */
  justify-content: center;
  border-radius: 10px;
  font-weight: 600 !important;
  white-space: nowrap;
  text-align: center;
}

/* Overlay scuro quando menu mobile è aperto */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  top: var(--navbar-h);
}
.menu-overlay.open { display: block; }

/* ====== HERO ====== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--navy);
  /* Padding top = navbar height per evitare sovrapposizione */
  padding-top: var(--navbar-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=85') center/cover no-repeat;
  opacity: 0.25; transform: scale(1.1);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1.2); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,22,40,0.95) 0%, rgba(26,48,96,0.8) 50%, rgba(10,22,40,0.9) 100%);
}
#particles-canvas {
  position: absolute; inset: 0; z-index: 1;
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  max-width: 960px; padding: 40px 20px;
  animation: heroFadeUp 1.2s ease forwards;
  width: 100%;
}
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold-light); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 20px; border-radius: 50px; margin-bottom: 24px;
  backdrop-filter: blur(10px);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); } 50% { box-shadow: 0 0 0 12px rgba(201,168,76,0); } }
.hero-title {
  font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 5rem);
  color: var(--white); line-height: 1.15; margin-bottom: 20px; font-weight: 900;
}
.hero-title em { color: var(--gold); font-style: italic; }
.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem); color: rgba(255,255,255,0.75);
  max-width: 640px; margin: 0 auto 32px; line-height: 1.9;
}
.hero-stats {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 800;
  color: var(--gold); display: block; line-height: 1;
}
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.hero-actions {
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 40px;
  /* MOBILE FIX: centra i bottoni */
  padding: 0 8px;
}
.hero-actions .btn {
  /* Su mobile i bottoni NON devono essere a tutta larghezza (flex-wrap li gestisce) */
  min-width: 0;
}

/* ====== SEARCH WIDGET ====== */
.search-widget {
  background: rgba(255,255,255,0.05); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
  padding: 20px; max-width: 820px; margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 100%;
}
.search-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.search-tab {
  flex: 1; padding: 9px 12px; border-radius: 10px;
  font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1); background: transparent;
  transition: var(--transition); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.search-tab.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.search-tab:hover:not(.active) { border-color: var(--gold); color: var(--gold); }
/* GRID SEARCH: default 2 colonne + pulsante */
.search-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.search-form-grid .search-field:first-child {
  grid-column: 1 / -1; /* Location occupa tutta la riga */
}
.search-btn-wrap {
  grid-column: 1 / -1; /* Pulsante occupa tutta la riga */
}
.search-field label { display: block; font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 7px; }
.search-field input, .search-field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: var(--white); font-size: 0.88rem;
  transition: var(--transition);
}
.search-field input:focus, .search-field select:focus {
  outline: none; border-color: var(--gold); background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
}
.search-field input::placeholder { color: rgba(255,255,255,0.4); }
.search-field select option { background: var(--navy); color: var(--white); }
.btn-search {
  width: 100%; padding: 13px 20px; background: var(--gold); color: var(--navy);
  border-radius: 10px; font-weight: 700; font-size: 0.92rem;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.btn-search:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow-gold); }

/* ====== PORTALS STRIP ====== */
.portals-strip {
  background: var(--white);
  padding: 14px 20px; display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.portals-strip-label { font-size: 0.72rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.1em; }
.portal-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; font-weight: 600; color: var(--gray-700);
  padding: 5px 12px; border-radius: 50px;
  border: 1px solid var(--gray-200); background: var(--white);
  transition: var(--transition);
}
.portal-badge:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.portal-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: blink 2s ease infinite; flex-shrink: 0; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ====== SERVICES GRID ====== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border-radius: 20px; padding: 32px 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0); transition: var(--transition); transform-origin: left;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold-light); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px; background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--gold); margin-bottom: 20px;
  transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--gold); color: var(--navy); transform: rotate(-5deg) scale(1.1); }
.service-card h3 { color: var(--navy); margin-bottom: 10px; font-size: 1.1rem; }
.service-card p { color: var(--gray-600); font-size: 0.9rem; line-height: 1.8; }

/* ====== STATS SECTION ====== */
.stats-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy) 100%);
  padding: 70px 0; position: relative; overflow: hidden;
}
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; z-index: 1; }
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-display); font-size: 2.8rem; font-weight: 900;
  color: var(--gold); display: block; line-height: 1;
  text-shadow: 0 0 40px rgba(201,168,76,0.4);
}
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 8px; }

/* ====== PROPERTY CARDS ====== */
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.property-card {
  background: var(--white); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.property-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--gold-light); }
.property-img { position: relative; height: 220px; overflow: hidden; }
.property-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.property-card:hover .property-img img { transform: scale(1.08); }
.property-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 7px; flex-wrap: wrap; z-index: 2; }
.badge {
  padding: 4px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-sale { background: var(--navy); color: var(--gold); }
.badge-rent { background: var(--blue); color: var(--white); }
.badge-new { background: var(--green); color: var(--white); }
.badge-reduced { background: var(--red); color: var(--white); }
.property-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 7px; z-index: 2; }
.action-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; color: var(--gray-700);
  box-shadow: var(--shadow-sm); transition: var(--transition); border: none; cursor: pointer;
}
.action-btn:hover { background: var(--gold); color: var(--navy); transform: scale(1.1); }
.action-btn.active { background: var(--red); color: var(--white); }
.property-portals { position: absolute; bottom: 12px; left: 14px; display: flex; gap: 5px; z-index: 2; }
.portal-icon-small {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 800; color: var(--navy);
}
.property-body { padding: 20px; }
.property-type { font-size: 0.7rem; font-weight: 700; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }
.property-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 9px; line-height: 1.4; }
.property-location { font-size: 0.82rem; color: var(--gray-600); display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.property-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.feature-item { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--gray-700); }
.feature-item i { color: var(--gold); font-size: 0.78rem; }
.property-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--gray-100); padding-top: 14px; }
.property-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.property-price span { font-size: 0.72rem; font-weight: 400; color: var(--gray-500); }
.property-link { font-size: 0.82rem; font-weight: 700; color: var(--gold); display: flex; align-items: center; gap: 5px; transition: var(--transition); white-space: nowrap; }
.property-link:hover { gap: 10px; }

/* ====== CONSULTANTS GRID ====== */
.consultants-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.consultant-card {
  background: var(--white); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--gray-100);
  transition: var(--transition); position: relative;
}
.consultant-card:hover { transform: translateY(-8px); box-shadow: 0 30px 80px rgba(0,0,0,0.15); }
.consultant-img-wrap { position: relative; height: 240px; overflow: hidden; }
.consultant-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.consultant-card:hover .consultant-img-wrap img { transform: scale(1.05); }
.consultant-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--gold); color: var(--navy); padding: 5px 12px;
  border-radius: 50px; font-size: 0.68rem; font-weight: 700;
}
.consultant-body { padding: 22px; }
.consultant-name { font-size: 1.15rem; font-weight: 800; color: var(--navy); margin-bottom: 5px; }
.consultant-role { font-size: 0.78rem; color: var(--gold-dark); font-weight: 600; margin-bottom: 12px; }
.consultant-stats { display: flex; gap: 16px; margin-bottom: 14px; }
.consultant-stat { text-align: center; flex: 1; }
.consultant-stat-num { font-size: 1.2rem; font-weight: 800; color: var(--navy); display: block; }
.consultant-stat-label { font-size: 0.62rem; color: var(--gray-500); text-transform: uppercase; }
.consultant-contact { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.contact-btn {
  flex: 1; min-width: 70px; padding: 9px 12px; border-radius: 10px;
  font-size: 0.76rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
  gap: 5px; transition: var(--transition); border: none; cursor: pointer;
}
.contact-btn.whatsapp { background: #25d366; color: white; }
.contact-btn.whatsapp:hover { background: #1da851; transform: translateY(-2px); }
.contact-btn.card { background: var(--navy); color: white; }
.contact-btn.card:hover { background: var(--navy-mid); transform: translateY(-2px); }
.contact-btn.tel { background: var(--gray-100); color: var(--navy); }
.contact-btn.tel:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }

/* ====== BUSINESS CARD ====== */
.bcard-container { perspective: 1000px; }
.bcard {
  width: 100%; max-width: 380px; height: 220px;
  border-radius: 20px; position: relative;
  cursor: pointer; transform-style: preserve-3d;
  transition: transform 0.7s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.bcard.flipped { transform: rotateY(180deg); }
.bcard-front, .bcard-back {
  position: absolute; inset: 0; border-radius: 20px;
  backface-visibility: hidden; overflow: hidden;
}
.bcard-front { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); }
.bcard-back { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); transform: rotateY(180deg); }
.bcard-front::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; background: rgba(201,168,76,0.1);
  border-radius: 50%; top: -60px; right: -40px;
}

/* ====== ADMIN PANEL ====== */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--navy); position: fixed; top: 0; left: 0; bottom: 0;
  width: 260px; z-index: 200; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.admin-main { margin-left: 260px; background: var(--gray-50); min-height: 100vh; }
.admin-header {
  background: var(--white); padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
/* Overlay per admin sidebar su mobile */
.admin-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
}
.admin-overlay.open { display: block; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo .logo-icon { width: 40px; height: 40px; font-size: 1.2rem; }
.sidebar-logo .logo-name { font-size: 0.95rem; }
.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-section-title { font-size: 0.62rem; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.15em; padding: 10px 20px 5px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: rgba(255,255,255,0.65); font-size: 0.86rem; font-weight: 500;
  transition: var(--transition); position: relative; cursor: pointer;
}
.sidebar-link::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--gold); border-radius: 0 3px 3px 0;
  opacity: 0; transform: scaleY(0); transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active { color: var(--white); background: rgba(255,255,255,0.07); }
.sidebar-link:hover::before, .sidebar-link.active::before { opacity: 1; transform: scaleY(1); }
.sidebar-link.active i { color: var(--gold); }
.sidebar-link i { width: 18px; text-align: center; font-size: 0.92rem; }
.sidebar-badge {
  margin-left: auto; background: var(--gold); color: var(--navy);
  font-size: 0.6rem; font-weight: 800; padding: 2px 7px;
  border-radius: 50px;
}
.admin-page { padding: 28px 24px; }
.admin-page-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.admin-page-desc { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 24px; }

/* ====== DASHBOARD CARDS ====== */
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.dash-card {
  background: var(--white); border-radius: 14px; padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.dash-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dash-card-icon { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: 14px; }
.dash-card-num { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.dash-card-label { font-size: 0.78rem; color: var(--gray-500); margin-top: 5px; }
.dash-card-trend { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; margin-top: 9px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

/* ====== FORMS ====== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-700); margin-bottom: 7px; }
.form-label.required::after { content: ' *'; color: var(--red); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 10px; font-size: 0.9rem; color: var(--gray-800);
  background: var(--white); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.form-control.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-hint { font-size: 0.73rem; color: var(--gray-500); margin-top: 5px; }
.form-section { background: var(--white); border-radius: 14px; padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); }
.form-section-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.form-section-title i { color: var(--gold); }

/* ====== TABLE ====== */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table thead { background: var(--navy); }
.data-table thead th { padding: 14px 18px; color: rgba(255,255,255,0.8); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; text-align: left; }
.data-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: var(--transition); }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table td { padding: 14px 18px; font-size: 0.86rem; color: var(--gray-700); vertical-align: middle; }
.data-table td:last-child { text-align: right; }

/* ====== TABLE RESPONSIVE WRAPPER ====== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }

/* ====== MODAL ====== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--white); border-radius: 20px; max-width: 680px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 40px 100px rgba(0,0,0,0.3); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 24px 28px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--white); z-index: 1; border-radius: 20px 20px 0 0; }
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.modal-close { width: 34px; height: 34px; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-600); transition: var(--transition); cursor: pointer; border: none; }
.modal-close:hover { background: var(--red); color: var(--white); }
.modal-body { padding: 24px 28px; }

/* ====== TAGS / FEATURES CHIPS ====== */
.chips-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--gray-100); color: var(--gray-800); padding: 5px 12px; border-radius: 50px; font-size: 0.78rem; font-weight: 500; }
.chip-remove { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 0.78rem; display: flex; align-items: center; padding: 0; transition: var(--transition); }
.chip-remove:hover { color: var(--red); }

/* ====== STATUS BADGES ====== */
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 50px; font-size: 0.7rem; font-weight: 700; }
.status-online { background: rgba(16,185,129,0.12); color: #059669; }
.status-offline { background: rgba(239,68,68,0.12); color: #dc2626; }
.status-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.status-active { background: rgba(59,130,246,0.12); color: #2563eb; }

/* ====== TABS ====== */
.tabs-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 10px 20px; font-size: 0.86rem; font-weight: 600;
  color: var(--gray-600); border: none; background: none; cursor: pointer;
  position: relative; transition: var(--transition); white-space: nowrap;
}
.tab-btn::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transition: var(--transition);
}
.tab-btn.active { color: var(--navy); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn:hover { color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ====== MAP ====== */
.map-container { border-radius: 18px; overflow: hidden; height: 380px; box-shadow: var(--shadow-md); }
#map { width: 100%; height: 100%; }

/* ====== VIRTUAL TOUR ====== */
.tour-container { border-radius: 18px; overflow: hidden; height: 460px; position: relative; background: var(--navy); }
.tour-container iframe { width: 100%; height: 100%; border: none; }
.tour-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--white); }
.tour-placeholder i { font-size: 3.5rem; color: var(--gold); margin-bottom: 18px; }

/* ====== OMI SECTION ====== */
.omi-card { background: var(--white); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-md); border: 1px solid var(--gray-100); }
.omi-table { width: 100%; border-collapse: collapse; }
.omi-table th { text-align: left; padding: 11px 14px; font-size: 0.73rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 2px solid var(--gray-100); }
.omi-table td { padding: 13px 14px; font-size: 0.88rem; color: var(--gray-800); border-bottom: 1px solid var(--gray-100); }
.omi-table tr:hover td { background: var(--gray-50); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-bar { flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; position: relative; }
.price-bar-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 3px; }

/* ====== PORTAL SYNC TABLE ====== */
.portals-table { display: grid; gap: 14px; }
.portal-row {
  background: var(--white); border-radius: 14px; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.portal-row:hover { box-shadow: var(--shadow-md); border-color: var(--gold-light); }
.portal-logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 800; flex-shrink: 0; }
.portal-info { flex: 1; min-width: 0; }
.portal-name { font-weight: 700; color: var(--navy); font-size: 0.92rem; }
.portal-url { font-size: 0.72rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-stats { display: flex; gap: 24px; }
.portal-stat { text-align: center; }
.portal-stat-num { font-weight: 800; color: var(--navy); font-size: 0.95rem; }
.portal-stat-label { font-size: 0.62rem; color: var(--gray-500); text-transform: uppercase; }

/* ====== FLOATING BUTTONS ====== */
.fab-group { position: fixed; bottom: 24px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 900; }
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transition: var(--transition); border: none; cursor: pointer; text-decoration: none;
}
.fab:hover { transform: scale(1.1) translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.fab-wa { background: #25d366; color: white; }
.fab-phone { background: var(--navy); color: white; }
.fab-top { background: var(--gold); color: var(--navy); }

/* ====== TOAST ====== */
.toast-container { position: fixed; bottom: 90px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { background: var(--white); border-radius: 12px; padding: 14px 18px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); display: flex; align-items: flex-start; gap: 12px; min-width: 260px; max-width: 380px; animation: slideInRight 0.4s ease; border-left: 4px solid var(--green); }
.toast.error { border-color: var(--red); }
.toast.warning { border-color: #f59e0b; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast-icon { font-size: 1.1rem; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.toast.error .toast-icon { color: var(--red); }
.toast-title { font-size: 0.86rem; font-weight: 700; color: var(--navy); }
.toast-msg { font-size: 0.78rem; color: var(--gray-600); margin-top: 2px; }

/* ====== UPLOAD ZONE ====== */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: 14px; padding: 32px;
  text-align: center; cursor: pointer; transition: var(--transition);
  background: var(--gray-50);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--gold); background: rgba(201,168,76,0.05); }
.upload-zone i { font-size: 2.2rem; color: var(--gray-400); margin-bottom: 10px; }
.upload-zone p { color: var(--gray-600); font-size: 0.88rem; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.upload-thumb { width: 90px; height: 72px; border-radius: 8px; overflow: hidden; position: relative; }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb-remove { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,0.6); color: white; width: 18px; height: 18px; border-radius: 50%; font-size: 0.58rem; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }

/* ====== FOOTER ====== */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); }
.footer-top { padding: 70px 0 44px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.9; margin: 14px 0 20px; max-width: 300px; }
.footer-social { display: flex; gap: 10px; }
.social-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); font-size: 0.82rem; transition: var(--transition); }
.social-btn:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-bottom: 9px; transition: var(--transition); }
.footer-col a:hover { color: var(--gold); padding-left: 5px; }
.footer-contact-item { display: flex; gap: 11px; margin-bottom: 12px; font-size: 0.85rem; }
.footer-contact-item i { color: var(--gold); margin-top: 3px; flex-shrink: 0; width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.78rem; }

/* ====== ANIMATIONS ====== */
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ====== TABLET (≤ 1024px) ====== */
@media (max-width: 1024px) {
  :root { --navbar-h: 70px; }

  .navbar-inner { padding: 0 20px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .consultants-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .admin-sidebar { width: 240px; }
  .admin-main { margin-left: 240px; }

  /* Hero actions: max 2 per riga */
  .hero-actions { gap: 10px; }
}

/* ====== MOBILE (≤ 768px) ====== */
@media (max-width: 768px) {
  :root { --navbar-h: 65px; }

  /* NAVBAR */
  .navbar-nav, .navbar-cta { display: none; }
  .hamburger { display: flex; }
  .navbar-inner { padding: 0 16px; }

  /* LOGO: testo più compatto */
  .logo-name { font-size: 1rem; }
  .logo-sub { display: none; }

  /* HERO */
  .hero { padding-top: var(--navbar-h); }
  .hero-content { padding: 32px 16px; }
  .hero-badge { font-size: 0.68rem; padding: 7px 14px; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.5rem; }

  /* HERO ACTIONS: colonna su mobile */
  .hero-actions { flex-direction: column; align-items: center; gap: 10px; padding: 0 8px; }
  .hero-actions .btn {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    white-space: nowrap;
  }
  /* Bottoni .btn-xl su mobile: stessa altezza di btn-lg */
  .btn-xl { padding: 13px 22px; font-size: 0.92rem; border-radius: 10px; }

  /* GRIDS */
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .properties-grid { grid-template-columns: 1fr; gap: 16px; }
  .consultants-grid { grid-template-columns: 1fr; gap: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  /* FOOTER */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand p { max-width: 100%; }
  .footer-top { padding: 48px 0 32px; }

  /* SECTION */
  .section-padding { padding: 56px 0; }
  .container { padding: 0 16px; }

  /* FORMS */
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }

  /* ADMIN */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { transform: translateX(-100%); width: 280px; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-page { padding: 20px 16px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* BUSINESS CARD */
  .bcard { max-width: 100%; height: 190px; }

  /* PORTAL ROW */
  .portal-row { flex-wrap: wrap; gap: 12px; }
  .portal-stats { gap: 12px; }

  /* SEARCH WIDGET */
  .search-widget { padding: 16px; border-radius: 14px; }
  .search-tabs { gap: 4px; }
  .search-tab { font-size: 0.78rem; padding: 8px 10px; gap: 4px; }
  .search-tab i { display: none; } /* Nasconde icone tab su mobile */

  /* SEARCH FORM */
  .search-form-grid { grid-template-columns: 1fr; gap: 8px; }
  .search-form-grid .search-field:first-child { grid-column: 1; }
  .search-btn-wrap { grid-column: 1; }

  /* STATS NUM */
  .stat-num { font-size: 2.2rem; }

  /* PORTALS STRIP */
  .portals-strip { gap: 10px; padding: 12px 16px; }
  .portals-strip-label:last-child { display: none; }

  /* BUTTONS: dimensioni corrette su mobile */
  .btn     { font-size: 0.85rem; padding: 10px 18px; }
  .btn-sm  { font-size: 0.78rem; padding: 6px 13px; }
  .btn-lg  { font-size: 0.9rem;  padding: 11px 22px; }
  .btn-xl  { font-size: 0.9rem;  padding: 12px 20px; }

  /* FAB buttons */
  .fab { width: 48px; height: 48px; font-size: 1.1rem; }
  .fab-group { bottom: 20px; right: 16px; gap: 8px; }

  /* TOAST */
  .toast-container { right: 12px; left: 12px; }
  .toast { min-width: 0; width: 100%; }

  /* TABLE: scroll orizzontale */
  .data-table td, .data-table th { padding: 12px 14px; }

  /* MODAL */
  .modal { border-radius: 16px; }
  .modal-header { padding: 18px 20px; }
  .modal-body { padding: 18px 20px; }

  /* MAP */
  .map-container { height: 280px; }
  .tour-container { height: 340px; }
}

/* ====== SMARTPHONE PICCOLO (≤ 480px) ====== */
@media (max-width: 480px) {
  :root { --navbar-h: 60px; }

  /* Logo ancora più compatto */
  .logo-icon { width: 38px; height: 38px; font-size: 1.1rem; }

  /* Dashboard: 1 colonna */
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 1.9rem; }
  .section-padding { padding: 44px 0; }
  .hero-title { font-size: 2rem; }
  .container { padding: 0 14px; }
  .admin-page { padding: 16px 12px; }

  /* Bottoni admin: ridotti */
  .dash-card { padding: 16px; }
  .dash-card-num { font-size: 1.4rem; }

  /* CONSULTANT CONTACT BUTTONS: impilati */
  .consultant-contact { flex-direction: column; gap: 6px; }
  .contact-btn { font-size: 0.78rem; padding: 9px 12px; width: 100%; }
  /* Bottoni hero ancora più piccoli */
  .btn-xl { font-size: 0.88rem; padding: 11px 18px; }

  /* Portals strip: solo icona + nome */
  .portal-badge span:not(.portal-dot) { display: none; }

  /* Footer bottom: colonna */
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}
