/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: #0f172a; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

:root {
  --slate-50:#f8fafc; --slate-100:#f1f5f9; --slate-200:#e2e8f0; --slate-300:#cbd5e1;
  --slate-400:#94a3b8; --slate-500:#64748b; --slate-600:#475569; --slate-700:#334155;
  --slate-800:#1e293b; --slate-900:#0f172a; --slate-950:#020617;
  --amber-100:#fef3c7; --amber-400:#fbbf24; --amber-500:#f59e0b; --amber-600:#d97706; --amber-700:#b45309;
  --green-50:#f0fdf4; --green-200:#bbf7d0; --green-600:#16a34a; --green-800:#166534;
  --red-50:#fef2f2; --red-200:#fecaca; --red-500:#ef4444; --red-600:#dc2626; --red-800:#991b1b;
  --max-w: 1280px;
}

/* ===== Layout ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
@media(min-width:1024px){ .container{ padding:0 32px; } }

/* ===== Navbar ===== */
.navbar { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 50; 
  transition: all .3s; 
}

.navbar.scrolled { 
  background: rgba(15,23,42,.95); 
  backdrop-filter: blur(8px); 
  box-shadow: 0 4px 20px rgba(0,0,0,.2); 
}

/* Gestione degli spazi interni: allinea a sinistra e imposta la distanza dal logo */
.navbar .nav-inner { 
  max-width: var(--max-w); 
  margin: 0 auto; 
  padding: 0 24px; 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; /* Aggancia il menu vicino al logo */
  gap: 50px;                   /* DISTANZA LOGO-MENU: Modificala qui (es. 40px o 60px) */
  height: 80px; 
}

@media(min-width:1024px){ 
  .navbar .nav-inner { padding: 0 32px; } 
}

/* Contenitore e dimensioni del nuovo Logo Gaspari */
.nav-logo { 
  display: flex; 
  align-items: center; 
}

.nav-logo .custom-logo {
  translate: 0px 15px;
  height: 120px;       /* Altezza ottimale per non toccare i bordi della barra da 80px */
  width: auto;        /* Mantiene le proporzioni corrette del marchio */
  display: block;
  transition: transform .3s;
}

/* L'effetto si attiva SOLO sui dispositivi che supportano il passaggio del mouse (PC) */
@media (hover: hover) and (pointer: fine) {
  .nav-logo:hover .custom-logo { 
    transform: scale(1.9); 
    translate: 70px 60px;
    transition: transform 0.3s ease, translate 0.3s ease; /* Rende lo zoom fluido */
  }
}


