/* RESET UNIVERSALE IMMAGINI E VIDEO */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   REGOLE RESPONSIVE SMARTPHONE E TABLET (Sotto i 960px)
   Questo blocco annulla automaticamente tutti gli overflow: hidden
   e le altezze fisse (30vh, 700px, 100vh) presenti negli HTML.
========================================================= */
@media screen and (max-width: 960px) {

  /* 1. Sblocco generale di pagina e contenitori */
  html, body, .container, .main, .colonna {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: auto !important;
  }

  /* 2. Header e Pannello controlli */
  .header, .pannello {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .header img {
    max-height: 80px !important;
    width: auto !important;
  }

  .pannello {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 3. Layout principale: le colonne scendono in verticale */
  .main {
    display: flex !important;
    flex-direction: column !important;
  }

  .colonna, .sinistra, .centro, .destra {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    float: none !important;
    margin-bottom: 20px;
  }

  /* 4. Box del testo */
  #box-testo {
    height: auto !important;
    max-height: 350px !important;
    overflow-y: auto !important;
  }
}