:root {
  --blu: #1e2a6d;
  --blu-chiaro: #eef1fb;
  --rosso: #c62828;
  --rosso-scuro: #a51f1f;
  --testo: #1c2430;
  --testo-soft: #3c4756;
  --sfondo: #ffffff;
  --sfondo-alt: #f4f6fa;
  --bordo: #d9dfe8;
  --verde-wa: #1e7e34;
  --raggio: 12px;
  --ombra: 0 2px 12px rgba(30, 42, 109, 0.10);
  --larghezza: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--testo);
  background: var(--sfondo);
}

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

a { color: var(--blu); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--rosso); }

.container {
  max-width: var(--larghezza);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Accessibilità ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blu);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--rosso);
  outline-offset: 2px;
}

/* ---------- Barra superiore ---------- */
.topbar {
  background: var(--blu);
  color: #fff;
  font-size: 16px;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: #ffd9d9; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--blu);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--ombra);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand img { flex-shrink: 0; }
.brand-name { min-width: 0; }
.brand img { width: auto; height: 56px; border-radius: 8px; }
.brand-name {
  line-height: 1.15;
  font-weight: 800;
  color: var(--blu);
  font-size: 22px;
}
.brand-name .lgf { color: var(--rosso); }
.brand-name small {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--testo-soft);
}