/* Lista dei link di navigazione */
.nav-links { 
  display: none; /* Nascosto su smartphone, appare su schermi grandi */
  align-items: center; 
  gap: 32px;     /* Spazio fisso tra i singoli testi (Home, Servizi, ecc.) */
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a { 
  color: var(--slate-300); 
  font-size: 14px; 
  font-weight: 500; 
  letter-spacing: .025em; 
  transition: color .2s; 
  position: relative; 
  text-decoration: none;
}

.nav-links a::after { 
  content: ''; 
  position: absolute; 
  bottom: -4px; 
  left: 0; 
  width: 0; 
  height: 2px; 
  background: var(--amber-500); 
  transition: width .3s; 
}

.nav-links a:hover { 
  color: var(--amber-500); 
}

.nav-links a:hover::after { 
  width: 100%; 
}

/* Pulsante Arancione "Richiedi Preventivo" */
.nav-cta { 
  display: none; 
  align-items: center; 
  padding: 10px 20px; 
  border-radius: 10px; 
  background: var(--amber-500); 
  color: var(--slate-900); 
  font-weight: 600; 
  font-size: 14px; 
  transition: background .2s; 
  box-shadow: 0 4px 12px rgba(245,158,11,.2); 
  text-decoration: none;
  margin-left: auto; /* Spinge ESCLUSIVAMENTE questo bottone sulla destra */
}

.nav-cta:hover { 
  background: var(--amber-400); 
}

/* Menu Mobile (Hamburger per Smartphone) */
.nav-toggle { 
  display: block; 
  color: #fff; 
  padding: 8px; 
  margin-left: auto; /* Se siamo su mobile, spinge l'hamburger a destra */
}

.nav-toggle svg { 
  width: 24px; 
  height: 24px; 
}

.nav-mobile { 
  display: none; 
  background: rgba(15,23,42,.98); 
  backdrop-filter: blur(8px); 
  border-top: 1px solid rgba(51,65,85,.5); 
}

.nav-mobile.open { 
  display: block; 
}

.nav-mobile ul { 
  padding: 16px 24px; 
  list-style: none;
  margin: 0;
}

.nav-mobile ul li { 
  margin-bottom: 12px; 
}

.nav-mobile ul li a { 
  display: block; 
  color: var(--slate-300); 
  font-weight: 500; 
  padding: 8px 0; 
  transition: color .2s; 
  text-decoration: none;
}

.nav-mobile ul li a:hover { 
  color: var(--amber-500); 
}

.nav-mobile ul li a.cta-btn { 
  text-align: center; 
  padding: 12px; 
  border-radius: 10px; 
  background: var(--amber-500); 
  color: var(--slate-900); 
  font-weight: 600; 
  margin-top: 8px; 
}

/* Attivazione layout Desktop (quando lo schermo è largo almeno 768px) */
@media(min-width:768px){
  .nav-links { 
    display: flex; 
  }
  .nav-cta { 
    display: inline-flex; 
  }
  .nav-toggle { 
    display: none; /* Nasconde l'hamburger dei telefoni */
  }
}
/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg .overlay { position: absolute; inset: 0; background: linear-gradient(to right, var(--slate-900), rgba(15,23,42,.9), rgba(15,23,42,.4)); }
.hero-content { position: relative; z-index: 10; max-width: var(--max-w); margin: 0 auto; padding: 80px 24px 0; width: 100%; }
@media(min-width:1024px){ .hero-content{ padding:80px 32px 0; } }
.hero-content .inner { max-width: 800px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9999px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--amber-400); font-size: 14px; font-weight: 500; margin-bottom: 24px; animation: fadeIn .6s ease-out; }
.hero-badge svg { width: 16px; height: 16px; }
.hero h1 { font-size: 48px; font-weight: 700; color: #fff; line-height: 1.1; letter-spacing: -.025em; margin-bottom: 24px; }
.hero h1 span { color: var(--amber-500); }
.hero p { font-size: 18px; color: var(--slate-300); line-height: 1.6; margin-bottom: 32px; max-width: 560px; }
@media(min-width:768px){ .hero h1{ font-size:60px; } }
@media(min-width:1024px){ .hero h1{ font-size:72px; } }

.hero-actions { display: flex; flex-direction: column; gap: 16px; }
@media(min-width:640px){ .hero-actions{ flex-direction:row; } }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 10px; background: var(--amber-500); color: var(--slate-900); font-weight: 600; transition: all .2s; box-shadow: 0 8px 20px rgba(245,158,11,.2); }
.btn-primary:hover { background: var(--amber-400); box-shadow: 0 8px 28px rgba(245,158,11,.4); transform: translateY(-2px); }
.btn-primary svg { width: 20px; height: 20px; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 10px; background: rgba(255,255,255,.1); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); color: #fff; font-weight: 600; transition: all .2s; }
.btn-secondary:hover { background: rgba(255,255,255,.15); }
.btn-secondary svg { width: 20px; height: 20px; }

.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1); }
.hero-tags .tag { display: flex; align-items: center; gap: 8px; color: var(--slate-400); font-size: 14px; font-weight: 500; }
.hero-tags .tag svg { width: 16px; height: 16px; color: var(--amber-500); }
.hero-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 96px; background: linear-gradient(to top, var(--slate-50), transparent); pointer-events: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Section Headers ===== */
.section { padding: 96px 0; }
.section-light { background: var(--slate-50); }
.section-white { background: #fff; }
.section-dark { background: var(--slate-900); }
.section-header { text-align: center; max-width: 768px; margin: 0 auto 64px; }
.section-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9999px; font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.section-badge.light { background: var(--amber-100); color: var(--amber-700); }
.section-badge.dark { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--amber-400); }
.section-badge svg { width: 16px; height: 16px; }
.section-header h2 { font-size: 36px; font-weight: 700; letter-spacing: -.025em; margin-bottom: 16px; }
@media(min-width:768px){ .section-header h2{ font-size:48px; } }
.section-header p { font-size: 18px; line-height: 1.6; }
.section-header.light h2 { color: var(--slate-900); }
.section-header.light p { color: var(--slate-600); }
.section-header.dark h2 { color: #fff; }
.section-header.dark p { color: var(--slate-400); }

/* ===== Services ===== */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media(min-width:768px){ .services-grid{ grid-template-columns:1fr 1fr; } }
.service-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border: 1px solid var(--slate-200); transition: all .3s; }
.service-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.1); border-color: var(--amber-300, #fcd34d); transform: translateY(-4px); }
.service-card .card-top { display: flex; align-items: flex-start; gap: 20px; }
.service-card .icon-box { flex-shrink: 0; width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, var(--slate-800), var(--slate-900)); display: flex; align-items: center; justify-content: center; transition: background .3s; }
.service-card:hover .icon-box { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }
.service-card .icon-box svg { width: 28px; height: 28px; color: #fff; }
.service-card h3 { font-size: 20px; font-weight: 700; color: var(--slate-900); margin-bottom: 8px; }
.service-card .desc { color: var(--slate-600); line-height: 1.6; margin-bottom: 16px; }
.service-card ul li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate-700); margin-bottom: 8px; }
.service-card ul li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-500); flex-shrink: 0; }

