/* Shared mobile navigation layout fix (all pages).
   The theme switches to mobile mode at 1199px in js/scripts.js. */
@media screen and (max-width: 1199px) {
  :root { --mobile-navbar-height: 76px; }
  html { scroll-padding-top: var(--mobile-navbar-height); }
  body { padding-top: var(--mobile-navbar-height); }
  #header, #header.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0 !important;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 9px rgba(0,0,0,.14);
  }
  #header .header_top { display: none; }
  #header #header_content,
  #header #header_content.header_content,
  #header #header_content.header_mobile {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    height: var(--mobile-navbar-height);
    background-color: #fff;
    box-shadow: none;
    padding: 0;
    text-align: right;
  }
  #header #header_content > .container {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #header #header_content .header_logo {
    float: none;
    display: flex;
    align-items: center;
    height: 100%;
    line-height: normal;
    margin: 0;
  }
  #header #header_content .header_logo a { display: flex; align-items: center; height: 100%; }
  #header #header_content .header_logo img {
    display: block;
    width: auto;
    height: 64px;
    max-height: calc(var(--mobile-navbar-height) - 10px);
    max-width: 150px;
    object-fit: contain;
  }
  #header #header_content .menu-bars {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-left: auto;
    z-index: 2;
  }
  #header #header_content .header_menu {
    position: fixed;
    top: var(--mobile-navbar-height) !important;
    bottom: 0;
    right: -270px;
    left: auto;
    width: min(270px, 85vw);
    height: calc(100vh - var(--mobile-navbar-height));
    height: calc(100dvh - var(--mobile-navbar-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #e1bd85;
    z-index: 9999;
  }
  #header #header_content .header_menu.active { right: 0; }
  #header #header_content .header_menu .menu > li { float: none; width: 100%; }
  #header #header_content .header_menu .menu > li > a {
    line-height: 1.4;
    padding: 14px 20px;
    color: #fff;
    font-size: 14px;
  }
  #header #header_content .header_menu .menu > li > a:hover { color: #232323; }
  /* Inner page banners used the old header's overlay spacing. */
  .section-sub-banner { padding-top: 38px; }
  .section-sub-banner .sub-banner .text h2 { margin-top: 24px; }
}
@media screen and (max-width: 360px) {
  :root { --mobile-navbar-height: 68px; }
  #header #header_content .header_logo img { height: 56px; }
}
