:root {
  --navy: #0f2540;
  --navy-deep: #0a1a2f;
  --navy-soft: #1c3a5e;
  --yellow: #ffc21a;
  --yellow-dark: #e6ac00;
  --ink: #16202e;
  --muted: #5b6b7d;
  --line: #e4e9f0;
  --bg: #f6f6f6; /* uguale allo sfondo del logo */
  --bg-alt: #f5f7fb;
  --radius: 14px;
  --shadow-sm: 0 6px 20px rgba(15, 37, 64, 0.08);
  --shadow-md: 0 20px 50px rgba(15, 37, 64, 0.14);
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 15px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--navy-deep);
  box-shadow: 0 12px 28px rgba(255, 194, 26, 0.4);
}

.btn-yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(255, 194, 26, 0.5);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-lg {
  font-size: 1.08rem;
  padding: 18px 40px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f6f6f6; /* opaco: nessuna differenza di colore col logo */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  box-shadow: inset 0 0 0 3px rgba(15, 37, 64, 0.15);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--navy);
}

.site-nav .nav-cta {
  color: var(--navy);
  font-weight: 600;
}

/* Pulsante hamburger: nascosto su desktop, visibile sotto i 640px */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  color: #fff;
  /* La FOTO riempie tutta la hero (cover), centrata, senza deformazioni. */
  background-color: var(--navy-deep);
  background-image:
    linear-gradient(rgba(10, 20, 35, 0.34), rgba(10, 20, 35, 0.58)),
    url("hero-serramenti.jpg?v=16");
  background-size: cover;
  /* mostra la parte BASSA della foto (deck/piscina/vetrate); la parte alta viene tagliata */
  background-position: center 72%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Su desktop la hero è a TUTTA LARGHEZZA con altezza contenuta (taglia la parte
   alta della foto). NB: niente aspect-ratio + max-height insieme, altrimenti il
   tetto all'altezza restringe anche la larghezza lasciando una banda a destra. */
@media (min-width: 768px) {
  .hero {
    width: 100%;
    min-height: 0;
    height: 62vh;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(700px 400px at 25% 20%, #000, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 24px;
  max-width: 900px;
}

/* Su desktop il testo scende un po' verso il basso */
@media (min-width: 768px) {
  .hero-inner {
    justify-content: flex-end;
    padding-bottom: 60px;
  }
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(1.7rem, 4.3vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  margin-bottom: 32px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
}

.hero-cta {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.hero-badges li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero-badges li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--yellow);
  font-weight: 700;
}

/* ---------- Benefits ---------- */
.benefits {
  background: var(--bg-alt);
  padding: 92px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-lead {
  text-align: center;
  color: var(--muted);
  margin: 12px auto 0;
  max-width: 560px;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}

.benefit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.benefit-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.benefit-body {
  padding: 26px 28px 30px;
}

.benefit-card h3 {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.benefit-card p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Testimonianze (carosello) ---------- */
.testimonials {
  padding: 90px 0;
  background: #fff;
}

.carousel {
  position: relative;
  margin-top: 48px;
}

.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  /* proximity (non mandatory): lo snap rifinisce lo swipe manuale ma non
     "rimbalza" a inizio quando lo spostamento è comandato dai pulsanti/autoplay */
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 14px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.tcard {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
}

.tcard-stars {
  color: var(--yellow-dark);
  letter-spacing: 3px;
  font-size: 1rem;
}

.tcard-text {
  flex: 1;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
}

.tcard-text::before {
  content: "\201C";
  color: var(--yellow-dark);
  font-weight: 800;
  margin-right: 2px;
}

.tcard-text::after {
  content: "\201D";
  color: var(--yellow-dark);
  font-weight: 800;
  margin-left: 2px;
}

.tcard-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.tcard-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.tcard-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.tcard-meta strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.tcard-meta small {
  color: var(--muted);
  font-size: 0.85rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}

.carousel-nav:hover {
  background: var(--yellow);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.94);
}

.carousel-prev {
  left: -12px;
}

.carousel-next {
  right: -12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.carousel-dots button.is-active {
  background: var(--yellow-dark);
  transform: scale(1.35);
}

@media (max-width: 980px) {
  .tcard {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .tcard {
    flex-basis: 86%;
  }
  .carousel-prev {
    left: 2px;
  }
  .carousel-next {
    right: 2px;
  }
}

/* ---------- Estimator ---------- */
.estimator {
  background: var(--bg);
  padding: 92px 0;
}

.estimator-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 48px;
  padding: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.estimator-control {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.estimator-control label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.estimator-select-wrap {
  position: relative;
}

.estimator-select-wrap::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.estimator-select-wrap select {
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  padding: 14px 46px 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.estimator-select-wrap select:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.35);
}

.estimator-slider-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.estimator-slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(var(--yellow), var(--yellow)) 0 / var(--fill, 30%) 100% no-repeat,
              var(--line);
  cursor: pointer;
  outline: none;
}

.estimator-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 37, 64, 0.3);
  cursor: pointer;
}

.estimator-slider-row input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 37, 64, 0.3);
  cursor: pointer;
}

