:root {
  /* Palette di colori sobria */
  --primary: #4a9fee;
  --primary-light: #6db5f8;
  --primary-dark: #2c6ca0;
  --accent: #f0f0f0;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-light: rgba(255, 255, 255, 0.9);
  --bg-dark: rgba(44, 62, 80, 0.85);
  --border-light: rgba(255, 255, 255, 0.2);
  
  /* Dimensioni e spaziature */
  --border-radius-lg: 20px;
  --border-radius-md: 15px;
  --border-radius-sm: 10px;
  --spacing-xl: 40px;
  --spacing-lg: 30px;
  --spacing-md: 20px;
  --spacing-sm: 10px;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  padding: 30px 0;
  justify-content: center;
  align-items: center;
  background-color: var(--text-dark);
}

.back-vid {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  filter: brightness(0.6);
}

@media (max-aspect-ratio: 16/9) {
  .back-vid {
    width: auto;
    height: 100%;
  }
}

@media (min-aspect-ratio: 16/9) {
  .back-vid {
    width: 100%;
    height: auto;
  }
}

.main-section {
  width: 90%;
  height: 90%;
  background-color: var(--bg-dark);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow-y: auto; /* Ripristinata la barra di scorrimento */
  border: 1px solid var(--border-light);
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Barra di navigazione */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  flex-wrap: wrap;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-dark);
}

nav h1 {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 30px;
  font-weight: 700;
  position: relative;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav li {
  position: relative;
  margin: 0 5px;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 30px;
  display: inline-block;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

nav a:hover::before,
.attivo::before {
  opacity: 1;
  transform: scale(1);
}

nav a:hover,
.attivo {
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

nav a i {
  margin-right: 8px;
  font-size: 14px;
}

.hero {
  display: flex;
  align-items: center;
  padding: 0 10%;
  color: var(--text-light);
  justify-content: space-between;
  flex-wrap: wrap;
  overflow-y: visible; /* Cambiato da auto a visible per evitare la barra di scorrimento */
  margin-bottom: 20px;
  flex: 0 0 auto; /* Evita che il hero si espanda oltre la dimensione necessaria */
}

.hero-info {
  flex: 0 0 45%; /* Ridotto per dare più spazio all'immagine */
  max-width: 450px;
}

.hero h1 {
  font-size: 45px; /* Ridotto leggermente */
  margin-bottom: 5px; /* Ridotto */
}

.hero h2 {
  margin-top: 10px; /* Ridotto */
  font-size: 26px; /* Ridotto leggermente */
}

.hero p {
  max-width: 450px;
  margin-top: 10px; /* Ridotto */
  margin-bottom: 15px; /* Ridotto */
  line-height: 1.4; /* Ridotto leggermente */
}

.highlight-text {
  background-image: linear-gradient(to right, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: .15em;
  animation: blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary); }
}

.Buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px; /* Ridotto */
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary);
  border: none;
  border-radius: 40px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 1px;
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
}

.btn i {
  margin-right: 8px;
}

.ul-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.ul-icons li {
  list-style: none;
  margin-left: 10px;
}

.ul-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
  margin: 0 7px;
  transition: all 0.3s ease;
}

.ul-icons a:hover {
  background: var(--primary);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.hero-img {
  width: 320px; /* Ridotto */
  height: 320px; /* Ridotto */
  position: relative;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin: 20px 0 20px auto; /* Spostata a destra */
  border: 3px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto; /* Non si espande */
  margin-left: 40px; /* Spazio aggiuntivo a sinistra */
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translatey(0px);
  }
  50% {
    transform: translatey(-20px);
  }
  100% {
    transform: translatey(0px);
  }
}

.hero-img img {
  position: absolute;
  width: 100%;
  z-index: 2;
  mix-blend-mode: lighten;
}

.hero-shape {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 100px;
  height: 100px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(20px);
  animation: pulse 5s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

.info-sec {
  display: flex;
  width: 100%;
  gap: 15px;
  padding: 10px 10%; /* Ridotto padding */
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0; /* Rimosso margine */
}

.info-card {
  display: flex;
  align-items: center;
  max-width: fit-content;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.1);
}

.info-sec h1 {
  font-size: 40px;
  text-transform: uppercase;
  color: var(--primary);
  margin-right: 15px;
  font-weight: 700;
}

.info-sec p {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 500;
}

