/* stili body */
body{
background-attachment:fixed;
background-image:url('../../sfaranc.gif');
background-repeat: repeat;
background-color:white
}

/* marginini del contatore */
p.contatore {margin: 16px 0;}


p.contatore img{height: 20px!important}


/* riordinamento celle delle tabelle */

/* ==========================================================================
   TABELLA #lazona
   ========================================================================== */

/* Riga 1 - Intestazioni della Tabella 1 */
#lazona tr:nth-child(1) td:nth-child(1) { order: 1; } 
#lazona tr:nth-child(1) td:nth-child(2) { order: 3; } 

/* Riga 2 - Contenuti della Tabella 1 */
#lazona tr:nth-child(2) td:nth-child(1) { order: 2; } 
#lazona tr:nth-child(2) td:nth-child(2) { order: 4; } 

#lazona tr:nth-child(3) td:nth-child(1) { order: 5; } 
#lazona tr:nth-child(4) td:nth-child(1) { order: 6; } 

#lazona tr:nth-child(5) td:nth-child(1) { order: 7; } 
#lazona tr:nth-child(5) td:nth-child(2) { order: 9; } 

#lazona tr:nth-child(6) td:nth-child(1) { order: 8; } 
#lazona tr:nth-child(6) td:nth-child(2) { order: 10; }
#lazona tr:nth-child(6) td:nth-child(3) { order: 11; }

/* ==========================================================================
   TABELLA #approfondimenti
   ========================================================================== */

/* Riga 1 - Intestazioni della Tabella 1 */
#approfondimenti tr:nth-child(1) td:nth-child(1) { order: 1; } /* Intestazione 4 */
#approfondimenti tr:nth-child(1) td:nth-child(2) { order: 3; } /* Intestazione 5 */

/* Riga 2 - Contenuti della Tabella 1 */
#approfondimenti tr:nth-child(2) td:nth-child(1) { order: 2; } /* Contenuto 4 */
#approfondimenti tr:nth-child(2) td:nth-child(2) { order: 4; } /* Contenuto 5 parte 1 */
#approfondimenti tr:nth-child(2) td:nth-child(3) { order: 5; } /* Contenuto 5 parte 2 */




/* tabella indice alfabetico in modalità mobile */

@media (max-width: 970px) {
  /* Forziamo la tabella e il corpo a comportarsi come contenitori a larghezza piena */
  #index-az, #index-az tbody {
    display: block!important;
    width: 100% !important;
    height: auto !important;
  }

  /* La prima riga (il titolo) rimane a tutta larghezza */
  #index-az tr:first-child {
    display: block!important;
    width: 100%!important;
  }
  #index-az tr:first-child td {
    display: block!important;
    width: 100% !important;
  }

  /* Trasformiamo le righe successive in contenitori Flexbox che vanno a capo */
  #index-az tr:not(:first-child) {
    display: flex!important;
    flex-wrap: wrap!important;
    width: 100%!important;
    height: auto !important;
  }

  /* Ogni cella occuperà esattamente un quarto della riga (il 25%) */
  #index-az tr:not(:first-child) td:not(.td-full-size) {
    display: block!important;
    box-sizing: border-box!important;
    width: 25% !important; 
    height: auto !important;
    text-align: center!important; /* Opzionale: centra il testo per un look migliore */
  }
}


/* indice alfabetico cinema d'animazione */

@media (max-width: 970px) {
  /* Forziamo la tabella e il corpo a comportarsi come contenitori a larghezza piena */
  #index-az-ca, #index-az-ca tbody {
    display: block!important;
    width: 100% !important;
    height: auto !important;
  }

  /* La prima riga (il titolo) rimane a tutta larghezza */
  #index-az-ca tr:first-child {
    display: block!important;
    width: 100%!important;
  }
  #index-az-ca tr:first-child td {
    display: block!important;
    width: 100% !important;
  }

  /* Trasformiamo le righe successive in contenitori Flexbox che vanno a capo */
  #index-az-ca tr:not(:first-child) {
    display: flex!important;
    flex-wrap: wrap!important;
    width: 100%!important;
    height: auto !important;
  }

  /* Ogni cella occuperà esattamente un terzo della riga (circa il 33.33%) */
  #index-az-ca tr:not(:first-child) td:not(.td-full-size) {
    display: block!important;
    box-sizing: border-box!important;
    width: 33.33% !important; 
    height: auto !important;
    text-align: center!important; /* Opzionale: centra il testo per un look migliore */
  }
  
  
}




