/* V54: coherent centered footer on narrow screens, real two-column Menu/Contatti */
/* Desktop layout remains four columns through display:contents. */
.site-footer .footer-links-v54 {display:contents;}
@media (max-width:700px) {
  .site-footer .footer-grid.footer-grid-v52 {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:0 !important;
    justify-items:stretch !important;
    width: min(calc(100% - 36px), 560px) !important;
    margin:0 auto !important;
    padding:34px 0 24px !important;
  }
  .site-footer .footer-grid-v52 > .footer-brand,
  .site-footer .footer-grid-v52 > .footer-links-v54,
  .site-footer .footer-grid-v52 > .footer-map-v52 {
    min-width:0 !important;
    width:100% !important;
    margin:0 !important;
    grid-area:auto !important;
    text-align:center !important;
  }
  .site-footer .footer-grid-v52 > .footer-brand {
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    padding:0 0 25px !important;
  }
  .site-footer .footer-brand img.logo-dark,
  .site-footer .footer-brand img.logo-light {
    width:124px !important;
    max-width:124px !important;
    height:auto !important;
    margin:0 auto 16px !important;
  }
  .site-footer .footer-brand > p {
    max-width:36ch !important;
    margin:0 auto !important;
    text-align:center !important;
  }
  .site-footer .footer-brand .footer-socials {
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    margin:20px auto 0 !important;
    gap:12px !important;
  }
  .site-footer .footer-grid-v52 > .footer-links-v54 {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    column-gap:clamp(12px,4vw,28px) !important;
    padding:25px 0 !important;
    border-top:1px solid rgba(138,223,172,.17) !important;
    align-items:start !important;
  }
  .site-footer .footer-links-v54 > .footer-menu-v52,
  .site-footer .footer-links-v54 > .footer-contacts-v52 {
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:11px !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    grid-area:auto !important;
    text-align:center !important;
  }
  .site-footer .footer-links-v54 h3 {
    width:100% !important;
    flex:none !important;
    text-align:center !important;
    margin:0 0 9px !important;
  }
  .site-footer .footer-links-v54 .footer-menu-v52 a {
    display:block !important;
    padding:3px 0 !important;
    margin:0 !important;
    min-height:auto !important;
    line-height:1.45 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    text-align:center !important;
    overflow-wrap:normal !important;
  }
  .site-footer .footer-links-v54 .footer-contacts-v52 p,
  .site-footer .footer-links-v54 .footer-contacts-v52 a {
    margin:0 !important;
    padding:0 !important;
    text-align:center !important;
    max-width:100% !important;
    font-size:clamp(.78rem,2.7vw,.94rem) !important;
    line-height:1.5 !important;
    overflow-wrap:anywhere;
  }
  .site-footer .footer-grid-v52 > .footer-map-v52 {
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    padding:25px 0 0 !important;
    border-top:1px solid rgba(138,223,172,.17) !important;
  }
  .site-footer .footer-map-v52 h3 {
    width:100% !important;
    margin:0 0 18px !important;
    text-align:center !important;
  }
  .site-footer .footer-map-v52 iframe {
    display:block !important;
    width:100% !important;
    height:205px !important;
    max-width:460px !important;
    margin:0 auto !important;
  }
  body.light-mode .site-footer .footer-links-v54,
  body.light-mode .site-footer .footer-grid-v52 > .footer-map-v52 {
    border-top-color:rgba(18,118,90,.20) !important;
  }
}
