/* CSS Document */
* {
  font-family: 'Lato', sans-serif;
  color: #707070 ;
}
body {

  margin: 0;
  padding: 0;

}
a {
  text-decoration: none !important;
    cursor: pointer!important;
}
*::selection {
  background-color: #707070;
  color: white;
}

header{
    margin-top: 50px;
    z-index: 20;
}
.logo {
width: 600px;
  text-align: center;
    
}
#menu {
  position: relative;
}
.menu {
  text-transform: uppercase;
  font-weight: 300;
  font-size: 14px;
  display: inline-block;
  cursor: pointer;
  pointer-events: none;
  position: absolute;
  top: auto;
  right: 0px;
  text-align: right;
  transform: translateY(-5.8px);
}

.menu:hover {
  transition: opacity 0.5s ease;
}
.label {
  display: inline-block;
  cursor: pointer;
  pointer-events: all;
}

.mainMenu {
  opacity: 0;
  pointer-events: none; /* blocca click quando è invisibile */
  transition: opacity 0.5s ease;
}

.mainMenu.show {
  opacity: 1;
  pointer-events: auto; /* riattiva i click solo quando visibile */
}

.mainMenu.hide {
  opacity: 0;
  pointer-events: none; /* disattiva subito al momento della chiusura */
}

/* Animazioni singole voci */
.mainMenu li {
  opacity: 0;
  transform: translateY(10px);
  animation-fill-mode: forwards;
  pointer-events: none; /* sicurezza extra: ogni voce singola */
}

.mainMenu.show li {
  animation: slideIn 0.5s forwards;
  pointer-events: auto;
}

.mainMenu.hide li {
  animation: slideOut 0.4s forwards;
  pointer-events: none;
}

.mainMenu.show li:nth-child(1) { animation-delay: 0.1s; }
.mainMenu.show li:nth-child(2) { animation-delay: 0.25s; }
.mainMenu.show li:nth-child(3) { animation-delay: 0.4s; }
.mainMenu.show li:nth-child(4) { animation-delay: 0.55s; }

.mainMenu.hide li:nth-child(1) { animation-delay: 0.4s; }
.mainMenu.hide li:nth-child(2) { animation-delay: 0.25s; }
.mainMenu.hide li:nth-child(3) { animation-delay: 0.1s; }
.mainMenu.hide li:nth-child(4) { animation-delay: 0s; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ======== ICONA MENU ======== */

.menu-icon {
  width: 24px;
  height: 20px;
  position: relative;
}

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  background-color: #000;
  transition: all 0.3s ease;
  border-radius: 10px;
  border: 0.5px solid #707070;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 7px; }
.menu-icon span:nth-child(3) { top: 14px; }

/*animazione icona menu*/
.menu-icon.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 7px;
}
.menu-icon.active span:nth-child(2) {
  opacity: 0;
}
.menu-icon.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 7px;
}
.menu .uno, .menu .due, .menu .tre, .menu .quattro {
  position: relative;
  display: flex;
  margin-left: 0;
  top: 10px;
  transition: opacity 0.5s ease, top 0.5s ease;
  flex-direction: row-reverse;
}


.uno a, .due a, .tre a, .quattro a {
  transition: color 0.5s ease;
  color: #A7A7A7 !important;
}
.uno:hover a, .due:hover a, .tre:hover a, .quattro:hover a {
  color: #707070 !important;
}

