.hamb-menu{
  position: fixed;
  inset: 0;
  background: url('/brands/shared/img/sfondo-hamb.jpg') center top / cover no-repeat;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transform: translateX(100%);      /* fuori dallo schermo a destra */
  will-change: transform, opacity;
}

/* ====== APERTURA ====== */
.hamb-menu.is-open{
  pointer-events: auto;
  animation: hm-in .75s cubic-bezier(.2,.8,.2,1) both;
}

/* ====== CHIUSURA ====== */
.hamb-menu.is-closing{
  pointer-events: none;
  animation: hm-out .75s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes hm-in{
  0%   { transform: translateX(100%); opacity: 0; }
  80%  { opacity: 1; }                 /* visibile già all’80% */
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes hm-out{
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}


/* Centra verticalmente la colonna menu */
.hamb-menu__panel{
  height: 100%;
  display: flex;
  align-items: center;        /* verticale */
}

/* WP wrapper */
.menu-hamburger-container{
  position: relative;
  width: 100%;
  height: 100%;
}

/* Lista: NO bullet, padding a sinistra, grandi spazi */
.hamb-menu__list,
#menu-hamburger {
  position: absolute;
  bottom: 60px;
  left: 60px;
  list-style: none;
  margin: 0;
}

/* Spaziatura tra le voci */
.hamb-menu__list li{ margin: 0 0 clamp(10px, 2.8vw, 28px); }

/* Stile voci come nello shot: molto grandi e bold, nero */
.hamb-menu__list a{
  position: relative;
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 6vw, 45px);
  line-height: 1.1;
  color: #000;
  text-decoration: none;
  transition: .25s ease;
}

/* Feedback al passaggio */
.hamb-menu__list a:hover{
  color: blue;
}

/* underline visibile già al caricamento (pseudo) */
.hamb-menu__list a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: clamp(2px, 0.6vw, 6px);
  background: currentColor;    /* usa lo stesso blu del link */
  opacity: 0;
}

/* linea “animata” che entra da sinistra (pseudo) */
.hamb-menu__list a::before{
  content: "";
  position: absolute;
  bottom: -6px;
  width: 100%;                 /* leggermente più lunga del testo */
  height: clamp(2px, 0.6vw, 6px);
  background: currentColor;
  transform: translateX(-100%);/* parte fuori a sinistra */
  will-change: transform;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  opacity: 0;
}

/* Hover: la linea scorre verso destra “uscendo” da sinistra */
.hamb-menu__list a:hover::before{
  transform: translateX(0);
  opacity: 1;
}

/* --- STATO CORRENTE / ATTIVO (WordPress) --- */
.hamb-menu__list .current-menu-item > a,
.hamb-menu__list .current_page_item > a,
.hamb-menu__list .current-menu-ancestor > a,
.hamb-menu__list a[aria-current="page"]{
  color: blue;                    /* blu quando la voce è la pagina corrente */
}

/* underline (pseudo) sempre visibile sul corrente */
.hamb-menu__list .current-menu-item > a::after,
.hamb-menu__list .current_page_item > a::after,
.hamb-menu__list .current-menu-ancestor > a::after,
.hamb-menu__list a[aria-current="page"]::after{
  opacity: 1;                     /* assicurati che la riga sia presente */
}

/* la linea “che esce da sinistra” resta già aperta sul corrente */
.hamb-menu__list .current-menu-item > a::before,
.hamb-menu__list .current_page_item > a::before,
.hamb-menu__list .current-menu-ancestor > a::before,
.hamb-menu__list a[aria-current="page"]::before{
  transform: translateX(0);
}

/* accessibilità: stesso stile quando il link ha focus via tastiera */
.hamb-menu__list a:focus-visible{
  outline: none;
  color: blue;
}

.hamb-icon-open {
  display: none;
}

.hamb-bar {
  display: block;
  width: 26px;
  height: 3px;
  background: #111;
  border-radius: 2px;
  pointer-events: none;
}

@media (max-width: 1300px){
  .hamb-icon-open {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 32px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 110;
    appearance: none;
    -webkit-appearance: none;
  }
}

.hamb-icon-close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
}

.hamb-icon-close::before,
.hamb-icon-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 3px;
  background: #111;
  border-radius: 2px;
}

.hamb-icon-close::before {
  transform: translateY(-50%) rotate(45deg);
}

.hamb-icon-close::after {
  transform: translateY(-50%) rotate(-45deg);
}

.hamb-icon-open:focus-visible,
.hamb-icon-close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* Mobile fine-tuning */
@media (max-width: 575px){
  .hamb-menu__list,
  #menu-hamburger {
    bottom: 24px;
    left: 32px;
    padding-inline-start: 0;
  }
  .hamb-menu__list a{ font-size: clamp(24px, 9vw, 40px); }
  .hamb-icon-open {
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .hamb-bar {
    width: 24px;
  }
}


/* =========================== ANIMAZIONE HAMB MENU =========================== */

/* animazione uscita hamb menu */
@keyframes slideInRight {
  0% {
    left 100%;
    opacity: 0;
  }
  
  60% {
    opacity: 1;
  }
  
  100% {
    left 0;
    opacity: 1;
  }
}


/* animazione uscita item menu */
@keyframes menuStaggerIn {
  0%   { opacity: 0; transform: translateY(100px); }
  100% { opacity: 1; transform: none; }
}

.hamb-menu.is-open
.hamb-menu__list li {
  opacity: 0;
  animation: menuStaggerIn .3s cubic-bezier(.2,.8,.2,1) forwards;
}

.hamb-menu.is-open .hamb-menu__list li:nth-child(1){ animation-delay: .4s; }
.hamb-menu.is-open .hamb-menu__list li:nth-child(2){ animation-delay: .5s; }
.hamb-menu.is-open .hamb-menu__list li:nth-child(3){ animation-delay: .6s; }
.hamb-menu.is-open .hamb-menu__list li:nth-child(4){ animation-delay: .7s; }
.hamb-menu.is-open .hamb-menu__list li:nth-child(5){ animation-delay: .8s; }
.hamb-menu.is-open .hamb-menu__list li:nth-child(6){ animation-delay: .9s; }