/* CalabriaVera — unico owner visuale dell'header pubblico. */
:root{
  --cv-header-navy:#00345b;
  --cv-header-gold:#ffb000;
  --cv-header-height:64px;
}

#site-header{
  position:sticky!important;
  top:0!important;
  z-index:5000!important;
  width:100%!important;
  max-width:100%!important;
  background:var(--cv-header-navy)!important;
  isolation:isolate!important;
}

#site-header .site-header.cv-header{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  max-width:100%!important;
  z-index:auto!important;
  border:0!important;
  box-shadow:none!important;
  background:var(--cv-header-navy)!important;
  color:#fff!important;
}

#site-header .cv-header .header-inner{
  width:min(calc(100% - 48px),1480px)!important;
  max-width:1480px!important;
  min-width:0!important;
  min-height:var(--cv-header-height)!important;
  margin-inline:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:clamp(12px,1.7vw,24px)!important;
}

#site-header .cv-header .brand{
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  min-width:0!important;
  text-decoration:none!important;
}

#site-header .cv-header .brand-logo{
  display:block!important;
  width:clamp(158px,13vw,188px)!important;
  height:48px!important;
  max-width:188px!important;
  object-fit:contain!important;
  object-position:left center!important;
  filter:none!important;
}

#site-header .cv-header .primary-nav{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:clamp(14px,1.8vw,28px)!important;
  flex:1 1 auto!important;
  min-width:0!important;
}

#site-header .cv-header .primary-nav>a{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  min-height:var(--cv-header-height)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#fff!important;
  text-decoration:none!important;
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:780!important;
  white-space:nowrap!important;
}

#site-header .cv-header .primary-nav>a:hover,
#site-header .cv-header .primary-nav>a:focus-visible{
  color:#fff!important;
}

#site-header .cv-header .primary-nav>a[aria-current="page"]::after,
body[data-page="home"] #site-header .primary-nav>[data-cv-nav="home"]::after,
body[data-page="catalog"] #site-header .primary-nav>[data-cv-nav="explore"]::after,
body[data-page="activities"] #site-header .primary-nav>[data-cv-nav="explore"]::after,
body[data-page="business"] #site-header .primary-nav>[data-cv-nav="explore"]::after,
body[data-page="map"] #site-header .primary-nav>[data-cv-nav="map"]::after,
body[data-page="blog"] #site-header .primary-nav>[data-cv-nav="blog"]::after,
body[data-page="about"] #site-header .primary-nav>[data-cv-nav="about"]::after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:7px!important;
  display:block!important;
  height:3px!important;
  border:0!important;
  border-radius:999px!important;
  background:var(--cv-header-gold)!important;
  opacity:1!important;
  transform:none!important;
}

#site-header .cv-header .header-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex:0 0 auto!important;
  min-width:0!important;
}

#site-header .cv-header .cv-header-shortcuts{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
}

#site-header .cv-header .cv-icon-action{
  position:relative!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:0!important;
  border-radius:10px!important;
  background:transparent!important;
  color:#fff!important;
  box-shadow:none!important;
}

#site-header .cv-header .cv-icon-action svg{
  display:block!important;
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
}

#site-header .cv-header .desktop-account,
#site-header .cv-header .account-menu{
  position:relative!important;
  margin:0!important;
  padding:0!important;
}

#site-header .cv-header .cv-account-trigger{
  list-style:none!important;
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.25)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.055)!important;
  color:#fff!important;
  box-shadow:none!important;
  cursor:pointer!important;
}

#site-header .cv-header .cv-account-trigger::-webkit-details-marker{display:none!important}
#site-header .cv-header .cv-account-trigger::marker{content:""!important}
#site-header .cv-header .cv-account-trigger:hover,
#site-header .cv-header .cv-account-trigger:focus-visible,
#site-header .cv-header .account-menu[open]>.cv-account-trigger{
  border-color:rgba(255,255,255,.45)!important;
  background:rgba(255,255,255,.11)!important;
  outline:0!important;
}

#site-header .cv-header .cv-account-icon{
  display:block!important;
  width:19px!important;
  height:19px!important;
  max-width:19px!important;
  max-height:19px!important;
  fill:currentColor!important;
  stroke:none!important;
}

#site-header .cv-header .header-language{
  position:relative!important;
  flex:0 0 auto!important;
  margin:0!important;
  z-index:3!important;
}

#site-header .cv-header .menu-button{
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:58px!important;
  min-height:44px!important;
  margin:0!important;
  padding:8px 12px!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:10px!important;
  background:transparent!important;
  font-weight:750!important;
  white-space:nowrap!important;
}

#site-header .primary-mobile[hidden]{display:none!important}
#site-header .primary-mobile{
  background:var(--cv-header-navy)!important;
  color:#fff!important;
}
#site-header .primary-mobile>a{color:#fff!important}

/* Il menu compatto parte prima del tablet: le etichette FR/DE sono più lunghe
   e non devono mai comprimere logo, lingua o azioni. */