/* Timeline Section */
.timeline-section {
  padding: 40px 10%;
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  color: var(--primary);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 45%;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.timeline-item:nth-child(odd) {
  margin-right: auto;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 159, 238, 0.3);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -48px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -48px;
}

.timeline-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.timeline-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.timeline-content p {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* Testimonial Section */
.testimonial-section {
  padding: 40px 10%;
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 30px;
}

.testimonial {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 25px;
  width: calc(50% - 15px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.testimonial:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 60px;
  color: rgba(74, 159, 238, 0.2);
  font-family: serif;
  line-height: 1;
}

.testimonial-text {
  margin-bottom: 20px;
}

.testimonial-text p {
  font-size: 15px;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.author-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.author-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background: var(--primary);
}

/* Ripristino delle barre di scorrimento con stile personalizzato */
::-webkit-scrollbar {
  width: 8px;
  display: block;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Nuova sezione CTA per la home page */
.home-cta {
  margin: 10px auto 30px; /* Ridotto margine superiore */
  padding: 20px; /* Ridotto padding */
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  width: 80%;
  max-width: 800px;
}

.home-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-light);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.home-cta h2 {
  font-size: 1.6rem;
  color: var(--primary-light);
  margin-bottom: 8px; /* Ridotto */
}

.home-cta p {
  color: var(--text-light);
  opacity: 0.9;
  margin-bottom: 15px; /* Ridotto */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  background: var(--primary);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.cta-btn:hover {
  transform: translateY(-3px);
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (min-width: 1220px) {
  body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
}

@media (max-width: 1200px) {
  .hero {
    justify-content: space-between;
  }
  
  .hero-info {
    flex: 0 0 45%;
    max-width: 45%;
  }
  
  .hero-img {
    width: 300px;
    height: 300px;
    margin-left: 20px;
  }
  
  .testimonial-container {
    justify-content: center;
  }
  
  .testimonial {
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 980px) {
  body {
    height: 100vh;
    overflow: hidden;
    padding: 15px 0;
  }
  
  .main-section {
    height: 95%;
  }

  nav {
    padding: 15px;
  }
  
  nav ul {
    width: 100%;
    justify-content: center;
    gap: 5px;
  }
  
  nav a {
    padding: 8px 12px;
    font-size: 15px;
  }

  .hero {
    padding: 10px 5%;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-info {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .hero p {
    margin: 15px auto;
  }
  
  .Buttons {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero h2 {
    font-size: 22px;
  }
  
  .hero p {
    font-size: 15px;
  }
  
  .hero-img {
    margin: 20px auto;
  }
  
  .info-card {
    margin: 5px;
  }
  
  .info-sec h1 {
    font-size: 32px;
  }
  
  .info-sec p {
    font-size: 14px;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 60px;
  }
  
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 22px;
  }
  
  .testimonial {
    width: 100%;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .main-section {
    width: 95%;
    border-radius: var(--border-radius-md);
  }
  
  nav {
    padding: 10px;
  }
  
  nav h1 {
    font-size: 22px;
  }
  
  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
  }
  
  nav li {
    margin: 0 3px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero h2 {
    font-size: 18px;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .hero-img {
    width: 250px;
    height: 250px;
  }
  
  .info-sec {
    flex-direction: column;
    align-items: center;
  }
  
  .info-card {
    margin: 5px 0;
  }
  
  .info-sec h1 {
    font-size: 28px;
  }
  
  .info-sec p {
    font-size: 13px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .timeline-content h3 {
    font-size: 16px;
  }
  
  .timeline-content p {
    font-size: 13px;
  }
  
  .testimonial {
    padding: 20px;
  }
  
  .testimonial-text p {
    font-size: 14px;
  }
  
  .testimonial-img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 440px) {
  .main-section {
    border-radius: var(--border-radius-sm);
    height: 95%;
  }
  
  nav {
    padding: 10px;
  }
  
  nav h1 {
    font-size: 18px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .hero h2 {
    font-size: 16px;
  }
  
  .hero p {
    font-size: 13px;
  }
  
  .btn {
    padding: 8px 15px;
    font-size: 12px;
  }
  
  .hero-img {
    width: 200px;
    height: 200px;
  }
  
  .home-cta {
    margin: 0 5% 30px;
  }
  
  .home-cta h2 {
    font-size: 1.4rem;
  }
}
  .home-cta h2 {
    font-size: 1.4rem;
  }