.main-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--blu);
  text-decoration: none;
  border-radius: 8px;
}
.main-nav a:hover { background: var(--blu-chiaro); color: var(--blu); }
.main-nav a[aria-current="page"] {
  background: var(--blu);
  color: #fff;
}
.nav-cta {
  background: var(--rosso);
  color: #fff !important;
  font-weight: 700;
}
.nav-cta:hover { background: var(--rosso-scuro) !important; color: #fff !important; }

.nav-toggle {
  display: none;
  background: var(--blu);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--blu-chiaro) 0%, #ffffff 100%);
  padding: 56px 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1.2;
  color: var(--blu);
  margin-bottom: 18px;
}
.hero .sottotitolo {
  font-size: 21px;
  color: var(--testo-soft);
  margin-bottom: 28px;
}
.hero-foto {
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
  object-fit: cover;
  width: 100%;
  max-height: 440px;
}
.hero-badge {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--blu);
  color: var(--blu);
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 18px;
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 19px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-rosso { background: var(--rosso); color: #fff; }
.btn-rosso:hover { background: var(--rosso-scuro); color: #fff; }
.btn-blu { background: var(--blu); color: #fff; }
.btn-blu:hover { background: #16205a; color: #fff; }
.btn-contorno {
  background: #fff;
  color: var(--blu);
  border-color: var(--blu);
}
.btn-contorno:hover { background: var(--blu-chiaro); color: var(--blu); }
.btn-whatsapp { background: var(--verde-wa); color: #fff; }
.btn-whatsapp:hover { background: #16612a; color: #fff; }
.btn-gruppo { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sezioni ---------- */
.sezione { padding: 64px 0; }
.sezione-alt { background: var(--sfondo-alt); }
.sezione h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  color: var(--blu);
  margin-bottom: 12px;
}
.sezione .intro-sezione {
  font-size: 20px;
  color: var(--testo-soft);
  max-width: 820px;
  margin-bottom: 36px;
}
.centrato { text-align: center; }
.centrato .intro-sezione { margin-left: auto; margin-right: auto; }

/* ---------- Card servizi ---------- */
.griglia-servizi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card-servizio {
  background: #fff;
  border: 1px solid var(--bordo);
  border-top: 5px solid var(--rosso);
  border-radius: var(--raggio);
  padding: 28px 24px;
  box-shadow: var(--ombra);
}
.card-servizio .icona {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 14px;
}
.card-servizio h3 {
  font-size: 22px;
  color: var(--blu);
  margin-bottom: 10px;
}
.card-servizio p { color: var(--testo-soft); }

/* ---------- Servizi estesi (pagina servizi) ---------- */
.servizio-esteso {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--bordo);
}
.servizio-esteso:last-child { border-bottom: 0; }
.servizio-esteso img {
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}
.servizio-esteso h3 { font-size: 26px; color: var(--blu); margin-bottom: 12px; }
.servizio-esteso ul { margin: 14px 0 20px 24px; }
.servizio-esteso li { margin-bottom: 8px; }
.servizio-esteso.inverti .foto { order: 2; }

/* ---------- Perché sceglierci ---------- */
.griglia-motivi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.motivo {
  background: var(--blu-chiaro);
  border-radius: var(--raggio);
  padding: 26px 22px;
}
.motivo .icona { font-size: 36px; margin-bottom: 12px; }
.motivo h3 { font-size: 21px; color: var(--blu); margin-bottom: 8px; }
.motivo p { color: var(--testo-soft); font-size: 17px; }

/* ---------- Banda CTA ---------- */
.banda-cta {
  background: var(--blu);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}
.banda-cta h2 { color: #fff; font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 10px; }
.banda-cta p { font-size: 20px; margin-bottom: 26px; color: #dfe4f7; }
.banda-cta .btn-gruppo { justify-content: center; }

/* ---------- Galleria ---------- */
.griglia-galleria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.griglia-galleria figure {
  margin: 0;
  border-radius: var(--raggio);
  overflow: hidden;
  box-shadow: var(--ombra);
  background: #fff;
  border: 1px solid var(--bordo);
}
.griglia-galleria button.foto-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: none;
}
.griglia-galleria img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.griglia-galleria button.foto-btn:hover img { transform: scale(1.04); }
.griglia-galleria figcaption {
  padding: 14px 16px;
  font-weight: 600;
  color: var(--blu);
  font-size: 17px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 17, 43, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.lightbox.aperto { display: flex; }
.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 82vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox .didascalia {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox .chiudi { top: 20px; right: 20px; }
.lightbox .prec { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .succ { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Contatti ---------- */
.griglia-contatti {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card-contatto {
  background: #fff;
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
  padding: 30px 26px;
  text-align: center;
}
.card-contatto .icona { font-size: 42px; margin-bottom: 12px; }
.card-contatto h3 { color: var(--blu); font-size: 22px; margin-bottom: 8px; }
.card-contatto p { color: var(--testo-soft); margin-bottom: 16px; }
.card-contatto .valore {
  font-size: 22px;
  font-weight: 800;
  word-break: break-word;
}
.riquadro-info {
  background: var(--blu-chiaro);
  border-left: 6px solid var(--blu);
  border-radius: 8px;
  padding: 22px 26px;
  margin-top: 36px;
  font-size: 18px;
}

/* ---------- Pagine legali ---------- */
.pagina-legale { max-width: 860px; }
.pagina-legale h1 { color: var(--blu); font-size: 34px; margin-bottom: 8px; }
.pagina-legale .aggiornamento { color: var(--testo-soft); margin-bottom: 30px; }
.pagina-legale h2 { font-size: 24px; color: var(--blu); margin: 34px 0 12px; }
.pagina-legale h3 { font-size: 20px; color: var(--blu); margin: 24px 0 10px; }
.pagina-legale p, .pagina-legale li { margin-bottom: 12px; }
.pagina-legale ul { margin-left: 26px; }
.pagina-legale table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 17px;
}
.pagina-legale th, .pagina-legale td {
  border: 1px solid var(--bordo);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.pagina-legale th { background: var(--blu-chiaro); color: var(--blu); }
.placeholder-dato {
  background: #fff3cd;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blu);
  color: #e8ebf8;
  padding: 56px 0 0;
  font-size: 17px;
}
.footer-griglia {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h3 {
  color: #fff;
  font-size: 19px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.site-footer a { color: #cdd5f5; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-brand img { width: auto; height: 48px; border-radius: 8px; }
.footer-brand strong { font-size: 20px; color: #fff; }
.footer-contatti li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: 20px 0;
  font-size: 15.5px;
}
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  align-items: center;
}
.footer-legali { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Barra chiamata mobile ---------- */
.barra-chiamata {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
}
.barra-chiamata a {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
.barra-chiamata .chiama { background: var(--rosso); }
.barra-chiamata .whatsapp { background: var(--verde-wa); }

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  background: #fff;
  border: 2px solid var(--blu);
  border-radius: var(--raggio);
  box-shadow: 0 8px 30px rgba(12, 17, 43, 0.35);
  padding: 22px 26px;
  max-width: 640px;
  margin: 0 auto;
}
.cookie-banner h2 { font-size: 20px; color: var(--blu); margin-bottom: 8px; }
.cookie-banner p { font-size: 16.5px; color: var(--testo-soft); margin-bottom: 16px; }
.cookie-banner .cookie-bottoni { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-banner .btn { padding: 12px 22px; font-size: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .servizio-esteso { grid-template-columns: 1fr; }
  .servizio-esteso.inverti .foto { order: 0; }
  .footer-griglia { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; flex-shrink: 0; }
  .site-header .container { min-height: 72px; }
  .brand img { width: auto; height: 44px; }
  .brand-name { font-size: 18px; }
  .brand-name small { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 3px solid var(--blu);
    box-shadow: var(--ombra);
  }
  .main-nav.aperto { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; }
  .main-nav a { font-size: 20px; padding: 14px; }
  .barra-chiamata { display: flex; }
  body { padding-bottom: 62px; }
  .cookie-banner { bottom: 74px; }
}

@media (max-width: 560px) {
  .footer-griglia { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
}
