@font-face {
  font-family: "Lobster";
  src: url("fonts/lobster-latin-400-normal.woff2") format("woff2"),
       url("fonts/lobster-latin-400-normal.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cyan: #00b8dc;
  --blue: #1f9be0;
  --navy: #1d2b4f;
  --text: #1d2b4f;
  --muted: #5b6780;
  --line: #dfe4ea;
  --error: #e0453a;
  --gold: #fcc419;
}

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

html, body { min-height: 100%; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #e4f1f1 18%, #b3d5d5 45%, #7fb4b4 72%, #568f8f 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.top { padding: 20px 16px 0; text-align: center; }

.brand img { height: 22px; width: auto; display: inline-block; }

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  margin: 26px auto 0;
  max-width: 720px;
  text-align: left;
}
.hero-icon { width: 92px; flex-shrink: 0; }
.hero-icon .stream { animation: pour 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes pour { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.85); } }

.hero-text h1 {
  background: var(--cyan);
  color: #fff;
  font-weight: 500;
  font-size: 26px;
  padding: 6px 14px;
  line-height: 1.25;
}
.hero-text p { font-size: 16px; margin-top: 10px; }

/* ---------- Progress ---------- */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 26px auto 18px;
}
.progress-bar {
  width: 224px;
  height: 10px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 10px;
  transition: width .4s ease;
}
.progress-label {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  min-width: 40px;
}

/* ---------- Quiz ---------- */
.quiz-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 80px;
}

.card {
  background: #fff;
  box-shadow: 0 18px 40px rgba(40, 90, 90, .18);
  padding: 34px 32px 32px;
  min-height: 200px;
}

.step { display: none; animation: fade .35s ease; }
.step.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.3px;
  margin-bottom: 30px;
}

.finale { text-align: center; margin-bottom: 22px; }
.finale h2 { margin-bottom: 12px; }
.finale p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 12px;
}
.finale p:last-child { margin-bottom: 0; }
.finale b { font-weight: 700; }

.options { display: flex; flex-direction: column; gap: 14px; }

.opt {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 16px;
  width: fit-content;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { position: relative; padding-left: 48px; line-height: 34px; }
.opt span::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: border-color .2s;
}
.opt span::after {
  content: "";
  position: absolute;
  left: 9px; top: 9px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--blue);
  transform: scale(0);
  transition: transform .2s;
}
.opt:hover span::before { border-color: var(--blue); }
.opt input:checked + span::before { border-color: var(--blue); }
.opt input:checked + span::after { transform: scale(1); }
.opt input:focus-visible + span::before { outline: 2px solid var(--blue); outline-offset: 2px; }

