/* AVIX Water v113 — final pending mobile refinements
   Loaded after v112. Deliberately scoped and specific so these approved
   corrections win over all older mobile !important layers. */

@media (max-width:767px){
  /* ----------------------------------------------------------------------
     01. MOBILE BURGER MENU — make the current page immediately visible.
     Keep the existing menu architecture; add only a restrained active state.
     ---------------------------------------------------------------------- */
  html body.home-v8:not(.page-diagram) .av5-nav > a[aria-current="page"]{
    position:relative!important;
    color:#147c9d!important;
    background:rgba(75,200,239,.11)!important;
    border-left:3px solid #4bc8ef!important;
    border-radius:10px!important;
    padding-left:13px!important;
    padding-right:12px!important;
    font-weight:780!important;
  }
  html body.home-v8:not(.page-diagram) .av5-nav > a[aria-current="page"]::after{
    right:12px!important;
    left:12px!important;
    background:#4bc8ef!important;
  }
  /* Contact remains the menu CTA, but still gets a clear current-page cue. */
  html body.home-v8:not(.page-diagram) .av5-nav > a.av5-nav-contact[aria-current="page"]{
    border-left:3px solid #147c9d!important;
    box-shadow:inset 3px 0 0 rgba(20,124,157,.22)!important;
  }

  /* ----------------------------------------------------------------------
     02. PRODUCTS HERO — the four-bottle group was still visually too large.
     Reduce the whole supplied artwork only; no crop or bottle redesign.
     ---------------------------------------------------------------------- */
  html body.home-v8.products-v3.avix-principal-page .p3-hero-products{
    width:min(64%,240px)!important;
    max-width:240px!important;
    margin:10px auto 30px!important;
  }
  html body.home-v8.products-v3.avix-principal-page .p3-hero-products img{
    width:100%!important;
    max-width:240px!important;
    height:auto!important;
    margin:0 auto!important;
  }
  html body.home-v8.products-v3.avix-principal-page .p3-hero-halo{
    width:250px!important;
    height:250px!important;
    transform:scale(.9)!important;
  }

  /* ----------------------------------------------------------------------
     03. CONTACT PAGE — remove the accidental large gap between the enquiry
     choice cards and the enquiry form. Keep the approved 2x2 cards.
     ---------------------------------------------------------------------- */
  html body.home-v8.tc-contact-page.avix-principal-page .tc-contact-path{
    padding:28px 0 20px!important;
  }
  html body.home-v8.tc-contact-page.avix-principal-page .tc-contact-path .sr-contact-choices{
    margin:0!important;
    padding:0!important;
  }
  html body.home-v8.tc-contact-page.avix-principal-page .tc-contact-main{
    padding-top:28px!important;
  }
  html body.home-v8.tc-contact-page.avix-principal-page .tc-contact-main .av5-section-head{
    margin-top:0!important;
  }

  /* ----------------------------------------------------------------------
     04. GLOBAL FOOTER CONTACT — restore standard readable typography and
     compact the three columns without squeezing the address values.
     ---------------------------------------------------------------------- */
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact{
    display:grid!important;
    grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr) auto!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    row-gap:6px!important;
    align-items:end!important;
    min-height:0!important;
    margin-top:14px!important;
    padding:0!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact > h2{
    grid-column:1/-1!important;
    margin:0 0 3px!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact-block{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-end!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact-block span{
    margin:0 0 5px!important;
    font-size:10px!important;
    line-height:1!important;
    letter-spacing:.10em!important;
    font-weight:800!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact-block a{
    margin:0!important;
    font-size:14px!important;
    line-height:1.25!important;
    font-weight:500!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-linkedin{
    grid-column:3!important;
    grid-row:2!important;
    align-self:end!important;
    justify-self:end!important;
    min-height:0!important;
    margin:0!important;
    padding:0 0 1px!important;
    font-size:14px!important;
    line-height:1.25!important;
    font-weight:750!important;
    white-space:nowrap!important;
  }

  /* One precise T-junction above the office pair. */
  html body:not(.page-diagram) .avix-global-footer .avix-footer-offices{
    position:relative!important;
    margin-top:13px!important;
    border-top:1px solid rgba(255,255,255,.17)!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-offices::after{
    top:0!important;
    bottom:0!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-office,
  html body:not(.page-diagram) .avix-global-footer .avix-footer-office + .avix-footer-office{
    padding-top:15px!important;
  }
}

/* Very narrow phones: keep values readable without letting the 3-column row
   overflow. The overall visual hierarchy remains unchanged. */
@media (max-width:360px){
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact{
    grid-template-columns:minmax(0,1.45fr) minmax(0,.85fr) auto!important;
    column-gap:7px!important;
  }
  html body:not(.page-diagram) .avix-global-footer .avix-footer-contact-block a,
  html body:not(.page-diagram) .avix-global-footer .avix-footer-linkedin{
    font-size:12.5px!important;
  }
}

@media (max-width:767px){
  /* Preserve the Contact CTA treatment when Contact itself is the current page. */
  html body.home-v8:not(.page-diagram) .av5-nav > a.av5-nav-contact[aria-current="page"]{
    background:#4bc8ef!important;
    color:#0b2027!important;
    border-left:3px solid #147c9d!important;
  }
  html body.home-v8:not(.page-diagram) .av5-nav > a.av5-nav-contact[aria-current="page"]::after{
    display:none!important;
  }
}
