/* ------------------------------------------------ MENU DESK ------------------------------------------------ */

#menuDesk {
  position: fixed;
  width: 60%;
  top: 3em;
  z-index: 998;
  margin-left: 20%;

  .contenuto {
    background: rgba(0, 0, 0, 0.79);
    border-radius: var(--raggio-bordo);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    width: 100%;
    margin: 0 auto;

    .logo {
      width: 125px;
    }

    .link a {
      color: var(--bianco);
      text-transform: uppercase;
      margin: 0 10px;
      transition: all .3s cubic-bezier(.215, .61, .355, 1);

      &:hover {
        color: var(--rosso);
        text-decoration: none;
      }
    }

    a.contatti {
      background: var(--rosso);
      color: var(--bianco);
      margin: 0;
      line-height: auto;
      text-transform: uppercase;
      padding: 10px 20px;
      border-radius: 10px;
      transition: all .5s cubic-bezier(.215, .61, .355, 1);

      &:hover {
        text-decoration: none;
        border-radius: 20px;
        background: var(--beige);
        color: var(--nero);
      }
    }
  }
}

#menuHover {
  position: fixed;
  width: 60%;
  margin-left: 20%;
  background: #B2B2B2;
  border-radius: var(--raggio-bordo);
  padding: 25px 25px;
  top: 9em;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;

  /* ponte invisibile che copre il gap col menu sopra, così l'hover non si perde */
  &::before {
    content: "";
    position: absolute;
    top: -3em;
    left: 0;
    width: 100%;
    height: 3em;
  }

  h4 {
    color: var(--bianco);
  }

  .hover-prodotti {
    position: relative;
  }

  .contenuto {
    display: flex;
    cursor: pointer;
    justify-content: space-between;

      &:hover {
        .titolo {
          background-color: var(--nero);
        }
      }

    .titolo {
      width: 40%;
      height: fit-content;
      display: flex;
      justify-content: space-between;
      align-items: start;
      border-radius: 10px;
      padding: 10px 15px;
      transition: all .5s cubic-bezier(.215, .61, .355, 1);

      img {
        width: 10px;
        margin-top: 5px;
      }
    }

    &:hover .testo {
      display: block;
      animation: fadeTesto .35s ease both;
    }

    .testo {
      width: 56%;
      min-height: 100%;
      display: none;
      position: absolute;
      top: 0;
      right: 0;
      background: #B2B2B2;
      padding: 0 50px 50px;
      border-radius: var(--raggio-bordo);

      p {
        padding: 20px 0;
        color: var(--bianco);
        font-size: 1.2vw;
      }

      a {
        color: var(--bianco);
        text-transform: uppercase;
        font-size: 1.2vw;
        margin: 5px 0;

        .ultimo {
          padding-bottom: 200px;
        }
      }
    }
  }
}

/* Hover su "Product Lines" -> mostra il sottomenu #menuHover.
   Resta aperto anche mentre il mouse è sul sottomenu stesso. */
#menuDesk:has(.product-lines:hover) ~ #menuHover,
#menuHover:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes fadeTesto {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------ MENU MOBILE ------------------------------------------------ */

@media screen and (max-width: 500px) {
  
 #menuSm {
  position: fixed;
  width: 90%;
  top: 2%;
  left: 5%;
  z-index: 998;

  .contenuto {
    background: rgba(0, 0, 0, 0.79);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 20px;
  }

  .chiuso {
    display: flex;
    justify-content: space-between;

    a {
      display: flex;
    }

    img {
      width: 100px;
    }

    .burger {
      background: var(--rosso);
      padding: 5px;
      border-radius: 7px;
      cursor: pointer;

      span {
        display: block;
        margin: 3px;
        background: var(--nero);
        height: 2px;
        width: 30px;
        transition: opacity .3s ease, transform .3s ease;
      }

      &.attivo span:nth-child(1) {
        opacity: 0;
      }

      &.attivo span:nth-child(3) {
        opacity: 0;
      }
    }
  }

  .aperto {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    color: var(--bianco);
    transition: max-height .4s ease, opacity .3s ease, margin-top .4s ease;

    .categorie {
      padding-left: 25px;
      padding-right: 25px;
    }

    .principale {
      padding-bottom: 10px;

      h3 {
        color: var(--bianco);
        margin: 20px 0 0;
      }
    }

    .contenuto-open {
      
      .titolo {
        display: flex;
        justify-content: space-between;

        h4 {
          color: var(--rosso);
          line-height: 1.5em;
        }
      }
    }

    .container-fluid.cta {
      padding-top: 75px;
      padding-left: 0;
      padding-right: 0;

      a {
        float: right;
      }
    }
  }

  &.attivo .aperto {
    max-height: 80vh;
    margin-top: 20px;
    opacity: 1;
    overflow-y: auto;
  }
 }




}