/* Navigazione condivisa: tendina Servizi, menu mobile, ancore */
html{scroll-behavior:smooth;}
[id]{scroll-margin-top:84px;}
.inline-link{text-decoration:underline; text-underline-offset:3px; font-weight:600;}
.inline-link:hover{opacity:.7;}

header.nav{position:sticky; top:0; z-index:60;}
.nav-row{display:flex; align-items:center; justify-content:space-between; gap:16px;}
nav.links{display:flex; gap:26px; align-items:center; font-size:.92rem; font-weight:600; color:var(--text-dim);}
nav.links > a, .sub-toggle{text-decoration:none; transition:color .15s;}
nav.links > a:hover, .sub-toggle:hover, nav.links a[aria-current="page"]{color:var(--text);}
.btn{font-family:var(--font-body); font-size:.9rem; font-weight:700; padding:.8em 1.5em; border-radius:999px; border:1px solid var(--text); color:#fff; background:var(--text); cursor:pointer; text-decoration:none; white-space:nowrap; display:inline-block;}

.has-sub{position:relative;}
.has-sub::after{content:""; position:absolute; left:-12px; right:-12px; top:100%; height:18px;}
.sub-toggle .chev{font-size:.7em; margin-left:.3em; display:inline-block; transition:transform .15s;}
.has-sub:hover .chev, .has-sub.open .chev{transform:rotate(180deg);}
.sub{display:none; position:absolute; top:calc(100% + 10px); left:-18px; min-width:290px; background:#fff; border:1px solid var(--border-strong); border-radius:16px; padding:8px; box-shadow:0 24px 48px -24px rgba(0,0,0,.3); flex-direction:column; gap:2px;}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub{display:flex;}
.sub a{display:block; padding:12px 14px; border-radius:10px; color:var(--text); font-weight:700; font-size:.92rem; text-decoration:none;}
.sub a small{display:block; color:var(--text-faint); font-weight:500; font-size:.78rem; margin-top:2px;}
.sub a:hover, .sub a[aria-current="page"]{background:var(--surface-2);}
.sub a.all{border-top:1px solid var(--border); border-radius:0 0 10px 10px; margin-top:4px; font-size:.84rem; color:var(--text-dim);}

.nav-right{display:flex; align-items:center; gap:12px;}
.burger{display:none; width:44px; height:44px; border:1px solid var(--border-strong); border-radius:999px; background:#fff; cursor:pointer; padding:0; flex-direction:column; align-items:center; justify-content:center; gap:5px;}
.burger span{display:block; width:18px; height:2px; background:var(--text); border-radius:2px; transition:transform .2s, opacity .2s;}
.burger[aria-expanded="true"] span:first-child{transform:translateY(3.5px) rotate(45deg);}
.burger[aria-expanded="true"] span:last-child{transform:translateY(-3.5px) rotate(-45deg);}

.mobile-menu{border-top:1px solid var(--border); background:#fff; padding:8px clamp(18px,5vw,56px) 24px; max-height:calc(100vh - 72px); overflow-y:auto;}
.mobile-menu[hidden]{display:none;}
.mobile-menu .group-label{font-size:.72rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; color:var(--text-faint); padding:16px 0 6px;}
.mobile-menu a{display:block; padding:13px 0; border-bottom:1px solid var(--border); font-weight:700; font-size:1.02rem; text-decoration:none; color:var(--text);}
.mobile-menu a small{display:block; color:var(--text-faint); font-weight:500; font-size:.82rem;}
.mobile-menu a[aria-current="page"]{text-decoration:underline; text-underline-offset:4px;}
.mobile-menu .btn{display:block; text-align:center; margin-top:20px; border-bottom:1px solid var(--text); color:#fff;}

.foot-links{display:flex; gap:22px; flex-wrap:wrap; font-size:.85rem; font-weight:600; color:var(--text-dim); padding-bottom:18px;}
.foot-links a{text-decoration:none;}
.foot-links a:hover{color:var(--text);}

@media (max-width:860px){
  nav.links{display:none;}
  .burger{display:flex;}
}
@media (max-width:520px){
  .nav-right > .btn{display:none;}
}
