/* Legalofe mobile shell v211 - header + drawer shared by all pages; navigazione standard */
.lofe-mobile-back,.lofe-mobile-nav-backdrop,.lofe-drawer-head{display:none}
.lofe-drawer-links{display:contents}
.lofe-menu-bars{display:none}
.lofe-menu-text{display:inline}

@media (max-width:800px){

  body .site-header{
    position:sticky!important;
    top:0!important;
    z-index:9500!important;
    min-height:74px!important;
    padding:calc(env(safe-area-inset-top,0px) + 8px) 14px 8px!important;
    display:grid!important;
    grid-template-columns:52px minmax(0,1fr) 52px!important;
    align-items:center!important;
    border-bottom:1px solid rgba(130,202,238,.24)!important;
    background:#082c47!important;
    box-sizing:border-box!important;
  }

  body .site-header .brand{
    grid-column:2!important;
    justify-self:center!important;
    margin:0!important;
    padding:0!important;
    width:auto!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:transparent!important;
  }
  body .site-header .brand picture{display:flex!important;align-items:center!important;justify-content:center!important}
  body .site-header .brand .lofe-logo-img{
    display:block!important;
    width:auto!important;
    max-width:176px!important;
    height:48px!important;
    max-height:48px!important;
    object-fit:contain!important;
  }

  .lofe-mobile-back{
    grid-column:1!important;
    grid-row:1!important;
    display:flex!important;
    width:46px!important;
    height:46px!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid rgba(132,205,240,.42)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    box-shadow:none!important;
  }
  .lofe-mobile-back svg{width:27px!important;height:27px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.4!important;stroke-linecap:round!important;stroke-linejoin:round!important}


  /* Home: niente freccia indietro. Il menu principale passa a sinistra. */
  body.page-home .lofe-mobile-back{display:none!important}
  body.page-home .site-header .menu-button{
    grid-column:1!important;
    justify-self:start!important;
  }

  /* Profilo direttamente sotto la stagione nel drawer. */
  .lofe-drawer-profile-head{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    width:max-content!important;
    min-height:38px!important;
    margin:10px 0 0!important;
    padding:6px 10px!important;
    border:1px solid rgba(155,220,255,.28)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.055)!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:.82rem!important;
    font-weight:650!important;
    box-sizing:border-box!important;
  }
  .lofe-drawer-profile-head .lofe-drawer-icon{
    flex:0 0 24px!important;
    width:24px!important;
    height:24px!important;
    color:#9bdcff!important;
  }
  .lofe-drawer-profile-head .lofe-drawer-icon::before{font-size:1.15rem!important}
  .lofe-drawer-profile-head.active{background:rgba(35,158,218,.19)!important}
  body .site-header .menu-button{
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    display:flex!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid rgba(132,205,240,.42)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:0!important;
  }
  .lofe-menu-text{display:none!important}
  .lofe-menu-bars{display:flex!important;flex-direction:column!important;gap:5px!important;width:24px!important}
  .lofe-menu-bars i{display:block!important;width:24px!important;height:3px!important;border-radius:4px!important;background:#fff!important}

  body #site-nav{
    position:fixed!important;
    z-index:10020!important;
    inset:0 auto 0 0!important;
    display:flex!important;
    flex-direction:column!important;
    width:min(86vw,370px)!important;
    max-width:calc(100vw - 44px)!important;
    height:100dvh!important;
    min-height:100vh!important;
    padding:0 0 calc(18px + env(safe-area-inset-bottom,0px))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    border:0!important;
    border-radius:0 22px 22px 0!important;
    background:#082c47!important;
    box-shadow:12px 0 35px rgba(0,0,0,.28)!important;
    transform:translate3d(-104%,0,0)!important;
    transition:transform .17s cubic-bezier(.22,.78,.28,1)!important;
    visibility:visible!important;
    opacity:1!important;
  }
  body #site-nav.open{transform:translate3d(0,0,0)!important}
  .lofe-drawer-links{display:flex!important;flex-direction:column!important;gap:5px!important;padding:12px 14px 18px!important}

  .lofe-drawer-head{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    gap:3px!important;
    padding:calc(env(safe-area-inset-top,0px) + 24px) 66px 22px 24px!important;
    border-bottom:1px solid rgba(142,207,239,.2)!important;
    background:linear-gradient(145deg,#0a3654,#082c47)!important;
    color:#fff!important;
  }
  .lofe-drawer-head small{color:#b9d9ec!important;font-size:.72rem!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase!important}
  .lofe-drawer-head strong{color:#fff!important;font-size:1.35rem!important;font-weight:750!important;line-height:1.12!important}
  .lofe-drawer-head span{color:#d5eaf5!important;font-size:.79rem!important}
  .lofe-drawer-close{
    position:absolute!important;
    top:calc(env(safe-area-inset-top,0px) + 18px)!important;
    right:16px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:42px!important;
    height:42px!important;
    padding:0!important;
    border:1px solid rgba(165,217,242,.34)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.06)!important;
    color:#fff!important;
    font-size:1.7rem!important;
    font-weight:300!important;
    line-height:1!important;
  }

  body #site-nav a,
  body #site-nav .nav-form button{
    display:flex!important;
    align-items:center!important;
    gap:14px!important;
    width:100%!important;
    min-height:52px!important;
    margin:0!important;
    padding:8px 12px!important;
    border:0!important;
    border-radius:12px!important;
    background:transparent!important;
    color:#fff!important;
    box-shadow:none!important;
    text-align:left!important;
    text-decoration:none!important;
    font-size:.94rem!important;
    font-weight:650!important;
    box-sizing:border-box!important;
  }
  body #site-nav a.active{background:rgba(35,158,218,.19)!important;color:#fff!important}
  body #site-nav a:active,
  body #site-nav .nav-form button:active{background:rgba(255,255,255,.09)!important}
  body #site-nav .nav-form{display:block!important;width:100%!important;margin:0!important;padding:0!important}
  body #site-nav .nav-spacer{display:none!important}

  .lofe-drawer-icon{
    position:relative!important;
    flex:0 0 31px!important;
    width:31px!important;
    height:31px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:#9bdcff!important;
  }
  .lofe-drawer-icon::before{font-size:1.45rem!important;line-height:1!important}
  .lofe-icon-home::before{content:'⌂'}
  .lofe-icon-trophy::before{content:'★'}
  .lofe-icon-calendar::before{content:'▣'}
  .lofe-icon-users::before{content:'♟'}
  .lofe-icon-pitch::before{content:'⚽'}
  .lofe-icon-chart::before{content:'▥'}
  .lofe-icon-live::before{content:'◉'}
  .lofe-icon-list::before{content:'☷'}
  .lofe-icon-plus::before{content:'⊕'}
  .lofe-icon-settings::before{content:'⚙'}
  .lofe-icon-user::before{content:'●'}
  .lofe-icon-exit::before{content:'↪'}

  .lofe-mobile-nav-backdrop{
    position:fixed!important;
    z-index:10010!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:rgba(0,16,28,.56)!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .14s ease-out!important;
  }
  html.lofe-menu-open .lofe-mobile-nav-backdrop{opacity:1!important;pointer-events:auto!important}

  /* Il saluto passa nel drawer: nella Home resta solo la parte visiva/season della hero. */
  body.page-home .lofe-president-hero__content h1,
  body.page-home .lofe-president-hero__content .lofe-hero-user{display:none!important}

  /* Il menu rapido Home deve restare sotto al drawer/backdrop. */
  .lofe-home-bottom-nav{z-index:9000!important}
}

@media (min-width:801px){
  .lofe-mobile-back,.lofe-mobile-nav-backdrop,.lofe-drawer-head{display:none!important}
  .lofe-drawer-links{display:contents!important}
  .lofe-menu-bars{display:none!important}
  .lofe-menu-text{display:inline!important}
}

@media (prefers-reduced-motion:reduce){
  @media (max-width:800px){body #site-nav,.lofe-mobile-nav-backdrop{transition:none!important}}
}


/* v205 - navigazione mobile definitiva */
@media (max-width:800px){
  /* Home: nessuna freccia. Il menu laterale si apre dalle tre linee a sinistra. */
  body.page-home .lofe-mobile-back{display:none!important}
  body.page-home .site-header .menu-button{
    display:flex!important;
    grid-column:1!important;
    grid-row:1!important;
    justify-self:start!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.page-home .lofe-menu-bars{
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    width:25px!important;
  }
  body.page-home .lofe-menu-bars i{
    display:block!important;
    width:25px!important;
    height:3px!important;
    border-radius:4px!important;
    background:#fff!important;
  }

  /* Pagine interne: niente ex hamburger/riquadro a destra. Solo freccia verso Home. */
  body:not(.page-home) .site-header .menu-button{display:none!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body:not(.page-home) .lofe-mobile-back{
    display:flex!important;
    text-decoration:none!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  /* Stagione e Profilo compatti sulla stessa riga, senza pallino. */
  .lofe-drawer-season-line{
    display:flex!important;
    align-items:center!important;
    gap:0!important;
    flex-wrap:wrap!important;
    margin-top:3px!important;
    color:#b8d7e8!important;
    font-size:.78rem!important;
    font-weight:500!important;
  }
  .lofe-drawer-profile-inline{
    display:inline!important;
    margin:0 0 0 5px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#fff!important;
    font-size:inherit!important;
    font-weight:700!important;
    text-decoration:none!important;
  }
  .lofe-drawer-profile-inline::before{content:'-';margin-right:5px!important;color:#b8d7e8!important;font-weight:400!important}
  .lofe-drawer-profile-inline.active{text-decoration:underline!important;text-underline-offset:3px!important}
  .lofe-drawer-profile-head{display:none!important}

  /* Le informazioni Presidente/Stagione sono gia' nel drawer: rimuovi il blocco dalla Home mobile. */
  body.page-home .lofe-president-hero{display:none!important}
}



/* v207 - fluidita mobile: solo compositor, feedback tap e page entry */
@media (max-width:800px){
  html{overscroll-behavior-x:none}
  body{-webkit-tap-highlight-color:transparent}

  body #site-nav{
    will-change:transform!important;
    backface-visibility:hidden!important;
    -webkit-backface-visibility:hidden!important;
    contain:paint!important;
  }
  .lofe-mobile-nav-backdrop{
    will-change:opacity!important;
    backface-visibility:hidden!important;
  }

  .lofe-mobile-back,
  body .site-header .menu-button,
  .lofe-drawer-close,
  body #site-nav a,
  body #site-nav .nav-form button,
  .lofe-home-bottom-nav__item{
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  .lofe-mobile-back,
  body .site-header .menu-button,
  .lofe-drawer-close{
    transition:transform .10s ease-out,background-color .10s ease-out,border-color .10s ease-out!important;
  }
  .lofe-mobile-back:active,
  body .site-header .menu-button:active,
  .lofe-drawer-close:active{
    transform:scale(.94)!important;
  }

  body #site-nav a,
  body #site-nav .nav-form button{
    transition:background-color .10s ease-out,transform .10s ease-out!important;
  }
  body #site-nav a:active,
  body #site-nav .nav-form button:active{
    transform:scale(.985)!important;
  }

  .lofe-home-bottom-nav__item{
    transition:transform .10s ease-out,opacity .10s ease-out!important;
  }
  .lofe-home-bottom-nav__item:active{
    transform:translate3d(0,1px,0) scale(.96)!important;
    opacity:.82!important;
  }
}

@media (prefers-reduced-motion:reduce){
  @media (max-width:800px){
    .lofe-mobile-back,
    body .site-header .menu-button,
    .lofe-drawer-close,
    body #site-nav a,
    body #site-nav .nav-form button,
    .lofe-home-bottom-nav__item{transition:none!important}
  }
}




/* v211 - Home: benvenuto solo desktop. Mobile senza alcun blocco di saluto. */
@media (max-width:800px){
  body.page-home .lofe-president-hero{display:none!important}
  body.page-home .welcome-president,
  body.page-home .mobile-welcome-first{display:none!important}

  /* Live mobile: rimuove soltanto la dicitura "Live · Apertura Nª giornata". */
  body.page-live .live-status .live-dot,
  body.page-live .live-status > div > strong{display:none!important}
}

/* v217: drawer/backdrop sono portalizzati sotto <body> su mobile, fuori dallo sticky header. */
@media (max-width:800px){
  body > #site-nav{position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;z-index:10020!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
  body > .lofe-mobile-nav-backdrop{position:fixed!important;inset:0!important;z-index:10010!important;touch-action:none!important}
  html.lofe-menu-open,html.lofe-menu-open body{overflow:visible!important}
}

/* v218 - ottimizzazioni fluidita mobile senza cambiare la navigazione stabile v217 */
@media (max-width:800px){
  body .site-header{
    -webkit-backface-visibility:hidden!important;
    backface-visibility:hidden!important;
    transform:translateZ(0)!important;
  }

  body #site-nav{
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
    -webkit-backface-visibility:hidden!important;
    backface-visibility:hidden!important;
    will-change:transform!important;
    contain:layout paint style!important;
    transform:translate3d(-101%,0,0)!important;
    transition:transform .14s ease-out!important;
  }
  body #site-nav.open{transform:translate3d(0,0,0)!important}

  .lofe-mobile-nav-backdrop{
    -webkit-backface-visibility:hidden!important;
    backface-visibility:hidden!important;
    will-change:opacity!important;
    transition:opacity .11s linear!important;
    touch-action:none!important;
  }

  /* Evita lavori grafici inutili sui contenuti coperti dal drawer. */
  html.lofe-menu-open body > *:not(#site-nav):not(.lofe-mobile-nav-backdrop){
    pointer-events:none!important;
  }
  html.lofe-menu-open body #site-nav,
  html.lofe-menu-open body .lofe-mobile-nav-backdrop{
    pointer-events:auto!important;
  }
}