.section-cta { text-align: center; margin-top: 48px; }
.btn-dark { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 10px; background: var(--slate-900); color: #fff; font-weight: 600; transition: background .2s; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.btn-dark:hover { background: var(--slate-800); }
.btn-dark svg { width: 20px; height: 20px; }
.btn-amber { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 10px; background: var(--amber-500); color: var(--slate-900); font-weight: 600; transition: background .2s; box-shadow: 0 4px 12px rgba(245,158,11,.2); }
.btn-amber:hover { background: var(--amber-400); }
.btn-amber svg { width: 20px; height: 20px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 64px; align-items: center; }
@media(min-width:1024px){ .about-grid{ grid-template-columns:1fr 1fr; } }
.about-img-wrap { position: relative; }
.about-img-wrap .img-box { border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.about-img-wrap .img-box img { width: 100%; height: 500px; object-fit: cover; }
.about-img-wrap .year-badge { position: absolute; bottom: -24px; right: -24px; background: var(--amber-500); border-radius: 16px; padding: 24px; box-shadow: 0 12px 24px rgba(0,0,0,.1); display: none; }
@media(min-width:640px){ .about-img-wrap .year-badge{ display:block; } }
.about-img-wrap .year-badge .num { font-size: 36px; font-weight: 700; color: var(--slate-900); }
.about-img-wrap .year-badge .label { font-size: 14px; font-weight: 500; color: var(--slate-800); }
.about-img-wrap .deco { position: absolute; top: -24px; left: -24px; width: 96px; height: 96px; border: 4px solid var(--amber-500); border-radius: 16px; z-index: -1; display: none; }
@media(min-width:640px){ .about-img-wrap .deco{ display:block; } }

.about-text .section-badge { background: var(--amber-100); color: var(--amber-700); padding: 8px 16px; border-radius: 9999px; font-size: 14px; font-weight: 500; margin-bottom: 16px; display: inline-block; }
.about-text h2 { font-size: 36px; font-weight: 700; color: var(--slate-900); letter-spacing: -.025em; margin-bottom: 24px; }
@media(min-width:768px){ .about-text h2{ font-size:48px; } }
.about-text > p { font-size: 18px; color: var(--slate-600); line-height: 1.6; margin-bottom: 32px; }
.values { margin-bottom: 32px; }
.value-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.value-item .v-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--slate-100); display: flex; align-items: center; justify-content: center; }
.value-item .v-icon svg { width: 24px; height: 24px; color: var(--amber-600); }
.value-item h3 { font-weight: 700; color: var(--slate-900); margin-bottom: 4px; }
.value-item p { color: var(--slate-600); font-size: 14px; line-height: 1.6; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 32px; border-top: 1px solid var(--slate-200); }
@media(min-width:640px){ .stats{ grid-template-columns:repeat(4,1fr); } }
.stats .stat .num { font-size: 24px; font-weight: 700; color: var(--slate-900); }
@media(min-width:768px){ .stats .stat .num{ font-size:30px; } }
.stats .stat .label { font-size: 12px; color: var(--slate-500); margin-top: 4px; }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media(min-width:640px){ .gallery-grid{ grid-template-columns:1fr 1fr; } }
@media(min-width:1024px){ .gallery-grid{ grid-template-columns:1fr 1fr 1fr; } }
.gallery-item { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.1); cursor: pointer; }
.gallery-item img { width: 100%; height: 256px; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.9), rgba(15,23,42,.2), transparent); opacity: .8; transition: opacity .3s; }
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; }
.gallery-item .caption .tag { color: var(--amber-500); font-size: 14px; font-weight: 500; margin-bottom: 4px; opacity: 0; transition: opacity .3s; }
.gallery-item:hover .caption .tag { opacity: 1; }
.gallery-item .caption h3 { color: #fff; font-weight: 700; font-size: 18px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media(min-width:1024px){ .contact-grid{ grid-template-columns:2fr 3fr; } }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.info-card { display: flex; align-items: flex-start; gap: 16px; background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border: 1px solid var(--slate-200); }
.info-card .icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--slate-900); display: flex; align-items: center; justify-content: center; }
.info-card .icon svg { width: 24px; height: 24px; color: var(--amber-500); }
.info-card h3 { font-weight: 700; color: var(--slate-900); margin-bottom: 4px; }
.info-card .val { color: var(--slate-700); font-weight: 500; }
.info-card .det { color: var(--slate-500); font-size: 14px; }

