/*@font-face {
  font-family: myFirstFont;
  src: url(MontserratAlternates-Medium.woff);
}*/



html,body {
  /*font-family: Gill Sans, Arial,Verdana, sans-serif;*/
  font-family: Book Antiqua, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  font-weight: normal;
  letter-spacing: 1px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Book Antiqua, sans-serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 10px 0;
  letter-spacing: 1px;
}
h1{
  margin-top: 0px;  
}
h5{
 line-height: 1.5; 
}
h6{
    margin: 0;
    line-height: 1;
    line-height: 1;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {font-weight: inherit;}
h1 {font-size: 36px}
h2 {font-size: 30px}
h3 {font-size: 24px}
h4 {font-size: 20px; margin: 10px 0;}
h5 {font-size: 18px}
h6 {font-size: 15px}

hr {
  height: 0;
  border: 0;
  border-top: 1px solid #eee;
  margin: 20px 0;
}

#imgScheda{
    margin-top: 7px;
    width: 100% !important;
}

.img-enlarge{
    transition: transform 0.3s ease; /* Aggiunge una transizione fluida */
}

.img-enlarge:hover{
    transform: scale(1.8); /* Ingrandisce l'immagine del 20% */
}

.w3-tag{
    padding: 8px;
}

.categorie{
    width: 150px;
    
}
#ricerca{
    width:50%
}
#no_results{
   display: none; 
}
#risultati-ricerca{
   display: none; 
}
#libreria{
    max-width:1200px;
    margin:auto;
    padding-top: 5px;
}
#libri{
    max-width:1040px;
    margin-top:16px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.autore_libro{
   margin-top: 15px; 
}
.titolo_libro{
   margin-top: 5px;
   margin-bottom: 15px;
}
#nome_libreria{
    border-top-width: 20px;
    border-top-style: solid;
    border-color: white;
}
#piede_libreria{
   margin-top: 30px; 
    
}
.minipulsante{
    padding: 2px;
}
.w3-button{
    padding: 8px 10px;
}
.w3-btn{
    margin-top: 15px;
}

.miniatura_libro{
    /*width: -moz-available;*/
    width: 100% !important;
}
.miniatura_categoria{
   width: 100% !important;    
}
#logo_libreria{
    border-right-width: 0px;
    border-right-style: solid;
    margin-right: 11px;
    margin-top: 4px;
    width: 45px;  
}
#logoFooter{
    width:65px;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.navbar {
  overflow: hidden;
  background-color: #333;
  font-family: Book Antiqua, sans-serif;
}

.navbar a {
  float: left;
  font-size: 16px;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 16px;  
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font: inherit;
  margin: 0;
}

.navbar a:hover, .dropdown:hover .dropbtn {
  background-color: red;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  width: 100%;
  left: 0;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content .header {
  background: red;
  padding: 16px;
  color: white;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Create three equal columns that floats next to each other */
.column {
  float: left;
  width: 33.33%;
  padding: 10px;
  background-color: #ccc;
  height: 250px;
}

.column a {
  float: none;
  color: black;
  padding: 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.column a:hover {
  background-color: #ddd;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Icona menu (mobile) */
.menu-icon {
  display: none; /* Nascosto di default */
  background: none;
  border: none;
  color: white;
  font-size: 2em;
  cursor: pointer;
  padding: 0; /* Rimuovi padding di default */
}

.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
}

.menu li {
  margin-left: 20px;
  position: relative;
}

.menu a {
  text-decoration: none;
  padding: 10px;
  display: block;
}

.menu a:hover {
  background-color: #555;
}

/* Submenu */
.submenu {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  padding: 0;
  margin: 0;
  min-width: 150px;
  z-index: 1;
}

.submenu li {
  margin: 0;
}

.submenu a {
  padding: 10px;
  display: block;
  color: white;
  text-decoration: none;
}

.submenu a:hover {
  background-color: #555;
}

.menu li:hover .submenu {
  display: block;
}

/* Icona menu (mobile) */
.menu-icon {
  display: none; /* Nascosto di default */
  background: none;
  border: none;
  color: white;
  font-size: 2em;
  cursor: pointer;
  padding: 0; /* Rimuovi padding di default */
}



@media screen and (min-width: 400px) {
 #libri{
       margin-top:30px;
    }
    .modal-content{
        width: 90%;
    }

}

@media screen and (max-width: 500px) {
 h1 {font-size: 30px;
    margin-top: 40px;}
 h2 {font-size: 24px}
 h3 {font-size: 18px}
 .modal{
     display:none;
 }
 .modal-content{
     with:90%;
 }
 #libri{
        margin-top:5px;
    }
 
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
    height: auto;
  }
  .modal-content{
        width: 90%;
    }
    .menu{
        display: none;
    position: relative;
    top: 60px; /* Posiziona sotto l'header (regola se necessario) */
    left: 0;
    width: 100%;
    background-color: #dbd6d6;
    flex-direction: column; /* Impila gli elementi verticalmente */
    z-index: 1;
    }  
    
  .menu-icon {
    display: block; /* Mostra l'icona su mobile */
    color: black;
  }
  .menu.active { /* Mostra il menu quando ha la classe 'active' */
      display:block;
  } 
  .submenu.active {
    display: block; /* Mostra il menu quando ha la classe 'active' */
  }
 .menu li {
    margin: 0;
  }

  .menu a {
    padding: 15px;
  }

  .submenu {
    position: static;
    display: none;
  }

  .submenu li {
        border-bottom: none; /*rimuovo il bordo dal submenu*/
    }
  
}