.estimator-slider-row input[type="range"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.35);
}

.estimator-slider-row output {
  min-width: 52px;
  padding: 8px 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy);
  background: var(--bg-alt);
  border-radius: 10px;
}

.estimator-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.estimator-result {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy), var(--navy-deep));
  color: #fff;
}

.estimator-result-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 10px;
}

.estimator-result-value {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.estimator-result-note {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.estimator-field-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.estimator-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.estimator-dim label {
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.estimator-dim input {
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.estimator-dim input::-webkit-outer-spin-button,
.estimator-dim input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.estimator-dim input:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.35);
}

.estimator-breakdown {
  margin-top: 18px;
  text-align: left;
  font-size: 0.92rem;
}

.estimator-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.estimator-breakdown dt {
  color: rgba(255, 255, 255, 0.65);
}

.estimator-breakdown dd {
  font-weight: 600;
  color: #fff;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover {
  background: var(--navy-soft);
  transform: translateY(-2px);
}

.estimator-add {
  margin-top: 6px;
}

.estimator-riga-corrente {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.estimator-riga-corrente .rc-posa {
  color: var(--navy);
  opacity: 0.75;
}

.estimator-accessori {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estimator-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  color: var(--navy);
  cursor: pointer;
}

.estimator-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.estimator-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.elr-accessori {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.elr-accessori label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.elr-accessori input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.estimator-add .btn {
  width: 100%;
}

.estimator-list {
  margin-top: 28px;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.estimator-list-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.estimator-list ul {
  list-style: none;
}

.estimator-list-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.estimator-list-row:first-child {
  border-top: none;
}

.elr-tipo {
  font-weight: 600;
  color: var(--navy);
  flex: 1 1 160px;
}

.elr-colore,
.elr-dim,
.elr-qta {
  color: var(--muted);
  font-size: 0.94rem;
}

.elr-imp {
  font-weight: 700;
  color: var(--navy);
  margin-left: auto;
}

.elr-del {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.elr-del:hover {
  background: #ffe3e3;
  border-color: #ffc9c9;
  color: #c92a2a;
}

.estimator-list-totali {
  margin-top: 6px;
  border-top: 2px solid var(--line);
}

.estimator-list-totali > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.estimator-list-totali dt {
  color: var(--muted);
}

.estimator-list-totali dd {
  font-weight: 600;
  color: var(--navy);
}

.estimator-list-totale-finale {
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.estimator-list-totale-finale dt {
  font-weight: 700;
  color: var(--navy);
}

.estimator-list-totale-finale dd {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

.estimator-pdf {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.estimator-pdf-intro {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--navy);
}

.estimator-pdf .btn {
  width: 100%;
}

.estimator-pdf-msg {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.estimator-cta {
  margin-top: 28px;
  text-align: center;
}

.estimator-form {
  margin-top: 24px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.estimator-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.estimator-form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.estimator-form-field input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 13px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.estimator-form-field input:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.35);
}

.estimator-form-msg {
  margin-top: 16px;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Final CTA ---------- */
.cta-final {
  position: relative;
  color: #fff;
  padding: 96px 0;
  background-color: var(--navy-deep);
  background-image:
    linear-gradient(rgba(10, 20, 35, 0.74), rgba(10, 20, 35, 0.86)),
    url("cta-serramenti.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cta-inner {
  text-align: center;
  max-width: 680px;
}

.cta-final h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.cta-final p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  margin-bottom: 34px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand--footer {
  color: #fff;
}

.footer-note {
  margin-top: 10px;
  font-size: 0.95rem;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
}

.footer-contacts a:hover {
  color: var(--yellow);
}

.footer-copy {
  text-align: center;
  font-size: 0.86rem;
  margin-top: 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .benefit-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .estimator-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .estimator-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #f6f6f6;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(15, 37, 64, 0.08);
    padding: 6px 20px 14px;
    display: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a,
  .site-nav a:not(.nav-cta) {
    display: block;
    padding: 13px 2px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child {
    border-bottom: none;
  }
  .brand-logo {
    height: 32px;
  }
  .hero {
    min-height: 52vh;
  }
  .hero-inner {
    padding: 56px 22px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
  .benefits,
  .estimator,
  .cta-final {
    padding: 68px 0;
  }
  .estimator-card {
    padding: 28px;
  }
  .estimator-list {
    padding: 22px;
  }
  .elr-imp {
    margin-left: 0;
  }
  .estimator-form {
    padding: 24px;
  }
}

/* ---------- Preventivo PDF (stampa) ---------- */
#preventivoPrint {
  display: none;
}

@media print {
  /* margine di pagina a 0: cosi' il browser non ha spazio per stampare la sua
     intestazione automatica (data/ora + titolo) ne' il pie' di pagina.
     Tutti i margini del documento sono dati dal padding di .pdf-doc. */
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    background: #fff !important;
  }

  body > *:not(#preventivoPrint) {
    display: none !important;
  }

  #preventivoPrint {
    display: block;
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }

  #preventivoPrint,
  #preventivoPrint * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-doc {
    /* spazio in basso su ogni pagina per il piè di pagina fisso (carta intestata) */
    padding: 13mm 14mm 24mm;
  }

  /* Blocco di chiusura: a SINISTRA una striscia bassa con dettagli/angolari dei
     serramenti e i sistemi usati; a destra il riepilogo totali. Resta unito. */
  .pdf-chiusura {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    break-inside: avoid;
  }

  .pdf-marchi {
    flex: 1;
    min-width: 0;
  }

  .pdf-marchi-tit {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .pdf-marchi-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .pdf-marchi-grid img,
  .pdf-marchi-grid .pdf-marchio-txt {
    box-sizing: border-box;
    width: 116px;
    height: 44px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
  }

  .pdf-marchi-grid img {
    object-fit: contain;
  }

  .pdf-marchi-grid .pdf-marchio-txt {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: 0.02em;
  }

  .pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 2.5px solid var(--yellow);
  }

  .pdf-logo {
    display: block;
    height: 54px;
    width: auto;
    flex-shrink: 0;
  }

  .pdf-azienda {
    text-align: right;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--muted);
  }

  .pdf-azienda strong {
    display: block;
    font-size: 0.84rem;
    color: var(--navy);
    margin-bottom: 2px;
  }

  .pdf-azienda .pdf-sito {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--yellow);
  }

  .pdf-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2px 24px;
    font-size: 0.8rem;
    margin-bottom: 9px;
  }

  .pdf-meta b {
    color: var(--navy);
  }

  .pdf-cliente {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 13px;
    margin-bottom: 13px;
    font-size: 0.8rem;
  }

  .pdf-cliente div {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 22px;
    line-height: 1.55;
  }

  .pdf-cliente b {
    color: var(--navy);
  }

  table.pdf-tab {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-bottom: 13px;
  }

  table.pdf-tab thead {
    display: table-header-group;
  }

  table.pdf-tab th {
    background: var(--navy);
    color: #fff;
    text-align: left;
    padding: 6px 9px;
    font-weight: 600;
    line-height: 1.2;
  }

  table.pdf-tab td {
    padding: 5px 9px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.3;
  }

  table.pdf-tab tbody tr:nth-child(even) td {
    background: #fafbfd;
  }

  table.pdf-tab tr {
    break-inside: avoid;
  }

  .pdf-tab .pdf-imp {
    text-align: right;
    white-space: nowrap;
  }

  .pdf-totali {
    margin-left: auto;
    width: 56%;
    min-width: 340px;
    font-size: 0.82rem;
    break-inside: avoid;
  }

  .pdf-chiusura > .pdf-totali {
    width: 285px;
    min-width: 285px;
  }

  .pdf-chiusura > .pdf-totali {
    flex-shrink: 0;
    margin-left: 0;
  }

  .pdf-totali > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 3.5px 0;
  }

  .pdf-totali .pdf-sub span:first-child {
    color: var(--muted);
  }

  .pdf-totali > div:not(.pdf-sub):not(.pdf-totale-finale) {
    font-weight: 700;
    color: var(--navy);
    border-top: 1px solid var(--line);
  }

  .pdf-totale-finale {
    border-radius: 8px;
    background: var(--navy);
    box-shadow: inset 0 0 0 2px var(--yellow);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    break-inside: avoid;
  }

  /* specificita' piu' alta di ".pdf-totali > div": vince su padding/margin */
  .pdf-totali > .pdf-totale-finale {
    margin-top: 8px;
    padding: 9px 24px 9px 14px;
  }

  .pdf-totale-finale span:first-child {
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  .pdf-totale-finale span:last-child {
    color: var(--yellow);
    white-space: nowrap;
  }

  .pdf-certificazioni {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    break-inside: avoid;
  }

  .pdf-certificazioni > div {
    flex: 1;
    border-left: 2px solid var(--yellow);
    padding-left: 8px;
  }

  .pdf-certificazioni .cert-badge {
    display: block;
    width: 33px;
    height: 33px;
    margin-bottom: 5px;
  }

  .pdf-certificazioni strong {
    display: block;
    font-size: 0.7rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1px;
  }

  .pdf-certificazioni span {
    font-size: 0.63rem;
    line-height: 1.32;
    color: var(--muted);
  }

  .pdf-nota {
    clear: both;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 0.74rem;
    color: var(--muted);
  }

  /* dati aziendali come CARTA INTESTATA: fissi in basso, ripetuti su OGNI pagina */
  .pdf-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4mm 14mm 6mm;
    border-top: 1px solid var(--line);
    background: #fff;
    font-size: 0.66rem;
    line-height: 1.6;
    color: var(--muted);
    text-align: center;
  }

  .pdf-footer strong {
    font-weight: 400;
    color: var(--muted);
  }

  .pdf-footer a {
    color: var(--muted);
    text-decoration: none;
  }
}
