/* Theo Properties RC1.0.11.20.25 — Mobile & Tablet Footer Containment Lock
   Responsive footer-only correction. Desktop >1180px remains unchanged. */

@media (max-width:1180px){
  html,body{max-width:100%;overflow-x:clip!important}
  .site-footer-v4{
    width:100%!important;
    max-width:100vw!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  .site-footer-v4::before,
  .site-footer-v4::after{max-width:100%!important;overflow:hidden!important}
  .site-footer-v4 .footer-v4-shell{
    width:min(100% - 40px,1040px)!important;
    max-width:calc(100% - 40px)!important;
    margin:0 auto!important;
    padding:34px 0 30px!important;
    box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:28px 28px!important;
    align-items:start!important;
  }
  .site-footer-v4 .footer-v4-shell>*{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  .site-footer-v4 .footer-v4-brand{grid-column:1/-1!important}
  .site-footer-v4 .footer-v4-brandmark{max-width:min(310px,100%)!important}
  .site-footer-v4 .footer-v4-brandmark img{display:block!important;width:min(280px,100%)!important;height:auto!important;max-width:100%!important}
  .site-footer-v4 .footer-v4-brand>p{max-width:560px!important}
  .site-footer-v4 .footer-v4-links{
    padding:18px 0 0!important;
    border-left:0!important;
    border-top:1px solid rgba(35,65,83,.10)!important;
    min-width:0!important;
  }
  .site-footer-v4 .footer-v4-links a{max-width:100%!important;overflow-wrap:anywhere!important}
  .site-footer-v4 .footer-v4-help{
    grid-column:1/-1!important;
    justify-self:stretch!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:36px minmax(0,1fr) auto!important;
    gap:13px!important;
    align-items:center!important;
    padding:15px 16px!important;
    box-sizing:border-box!important;
  }
  .site-footer-v4 .footer-v4-help-icon{margin:0!important}
  .site-footer-v4 .footer-v4-help p{margin:4px 0 0!important;max-width:none!important}
  .site-footer-v4 .footer-v4-help-action{align-self:center!important;white-space:nowrap!important}
  .site-footer-v4 .footer-v4-bottom{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:13px 20px!important;
  }
}

/* Tablet portrait: iPad and Android tablets use a deliberate two-column footer. */
@media (orientation:portrait) and (min-width:701px) and (max-width:1024px){
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 44px)!important;
    max-width:calc(100% - 44px)!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:26px 24px!important;
  }
  .site-footer-v4 .footer-v4-brand{grid-column:1/-1!important}
  .site-footer-v4 .footer-v4-help{grid-column:1/-1!important}
  .site-footer-v4::before{
    background-size:auto 72%!important;
    background-position:center bottom!important;
  }
}

/* Tablet landscape: still contained, with balanced 2x2 composition instead of squeezed desktop columns. */
@media (orientation:landscape) and (min-width:701px) and (max-width:1180px){
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 48px)!important;
    max-width:calc(100% - 48px)!important;
    grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,.8fr)!important;
    gap:26px!important;
  }
  .site-footer-v4 .footer-v4-brand{grid-column:auto!important}
  .site-footer-v4 .footer-v4-help{
    grid-column:1/-1!important;
    grid-template-columns:34px minmax(0,1fr) auto!important;
  }
}