@media(max-width:1180px){
  :root{--cv-header-height:62px}
  #site-header .cv-header .header-inner{
    width:min(calc(100% - 32px),1480px)!important;
    gap:10px!important;
  }
  #site-header .cv-header .brand-logo{
    width:168px!important;
    max-width:168px!important;
    height:44px!important;
  }
  #site-header .cv-header .primary-nav,
  #site-header .cv-header .desktop-account{
    display:none!important;
  }
  #site-header .cv-header .header-actions{
    margin-left:auto!important;
  }
  #site-header .cv-header .menu-button{
    display:inline-flex!important;
  }
  #site-header .primary-mobile:not([hidden]){
    width:min(calc(100% - 32px),1480px)!important;
    max-width:1480px!important;
    margin:0 auto!important;
    padding:10px 0 max(14px,env(safe-area-inset-bottom))!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:6px!important;
    max-height:calc(100dvh - var(--cv-header-height))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    border-top:1px solid rgba(255,255,255,.12)!important;
  }
  #site-header .primary-mobile>a{
    min-width:0!important;
    min-height:46px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:9px 10px!important;
    border-radius:10px!important;
    color:#fff!important;
    background:rgba(255,255,255,.055)!important;
    text-align:center!important;
    text-decoration:none!important;
    font-size:13px!important;
    font-weight:750!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  #site-header .primary-mobile>a[aria-current="page"]{
    background:rgba(255,176,0,.16)!important;
    box-shadow:inset 0 -3px 0 var(--cv-header-gold)!important;
  }
  #site-header .primary-mobile>.guest-actions,
  #site-header .primary-mobile>.account-menu{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
  }
  #site-header .primary-mobile>.guest-actions:not([hidden]){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding-top:4px!important;
  }
  #site-header .primary-mobile>.guest-actions[hidden],
  #site-header .primary-mobile>.account-menu[hidden]{display:none!important}
  #site-header .primary-mobile .guest-actions .button{
    width:100%!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  #site-header .primary-mobile>.account-menu>.cv-account-trigger{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:auto!important;
    display:flex!important;
    gap:8px!important;
    border-radius:10px!important;
  }
  #site-header .primary-mobile .account-links{
    position:static!important;
    inset:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin-top:6px!important;
    padding:6px!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:12px!important;
    background:#073f69!important;
    box-shadow:none!important;
  }
  #site-header .primary-mobile .account-links>a,
  #site-header .primary-mobile .account-links>button{
    min-width:0!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px!important;
    color:#fff!important;
    background:rgba(255,255,255,.055)!important;
    border:0!important;
    border-radius:9px!important;
    text-align:center!important;
    text-decoration:none!important;
    overflow-wrap:anywhere!important;
  }
}

@media(max-width:760px){
  :root{--cv-header-height:60px}
  #site-header .cv-header .header-inner,
  #site-header .primary-mobile:not([hidden]){
    width:calc(100% - 24px)!important;
  }
  #site-header .cv-header .header-inner{gap:7px!important}
  #site-header .cv-header .brand-logo{
    width:145px!important;
    max-width:145px!important;
    height:42px!important;
  }
  #site-header .cv-header .cv-icon-action{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
  }
  #site-header .cv-header .menu-button{
    min-width:54px!important;
    min-height:42px!important;
    padding-inline:10px!important;
  }
  #site-header .primary-mobile:not([hidden]){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #site-header .primary-mobile .account-links{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:520px){
  #site-header .cv-header .header-inner,
  #site-header .primary-mobile:not([hidden]){width:calc(100% - 18px)!important}
  #site-header .cv-header .brand-logo{
    width:132px!important;
    max-width:132px!important;
  }
  #site-header .cv-header .header-actions{gap:5px!important}
  #site-header .cv-header .cv-header-shortcuts{gap:2px!important}
  #site-header .primary-mobile:not([hidden]){grid-template-columns:1fr!important}
  #site-header .primary-mobile>.guest-actions:not([hidden]),
  #site-header .primary-mobile .account-links{grid-template-columns:1fr!important}
}

@media(max-width:390px){
  #site-header .cv-header .cv-header-shortcuts{display:none!important}
  #site-header .cv-header .brand-logo{
    width:124px!important;
    max-width:124px!important;
  }
  #site-header .cv-header .header-language .cv-language-name{display:none!important}
}

@media(max-width:330px){
  #site-header .cv-header .header-inner,
  #site-header .primary-mobile:not([hidden]){width:calc(100% - 12px)!important}
  #site-header .cv-header .brand-logo{
    width:110px!important;
    max-width:110px!important;
  }
  #site-header .cv-header .menu-button{
    min-width:48px!important;
    padding-inline:8px!important;
  }
}

@media(max-height:520px) and (orientation:landscape){
  #site-header .primary-mobile:not([hidden]){
    max-height:calc(100dvh - var(--cv-header-height))!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(pointer:coarse){
  #site-header a,#site-header button,#site-header summary{touch-action:manipulation}
  #site-header .primary-mobile>a,
  #site-header .primary-mobile .account-links>a,
  #site-header .primary-mobile .account-links>button{min-height:44px!important}
}