/*homepage*/
.hero {
  max-width: 600px;
    padding: 0px;
    text-align: right;
}
.gallery-mixed {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* default desktop */
  /*grid-auto-rows: 1fr; /* base altezza */
  gap: 10px;
  max-width: 600px;
  width: 100%;
  /*  aspect-ratio: 1/1; /* contenitore quadrato */
}
/* Celle base */
.gallery-mixed .item {
  position: relative;
  overflow: hidden;
}
/* Immagini responsive */
.gallery-mixed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;  
}
/* Orizzontale 2x1 */
.gallery-mixed .h2 {
  grid-column: span 2;
}
/* Verticale 1x2 */
.gallery-mixed .v2 {
  grid-row: span 2;
}
#gallery {
  position: relative;
  top: 10%;
  left: auto;
    
    
}
#gallery .container, #portfolio .container, #photo-gallery .container, #about .container, #book .container {
  max-width: 600px;
    padding: 0;
}
/*books*/
.main-img {
  max-height: 300px;
  object-fit: cover;
    margin: 0 auto;
}
.main-block,
.small-block {
  display: inline-block;
  text-align: left;
}
.small-block img{
    max-height: 150px;
    margin: 20px 0;
}
.main-img,
.small-block img {
  display: block;
}

.text-block {
  margin-top: 10px;
}
.book-link {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #707070;
  transition: color 0.3s ease;
}
.title,
.sub-title, .title-sec {
  color: #707070;
  font-weight: 300;
  margin-bottom: 5px;
}

.title {
  font-size: 22px;
}
.title-sec{
    font-size:  15px;
}

.subtitle,
.sub-subtitle {
  font-size: 14px;
  color: #A7A7A7;
  margin-bottom: 8px;
}

.book-link {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a7a7a7;
  transition: color 0.3s ease;
}

.book-link:hover {
  color: #707070;
}
.grid-item, .macros, .movement, .dimension {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  max-width: 100%;
}
.grid-item.visible, .macros.visible, .movement.visible, .dimension.visible {
  opacity: 1;
  transform: translateY(0);
}
#lg-content-1 button {
  background: none;
  color: transparent !important;
}
.lg-backdrop {
  background-color: white !important;
}
.lg-object {
  max-width: 40% !important;
  max-height: 50% !important;
  margin: auto; /* per centrarla */
}
.custom-prev, .custom-next {
  color: #707070;
  background: transparent !important;
  border: none !important;
  font-size: 1rem;
  cursor: pointer;
}
.custom-prev:hover, .custom-next:hover {
  text-decoration: underline !important;
}
/*PORTFOLIO*/
.dimension{
    width: 12.5%;
    cursor: pointer!important;
}
.caption {

  color: #707070;
  font-size: 14px;
  font-weight: 100;
  letter-spacing: 1px;
  padding: 0!important;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}

/* Mostra il titolo al passaggio */
.dimension:hover .caption {
  opacity: 1;
  transform: translateX(0);
}
/*ABOUT*/
p {
  font-family: 'Baskervville', serif;
}
.enfasi {
  font-style: italic;
  font-family: 'Baskervville', serif;
}


.icon{
    width: 24px;
    height: 20px;
}
#footer{
    margin-bottom: 50px;
}
#footer .container{
    max-width: 600px;
}
#footer .pittogramma{
    width: 50px;
    height: auto;
}
.copyright{
    font-size: 8px;
    font-weight: 200;
    padding-top: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (min-width: 768px) and (max-width: 991px) {

  body {
    overflow: auto;
  }

}
@media (max-width: 991px) {
  header .container {
    max-width: 600px;
    padding: 20px 0!important;
  }
  .logo {
    width: 70%;
    text-align: left;
  }
  #hero {
    padding: 1rem;
  }
}
@media (max-width: 768px) {
  body {
    overflow: auto;
  }
    header{
        padding: 0;
        margin-top: 30px;
    }
.mainMenu.show li {
    padding: 4px 0;
    font-size: 15px;
    }    

#gallery .container, #portfolio .container, #photo-gallery .container, #about .container, #book .container {
    padding: 20px;
}    

  .gallery-mixed {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    aspect-ratio: auto; /* su telefono si sviluppa in verticale */
  }


    .dimension{
    width: auto;
}
    .caption{
        opacity: 1;
    }
      #portfolio, #photo-gallery, #book{
    align-items: flex-start !important;
    justify-content: center;
    padding: 170px 0; 
    height: auto !important;
  }
  #gallery a{
    pointer-events: none !important;
    cursor: default !important;
  }
    #book .container, #book .row{

        text-align-last: start;
    }




  
}