.field {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.field:focus { outline: none; border-color: var(--blue); }
.field.invalid { border-color: var(--error); }
select.field { cursor: pointer; }

.privacy { display: flex; align-items: center; gap: 12px; font-size: 13px; cursor: pointer; }
.privacy input { width: 20px; height: 20px; accent-color: var(--blue); }
.privacy a { color: var(--blue); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.err { display: none; color: var(--error); font-size: 13px; margin-top: 14px; }
.step.show-err .err { display: block; }

.actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn {
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:hover { background: #1586c6; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }

.thanks { text-align: center; padding: 10px 0; }
.thanks p { color: var(--muted); }
.check { width: 64px; margin: 0 auto 16px; display: block; }
.check circle { fill: none; stroke: var(--blue); stroke-width: 3; }
.check path { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Frecce ---------- */
.nav {
  position: absolute;
  top: 108px;
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity .2s, background .2s;
}
.nav:hover { background: #2c3e6b; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.nav-prev { left: 20px; }
.nav-next { right: 20px; }
.nav[hidden] { display: none; }

/* ---------- Trust ---------- */
.trust { text-align: center; color: #fff; padding: 70px 16px 40px; margin-top: auto; }
.trust-claim {
  font-family: "Lobster", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.25;
  max-width: 760px;
  margin: 0 auto;
  text-wrap: balance;
  color: #fff;
  -webkit-text-stroke: 1.5px #2e6666;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #2e6666, 0 4px 10px rgba(20, 60, 60, .35);
}
.trust-sub { text-transform: uppercase; font-size: 18px; letter-spacing: .5px; margin-top: 14px; line-height: 1.35; }
.stars { color: var(--gold); font-size: 36px; letter-spacing: 2px; margin-top: 8px; }
.trust-rating { font-size: 15px; margin-top: 2px; opacity: .95; }
.trust-rating strong { font-size: 18px; }

.foot { background: #3f7777; color: #e3f1f1; text-align: center; padding: 22px 16px; font-size: 13px; }
.foot img { height: 16px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 10px; }
.foot a { color: #fff; }

/* ---------- Comune (tendina con ricerca) ---------- */
.comune-box { margin-top: 6px; }
.comune-box[hidden] { display: none; }
.comune-label {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 6px 0 14px;
}
.combo { position: relative; }
.combo .field {
  margin-bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231d2b4f' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}
.combo-list {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(40, 90, 90, .18);
}
.combo-list li { padding: 10px 16px; cursor: pointer; font-size: 15px; }
.combo-list li.on, .combo-list li:hover { background: #e8f5fc; }
.combo-list li.empty { color: var(--muted); cursor: default; }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin: -20px 0 22px; }
.btn-sm { font-size: 16px; padding: 10px 18px; margin-top: 18px; }

/* ---------- Recensioni ---------- */
.reviews { background: #fff; padding: 64px 16px 56px; }
.reviews-title {
  text-align: center;
  font-weight: 400;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 34px;
}
#reviewsGoogle, #reviewsWidget { max-width: 1240px; margin: 0 auto; }

.rv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #f2f2f2;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.rv-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.rv-brand .g-logo { width: 22px; height: 22px; }
.rv-rating { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
#rvAvg { font-size: 20px; font-weight: 700; }
.rv-stars { color: #f6b100; font-size: 20px; letter-spacing: 1px; }
.rv-count { color: #888; font-size: 13px; }
.btn-google { background: #1a73e8; font-size: 14px; font-weight: 600; padding: 10px 22px; text-decoration: none; }
.btn-google:hover { background: #1660c4; }

.rv-carousel { position: relative; }
.rv-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px;
}
.rv-track::-webkit-scrollbar { display: none; }
.rv-card {
  flex: 0 0 calc((100% - 60px) / 4);
  scroll-snap-align: start;
  background: #f2f2f2;
  border-radius: 8px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}
.rv-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rv-card header img, .rv-initial {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.rv-initial { display: grid; place-items: center; background: #0f8a7e; color: #fff; font-weight: 600; font-size: 18px; }
.rv-card strong { display: block; font-size: 15px; line-height: 1.2; }
.rv-card small { color: #999; font-size: 12px; }
.rv-card .rv-stars { font-size: 18px; margin-bottom: 8px; }
.rv-text {
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rv-card.open .rv-text { -webkit-line-clamp: unset; }
.rv-more { background: none; border: 0; color: #888; font: inherit; font-size: 15px; text-align: left; cursor: pointer; padding: 0; margin-top: 2px; }
.rv-source { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; font-size: 12px; color: #888; }
.rv-source svg { width: 22px; height: 22px; }
.rv-source b { color: #1a73e8; font-weight: 500; font-size: 14px; }

.rv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 0;
  background: #777;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rv-arrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; }
.rv-prev { left: -16px; }
.rv-next { right: -16px; }

@media (max-width: 1024px) { .rv-card { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 600px) {
  .reviews-title { font-size: 22px; }
  .rv-card { flex-basis: 85%; }
  .rv-prev { left: -6px; }
  .rv-next { right: -6px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .hero { gap: 14px; }
  .hero-icon { width: 64px; }
  .hero-text h1 { font-size: 20px; }
  .hero-text p { font-size: 14px; }
  .quiz-wrap { padding: 0 16px 70px; }
  .card { padding: 26px 20px; }
  .step h2 { font-size: 19px; margin-bottom: 22px; }
  .nav { top: auto; bottom: 10px; }
  .nav-prev { left: 16px; }
  .nav-next { right: 16px; }
  .trust { padding-top: 40px; }
  .trust-claim { font-size: 28px; }
  .trust-sub { font-size: 15px; }
}
