html {
  scroll-behavior: smooth;
}


/* ---------- COLORI ---------- */
:root {
  --blu-notte: #0F2A43;
  --blu: #2563A8;
  --verde: #1F7A6D;
  --argento: #D9DEE3;
  --ghiaccio: #F5F7F9;
}

/* ---------- BASE ---------- */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--ghiaccio);
  color: var(--blu-notte);
}

h1, h2, h3 {
  font-family: 'Poppins', Arial, sans-serif;
}

/* ---------- HERO ---------- */
header {
  background: var(--blu-notte);
  color: var(--ghiaccio);
  padding: 32px 20px;
  text-align: center;
}

header h1 {
  font-size: 32px;
  margin: 0 0 10px 0;
}

header p {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  margin: 0 0 18px 0;
}

/* ---------- BOTTONE ---------- */
button {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--verde);
  color: #ffffff;
  border-top: var(--ghiaccio);
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 8px 30px;
  cursor: pointer;
}

/* ---------- SEZIONI ---------- */
section {
  padding: 32px 20px;
  text-align: center;
}

section h2 {
  font-size: 24px;
  margin: 0 0 20px 0;
}

/* ---------- CARD ---------- */
.card {
  background: var(--ghiaccio);
  border: 1px solid #c9d0d7;
  border-top: 4px solid var(--verde);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 42, 67, 0.10);
  padding: 16px;
  margin: 0 auto 16px auto;
  max-width: 500px;
}

.card h3 {
  font-size: 18px;
  color: var(--verde);
  margin: 0 0 8px 0;
}

.card p {
  font-size: 15px;
  margin: 0;
  color: var(--blu-notte);
}

/* ---------- PROBLEMI ---------- */
section.problemi {
  background: var(--argento);
}

section.problemi h2 {
  color: var(--blu-notte);
}

/* ---------- SOLUZIONE ---------- */
section.soluzione {
  background: var(--blu-notte);
}

section.soluzione h2 {
  color: var(--ghiaccio);
}

section.soluzione .card {
  background: var(--verde);
  border: 1px solid var(--verde);
  border-top: 4px solid var(--ghiaccio);
  box-shadow: none;
}

section.soluzione .card h3 {
  color: var(--ghiaccio);
}

section.soluzione .card p {
  color: var(--ghiaccio);
}

/* ---------- PACCHETTI ---------- */
section.pacchetti {
  background: var(--ghiaccio);
}
.lavori-demo { text-align: center; padding: 40px 20px; }

.telefono {
  width: 100%;
  max-width: 320px;
  height: 600px;
  margin: 24px auto;
  padding: 12px;
  background: #1b1f23;
  border-radius: 36px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.telefono iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: #fff;
}


/* ---------- CONTATTI ---------- */
section.contatti {
  background: var(--argento);
}
section.contatti a {
  color: var(--argento);
}
section.contatti a { color: var(--verde);
}
/*---------- PACCHETTI --------*/

.pacchetto {
  position: relative;
  background: var(--argento);
  border: 1px solid #c9d0d7;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 42, 67, 0.10);
  padding: 28px 20px 24px;
  margin: 0 auto 28px auto;
  max-width: 500px;
}

.pacchetto h3 {
  font-size: 22px;
  margin: 0;
}

.sottotitolo {
  color: var(--verde);
  font-style: italic;
  margin: 4px 0 0 0;
}

.prezzo {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 44px;
  font-weight: 700;
  margin: 14px 0 0 0;
}

.prezzo span {
  font-size: 14px;
  font-weight: 400;
}

.canone {
  margin: 2px 0 16px 0;
  color: var(--blu);
  font-weight: 700;
}

.pacchetto ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}

.pacchetto li {
  position: relative;
  padding: 9px 0 9px 28px;
  border-bottom: 1px solid #e3e7eb;
}

.pacchetto li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde);
  font-weight: 700;
}

.in-evidenza {
  border: 2px solid var(--verde);
}

.etichetta {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--verde);
  color: #ffffff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
}

.bottone {
  display: square-block;
  background: var(--verde);
  color: #ffffff;
  text-decoration: none;
  font-family: 'Poppins', Arial, sans-serif;
  padding: 14px 26px;
  border-radius: 8px 30px;
}
.torna {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--blu);
  padding: 12px 20px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(15, 42, 67, 0.35);
}

.torna=[hidden]{
  display: none;
}

section.calcolatore {
  background: var(--blu-notte);
  color: var(--ghiaccio);
}

section.calcolatore h2 {
  color: var(--ghiaccio);
}

.campo {
  max-width: 400px;
  margin: 0 auto 18px auto;
  text-align: left;
}

.campo label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.campo input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 17px;
  border: none;
  border-radius: 8px;
  background: var(--ghiaccio);
  color: var(--blu-notte);
}

section.calcolatore button {
  margin-top: 6px;
}