/* Phones: remove all desktop-grid carryover and prevent horizontal overflow. */
@media (max-width:700px){
  .site-footer-v4{
    margin-top:34px!important;
    margin-left:0!important;
    margin-right:0!important;
    border-radius:0!important;
  }
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 28px)!important;
    max-width:calc(100% - 28px)!important;
    grid-template-columns:1fr!important;
    padding:28px 0 24px!important;
    gap:20px!important;
  }
  .site-footer-v4 .footer-v4-brand,
  .site-footer-v4 .footer-v4-links,
  .site-footer-v4 .footer-v4-help{grid-column:1!important;width:100%!important;max-width:100%!important}
  .site-footer-v4 .footer-v4-brandmark{display:block!important;max-width:min(245px,78vw)!important}
  .site-footer-v4 .footer-v4-brandmark img{width:min(235px,76vw)!important;max-width:100%!important}
  .site-footer-v4 .footer-v4-brand>p{font-size:12.5px!important;line-height:1.5!important;max-width:100%!important}
  .site-footer-v4 .footer-v4-journey{gap:6px!important;font-size:9px!important}
  .site-footer-v4 .footer-v4-journey i{width:8px!important}
  .site-footer-v4 .footer-v4-contact{gap:8px!important}
  .site-footer-v4 .footer-v4-contact span,
  .site-footer-v4 .footer-v4-contact a{min-width:0!important;max-width:100%!important;padding:0 11px!important}
  .site-footer-v4 .footer-v4-links{padding-top:15px!important}
  .site-footer-v4 .footer-v4-links a{font-size:11.5px!important}
  .site-footer-v4 .footer-v4-help{
    display:block!important;
    padding:14px!important;
    border-radius:13px!important;
  }
  .site-footer-v4 .footer-v4-help-icon{margin:0 0 10px!important}
  .site-footer-v4 .footer-v4-help strong{font-size:16px!important}
  .site-footer-v4 .footer-v4-help p{font-size:10.5px!important;margin:6px 0 11px!important}
  .site-footer-v4 .footer-v4-help-action{width:max-content!important;max-width:100%!important}
  .site-footer-v4 .footer-v4-bottom{
    padding:12px 14px calc(12px + env(safe-area-inset-bottom))!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:8px!important;
    font-size:9.5px!important;
  }
  .site-footer-v4 .footer-v4-bottom nav{display:flex!important;flex-wrap:wrap!important;gap:14px!important}
  body.signed-mode .site-footer-v4{margin-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  .site-footer-v4::before{
    background-size:auto 62%!important;
    background-position:center bottom!important;
  }
}

@media (max-width:420px){
  .site-footer-v4 .footer-v4-shell{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important}
  .site-footer-v4 .footer-v4-contact{display:grid!important;grid-template-columns:1fr!important}
  .site-footer-v4 .footer-v4-contact span,
  .site-footer-v4 .footer-v4-contact a{width:100%!important;justify-content:flex-start!important}
}

/* Coarse-pointer tablets that report desktop-like CSS widths. */
@media (pointer:coarse) and (orientation:portrait) and (min-width:1025px) and (max-width:1280px){
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 52px)!important;
    max-width:calc(100% - 52px)!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:28px 26px!important;
  }
  .site-footer-v4 .footer-v4-brand,
  .site-footer-v4 .footer-v4-help{grid-column:1/-1!important}
}
@media (pointer:coarse) and (orientation:landscape) and (min-width:1181px) and (max-width:1366px){
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 56px)!important;
    max-width:calc(100% - 56px)!important;
    grid-template-columns:minmax(0,1.15fr) minmax(0,.8fr) minmax(0,.8fr)!important;
    gap:28px!important;
  }
  .site-footer-v4 .footer-v4-brand{grid-column:auto!important}
  .site-footer-v4 .footer-v4-help{grid-column:1/-1!important;width:100%!important;max-width:none!important}
}

/* Phone landscape: stay compact instead of inheriting a squeezed tablet/desktop footer. */
@media (orientation:landscape) and (max-height:600px) and (max-width:1024px){
  .site-footer-v4 .footer-v4-shell{
    width:calc(100% - 36px)!important;
    max-width:calc(100% - 36px)!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:20px 24px!important;
    padding:24px 0 22px!important;
  }
  .site-footer-v4 .footer-v4-brand,
  .site-footer-v4 .footer-v4-help{grid-column:1/-1!important}
  .site-footer-v4 .footer-v4-help{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto!important}
}
