body {
  font-family: 'Montserrat';
}

.bslib-page-navbar>.navbar {
  --bslib-navbar-default-bg: #f5f5f5 !important;
  border-bottom: var(--bs-border-width) solid var(--bs-border-color-translucent);
  background-image: 
    repeating-linear-gradient(
      45deg, 
      rgba(255, 255, 255, 0.1), 
      rgba(255, 255, 255, 0.1) 2px, 
      rgba(94, 129, 172, 0.05) 136px, 
      rgba(94, 129, 172, 0.05) 4px
    ), 
    linear-gradient(to bottom, #f5f5f5, #e5e5e5);
}

.navbar {
  padding-left: 0px;
  padding-right: 0px;
  
}



.navbar-header {
  width: -webkit-fill-available;
  }



.tab-content > .tab-pane {
min-height: calc(100vh - 126px);
margin-bottom: 1rem !important;
}

.footer {
  padding: 0 12px;
  margin: 0 -12px;
  height: 30px;
  line-height: 25px;
  display:flex; 
  align-items: center;
  justify-content: space-between;
  background-color: #f5f5f5;
    /*border-top: var(--bs-border-width) solid var(--bs-border-color-translucent);*/
    border-top: var(--bs-border-width) solid #cccccc;
}


#main_tab > li a {
display:none;
}

/*#main_tab > li a {*/
  /*visibility: hidden;*/ 
  /*}*/
  
  .box { 
    margin-left: -12px; margin-right: -12px;
    background-image: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0.2)), url(pic-lab.png);
    height: 250px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: -20px;
    border-bottom: var(--bs-border-width) solid #cccccc;
  }


.box_text { 
  cursor: default;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  color: #364652; /*#283067;*/
  line-height: 25px;
  text-shadow: 0px 0px 20px #fff, 0px 0px 20px #fff, 2px 2px 0 lightslategrey;
  padding: 1rem;
}

.box_text p { 
  line-height: 35px;
  letter-spacing: 5px;
  margin:0;
/*   font-size:38px; */
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.box_text hr { 
  opacity: 1;
  border: 2px solid;
  color: #364652; /*#283067;*/
  width: 200px;
  box-shadow: 0px 0px 20px #fff, 0px 0px 20px #fff, 2px 2px 0 lightslategrey;
  margin: clamp(1rem, 0.1rem + 2.5vw, 2rem) 0;
}

.product-info {
  width: 100%;
  margin: 15px auto 30px auto;
  text-align: center;
  border: none;
}

/* Tipografia del titolo: autorevole ma moderna */
.product-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.4rem); 
  color: #364652;
/*   text-transform: uppercase; */
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  letter-spacing: clamp(1px, 0.5vw + 1px, 4px);
  line-height: 1.4; 
  margin: 0;
  cursor: default;
 
}

/* Stile per i riquadri delle immagini */
.product-image-box {
  position: relative;
  text-align: center;
  border: 1px solid #d6dadc;
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
}

/* Stile per le immagini dentro i riquadri */
.product-image-box img {
  width: 100%;
  object-fit: cover;
  max-height: 350px;
  cursor: zoom-in;
  display: block;
}

/* Stile per il bottone di download trasparente */
.btn-download-img {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: transparent !important; 
  border: none !important;
  box-shadow: none !important;
  color: #404040;
  font-size: 1.2rem;
  padding: 0;
  cursor: pointer !important;
  z-index: 50;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: color 0.2s ease-in-out;
}

/* Effetto Hover: Mantiene lo sfondo trasparente e cambia solo il colore dell'icona */
.btn-download-img:hover,
.btn-download-img:focus,
.btn-download-img:active {
  background-color: transparent !important; /* Disabilita lo sfondo grigio di default */
  border: none !important;
  box-shadow: none !important;
  color: #5c5c5c !important;
  transform: scale(1.05);
}


#divflyer a,
#divflyer a:hover,
#divflyer a:focus {
text-decoration: none !important;
}


#contacts:hover,
#iso9001:hover {
text-decoration: underline !important;
}

.mail_contacts:hover {
text-decoration: underline !important;
}

/*MODALE INFO & CONTACTS*/


/* 1. Margine di sicurezza standard per tutte le modali */
.modal {
  --bs-modal-margin: 2% !important;
}

/* 2. Regola generale salva-schermo per mobile */
div.modal-dialog {
  max-width: 95vw !important; 
  margin: 1.75rem auto; 
}

/* 3. Il corpo della modale dei contatti */
#modal_contacts .modal-body {
  max-width: 100%; 
  padding: 12px;
  overflow-x: auto;
  font-size: clamp(12px, 0.6rem + 0.6vw, 15px) !important;
  line-height: 1.6 !important; 
}

#modal_contacts .modal-dialog {
  max-width: 450px !important; 
  width: fit-content;
  width: 95vw;
}


/* 4. La scatola con i bordi blu che abbiamo appena creato in server.R */
.contact-box {
  cursor: default;
  border-top: 6px solid #375a7f;
  border-bottom: 6px solid #375a7f;
  padding: 15px 10px; 
}

/* Gestione spaziatura paragrafi  */
.contact-box p {
  margin-bottom: 12px !important; /* Spazio esatto tra le due righe */
}

/* Togliamo il margine all'ultima riga per non sbilanciare il riquadro */
.contact-box p:last-child {
  margin-bottom: 0 !important; 
}

