/* ⚙️ REGOLE FONDAMENTALI ORIGINALI */
a {
  text-decoration: none;
  color: black;
}

a:hover, a:visited {
  text-decoration: none;
  color: black;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Times New Roman", Times, serif; 
  font-weight: normal; 
  background-color: white; 
  font-size: 15px;
  line-height: 18px; 
  color: black;
  text-align: center;
   
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.homepage {
    overflow: hidden;
    padding-top: 0;
}

::selection {
    background: #FFFF00; 
    color: black;
}
::-moz-selection { 
    background: #FFFF00;
    color: black;
}

/* ------------------------------------- */
/* 🔝 HEADER FISSO (CLASSE .footer1) */
/* ------------------------------------- */

.footer1 {
  position: fixed;
  top: 0;
  left: 0;
  right: 0; 
   
  display: flex;
  justify-content: space-between; 
  align-items: flex-start; 
   
  padding: 8px 10px 10px 10px; 
  margin: 0; 
   
  background-color: transparent; 
  z-index: 1000;
  color: white; 
  mix-blend-mode: difference; 
   
  font-weight: normal;
  font-size: inherit;
  font-family: inherit;
}

.footer1 a {
    color: white;
    mix-blend-mode: difference;
    text-decoration: none;
}

/* Style specifico per il link header (incluso About sottolineato) */
.header-link {
    color: inherit; 
    text-decoration: none;
}

/* Assicura che il tag u erediti correttamente il colore per mix-blend-mode */
.header-link u {
    text-decoration: underline;
    text-decoration-thickness: 1px; /* Opzionale: spessore linea fine */
}

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

/* ------------------------------------- */
/* 🎞️ REGOLE GALLERIA SCORREVOLE */
/* ------------------------------------- */

.gallery-container {
  overflow-x: auto; 
  overflow-y: hidden;
  display: block;
}

.gallery-container.fullscreen {
  width: 100vw; 
  height: 100vh; 
  margin: 0;
}

.image-wrapper {
  display: flex; 
  height: 100%;
  white-space: nowrap;
}

.image-slide {
  flex-shrink: 0; 
  height: 100%;
  margin-right: 0; 
  position: relative; 
}

.image-slide img,
.image-slide video {
  height: 100%; 
  width: auto;
  display: block;
}

/* Il cursore "mano" appare solo su desktop */
@media (hover: hover) {
    .video-toggle {
        cursor: pointer;
    }
}

/* ✨ MODIFICA: Regola NUCLEARE per nascondere il tasto play di iOS */
*::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.video-toggle::-webkit-media-controls {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Overlay trasparente (invisibile su desktop) */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; 
    display: none; 
}


.caption {
  position: absolute;
  bottom: 30px; 
  left: 10px; 
   
  color: white;
  mix-blend-mode: difference;
  z-index: 10; 
   
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ------------------------------------- */
/* 👥 REGOLE SEZIONE INFO (Pagina about.html) */
/* ------------------------------------- */

.clients {
  padding-top: 140px; 
  padding-bottom: 70px; 
   
  padding-left: 10px;
  padding-right: 10px;
   
  margin-left: 0; 
  margin-right: 0; 
   
  text-align: left; 
  display: flex; 
  justify-content: space-between; 
  gap: 40px; 
  max-width: none; 

  color: white; 
  mix-blend-mode: difference;
}

.clients a {
    color: white;
    mix-blend-mode: difference;
}

.clients > div {
    flex-basis: 33.33%;
    flex-grow: 1;
    flex-shrink: 1;
    text-wrap: balance;
    hyphens: auto; 
}

.clients .colonna3 br:first-child {
    display: none;
}

/* ------------------------------------- */
/* 📱 REGOLE MEDIA QUERY (MOBILE) */
/* ------------------------------------- */

@media screen and (max-width: 840px) {
   
  body.homepage {
      padding-top: 0;
  }

  .footer1 {
    flex-direction: column; 
    align-items: flex-start;
    padding: 8px 10px;
  }

  .header-right {
    text-align: left;
    margin-top: 10px; /* Spazio tra blocco nomi e blocco orologio/about */
  }
   
  .gallery-container.fullscreen {
      height: 100vh;
  }
   
  .caption {
      bottom: 30px; 
      left: 10px;
  }
   
  /* Video ignora tocchi, Overlay li cattura */
  .video-toggle {
      pointer-events: none;
      z-index: 1; 
  }
  .video-overlay {
      display: block; 
      z-index: 2;
  }

  .clients {
      flex-direction: column; 
      gap: 30px; 
       
      padding-left: 10px;
      padding-right: 10px;
      max-width: none;
      padding-top: 170px; 
      margin-left: 0;
      margin-right: 0;
  }
   
  .clients > div {
      flex-basis: auto;
  }
}
