* {
  box-sizing: border-box;
  max-width: 100vw;
}

/* animazioni */

/* animazioni abbonamenti */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* pulsazione veloce */
@keyframes blink {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* 2) Slide in da destra */
@keyframes slideInFromRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 3) Slide in dall’alto */
@keyframes slideInFromTop {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 4) Slide in dal basso */
@keyframes slideInFromBottom {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 5) Slide in da sinistra */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 6) Fade in / Fade out semplice */
@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  color: #222;
  background: #fff;
}

/*#cookie banner */
.banner-cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #ccc;
  padding: 20px 15px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
}

.cookie-container {
  max-width: 960px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  display: flex;
  justify-content: space-between;
}

.cookie-buttons button {
  padding: 10px 15px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  flex: 1;
  min-width: content;
  max-width: 300px;
}

#accept-essential {
  background-color: #e0e0e0;
  color: #333;
}

#accept-all {
  background-color: #004aad;
  color: white;
}
/*#endregion */

/*#region header e nav */

header {
  background: white;
  color: #004aad;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 34px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
  color: #004aad;
  font-size: 35px;
  font-weight: bold;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: 200px;
  margin-right: 10px;
  margin-top: 5px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  top: 45px;
  right: 20px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #004aad;
  border-radius: 2px;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
.hamburger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Nav orizzontale di default */
nav.nav-links {
  display: flex;
  align-items: center;
  margin-right: 3rem;
  padding-right: 1rem;
}

nav.nav-links a:not(.accedi) {
  color: #004aad;
  margin-left: 3rem;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  font-size: 18px;
}

nav.nav-links a:not(.accedi)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, skyblue, #004aad);
  transition: width 0.3s ease;
}

nav.nav-links a:not(.accedi):hover::after {
  width: 100%;
}

nav.nav-links .accedi {
  border: 2px solid #004aad;
  background: white;
  padding: 12px 28px;
  border-radius: 20px;
  margin-left: 3rem;
  cursor: pointer;
  color: #004aad;
  font-size: 18px;
  text-decoration: none;
}

nav.nav-links .accedi:hover {
  padding-bottom: 12px;
  background: #004aad;
  color: white;
}

/*#endregion */

/*#region hero*/
.hero-container {
  display: flex;
  align-items: end;
  min-height: 700px;
  height: 100vh;
  padding-right: 2rem;
  padding-bottom: 2rem;
  padding-left: 0;
  gap: 4rem;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0 2px 80px rgba(0, 0, 0, 0.1);
  position: relative; /* Importante per posizionare il pseudo-elemento */
  overflow: hidden; /* Nasconde la parte del background che "scivola" da fuori */

  /* Rimuovi le proprietà background-image dal contenitore principale */
  /* background-image: url("imgs/header-filler/formageometrica.png"); */
  /* background-position: left top 10%; */
  /* background-repeat: no-repeat; */
  /* background-size: 30% auto; */
}

/* Pseudo-elemento per l'immagine di sfondo animata */

.img-container {
  flex: 0 0 40%; /* larghezza fissa 40% */
  display: flex;
  align-self: flex-end;
  justify-content: center;
  align-self: center;
}

.img-container img {
  width: 40%;
  height: auto;
  object-fit: cover;
  flex-shrink: 0;
  animation-name: slideInFromLeft;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* Animazioni */
@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.hero {
  margin-top: 150px;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-bottom: 1rem;
  justify-items: center;
  gap: 1.4rem;
  width: 70%;
  align-self: center;
}

.assistenteIA {
  color: deepskyblue;
}

.hero h1 {
  color: #004aad;
  font-size: 3rem;
  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  margin-block: 0;
  text-align: center;
}

.hero p {
  animation-name: slideInFromRight;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  font-size: 1.2rem;
  color: #555;
  margin-block: 0;
}

.hero-video {
  width: 65%;
  aspect-ratio: 16 / 9;
}

@media (min-width: 1800px) {
  .hero-video {
    width: 70%;
    aspect-ratio: 16 / 9;
  }
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-primary {
  background: #004aad;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-primary a {
  text-decoration: none;
  color: white;
}
/*#endregion */

/*#region carosello testi */

#come-funziona {
  scroll-margin-top: 135px;
}

.carousel {
  max-width: 80vw;
  overflow: hidden;
  margin: auto;
  position: relative;
  border-radius: 10px;
}

.carousel-track {
  margin-top: 50px;
  margin-bottom: 50px;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  flex: 0 0 100%;
  padding: 0 20px;
  box-sizing: border-box;
  color: black;
  font-size: 1.1rem;
  text-align: center;
}

.slide h3 {
  color: #004aad;
  font-size: 30px;
}

.slide p {
  font-size: 24px;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.carousel-button {
  position: relative;
  background: none;
  border: none;
  font-size: 18px;
  color: #333;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
}

.carousel-button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: #004aad;
  transition: width 0.3s ease;
}

.carousel-button:hover::after {
  width: 100%;
}

.carousel-button.active::after {
  width: 100%;
  background-color: #004aad;
}

.section-box {
  margin-top: 30px;
  margin-bottom: 30px;
}

.carousel .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  border: none;
  color: #004aad;
  cursor: pointer;
  padding: 15px;
  z-index: 10;

  height: 100%; /* o usa 100% se vuoi coprire tutta l'altezza slide */
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: transparent;
  opacity: 0.3; /* inizialmente trasparenti */
}