#risultato {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #5fd0bf;
  margin: 24px 0 8px 0;
}

.nota {
  font-size: 13px;
  opacity: 0.8;
  max-width: 400px;
  margin: 0 auto;
}
/* ---------- ASSISTENTE ---------- */
section.assistente {
  background: var(--ghiaccio);
}

#chat {
  background: #ffffff;
  border: 1px solid #c9d0d7;
  border-radius: 12px;
  padding: 14px;
  height: 300px;
  overflow-y: auto;
  max-width: 500px;
  margin: 0 auto 16px auto;
}

.messaggio {
  max-width: 80%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  text-align: left;
  font-size: 15px;
}

.messaggio.utente {
  background: var(--verde);
  color: #ffffff;
  margin-left: auto;
}

.messaggio.assistente {
  background: var(--argento);
  color: var(--blu-notte);
  margin-right: auto;
}

.domande {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto 16px auto;
}

button.domanda {
  background: var(--ghiaccio);
  color: var(--verde);
  border: 2px solid var(--verde);
  font-size: 14px;
  padding: 10px 16px;
  margin: 4px;
  border-radius: 20px;
}
/* ---------- ANIMAZIONI ---------- */
.rivela {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rivela.visibile {
  opacity: 1;
  transform: none;
}

button:not(.torna),
.bottone {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:not(.torna):hover,
.bottone:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 42, 67, 0.25);
}

button:not(.torna):active,
.bottone:active {
  transform: translateY(0);
}

@keyframes comparsa {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.messaggio {
  animation: comparsa 0.3s ease;
}

/* Rispetta chi ha disattivato le animazioni sul telefono */
@media (prefers-reduced-motion: reduce) {
  .rivela {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .messaggio {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
.icona {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto 10px auto;
  color: var(--verde);
}

section.soluzione .icona {
  color: var(--ghiaccio);
}

.icona {
  transition: transform 0.25s ease;
}

.card:hover .icona {
  transform: scale(1.12);
}

.lavori-demo .telefono {
  width: 100%;
  max-width: 280px;
  margin: 24px auto 12px;
  padding: 10px;
  background: #1b1f23;
  border-radius: 36px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.lavori-demo .schermate {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 28px;
  scrollbar-width: none;
}
.lavori-demo .schermate::-webkit-scrollbar { display: none; }

.lavori-demo .schermate img {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  display: block;
}

.puntini { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.puntini span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c3cbd2;
}
.puntini span.attivo { background: var(--verde, #1f7a6d); }
.lavori-demo .telefono {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 280px;
  padding: 10px;
}

.lavori-demo .schermate {
  align-items: flex-start;
  height: auto;
}

.lavori-demo .schermate img {
  height: auto;
}

.lavori-demo .bottone {
  display: inline-block;
  height: auto;
  line-height: 1.3;
  margin: 0 0 24px;
  padding: 14px 28px;
}

.lavori-demo .nota {
  margin-top: 0;
}

.privacy { padding: 40px 20px; max-width: 700px; margin: 0 auto; }
.privacy h2 { text-align: center; }
.privacy h3 { font-size: 18px; margin: 24px 0 6px; }
.privacy p { font-size: 15px; line-height: 1.6; text-align: left; }

.contatti { text-align: center; padding: 48px 20px; }

.contatti-bottoni {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.contatti-bottoni .bottone {
  display: inline-block;
  height: auto;
  line-height: 1.3;
  margin: 0;
  padding: 14px 28px;
}

.contatti-bottoni .bottone-chiaro {
  background: transparent;
  color: var(--blu, #14304a);
  border: 2px solid var(--blu, #14304a);
}

.orari {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  line-height: 1.8;
}
.contatti-bottoni .bottone {
  color: #ffffff;
  min-width: 220px;
}

.contatti-bottoni .bottone-chiaro {
  background: transparent;
  color: var(--blu, #14304a);
  border: 2px solid var(--blu, #14304a);
}
.footer {
  text-align: center;
  padding: 32px 20px 40px;
}

.footer #apri-privacy {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 20px;
  background: #14304a;
  color: #ffffff;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
}
.finestra-privacy {
  width: min(92vw, 700px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 20px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #1c2630;
}

.finestra-privacy::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.chiudi-privacy {
  position: sticky;
  top: 0;
  float: right;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #14304a;
  color: #ffffff;
  font-size: 18px;
}
.footer #apri-privacy {
  border: 0;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
}
#chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

#chat .msg {
  margin: 0;
  padding: 12px 16px;
  max-width: 85%;
  border-radius: 18px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
}

#chat .msg-utente {
  align-self: flex-end;
  background: #1f7a6b;
  color: #fff;
  border-bottom-right-radius: 6px;
}

#chat .msg-assistente {
  align-self: flex-start;
  background: #eef2f5;
  color: #14304a;
  border-bottom-left-radius: 6px;
}