/* 5. Regola per l'eventuale tabella GT dentro la modale */
#modal_contacts #shiny-modal table.gt_table {
  font-size: clamp(11px, 0.5rem + 0.5vw, 13px) !important;
}


/* --- MODALE ISO 9001 --- */

#modal_iso .modal-body {
  padding: 0;
  text-align: center; 
}

#modal_iso .modal-dialog {
  max-width: 95vw !important; 
  width: fit-content;
  margin: 1.75rem auto; 
}

#modal_iso .modal-content {
  border: none;
  background-color: transparent;
}


.link_btn {
  color: #364652;
  background: #c8cfd3;
  text-align: left;
  border: var(--bs-border-width) solid rgb(0 0 0 / 20%);
  /*border: var(--bs-border-width) solid var(--bs-border-color-translucent);*/
  padding: 8px;
  font-size: clamp(13px, 0.7rem + 0.5vw, 16px); 
  letter-spacing: 1px;
}

.link_btn:active {
  color: #ffffff !important;
  border: var(--bs-border-width) solid rgb(0 0 0 / 20%) !important;
  background: rgb(45 79 98 / 80%) !important;
  opacity: 0.9 !important;
}

.link_btn:hover,
.link_btn:focus {
  color: #ffffff;
  border: var(--bs-border-width) solid rgb(0 0 0 / 20%) !important;
  background: rgb(45 79 98 / 80%);
}

.custom-gap {
  gap: 1rem !important;
}

#back {
padding: 6px 16px;
border-radius: 50px;
color: #364652;
border: var(--bs-border-width) solid rgb(0 0 0 / 20%);
letter-spacing:1px;
background: #c8cfd3;
}

#back:hover,
#back:focus {
color: #ffffff;
  border: var(--bs-border-width) solid rgb(0 0 0 / 20%) !important;
background: rgb(45 79 98 / 80%);
-webkit-transition: all 400ms ease;
transition: all 400ms ease;
}

.custom-tab {
  margin-left: -12px;
  margin-right: -12px;
}

.gt_table {
  font-family: Montserrat !important;
  cursor: default !important;
  font-size: clamp(11px, 0.6rem + 0.8vw, 15px) !important; 
  width: 100% !important;
}

.gt_table td.gt_row,
.gt_table th.gt_col_heading {
  padding: clamp(4px, 0.2rem + 0.5vw, 8px) clamp(6px, 0.3rem + 1vw, 12px) !important; 
}

/* Note a piè di pagina: scendono da 13px a 10px */
.gt_table .gt_sourcenote {
  font-size: clamp(11px, 0.5rem + 0.5vw, 13px) !important;
  padding-left: clamp(8px, 0.5rem + 1vw, 12px) !important;
}


.gt_table td:first-child,
.gt_table th:first-child {
  /* Passa fluidamente da 200px su PC a 130px/150px su smartphone */
  width: clamp(130px, 20vw, 200px) !important;
  min-width: clamp(130px, 20vw, 200px) !important;
  
  /* Opzionale: fa andare a capo il testo se la parola è troppo lunga su schermi stretti */
  white-space: normal !important; 
  word-wrap: break-word !important;
}  


a#iconEN {
margin-right: 20px;
text-decoration: none !important;
}

a#iconRU {
text-decoration: none !important;
}

a#iconEN:hover, a#iconEN:focus,
a#iconRU:hover, a#iconRU:focus{
text-decoration: none !important;
}

#iconEN:after {
content:' English';
color: #777;
vertical-align: middle;
}

#iconRU:after {
content:' Русский (Russian)';
color: #777;
  vertical-align: middle;
}



/* ---- IMPOSTAZIONI DEFAULT (PC e globale) ---- */
.kit-title {
  cursor: default;
  margin-top: 20px !important;
  text-align: center;
  color: #364652;
  text-shadow: 2px 2px 3px rgba(0,0,0,0.3);
  font-size: clamp(15px, 0.6rem + 1.5vw, 22px);
  letter-spacing: clamp(1px, 0.5vw + 1px, 5px);
}

#header_title {
  font-size: clamp(13px, 0.18rem + 1.76vw, 1.5rem); 
  white-space: normal !important; 
  line-height: 1.3 !important;    
  letter-spacing: 1px;
}

#header_izs img {
  height: clamp(45px, 1.95rem + 2.4vw, 60px) !important;
  width: auto; 
}

.footer-mobile {
  display: none; 
}

.footer-desktop {
  display: inline;
}



/* =========================================
   MEDIA QUERIES (Sempre in fondo al file!)
   ========================================= */

/* 1. TABLET E SMARTPHONE (< 768px) */
@media (max-width: 768px) {
  .footer {
    justify-content: center !important;
  }
  
  #auth-footer, .navbar-brand {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  
  /* Disabilita zoom immagini su mobile */
  .product-image-box img {
    pointer-events: none !important; 
    cursor: default !important; 
  }
}

/* 2. SMARTPHONE PICCOLI (< 576px) */
@media (max-width: 576px) {
  .footer-desktop {
    display: none !important; 
  }
  
  .footer-mobile {
    display: inline; 
    letter-spacing: 1px;
  }
  
  #auth-footer {
    white-space: normal !important;
    text-overflow: clip !important;
  }
  
}