@media (hover: hover) and (pointer: fine) {
  .arrow:hover,
  .arrow:active {
    opacity: 1;
  }
}

.arrow:focus {
  opacity: 1;
  box-shadow: none;
}

.carousel .arrow-left {
  left: 0;
}

.carousel .arrow-right {
  right: 0;
}
/*#endregion */

/*#region box + video */
.container-box {
  display: flex;
  align-items: center;
  margin: auto;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(to bottom, #b3d9ff, #e6f2ff);
  width: 80%;
  text-align: center;
  border-radius: 20px;
}

.video-content-wrapper {
  display: flex;
  flex-direction: row;
  margin: 30px;
}

.video-wrapper {
  width: 50%;
  margin-top: 10px;
}

.video-wrapper video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.content-box {
  display: flex;
  color: black;
  width: 50%;
  margin-left: 50px;
}

.content-box ul {
  width: 90%;
  gap: 15px;
  text-align: left;
}

.content-box ul li {
  font-size: large;
  padding: 12px;
}

.container-box h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  line-height: 1.3;
  font-weight: 700;
  position: relative;
  width: 70%;
  color: #004aad;
  margin: auto;
  padding: 28px;

  animation-name: slideInFromBottom;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.container-box h2 .highlight {
  position: relative;
  display: inline-block;
  color: white;
  z-index: 1;
  padding: 0 12px 8px;

  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.container-box h2 .highlight::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.2em;
  background: #004aad;
  transform: rotate(-2deg);
  transform-origin: left center;
  z-index: -1;
  height: 45px;
  opacity: 0.9;
  pointer-events: none;
  translate: 0 -50%;
}
/*#endregion */

/*#region progress points */
.bandi-personalizzati {
  max-width: 100vw;
  margin: 80px auto;
  padding: 0 20px;
  font-family: Arial, sans-serif;
}

.bandi-titolo {
  color: #004aad;
  font-size: 48px;
  text-align: center;
  margin-bottom: 10px;
  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.bandi-sottotitolo {
  text-align: center;
  color: #555;
  font-size: 26px;
  margin-bottom: 50px;
  animation-name: slideInFromLeft;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.bandi-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 100px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 0;
}

.video-wrapper-step,
.step-img {
  width: 45%;
}

.video-wrapper-step video,
.step-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.step-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.bandi-step-1,
.bandi-step-2,
.bandi-step-3,
.bandi-step-4 {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  z-index: 1;
  justify-content: space-between;
}

.bandi-step:nth-child(odd) {
  flex-direction: row;
  justify-content: flex-start;
}

.bandi-step:nth-child(even) {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.bandi-cerchio {
  position: absolute;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #cce0ff;
  transform: translateX(-50%);
}

.bandi-cerchio-1 {
  background-color: #0056d6;
}
.bandi-cerchio-2 {
  background-color: #1d74e9;
}
.bandi-cerchio-3 {
  background-color: #7bb5ff;
}
.bandi-cerchio-4 {
  background-color: #cce0ff;
}

.bandi-contenuto {
  width: 45%;
  max-width: 500px;
  padding: 0 20px;
}

.bandi-step-titolo {
  font-size: 28px;
  color: #111;
  margin-bottom: 14px;
}

.bandi-step-testo {
  font-size: 16px;
  color: #333;
  margin: 0;
}

.bandi-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 150px;
  bottom: 150px;
  width: 4px;
  background-color: #cce0ff;
  transform: translateX(-50%);
  z-index: 0;
}

.bandi-step,
.bandi-cerchio,
.bandi-contenuto {
  z-index: 1;
}

.bandi-cerchio-inizio,
.bandi-cerchio-fine {
  position: absolute;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #cce0ff;
  transform: translateX(-50%);
  z-index: 2;
}

/* Primo cerchio (primo step) */
.bandi-step:nth-child(1) .bandi-cerchio {
  top: 0;
}

/* Ultimo cerchio (ultimo step) */
.bandi-step:nth-last-child(1) .bandi-cerchio {
  bottom: 0;
}
/*#endregion */

.features ul {
  list-style: disc inside;
  font-size: 1.1rem;
  line-height: 1.6;
}

.features strong {
  color: #004aad;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.feature {
  flex: 1 1 300px;
  background: #f3f4f6;
  padding: 1.5rem;
  border-radius: 10px;
}

/*#region abbonamenti */

#prezzi {
  scroll-margin-top: 60px;
}

.header-abbonamenti {
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #b3d9ff, #e6f2ff);
  text-align: center;
  padding-bottom: 48px;
  justify-content: center;
  align-items: center;
  max-width: 100vw;
}

.header-abbonamenti h2 {
  font-size: 48px;
  color: #004aad;
  padding-bottom: 48px;

  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.header-abbonamenti a {
  background: #004aad;
  border-radius: 80px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  cursor: pointer;
  text-decoration: none;
  animation-name: blink;
  animation-duration: 0.4s; /* Durata breve per due pulsazioni veloci */
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  animation-iteration-count: 2;
}

.header-abbonamenti a:hover {
  opacity: 0.9;
}

.header-abbonamenti a p {
  color: white;
  font-size: 32px;
}

.header-abbonamenti a img {
  width: 20%;
  margin-left: 5px;
}

.pricing {
  padding: 3rem 2rem;
  text-align: center;
  max-width: 1440px;
  margin: 0 auto;
}

.pricing h2 {
  font-size: 48px;
  margin-bottom: 1rem;
  color: #004aad;

  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.pricing p.subtitle {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  color: #555;
}

.plans-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.plans-container .plan {
  opacity: 0;
  transform: translateY(20px);
  animation-name: fadeSlideUp;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.plans-container .plan:nth-child(1) {
  animation-delay: 0.2s;
}

.plans-container .plan:nth-child(2) {
  animation-delay: 0.5s;
}

.plans-container .plan:nth-child(3) {
  animation-delay: 0.8s;
}

.plan {
  position: relative;
  background: #ffffff;
  width: 330px;
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.badge-container {
  position: absolute;
  top: 0;
  left: -8%;
  width: 160px;
  z-index: 2;
}

/* Stile del badge */
.badge {
  padding: 14px;
  font-size: 28px;
  color: white;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
  margin: 0;
  position: relative;
  background: #630063; /* Colore di esempio */
}

/* Triangolo di supporto */
.badge-triangle {
  width: 14%;
  height: 15px;
  background: red;
  clip-path: polygon(
    0% 0%,
    calc(90% + 8%) 0%,
    100% 100%
  ); /* Adatta l'inclinazione */
  z-index: -1;
}

.plan-0 h3.badge {
  background: #ff960b;
  padding-left: 40px;
  padding-right: 160px;
}
.plan-1 h3.badge {
  background: #8c52ff;
  padding-left: 40px;
} /* viola */
.plan-2 h3.badge {
  background: rgb(66, 152, 206);
  padding-left: 40px;
} /* blu */
.plan-3 h3.badge {
  background: rgb(25, 180, 25);
  padding-left: 40px;
} /* verde */

.plan-0 div.badge-triangle {
  background: #ffbd59; /* Canali R/B: +50% | G: da 0 a 50 */
}

/* Viola - Originale: rgb(99, 0, 99) → +50% */
.plan-1 div.badge-triangle {
  background: #cb6ce6; /* Canali R/B: +50% | G: da 0 a 50 */
}

/* Blu - Originale: rgb(66, 152, 206) → +50% */
.plan-2 div.badge-triangle {
  background: rgb(99, 228, 255); /* R: +50% | G: +50% | B: +25% */
}

/* Verde - Originale: rgb(25, 180, 25) → +50% */
.plan-3 div.badge-triangle {
  background: rgb(38, 255, 38); /* Canali R/G/B: +50% */
}

.plan .risparmio {
  display: inline-block;
  margin-top: 3rem;
  background: #e9e9e9;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
}

.plan-0 .risparmio {
  color: #ff960b;
}
.plan-1 .risparmio {
  color: rgb(99, 0, 99);
}
.plan-2 .risparmio {
  color: rgb(66, 152, 206);
}
.plan-3 .risparmio {
  color: rgb(25, 180, 25);
}

.plan-1-description {
  font-size: 0.95rem;
  margin: 3rem 0 1.5rem 0;
  color: #444;
}

.plan p.description {
  font-size: 0.95rem;
  margin: 2rem 0 1.5rem 0;
  color: #444;
}

.plan .price {
  font-size: 1.75rem;
  font-weight: bold;
  color: #000;
  margin-bottom: 0.25rem;
}
.plan .price sup {
  font-size: 1rem;
  font-weight: normal;
}

.plan .price-info {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.75rem;
}

/* ================ BOTTONE ================ */
.button-pricing-wrapper {
  text-align: center;
  margin: 1rem 0 1.5rem 0;
}
.pricing-button {
  background: #004aad;
  color: #ffffff;
  font-size: 1rem;
  padding: 12px 0;
  width: 80%;
  border: none;
  border-radius: 15px;
  cursor: pointer;
}
.pricing-button:hover {
  opacity: 0.9;
}
.pricing-button a {
  display: block;
  width: 100%;
  color: #ffffff;
  text-decoration: none;
}

.strike {
  text-decoration: line-through;
}

/* ================ LISTA PUNTI ================ */
.check-list {
  list-style: none;
  margin-top: 1.5rem;
  padding: 0;
}
.check-list li {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.5rem;
}
.check-list li img {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
}
/*#endregion */

/*#region faq */

#faq {
  scroll-margin-top: 118px;
}

.accordion-container {
  margin: 0 auto;
  width: 80%;
}

.accordion-item {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 0.5px solid #ddd;
  border-radius: 16px;
  margin-bottom: 20px;
}

.accordion-header {
  padding: 2rem 3rem 2rem 1rem; /* Più spazio a destra per la freccia */
  cursor: pointer;
  font-weight: bold;
  position: relative;
  background-color: #fdfdfd;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: #f0f0f0;
}

.accordion-header::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: translateY(-75%) rotate(45deg);
  transition: all 0.3s ease;
}

.accordion-item.active .accordion-header::after {
  transform: translateY(-25%) rotate(-135deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #fff;
}

.accordion-item.active .accordion-content {
  padding: 1rem;
  max-height: 500px;
}
/*#endregion */

/*#region robot newsletter */
.Robot_Newsletter_img {
  margin-top: 50px;
  margin-left: 200px;
  width: 20%;
}

.newsletter-section {
  margin-top: -5px;
  padding: 50px 300px;
  background-image: url("https://stgdgt01.blob.core.windows.net/webshared/Digitality/bandopilot-landing/imgs/newsletterBG/newsletter.png");
}

.newsletter-section h2 {
  font-size: 48px;
  color: #004aad;
  margin-bottom: 10px;
  animation-name: slideInFromLeft;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.newsletter-section p {
  font-size: larger;
  margin-bottom: 40px;
}

.email-input-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 10px; /* Spazio tra input e bottone */
}

.email-input-wrapper input {
  padding: 14px 24px;
  border-radius: 10px;
  border: 2px solid rgb(218, 218, 218);
  font-size: 24px;
  min-width: 0;
  flex: 1; /* Occupa lo spazio disponibile */
  max-width: 400px; /* Limita larghezza su desktop */
}

.email-input-wrapper button {
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 24px;
  white-space: nowrap; /* Testo su una riga */
}

/* .newsletter-section div input {
  border: 2px solid #555;
  width: 200px;
  border-radius: 10px;
}*/

.checkbox-wrapper {
  display: flex;
  flex-direction: row;
  margin-top: 20px;
}

.checkbox-wrapper label {
  margin-left: 10px;
}

.checkbox-wrapper-modal label {
  margin-left: 10px;
}

.newsletter-section div button {
  padding: 14px 24px;
  margin-left: 20px;
  border-radius: 10px;
  border: none;
  background: #004aad;
  color: white;
  font-size: 24px;
  cursor: pointer;
}
/*#endregion */

/* chi ci ha provato è rimasto section */
/*#region section container */

#recensioni {
  scroll-margin-top: 100px;
}

.section-container {
  padding-bottom: 40px;
  margin-top: 100px;
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(to bottom, #b3d9ff, #e6f2ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.section-container h2 {
  font-size: 3rem;
  color: #004aad;
  margin-bottom: 30px;
  text-align: center;

  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.top-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  position: relative;
}

.top-content .robot-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.top-content .robot-wrapper img {
  max-width: 50%;
  height: auto;
  animation-name: slideInFromBottom;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.top-content .text-block {
  flex: 1;
  padding-left: 40px;
}

.top-content .text-block p {
  font-size: 2rem;
  color: #111;
  animation-name: slideInFromRight;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.top-content .text-block p strong {
  font-weight: bold;
}

/* Container principale */
.testimonial-carousel {
  position: relative;
  width: 90vw;
  height: 40vw;
  max-width: 100vw;
  margin: auto; /* impedisce overflow orizzontale */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track con prospettiva 3D */
.testimonial-track {
  position: relative;
  width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenitore dei video */
.carousel-inner {
  position: relative;
  width: 100%;
  height: auto;
}

/* Ogni video-mock: posizionato assoluto per effetto 3D */
.video-mock {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 35vw; /* mantiene proporzioni video */
  max-width: 600px;
  max-height: 80vh;
  transform-style: flat;
  transition: transform 0.7s ease, opacity 0.7s ease;
  opacity: 0.5;
  border-radius: 10px;
  background-color: black;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* disabilita click se non attivo */
}

.video-mock video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: contain;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  position: relative; /* evita che Safari stacchi il layer */
  z-index: 1;
  will-change: transform;
}

/* Stato attivo: al centro, sopra */
.video-mock.active {
  opacity: 1;
  transform: translate(-50%, -50%) translateZ(0) scale(1);
  z-index: 3;
  pointer-events: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Precedente: spostato a sinistra, ruotato */
.video-mock.prev {
  opacity: 0.7;
  transform: translate(calc(-120%), -50%) translateZ(-150px) scale(0.7)
    rotateY(0deg);
  z-index: 2;
}

/* Successivo: spostato a destra, ruotato */
.video-mock.next {
  opacity: 0.7;
  transform: translate(calc(20%), -50%) translateZ(-150px) scale(0.7)
    rotateY(0deg);
  z-index: 2;
}

/* Bottoni freccia */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #004aad;
  border: none;
  font-size: 2.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
  user-select: none;
  z-index: 10;
  transition: background-color 0.3s ease;
  opacity: 0.3;
}

.t-arrow-left {
  left: 0.9rem;
}

.t-arrow-right {
  right: 0.9rem;
}

/* Dots sotto */
.testimonial-carousel-dots {
  text-align: center;
  margin-bottom: 2rem;
}

.testimonial-carousel-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.testimonial-carousel-dots span.active {
  background: #004aad;
}

.testimonials-grid {
  width: 100%;
  max-width: 1200px;
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 30px;
}

.card {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 25px 20px 50px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  animation-name: slideInFromTop;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.card .card-text {
  flex: 1;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 50px;
}

.card .profile {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}

.card .profile .pic-container {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0066cc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .pic-container img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.card .profile .profile-text {
  margin-left: 15px;
}

.card .profile .profile-text .name {
  display: block;
  font-size: 1rem;
  color: #111;
  margin-bottom: 3px;
}

.card .profile .profile-text .title {
  font-size: 0.88rem;
  font-style: italic;
  font-weight: bold;
}

.card .corner-accent {
  position: absolute;
  bottom: -20px;
  right: 0;
  width: 150px;
  height: 20px;
  background: #0066cc;
  border-bottom-left-radius: 8px;
}
/*#endregion */
#parlano-di-noi {
  scroll-margin-top: 95px;
}
/* cta */
/*#region cta */
#cta-fixed-container {
  position: fixed;
  z-index: 100;
  right: 1%;
  bottom: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: bottom 0.3s ease;
}

.cta-fixed-cookies {
  border-radius: 100%;
  border: none;
  background: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
}

.cta-fixed-cookies img {
  width: 40px;
  padding: 8px;
  filter: brightness(0) saturate(100%) invert(77%) sepia(42%) saturate(2934%)
    hue-rotate(164deg) brightness(103%) contrast(99%);
}

.cta-fixed-chat {
  border-radius: 100%;
  border: none;
  background: rgb(100, 216, 255);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-fixed-chat img {
  width: 60px;
  padding: 8px;
}

/*#endregion */

.news-articles {
  justify-items: center;
  text-align: center;
  padding: 40px 20px;
}

.news-articles h2 {
  font-size: 48px;
  color: #004aad;
  margin-bottom: 30px;
  animation-name: slideInFromLeft;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.news-articles-logo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5rem;
  justify-content: center;
  align-items: center;
}

.news-articles-logo-container a {
  padding: 20px;
  border-radius: 12px;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.news-articles-logo-container a:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.news-articles a img {
  width: 140px;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
}

/*#region footer */
.footer-wrapper {
  margin: 150px 30px 10px 30px;
  background: #004aad;
  border-radius: 25px;
  border-top-left-radius: 0;
  color: white;
  padding: 2rem;
  position: relative;
  font-size: 0.9rem;
}

.corner-footer {
  position: absolute;
  top: -50px;
  left: 0;
  display: flex;
}

.box {
  background: lightskyblue;
  width: 40vw;
  height: 50px;
  max-width: 100vw;
}

.corner {
  background: lightskyblue;
  width: 50px;
  height: 50px;
  border-top-right-radius: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  align-items: start;
  text-align: left;
}

.footer-logo {
  margin: auto;
}

.footer-logo img {
  width: 150px;
}

.footer-contatti {
  display: flex;
  flex-direction: column;
}

.footer-contatti h4 {
  margin-bottom: 1rem;
  font-size: larger;
}

.footer-contatti a {
  margin-bottom: 1rem;
  font-size: medium;
  color: white;
  text-decoration: none;
}

.footer-contatti a:hover {
  text-decoration: underline;
}

.footer-links p a {
  color: white;
  text-decoration: none;
}

.footer-links p a:hover {
  text-decoration: underline;
}

.footer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.footer-button:hover {
  opacity: 0.9;
}

.footer-button button {
  background: white;
  color: #004aad;
  border: none;
  padding: 7px 24px;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  font-size: x-large;
  display: flex;
  align-items: center;
}

.footer-button button span {
  border-radius: 100%;
  background: #004aad;
  padding: 10px;
  display: flex;
  align-items: center;
  margin-left: 20px;
  margin-right: -20px;
}

.footer-button button span img {
  width: 50px;
  height: 50px;
}

.footer-bottom {
  width: 90%;
  margin-top: 0rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  text-align: center;
  display: flex;
  align-items: center;
  margin: auto;
  justify-content: space-between;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-bottom div a {
  color: black;
  margin: 0 5px;
  text-decoration: underline;
}

.icone-pagamento {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.icona-pagamento {
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
}

.icone-pagamento div img {
  width: 2.5rem;
}
/*#endregion */

/* Modale */
/*#region modale */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(215, 215, 230, 0.7);
  backdrop-filter: blur(4px);
}

/* Contenuto del modale */
.modal-content {
  background-color: white;
  margin: 8% auto;
  padding: 30px 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 680px;
  box-shadow: 0 8px 20px rgba(0, 0, 70, 0.3);
  font-family: Arial, sans-serif;
}

.modal-content h2 {
  text-align: center;
  align-self: center;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form-input-wrapper {
  display: flex;
  flex-direction: column;
}

.modal-content {
  color: #004aad;
  font-size: larger;
}

.contact-form-inputs-wrapper {
  display: grid;
}

/* Pulsante per chiudere */
.close {
  float: right;
  font-size: 26px;
  font-weight: bold;
  color: #1e3a8a;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #2563eb;
}
/*#endregion */

/* Stile del form */
/*#region form */
#contactForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contactForm label {
  font-size: 14px;
  color: #1e3a8a;
  margin-bottom: 5px;
}

#contactForm input,
#contactForm textarea,
#contactForm select {
  padding: 10px 12px;
  border: 1px solid #aac8f0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#contactForm input:focus,
#contactForm textarea:focus,
#contactForm select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.4);
}

#contactForm textarea {
  resize: vertical;
  min-height: 100px;
}

/* Pulsante Invia */
#contactForm button[type="submit"] {
  align-self: center;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #1e3a8a;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: flex;
}

#contactForm button[type="submit"] svg {
  display: none;
}

button[type="submit"]:disabled {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

#contactForm button[type="submit"]:hover:not(:disabled) {
  background-color: #2563eb;
}

#contactForm button[type="submit"]:active:not(:disabled) {
  transform: scale(0.97);
}

#newsletter-submit {
  display: flex;
  justify-content: space-between;
}
#modal-submit {
  display: flex;
  justify-content: space-between;
}

#modal-submit .spinner {
  width: 16px;
  height: 16px;
}

.spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid #cce5ff; /* colore sfondo */
  border-top: 3px solid #007bff; /* colore blu */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*#endregion */

.legal {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
  line-height: 1.6;
  max-width: 800px;
  margin: 20px auto;
  padding: 0 15px;
}

.legal h1,
.legal h2,
.legal h3 {
  color: #004080;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
}

.legal h1 {
  font-size: 2.2rem;
}

.legal h2 {
  font-size: 1.6rem;
}

.legal h3 {
  font-size: 1.2rem;
}

.legal p {
  margin-bottom: 1em;
  font-size: 1rem;
}

.legal ul {
  margin: 0 0 1em 1.5em;
  padding: 0;
  list-style-type: disc;
  font-size: 1rem;
}

.legal a {
  color: #0066cc;
  text-decoration: none;
}

.legal a:hover,
.legal a:focus {
  text-decoration: underline;
}

/* —————— MEDIA QUERIES: TABLET (max-width:1024px) —————— */
@media (max-width: 1024px) {
  .Robot_Newsletter_img {
    margin-top: 20px;
    margin-left: 0px;
    width: 30%;
  }
  /*#region HEADER & NAVIGATION */
  header {
    padding: 16px 24px;
    z-index: 999;
  }

  .logo img {
    width: 180px;
  }

  .hamburger {
    display: flex;
  }

  nav.nav-links {
    position: fixed;
    top: 105px;
    right: -50px;
    width: 300px;
    height: calc(100% - 64px);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0 0 20px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 900;
  }

  nav.nav-links a {
    margin: 16px 0;
    font-size: 20px;
    color: black;
  }

  nav.nav-links.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  /*#endregion */

  /*#region HERO SECTION */
  .hero-container {
    flex-direction: column;
    height: auto;
    padding-right: 0rem;
  }

  .hero-container::before {
    background-image: none;
  }

  .img-container img {
    display: none;
  }

  .img-container,
  .hero {
    width: 90%;
  }

  .hero {
    text-align: center;
    background-position: left bottom;
    background-repeat: no-repeat;
    background-size: 20% auto;
    min-height: 400px;
    position: relative;
    margin-top: 50px;
  }
  /*#endregion */

  /*#region CAROUSEL */
  .carousel {
    max-width: 100%;
  }

  .slide h3 {
    font-size: 25px;
  }

  .slide p {
    font-size: 20px;
  }

  .carousel-track {
    margin: 30px 0;
  }
  /*#endregion */

  /*#region FEATURE BOX & VIDEO */
  .container-box {
    width: 100%;
    padding: 10px;
  }

  .video-content-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .content-box,
  .video-wrapper {
    width: 60%;
    margin: 0;
  }
  /*#endregion */

  /*#region progress points */
  .bandi-timeline {
    padding: 30px 0;
  }

  .bandi-timeline::before,
  .bandi-cerchio {
    display: none !important;
  }

  .bandi-step-1,
  .bandi-step-3 {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .bandi-step-2,
  .bandi-step-4 {
    flex-direction: column-reverse;
    align-items: center;
    gap: 30px;
  }

  .video-wrapper-step,
  .step-img,
  .bandi-contenuto {
    width: 100% !important;
    max-width: 600px;
    margin-left: 0 !important;
    padding: 0 20px !important;
  }
  /*#endregion */

  /*#region FEATURES */
  .features {
    flex-direction: column;
  }
  /*#endregion */

  /*#region abbonamenti */
  .pricing {
    padding: 2rem 1rem;
  }

  .pricing h2 {
    font-size: 38px;
  }

  .pricing p.subtitle {
    font-size: 1.4rem;
  }

  .plans-container {
    gap: 3rem;
    padding-left: 5%;
  }

  .plan {
    max-width: 80%;
  }

  .plan .risparmio {
    font-size: 0.85rem;
  }

  .plan .price {
    font-size: 1.5rem;
  }
  /*#endregion */

  /*#region ACCORDION */
  .accordion-container {
    width: 100%;
    padding: 0 1rem;
  }
  /*#endregion */

  /*#region NEWSLETTER */
  .newsletter-section {
    padding: 40px 5%;
  }

  .email-input-wrapper input,
  .email-input-wrapper button {
    font-size: 20px;
    padding: 12px 20px;
  }

  .newsletter-section h2 {
    font-size: 32px;
  }

  .newsletter-section p {
    font-size: 1rem;
  }

  .checkbox-wrapper {
    flex-direction: row;
    align-items: center;
    font-size: 0.95rem;
  }
  /*#endregion */

  /*#region TESTIMONIALS */
  .top-content {
    flex-direction: column;
  }

  .top-content .robot-wrapper,
  .top-content .text-block {
    width: 100%;
    padding: 0 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  /*#endregion */

  /*#region FOOTER */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column-reverse;
    gap: 10px;
  }
  /*#endregion */

  .section-box {
    margin-right: 8px;
    margin-left: 8px;
  }

  .card {
    margin-bottom: 10px;
  }

  .top-content .robot-wrapper img {
    max-width: 30%;
    height: auto;
    animation-name: slideInFromBottom;
    animation-duration: 0.6s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
  }

  .hero-video {
    width: 90%;
    aspect-ratio: 16 / 9;
  }

  .hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* —————— MEDIA QUERIES: MOBILE (max-width:768px) —————— */
@media (max-width: 768px) {
  .Robot_Newsletter_img {
    margin-top: 20px;
    margin-left: 0px;
    width: 60%;
  }
  .top-content .robot-wrapper img {
    max-width: 60%;
    height: auto;
    animation-name: slideInFromBottom;
    animation-duration: 0.6s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
  }

  .card {
    margin-bottom: 10px;
  }

  .section-box {
    margin-right: 8px;
    margin-left: 8px;
  }
  /*#region HEADER & NAVIGATION */
  header {
    padding: 12px 16px;
  }

  nav.nav-links {
    top: 96px;
    height: calc(100% - 64px);
    padding: 20px 0 0 20px;
  }

  nav.nav-links a {
    font-size: 18px;
    margin: 12px 0;
  }
  /*#endregion */

  .hero-container {
    min-height: 500px;
  }

  /*#region HERO SECTION */

  #faq {
    scroll-margin-top: 10px;
  }
  #prezzi {
    scroll-margin-top: 50px;
  }
  #come-funziona {
    scroll-margin-top: 95px;
  }
  #parlano-di-noi {
    scroll-margin-top: 95px;
  }

  .hero {
    min-height: 300px;
    background-size: 20% auto;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .hero-video {
    width: 90%;
    aspect-ratio: 16 / 9;
  }

  .hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .btn-primary {
    font-size: 20px;
    padding: 12px 24px;
  }
  /*#endregion */

  /*#region progress points */
  .bandi-step {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .bandi-contenuto {
    max-width: 100%;
  }

  .bandi-cerchio {
    margin: 20px 0;
  }

  .bandi-timeline::before {
    left: 13px;
    transform: none;
  }

  .bandi-step:nth-child(even),
  .bandi-step:nth-child(odd) {
    justify-content: center;
  }
  /*#endregion */

  /*#region CAROUSEL */
  .carousel-track {
    margin: 20px 0;
  }

  .carousel .arrow {
    height: 70%;
  }

  .dots {
    margin: 16px 0 30px;
  }

  .slide p {
    margin: 0;
    padding: 0 14px;
  }

  /*#endregion */

  /*#region CONTENT BOXES */
  .container-box {
    padding: 10px;
    gap: 5px;
  }

  .container-box h2 {
    font-size: 1.5rem;
    padding: 16px;
    width: 100%;
  }

  .video-wrapper,
  .content-box {
    width: 100%;
  }

  .container-box h2 .highlight::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1.2em;
    background: #004aad;
    transform: rotate(-1deg);
    transform-origin: left center;
    z-index: -1;
    height: 32px;
    opacity: 0.9;
    pointer-events: none;
    translate: 0 -50%;
  }

  /*#endregion */

  /*#region FEATURES */
  .feature {
    padding: 1rem;
  }
  /*#endregion */

  .header-abbonamenti {
    padding: 20px;
  }

  .header-abbonamenti h2 {
    font-size: 48px;
    padding-bottom: 25px;
  }

  .header-abbonamenti a {
    background: #004aad;
    max-width: 350px;
  }

  .header-abbonamenti a:hover {
    opacity: 0.9;
  }

  .header-abbonamenti a p {
    color: white;
    font-size: 20px;
    padding: 5px;
  }

  .header-abbonamenti a img {
    width: 20%;
    margin-left: 5px;
  }

  /*#region abbonamenti */
  .pricing h2 {
    font-size: 32px;
  }

  .pricing p.subtitle {
    font-size: 1.2rem;
  }

  .plans-container {
    flex-direction: column;
    align-items: center;
  }

  .plan {
    max-width: 80%;
  }

  .plan-1-description,
  .plan p.description {
    font-size: 0.9rem;
  }

  .plan .price {
    font-size: 1.3rem;
  }
  /*#endregion */

  /*#region ACCORDION */
  .accordion-container {
    width: 95%;
  }

  .accordion-header {
    font-size: 0.95rem;
  }

  .accordion-header::after {
    font-size: 1.1rem;
  }

  .accordion-content {
    font-size: 0.9rem;
    padding: 0 0.8rem;
  }

  .accordion-item.active .accordion-content {
    padding: 0.8rem;
  }
  /*#endregion */

  /*#region NEWSLETTER */
  .newsletter-section {
    padding: 40px 5%;
    text-align: center;
  }

  .email-input-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .email-input-wrapper input,
  .email-input-wrapper button {
    max-width: 400px;
    width: 100%;
    font-size: 18px;
    padding: 12px 16px;
    margin-left: 0px !important;
  }

  .newsletter-section h2 {
    font-size: 28px;
  }

  .newsletter-section p {
    font-size: 1rem;
  }

  .checkbox-wrapper {
    flex-direction: row;
    align-items: center;
    font-size: 0.9rem;
  }
  /*#endregion */

  /*#region TESTIMONIALS */
  .testimonials-grid {
    gap: 20px;
    padding: 20px;
  }

  .testimonial-carousel {
    position: relative;
    width: 90vw;
    height: 50vh;
    min-height: 490px;
    max-width: 100vw;
    margin: auto; /* impedisce overflow orizzontale */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .video-mock {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 480px;
    width: 80vw; /* mantiene proporzioni video */
    max-height: 80vh;
    transform-style: preserve-3d;
    transition: transform 0.7s ease, opacity 0.7s ease;
    opacity: 0.5;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* disabilita click se non attivo */
  }

  .video-mock video {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    object-fit: contain;
  }

  /* Stato attivo: al centro, sopra */
  .video-mock.active {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(0) scale(1);
    z-index: 3;
    pointer-events: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }

  /* Precedente: spostato a sinistra, ruotato */
  .video-mock.prev {
    opacity: 0.7;
    transform: translate(calc(-60%), -50%) translateZ(-150px) scale(0.7)
      rotateY(30deg);
    z-index: 2;
  }

  /* Successivo: spostato a destra, ruotato */
  .video-mock.next {
    opacity: 0.7;
    transform: translate(calc(-40%), -50%) translateZ(-150px) scale(0.7)
      rotateY(-30deg);
    z-index: 2;
  }

  .t-arrow-left {
    left: -1.3rem;
  }

  .t-arrow-right {
    right: -1.3rem;
  }

  /*#endregion */

  .contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .contact-form-input-wrapper {
    display: flex;
    flex-direction: column;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .logo img {
    width: 150px;
  }
  nav.nav-links {
    top: 85px;
  }

  .legal {
    padding: 0 10px;
  }
  .legal h1 {
    font-size: 1.8rem;
  }
  .legal h2 {
    font-size: 1.4rem;
  }
  .legal p,
  .legal ul {
    font-size: 0.9rem;
  }
}

@media (max-width: 500px) {
  .carousel-slide {
    padding: 5px;
    font-size: 14px;
  }

  .carousel-button {
    padding: 6px 8px;
    font-size: 12px;
  }
}
body.legal-document main[hidden],
body.legal-document footer[hidden],
body.legal-document #modal[hidden] {
  display: none !important;
}

body.legal-document {
  background: #f8fafc;
  color: #0f172a;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.legal-document .legal {
  width: min(calc(100% - 32px), 920px);
  margin: 40px auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: clamp(24px, 5vw, 56px);
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body.legal-document .legal table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.legal-document .legal th,
body.legal-document .legal td {
  min-width: 130px;
  vertical-align: top;
}

body.legal-document .legal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}

body.legal-document .legal-back-link,
body.legal-document .legal-manage-link {
  display: inline-flex;
  color: #005cd6;
  font-weight: 700;
  text-decoration: none;
}
