/* Site-wide fixed header — every page */

header.header-area {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
  -webkit-transform: none !important;
  transform: none !important;
}

/* Keep menu bar inside the fixed header (not a second fixed layer) */
header.header-area .te-header-menu-area,
header.header-area .te-header-menu-area.te-sticky-header,
header.header-area .te-header-menu-area.position-fixed,
header.header-area .te-header-menu-area.te-sticky_menu {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 0 !important;
}

/* No scroll-shrink / logo swap on any page */
header.header-area .te-header-menu-area.te-sticky_menu {
  box-shadow: none;
  background: transparent;
}

header.header-area.style-1 .te-header-menu-area.te-sticky_menu .te-logo .te-standard-logo {
  display: block !important;
}

header.header-area.style-1 .te-header-menu-area.te-sticky_menu .te-logo .te-sticky-logo {
  display: none !important;
}

header.header-area.style-1.background-gray-light {
  background-color: #1b365d;
}

header.header-area.style-1:not(.background-gray-light) {
  background-color: #ffffff;
}

/* Fallback body offset before JS runs (standard logo pages) */
body {
  padding-top: 140px;
}

body:has(.header-top) {
  padding-top: 200px;
}

body:has(.apex-site-header__row) {
  padding-top: 325px;
}

body:has(.header-top):has(.apex-site-header__row) {
  padding-top: 364px;
}

body.apex-inner-page {
  padding-top: 117px !important;
}

@media only screen and (max-width: 991px) {
  body:has(.apex-site-header__row) {
    padding-top: 299px;
  }

  body:has(.header-top):has(.apex-site-header__row) {
    padding-top: 338px;
  }

  body.apex-inner-page {
    padding-top: 78px !important;
  }
}

@media only screen and (max-width: 767px) {
  body {
    padding-top: 100px;
  }

  body:has(.header-top) {
    padding-top: 150px;
  }

  body:has(.apex-site-header__row) {
    padding-top: 247px;
  }

  body:has(.header-top):has(.apex-site-header__row) {
    padding-top: 273px;
  }

  body.apex-inner-page {
    padding-top: 72px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Footer logo: top-left, readable size (overrides template center + huge img) */
/* -------------------------------------------------------------------------- */

.footer .te-footer-widget-info:has(.te-footer-logo) {
  -webkit-box-align: start !important;
  -ms-flex-align: start !important;
  align-items: flex-start !important;
  text-align: left !important;
}

.footer .te-footer-widget-info:has(.te-footer-logo) p {
  text-align: left !important;
}

.footer .te-footer-widget-info:has(.te-footer-logo) .te-footer-logo {
  margin: -12px 0 18px 0 !important;
  text-align: left !important;
  width: auto !important;
  max-width: 100%;
  -ms-flex-item-align: start !important;
  align-self: flex-start !important;
}

.footer .te-footer-widget-info:has(.te-footer-logo) .te-footer-logo a {
  display: block;
}

.footer .te-footer-widget-info:has(.te-footer-logo) .te-footer-logo img {
  margin: 0 auto 0 0 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  max-height: min(3000px, 95vh) !important;
  max-width: min(8000px, 100%) !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  -o-object-fit: contain;
  object-fit: contain;
  -o-object-position: left top;
  object-position: left top;
}

@media only screen and (max-width: 767px) {
  .footer .te-footer-widget-info:has(.te-footer-logo) .te-footer-logo img {
    max-height: min(2400px, 90vh) !important;
    max-width: 100% !important;
  }
}