.map-card { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); border: 1px solid var(--slate-200); background: #fff; }
.map-card iframe { width: 100%; height: 256px; border: 0; }
.map-card .map-link { padding: 16px; border-top: 1px solid var(--slate-100); }
.map-card .map-link a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--amber-600); transition: color .2s; }
.map-card .map-link a:hover { color: var(--amber-500); }
.map-card .map-link svg { width: 16px; height: 16px; }

.contact-form { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border: 1px solid var(--slate-200); }
.form-alert { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 10px; margin-bottom: 24px; font-size: 14px; font-weight: 500; }
.form-alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.form-alert.success { background: var(--green-50); border: 1px solid var(--green-200); color: var(--green-800); }
.form-alert.success svg { color: var(--green-600); }
.form-alert.error { background: var(--red-50); border: 1px solid var(--red-200); color: var(--red-800); }
.form-alert.error svg { color: var(--red-600); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
@media(min-width:640px){ .form-row.two-col{ grid-template-columns:1fr 1fr; } }
.form-field label { display: block; font-size: 14px; font-weight: 500; color: var(--slate-700); margin-bottom: 8px; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--slate-300); color: var(--slate-900); outline: none; transition: all .2s; }
.form-field input:focus, .form-field textarea:focus { border-color: transparent; box-shadow: 0 0 0 2px var(--amber-500); }
.form-field textarea { resize: none; }

.dropzone { cursor: pointer; border-radius: 10px; border: 2px dashed var(--slate-300); padding: 24px; text-align: center; transition: all .2s; }
.dropzone:hover { border-color: var(--amber-400); background: var(--slate-50); }
.dropzone.dragover { border-color: var(--amber-500); background: var(--amber-50, #fffbeb); }
.dropzone svg { width: 24px; height: 24px; color: var(--slate-400); margin: 0 auto 8px; }
.dropzone p { font-size: 14px; color: var(--slate-600); font-weight: 500; }
.dropzone .hint { font-size: 12px; color: var(--slate-400); margin-top: 4px; }

.file-list { margin-top: 12px; }
.file-item { display: flex; align-items: center; gap: 12px; background: var(--slate-50); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.file-item svg { width: 20px; height: 20px; color: var(--amber-600); flex-shrink: 0; }
.file-item .fname { flex: 1; font-size: 14px; color: var(--slate-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fsize { font-size: 12px; color: var(--slate-400); }
.file-item .fremove { color: var(--slate-400); transition: color .2s; display: flex; align-items: center; }
.file-item .fremove:hover { color: var(--red-500); }
.file-item .fremove svg { width: 16px; height: 16px; }

.submit-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 10px; background: var(--amber-500); color: var(--slate-900); font-weight: 600; transition: background .2s; box-shadow: 0 4px 12px rgba(245,158,11,.2); }
.submit-btn:hover { background: var(--amber-400); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.submit-btn svg { width: 20px; height: 20px; }

/* ===== Footer ===== */
.footer { background: var(--slate-950); color: var(--slate-400); }
.footer .footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 64px 24px; }
@media(min-width:1024px){ .footer .footer-inner{ padding:64px 32px; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 48px; }
@media(min-width:768px){ .footer-grid{ grid-template-columns:2fr 1fr 1fr; } }
.footer-brand .f-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .f-logo .logo-icon { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); display: flex; align-items: center; justify-content: center; }
.footer-brand .f-logo .logo-icon svg { width: 24px; height: 24px; color: #fff; }
.footer-brand .f-logo .f-text { display: flex; flex-direction: column; }
.footer-brand .f-logo .f-text .name { color: #fff; font-weight: 700; font-size: 18px; }
.footer-brand .f-logo .f-text .name span { color: var(--amber-500); }
.footer-brand .f-logo .f-text .sub { color: var(--slate-500); font-size: 12px; font-weight: 500; margin-top: 2px; }
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 448px; }
.footer-col h4 { color: #fff; font-weight: 600; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; font-size: 14px; }
.footer-col ul li a { transition: color .2s; }
.footer-col ul li a:hover { color: var(--amber-500); }
.footer-col ul.contact-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-col ul.contact-list li svg { width: 16px; height: 16px; color: var(--amber-500); }
.footer-bottom { padding-top: 32px; border-top: 1px solid var(--slate-800); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 16px; }
@media(min-width:640px){ .footer-bottom{ flex-direction:row; } }
.footer-bottom p { font-size: 14px; }
