/* =========================================================
   1. IMPOSTAZIONI GLOBALI
   ========================================================= */

html {
    width: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}



body {
  width: 95%;
  margin: 0 auto;
  padding: 0;
  background-color: #fff;
  color: #3D3D3D;
  font-family: Verdana, sans-serif;
  line-height: 1.8;
}

/* =========================================================
   2. HEADER, LOGO E TITOLO PRINCIPALE
   ========================================================= */

header {
  position: relative;
  display: flow-root;
  width: 70%;
  height: auto;
  margin-left: 2%;
  padding: 5px;
  text-align: left;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

#titolo {
  margin-top: 0.7%;
  margin-left: 3%;
  font-size: 24px;
}

#logo {
  float: left;
  width: 90px;
  max-width: 25%;
  height: auto;
  margin-top: 0.6%;
  margin-right: 2%;
  padding-right: 2%;
}

#prova {
  display: block;
  width: 95%;
  max-width: auto;
  height: 300px;

}

/* =========================================================
   3. NAVIGAZIONE
   ========================================================= */

#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background-color: #F7D145;
  padding: 9px;
  
}

.navbar {
  margin-left: 2%;
}

.navbargrigio {
  margin-left: 3%;
}

.navigazione {
  display: inline-block;
}






/* Menu hamburger: nascosto su desktop */
.hamburger {
  display: none;
  position: absolute;
  top: 3px;
  left:75%;
  z-index: 10001;
  padding: 15px;
  border: none;
  background: none;
  color: #3D3D3D;
  font-size: 30px;
  cursor: pointer;
  
}

/* =========================================================
   4. TESTI, TITOLI E SEZIONI
   ========================================================= */

h1 {
  color: #4A4A4A;
  font-size: 37pt;
  line-height: 1.3;
  overflow-wrap: break-word;
}

h2 {
  color: #4A4A4A;
  font-size: 14pt;
}

.comunicato {
  color: #4A4A4A;
  font-size: 24pt;
}

.section1 {
  width: 43%;
}

#section1 {
  margin-top: 5%;
}

/* Titolo "CHI SIAMO" identificato dall'ID section2 */
#section2 {
  max-width: 100%;
  overflow-wrap: break-word;
}

.sottotitolo {
  margin-top: 3%;
  margin-bottom: 3%;
}

#sottotitolo {
  width: 50%;
  max-width: 100%;
  margin-top: 3%;
  margin-bottom: 3%;
}

main {
  width: 95%;
  margin-left: 5%;
  text-align: left;
}

#paragrafo {
  float: right;
  max-width: 100%;
  height: auto;
  margin-right: 9%;
  padding-top: 3%;
}

/* =========================================================
   5. IMMAGINI E CONTENUTI MULTIMEDIALI
   ========================================================= */

.responsive,
#europa {
  max-width: 100%;
  height: auto;
}

#europa {
  margin-top: 10px;
}

/* =========================================================
   6. ARTICOLI E CITAZIONI
   ========================================================= */

.article {
  width: 77%;
  max-width: 100%;
  margin-top: 5%;
  margin-left: 4%;
  padding: 2%;
  background-color: #EFEFEF;
}

.articolo {
  max-width: 100%;
}

blockquote {
  max-width: 100%;
}

/* =========================================================
   7. SEZIONE 7
   ========================================================= */

#section7 {
  padding-top: 2%;
  padding-bottom: 2%;
}

/* =========================================================
   8. LINK E PULSANTI
   ========================================================= */

a:link {
  margin-right: 3%;
  color: #3D3D3D;
}

button {
  padding: 10px;
  border: none;
  border-radius: 4px;
  background-color: #3D3D3D;
  color: #fff;
  font-family: Verdana, sans-serif;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #F7D145;
  color: #3D3D3D;
  transition: none;
  transform: none;
}

button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  background-color: #F7D145;
  color: #3D3D3D;
  transform: none;
}

#showInstructionsBtn {
  margin-right: 3%;
  margin-left: 3%;
}

/* Collegamento per saltare direttamente al contenuto */
.skip {
  position: absolute;
  top: -40px;
  left: 10px;
  z-index: 1000;
  overflow: hidden;
  padding: 10px;
  border-radius: 5px;
  font-family: Verdana, sans-serif;
  font-size: 14px;
}

.skip:focus {
  position: fixed;
  top: 10px;
  background-color: #F6CB30;
  color: #3D3D3D;
  padding: 15px;
}

