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

@font-face {
  font-family: 'Mio Font';  /* Nome del font che userai nel CSS */
  src: url('fonts/helveticaneue.woff2') format('woff2');  /* Percorso del file .woff2 */
  font-weight: normal;  /* Se il font è "normale" o se hai altre varianti come bold, italic, etc. */
  font-style: normal;  /* Stile del font (es. italic, oblique, etc.) */
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Mio Font', sans-serif;  /* Usa il tuo font personalizzato */
  color: white;
  display: flex;
  flex-direction: column;
}

body {
  background: url('images/sfondi_dissolvenza/sfondo1.jpg') no-repeat center center fixed; /* Sfondo di default per tutte le pagine */
  background-size: cover;
  display: flex;
  flex-direction: column;
  /* Applica un effetto di dissolvenza sulla body */
  transition: opacity 1s ease-in-out;
  opacity: 1; /* Impostiamo l'opacità a 1 inizialmente. Per fare fade-in deve partire da 0 */
}

/* Quando viene aggiunta la classe 'fade-in' la pagina diventa visibile */
body.fade-in {
  opacity: 1; /* L'opacità rimane a 1 quando la classe fade-in è attiva */
}

/* Quando la classe fade-in è rimossa, la pagina diventa invisibile */
body.fade-out {
  opacity: 0; /* La pagina diventa invisibile durante la dissolvenza in uscita */
}

.ti_devo_menare {
  background: url('images/sfondi_specifici/sfondo_ti_devo_menare.jpg') no-repeat center center fixed; /* Sfondo specifico per contatti */
  background-size: cover;
}

.manfatti {
  background: url('images/sfondi_specifici/sfondo_manfatti.JPG') no-repeat center center fixed; /* Sfondo specifico per contatti */
  background-size: cover;
}

.coattixparigi95 {
  background: url('images/sfondi_specifici/sfondo_coattixparigi95.JPG') no-repeat center center fixed; /* Sfondo specifico per contatti */
  background-size: cover;
}

.anestetici {
  background: url('images/sfondi_specifici/sfondo_anestetici.JPG') no-repeat center center fixed; /* Sfondo specifico per contatti */
  background-size: cover;
}

.contatti {
  background: url('images/sfondi_specifici/sfondo_contatti.jpg') no-repeat center center fixed; /* Sfondo specifico per contatti */
  background-size: cover;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 6rem; /* Distanza dal top come prima */
  margin-left: 10rem; /* Distanza dalla sinistra */
  margin-right: 10rem; /* Aggiunto margine a destra */
  flex-grow: 1; /* Questo permette alla container di occupare tutto lo spazio disponibile */
}

.top-container {
  display: flex;
  align-items: center;
  gap: 1rem; /* Spazio tra freccia e testo */
}

.top {
  font-size: 3rem; 
  font-weight: bold;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  font-size: 1.91rem; /* Ridotto del 15% rispetto al precedente */
}

.menu a {
  font-size: 1.8rem; /* Ridotto del 15% rispetto al precedente */
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.menu a:hover {
  opacity: 0.7;
}

.testo {
  font-size: 1.125rem; /* Dimensione del testo ridotta (metà rispetto a quella di "Videoclip") */
  font-weight: normal;
  line-height: 1.5; /* Aggiunto per migliorare la leggibilità */
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.testo a {
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 1.5;
  color: white;
  text-decoration: none;
}

.testo a:hover {
  opacity: 0.7;
}

footer {
  background-color: rgba(0, 0, 0, 0.5); /* Sfondo trasparente per il footer */
  color: white;
  text-align: center;
  padding: 1rem;
  width: 100%;
  margin-top: auto; /* Garantisce che il footer si sposti sempre in basso */
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.left-socials {
  align-items: flex-start; /* Allinea l'icona a sinistra */
  margin-left: 0; /* Puoi regolare questo valore per posizionarla meglio */
}

.social-icon {
  width: 50px;
  height: 50px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1); /* Effetto ingrandimento al passaggio del mouse */
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.icon-left {
  width: 28px;
  height: 28px;
}

.link {
  font-size: 1.91rem; /* Ridotto del 15% rispetto al precedente */
  color: white;
  text-decoration: none;
}

.link:hover {
  opacity: 0.7;
}

.contact-link {
  color: white;
  text-decoration: none;
  font-size: 1.125rem;
}

.contact-link:hover {
  opacity: 0.7;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 800px; /* Limite massimo su schermi grandi */
  margin: 1rem auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Freccia (back-link) */
.back-link {
  color: white; /* Impostiamo il colore bianco */
  text-decoration: none; /* Rimuoviamo la sottolineatura */
  font-size: 2.13rem; /* Ridotto del 15% rispetto alla versione precedente di 2.5rem */
}

.back-link:hover {
  opacity: 0.7; /* Effetto al passaggio del mouse */
}

@media (max-width: 768px) {
  .container {
    margin-left: 1.5rem;
    margin-right: 1.5rem; /* Aggiunto margine a destra anche su mobile */
    margin-top: 2rem;
    gap: 2rem;
  }
  
  .top {
    font-size: 2rem;
  }
  
  .menu {
    font-size: 1.5rem;
    gap: 1.2rem;
  }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6rem 10rem 2rem 10rem; /* stessa distanza margini laterali */
}

/* Posizionamento e stile del selettore lingua */
.language-switch {
  position: absolute;
  top: 6rem;
  right: 10rem;
  font-size: 2rem;
  z-index: 10;
  display: flex;
  gap: 0.4rem;
}

.language-switch .lang {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.language-switch .lang:hover {
  opacity: 1;
  text-decoration: none;
}

.language-switch .lang.active {
  font-weight: bold;
  text-decoration: none;
  opacity: 1;
}

@media (max-width: 768px) {
  .language-switch {
    top: 2.5rem;
    right: 1rem;
    font-size: 1rem;
  }
}