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

#menuDesk {
  position: fixed;
  width: 100%;
  z-index: 998;
  padding: 20px 0;
  transition: transform .4s cubic-bezier(.215, .61, .355, 1),
              background .4s cubic-bezier(.215, .61, .355, 1),
              padding .4s cubic-bezier(.215, .61, .355, 1);

  &.nascosto {
    transform: translateY(-100%);
  }

  &.compatto {
    background: var(--background);
    padding: 20px 0 30px;

    .burger span {
      background: var(--blu);
    }

    .logo-chiaro {
      display: none;
    }

    .logo-scuro {
      display: block;
      mix-blend-mode: multiply;
    }

    img {
      width: 150px;
    }
  }

  .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .lato {
    flex: 1 1 0;
    display: flex;

    &.destra {
      justify-content: flex-end;
    }
  }

  .cont-logo {
    display: flex;
    flex-shrink: 0;
  }

  .burger {
    cursor: pointer;
    padding: 10px 0;

    span {
      display: block;
      width: 50px;
      height: 3px;
      background: white;
      margin: 5px;
      transition: background .4s cubic-bezier(.215, .61, .355, 1),
                  transform .4s cubic-bezier(.215, .61, .355, 1);
    }

    &.attivo span:first-child {
      transform: translateY(4px) rotate(45deg);
    }

    &.attivo span:last-child {
      transform: translateY(-4px) rotate(-45deg);
    }
  }

  &:has(.burger.attivo) {
    background: transparent;

    .burger span {
      background: var(--bianco);
    }

    .logo-chiaro {
      display: block;
    }

    .logo-scuro {
      display: none;
    }
  }

  img {
    width: 200px;
    transition: width .4s cubic-bezier(.215, .61, .355, 1);
  }

  .logo-scuro {
    display: none;
  }
}


/* ------------------------------------------------ MENU APERTO ------------------------------------------------ */

#menuAperto {
  position: fixed;
  inset: 0;
  z-index: 997;
  background: var(--blu);
  color: var(--bianco);
  overflow-y: auto;
  overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s cubic-bezier(.77, 0, .175, 1),
              visibility 0s .8s;

  &.aperto {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .8s cubic-bezier(.77, 0, .175, 1),
                visibility 0s;

    .voci a {
      opacity: 1;
      transform: translateY(0);
    }

    .voci a:nth-child(1) { transition-delay: .45s; }
    .voci a:nth-child(2) { transition-delay: .52s; }
    .voci a:nth-child(3) { transition-delay: .59s; }
    .voci a:nth-child(4) { transition-delay: .66s; }
    .voci a:nth-child(5) { transition-delay: .73s; }
    .voci a:nth-child(6) { transition-delay: .8s; }

    .lato-menu {
      opacity: 1;
      transform: translateY(0);
      transition-delay: .7s;
    }
  }

  .container-fluid {
    min-height: 100%;
    display: flex;
    justify-content: space-between;
    gap: 50px;
    padding-top: 200px;
    padding-bottom: 60px;
  }

  .voci {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-left: 5%;

    a {
      display: flex;
      align-items: baseline;
      font-family: var(--titoli);
      font-size: clamp(2em, 3.2vw, 3.2em);
      line-height: 1.15em;
      color: var(--bianco);
      position: relative;
      padding-bottom: 4px;
      opacity: 0;
      transform: translateY(40px);
      transition: opacity .7s cubic-bezier(.215, .61, .355, 1),
                  transform .7s cubic-bezier(.215, .61, .355, 1);

      span {
        font-family: var(--testi);
        font-weight: 300;
        font-size: .3em;
        color: var(--azzurro);
        margin-right: .8em;
        letter-spacing: .1em;
        transition: color .4s cubic-bezier(.215, .61, .355, 1);
      }

      &::after {
        display: none;
      }

      &:hover {
        color: var(--bianco);

        span {
          color: var(--giallo);
        }

        &::after {
          transform: scaleX(1);
        }
      }
    }

    a.due::after {
      background: var(--giallo);
    }

    a.tre::after {
      background: var(--giallo);
    }
  }

  .lato-menu {
    width: 32%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s cubic-bezier(.215, .61, .355, 1),
                transform .7s cubic-bezier(.215, .61, .355, 1);

    .cont-img {
      height: 38vh;
      border-radius: 35px;
      overflow: hidden;
      margin-bottom: 35px;
    }

    .info {
      display: flex;
      flex-direction: column;
      margin-bottom: 35px;

      p {
        font-family: var(--titoli);
        font-size: 1.3em;
        color: var(--azzurro);
        margin-bottom: 10px;
      }

      small {
        white-space: pre-line;
        line-height: 1.5em;
        margin-bottom: 15px;
        opacity: .8;
      }

      a {
        color: var(--bianco);
        width: fit-content;
        padding: 3px 0;
        border-bottom: solid 1px transparent;
        transition: border-color .4s cubic-bezier(.215, .61, .355, 1),
                    color .4s cubic-bezier(.215, .61, .355, 1);

        &:hover {
          color: var(--giallo);
          border-bottom-color: var(--giallo);
        }
      }
    }

    .cta-std:hover {
      background: var(--background);
      color: var(--blu);
    }
  }
}


/* ------------------------------------------------ MENU SM ------------------------------------------------ */

@media screen and (max-width: 500px) {

  #menuDesk {

    img {
      width: 100px;
    }

    .burger {
      span {
        width: 35px;
        margin: 3px;
        height: 2px;
      }
    }

    .lato {
      flex: none;
    }

    img.logo-scuro {
      width: 100px!important;
    }

    .burger.attivo span:first-child {
      transform: translateY(2.5px) rotate(45deg);
    }

    .burger.attivo span:last-child {
      transform: translateY(-2.5px) rotate(-45deg);
    }

      &:has(.burger.attivo) {
        background: transparent;

        .burger span {
          background: var(--bianco);
        }

        .logo-chiaro {
          display: block;
          width: 100px!important;
        }

        .logo-scuro {
          display: none;
        }
    }
  }

  #menuAperto {

    .container-fluid {
      flex-direction: column;
      justify-content: flex-start;
      align-items: stretch;
      gap: 50px;
      padding-top: 150px;
      padding-bottom: 40px;
    }

    &:has(.burger.attivo) {
    background: transparent;

    .burger span {
      background: var(--bianco);
    }

    .logo-chiaro {
      display: block;
    }

    .logo-scuro {
      display: none;
    }
  }

    .voci {
      gap: 10px;
      padding-left: 0;

      a {
        font-size: 1.5em;
        padding-bottom: 2px;

        span {
          font-size: .5em;
        }

        &:hover {
          padding-left: 0;
        }
      }
    }

    .lato-menu {
      width: 100%;
      padding-top: 35px;
      border-top: solid 1px rgba(255, 255, 255, .2);

      .cont-img {
        display: none;
      }

      .info {
        margin-bottom: 25px;

        p {
          font-size: 1.1em;
        }
      }
    }
  }






}



