/* AITW v27 — header LOGO only. Keep the v26 header/layout/mobile-gap rules unchanged.
   Images retain their aspect ratio; desktop and phone sizes follow the same design scale.
   Never target .footer-logo-hp: the footer has its own intentional logo size. */
#header.header-hp .logo-hp > a {
  display:flex !important; align-items:center !important; justify-content:center !important;
  line-height:0 !important; max-width:100% !important;
}
#header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"] {
  display:block !important; width:auto !important; height:88px !important;
  max-width:180px !important; max-height:none !important;
  object-fit:contain !important; object-position:center !important;
  flex-shrink:0 !important;
}
/* Two-line menu: the logo fits inside the existing 170px brand column. */
@media (min-width:992px) and (max-width:1679.98px) {
  #header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"] {
    height:79px !important; max-width:160px !important;
  }
}
/* Mobile: enlarge the logo while respecting the commerce and hamburger controls.
   No header positioning/height, margin or navigation display changes here. */
@media (max-width:991.98px) {
  #header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"] {
    height:clamp(57px, 16vw, 70px) !important;
    max-width:clamp(110px, 31vw, 140px) !important;
  }
}
@media (max-width:360px) {
  #header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"] {
    height:57px !important; max-width:110px !important;
  }
}
/* PHP commerce, login and admin pages have a different shared header. */
.site-header .aitw-brand-stack .logo > img[src="/assets/aitw-logo.png"],
.site-header a.logo > img[src="/assets/aitw-logo.png"] {
  display:block !important; width:auto !important; height:88px !important;
  max-height:none !important; max-width:180px !important; object-fit:contain !important;
}
@media (min-width:701px) and (max-width:1679.98px) {
  .site-header .aitw-brand-stack .logo > img[src="/assets/aitw-logo.png"],
  .site-header a.logo > img[src="/assets/aitw-logo.png"] {height:79px !important;max-width:160px !important;}
}
@media (max-width:700px) {
  .site-header .aitw-brand-stack .logo > img[src="/assets/aitw-logo.png"],
  .site-header a.logo > img[src="/assets/aitw-logo.png"] {height:clamp(57px, 16vw, 70px) !important;max-width:clamp(110px,31vw,140px) !important;}
}

/* v28: narrow screens only. Leave breathing room above and below the brand.
   This modifies the logo image, NOT header height, document spacing or nav. */
@media screen and (max-width:600px) {
  #header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"],
  .site-header .aitw-brand-stack .logo > img[src="/assets/aitw-logo.png"],
  .site-header a.logo > img[src="/assets/aitw-logo.png"] {
    height:clamp(48px, 12vw, 58px) !important;
    max-width:124px !important;
  }
}
@media screen and (max-width:360px) {
  #header.header-hp .logo-hp > a > img[src="/assets/aitw-logo.png"],
  .site-header .aitw-brand-stack .logo > img[src="/assets/aitw-logo.png"],
  .site-header a.logo > img[src="/assets/aitw-logo.png"] {
    height:46px !important;
    max-width:108px !important;
  }
}
