/* ================================================================= 
   CSS SPECIFICO PER LA PAGINA DOCUMENTI (DESKTOP DEFAULT)
   ================================================================= */
.documenti-container {
   position: relative;
   width: 980px;
   margin: 0 auto;
   min-height: 1200px;
}

#bv_Text6 { margin: 0; padding: 0; position: absolute; left: 141px; top: 75px; width: 633px; height: 26px; z-index: 6; }
#bv_Text6 span { color: #000000; font-family: 'Calibri Light', sans-serif; font-size: 21px; }

#bv_Text11 { margin: 0; padding: 0; position: absolute; left: 268px; top: 176px; width: 230px; height: 34px; z-index: 8; }
#bv_Image1  { margin: 0; padding: 0; position: absolute; left: 269px; top: 216px; width: 158px; height: 159px; z-index: 7; }
#bv_Image1 img { width: 158px; height: 159px; border: 0; }

#bv_Text2  { margin: 0; padding: 0; position: absolute; left: 562px; top: 176px; width: 220px; height: 134px; z-index: 10; }
#bv_Image3 { margin: 0; padding: 0; position: absolute; left: 562px; top: 214px; width: 200px; height: 142px; z-index: 9; }
#bv_Image3 img { width: 200px; height: 142px; border: 0; }

#bv_Text9  { margin: 0; padding: 0; position: absolute; left: 872px; top: 177px; width: 279px; height: 19px; z-index: 18; }
#bv_Image4 { margin: 0; padding: 0; position: absolute; left: 872px; top: 215px; width: 133px; height: 160px; z-index: 19; }
#bv_Image4 img { width: 133px; height: 160px; border: 0; }
#bv_Image5 { margin: 0; padding: 0; position: absolute; left: 916px; top: 216px; width: 133px; height: 160px; z-index: 20; }
#bv_Image5 img { width: 133px; height: 160px; border: 0; }

#bv_Text10 { margin: 0; padding: 0; position: absolute; left: 274px; top: 423px; width: 268px; height: 38px; z-index: 21; }
#bv_Image6 { margin: 0; padding: 0; position: absolute; left: 277px; top: 478px; width: 149px; height: 211px; z-index: 22; }
#bv_Image6 img { width: 149px; height: 211px; border: 0; }

#bv_Text13 { margin: 0; padding: 0; position: absolute; left: 589px; top: 425px; width: 181px; height: 19px; z-index: 29; }
#bv_Image7 { margin: 0; padding: 0; position: absolute; left: 590px; top: 467px; width: 146px; height: 110px; z-index: 30; }
#bv_Image7 img { width: 146px; height: 110px; border: 0; }
#bv_Image14 { margin: 0; padding: 0; position: absolute; left: 745px; top: 467px; width: 146px; height: 110px; z-index: 32; }
#bv_Image14 img { width: 146px; height: 110px; border: 0; }
#bv_Image13 { margin: 0; padding: 0; position: absolute; left: 901px; top: 467px; width: 146px; height: 110px; z-index: 31; }
#bv_Image13 img { width: 146px; height: 110px; border: 0; }

#bv_Text12 { margin: 0; padding: 0; position: absolute; left: 694px; top: 693px; width: 257px; height: 19px; z-index: 27; }
#bv_Image9 { margin: 0; padding: 0; position: absolute; left: 692px; top: 731px; width: 198px; height: 118px; z-index: 24; }
#bv_Image9 img { width: 198px; height: 118px; border: 0; }
#bv_Image12 { margin: 0; padding: 0; position: absolute; left: 898px; top: 730px; width: 137px; height: 174px; z-index: 28; }
#bv_Image12 img { width: 137px; height: 174px; border: 1px #000000 solid; }

#bv_Image8  { margin: 0; padding: 0; position: absolute; left: 480px; top: 855px; width: 133px; height: 133px; z-index: 23; }
#bv_Image8 img { width: 133px; height: 133px; border: 0; }
#bv_Image10 { margin: 0; padding: 0; position: absolute; left: 618px; top: 854px; width: 133px; height: 133px; z-index: 25; }
#bv_Image10 img { width: 133px; height: 133px; border: 0; }
#bv_Image11 { margin: 0; padding: 0; position: absolute; left: 757px; top: 855px; width: 133px; height: 133px; z-index: 26; }
#bv_Image11 img { width: 133px; height: 133px; border: 0; }

#bv_Text15 { margin: 0; padding: 0; position: absolute; left: 274px; top: 670px; width: 268px; height: 38px; z-index: 21; }
#bv_Image15 { margin: 0; padding: 0; position: absolute; left: 274px; top: 725px; width: 149px; height: 211px; z-index: 22; }
#bv_Image15 img { width: 250px; height: auto; border: 0; }

#bv_Text16 { margin: 0; padding: 0; position: absolute; left: 274px; top: 915px; width: 268px; height: 38px; z-index: 21; }
#bv_Image16 { margin: 0; padding: 0; position: absolute; left: 274px; top: 975px; width: 149px; height: 211px; z-index: 22; }
#bv_Image16 img { width: 220px; height: auto; border: 0; }


/* =================================================================
   RESPONSIVE DESIGN PER TABLET E SMARTPHONE (<= 1199px)
   Il layout desktop a posizionamento assoluto occupa circa 1050-1150px
   di larghezza: sotto i 1200px viene sostituito da un flusso fluido.
   Ogni titolo (bv_Text*) occupa una riga intera, le immagini/anteprime
   (bv_Image*) vanno a capo in file affiancate sotto il proprio titolo.
   ================================================================= */
@media (max-width: 1199px) {
   .documenti-container {
      position: relative !important;
      width: 100% !important;
      max-width: 1000px;
      height: auto !important;
      min-height: 0 !important;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: flex-start;
      gap: 20px;
      padding: 20px 15px;
      margin: 0 auto;
   }

   /* Annulla top/left/width/height fissi e gli z-index del layout assoluto */
   .documenti-container > div {
      position: relative !important;
      top: auto !important;
      left: auto !important;
      width: auto !important;
      height: auto !important;
      margin: 0 !important;
      z-index: auto !important;
      max-width: 100%;
   }

   /* Titoli: una riga intera, con filetto di separazione */
   .documenti-container > [id^="bv_Text"] {
      flex: 0 0 100%;
      width: 100% !important;
      text-align: left;
      padding-top: 12px;
      border-top: 1px solid #dee2e6;
      line-height: 1.4;
   }

   /* Anteprime: file affiancate che vanno a capo */
   .documenti-container > [id^="bv_Image"] {
      flex: 0 1 180px;
      text-align: center;
   }

   .documenti-container > [id^="bv_Image"] a {
      display: block;
      color: #0056b3;
      text-decoration: none;
      line-height: 1.3;
   }

   .documenti-container img {
      display: block;
      width: 100% !important;
      max-width: 100% !important;
      height: auto !important;
      object-fit: contain;
      margin: 0 auto 6px;
   }
}

@media (max-width: 768px) {
   .documenti-container {
      gap: 16px;
      padding: 15px 12px;
   }
}

@media (max-width: 600px) {
   /* Due anteprime per riga */
   .documenti-container > [id^="bv_Image"] {
      flex: 0 1 calc(50% - 8px);
   }

   /* Documenti singoli: una sola anteprima, piu' grande e centrata */
   #bv_Image1, #bv_Image3, #bv_Image6, #bv_Image15, #bv_Image16 {
      flex: 0 1 min(100%, 280px);
   }
}