/* =========================================================
   9. PANNELLO DELLE ISTRUZIONI ACCESSIBILI
   ========================================================= */

.hidden {
  display: none;
}

#instructions {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10002;
  width: 70%;
  max-width: 700px;
  max-height: 85vh;
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 5%;
  border-radius: 10px;
  background-color: #000;
  color: #fff;
  text-align: left;
  line-height: 1.5;
}

/* =========================================================
   10. BARRA DI AVANZAMENTO DELLA LETTURA
   ========================================================= */

#progressbarlettura {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0;
  height: 9px;
  background-color: #F7D145;
  transition: width 0.2s ease-in-out;
}

/* =========================================================
   11. MODULO GOOGLE
   ========================================================= */

.google-form-container {
  position: relative;
  width: 100%;
  padding-top: 100%;
}

.google-form-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================================
   12. BOX INFORMATIVI
   ========================================================= */

.info-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 89%;
  max-width: 1200px;
  margin-top: 5%;
  margin-bottom: 5%;
}

.info-box,
.info-box1 {
  flex: 1;
  padding: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.info-box {
  background-color: #F7D145;
  font-weight: bold;
}

.info-box1 {
  background-color: #3D3D3D;
  color: #fff;
   font-weight: bold;
 
}
.info-box1 h2 {
  margin-bottom: 0.75rem;
  color: #F7D145;;
  font-size: 1.25rem;
}

.info-box h2 {
  margin-bottom: 0.75rem;
  color: #0056b3;
  font-size: 1.25rem;
}

.info-box p {
  color: #333;
  font-size: 1rem;
}

/* =========================================================
   1 link si e no
   ========================================================= */
/* Quando il pulsante è attivo, sottolinea tutti i link */
body.link-sottolineati-tools a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
}

/* Quando il pulsante è disattivato, rimuove
   la sottolineatura dai link della navigazione */
body:not(.link-sottolineati-tools) nav.navbar a {
    text-decoration: none !important;
}


/* =========================================================
   13. FOOTER
   ========================================================= */

footer {
  width: 100%;
  padding-bottom: 5%;
  background-color: #333;
  color: #fff;
  text-align: center;
  font-size: 1.15rem;
}

footer p {
  margin: 0;
}

/* =========================================================
   14. PULSANTE "TORNA SU"
   ========================================================= */

#myBtn {
  display: none;
  position: fixed;
  right: 3%;
  bottom: 35px;
  z-index: 99;
  padding: 15px;
  border: none;
  border-radius: 4px;
  outline: none;
  background-color: red;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* =========================================================
   15. TABLET E SCHERMI PICCOLI
   ========================================================= */

@media screen and (max-width: 768px) {
  body {
    width: 100%;
    padding-right: 4%;
    padding-left: 4%;
  }

  header {
    width: 100%;
    margin-left: 0;
  }

  #titolo {
    margin-left: 0;
    padding-right: 50px;
    font-size: clamp(18px, 4vw, 24px);
  }

  #logo {
    width: 50px;
	max-width:25%;
    height: auto;
  }
 #prova {
    width: 100%;
	margin-left: 0;

  }

  #accessibility-toolbar button.tools:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 4px;
}

  /* Nasconde il menu orizzontale finché non viene aperto */
  #navbar {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  #navbar.active {
    display: flex;
  }

  .hamburger {
    display: block;
    background: none;
    color: #3D3D3D;
	
  }

  .navbar,
  .navbargrigio {
    margin-left: 0;
  }

  .section1,
  #sottotitolo {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  #section2 {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    font-size: clamp(24px, 6vw, 37pt);
  }

  h1 {
    font-size: clamp(24px, 6vw, 37pt);
  }

  .comunicato {
    font-size: clamp(18px, 4.5vw, 24pt);
  }

  main {
    width: 100%;
    margin-left: 0;
  }

  #paragrafo {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-top: 3%;
  }

  .article,
  .articolo {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 4%;
  }

  #instructions {
    width: 92%;
    max-width: none;
    max-height: 90vh;
    padding: 6%;
    text-align: left;
  }

  hr {
    display: none;
  }



  blockquote {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    font-style: normal;
  }

  .navigazione {
    display: inline-block;
  }

  .info-container {
    width: 100%;
  }

  .info-box,
  .info-box1 {
    padding: 1rem;
  }

  footer {
    font-size: 1rem;
  }
}

/* Box affiancati su schermi più larghi */
@media screen and (min-width: 769px) {
  .info-container {
    flex-direction: row;
  }
}
