/* Desktop: glass wrapper is transparent — children keep original flex layout */
.mobile-glass-pill {
  display: contents;
}

.mobile-logo,
.mobile-header-divider,
.mobile-lang-trigger {
  display: none;
}

.mobile-lang-wrap {
  display: contents;
}

.head_btn a i {
  margin-right: 8px;
}

@media only screen and (min-width: 901px) {
  .head_btn a i {
    display: none;
  }
}

/* Mobile glass header (mockup-style) */
@media only screen and (max-width: 900px) {
  #myHeader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    background: transparent !important;
    padding: max(12px, env(safe-area-inset-top)) 0 0;
    z-index: 1000;
  }

  #myHeader .container-fluid {
    padding: 0 16px;
  }

  #myHeader .head-all {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 0;
  }

  .mobile-glass-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }

  .mobile-lang-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    min-height: 44px;
  }

  .mobile-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    background: none;
    border: none;
    padding: 0;
    color: #365140;
    font-family: Raleway, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-lang-trigger .fa-globe {
    font-size: 20px;
  }

  .mobile-lang-chevron {
    font-size: 10px;
    opacity: 0.7;
  }

  .mobile-logo {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
  }

  .mobile-logo a {
    display: block;
  }

  .mobile-logo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
    background: rgba(54, 81, 64, 0.85);
  }

  .mobile-header-divider {
    display: block;
    width: 1px;
    height: 28px;
    flex: 0 0 1px;
    background: rgba(54, 81, 64, 0.2);
  }

  .mobile-lang-wrap .language {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    overflow: hidden;
    z-index: 3;
  }

  div#google_translate_element_desktop {
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
  }

  /* Hide Google Translate chrome — tap invisible select over globe */
  .mobile-lang-wrap .goog-te-gadget {
    font-size: 0 !important;
    color: transparent !important;
    line-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .mobile-lang-wrap .goog-te-gadget > span,
  .mobile-lang-wrap .goog-te-gadget > div > span,
  .mobile-lang-wrap .goog-te-gadget img,
  .mobile-lang-wrap .goog-te-gadget a,
  .mobile-lang-wrap .goog-te-gadget .goog-te-menu-value,
  .mobile-lang-wrap .goog-te-gadget .goog-te-menu-value span,
  .mobile-lang-wrap .goog-te-gadget-simple .goog-te-menu-value,
  .mobile-lang-wrap .goog-te-gadget-simple .goog-te-menu-value span,
  .mobile-lang-wrap .goog-te-gadget-simple img {
    display: none !important;
  }

  .mobile-lang-wrap .goog-te-gadget-simple {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .mobile-lang-wrap .goog-te-combo,
  .mobile-lang-wrap select.goog-te-combo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
    border: none !important;
    -webkit-appearance: none;
    appearance: none;
  }

  #myHeader .toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 0 0 auto;
    order: unset;
    visibility: visible;
    cursor: pointer;
    z-index: 4;
    background: transparent;
    border: none;
    padding: 0;
  }

  #myHeader .toggle > * {
    width: 24px;
    height: 2.5px;
    background: #365140;
    margin: 3.5px 0;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  #myHeader .toggle.active .line1 {
    transform: rotate(-45deg) translate(-4px, 5px);
  }

  #myHeader .toggle.active .line2 {
    opacity: 0;
  }

  #myHeader .toggle.active .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  #myHeader .nab-navbar {
    order: 2;
    width: 100%;
    height: 0;
    position: static;
    display: block;
    margin: 0;
    overflow: visible;
  }

  #myHeader .nab-navbar .navigation {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
  }

  #myHeader .nab-navbar .navigation.is-open {
    display: flex !important;
  }

  #myHeader .navigation li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(54, 81, 64, 0.08);
  }

  #myHeader .navigation li:last-child {
    border-bottom: none;
  }

  #myHeader .navigation li a {
    display: block;
    padding: 14px 20px;
    color: #1a1a1a !important;
    font-size: 15px;
    letter-spacing: 0.03em;
    font-family: Raleway, sans-serif;
  }

  #myHeader .navigation .logo {
    display: none;
  }

  #myHeader .head_btn {
    display: flex !important;
    justify-content: center;
    order: 3;
    width: 100%;
    margin: 0;
  }

  #myHeader .head_btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 999px;
    background: #365140;
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    font-family: Raleway, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(54, 81, 64, 0.45);
  }

  #myHeader .head_btn a:hover {
    background: #2d4333;
    color: #fff;
  }

  #myHeader .head_btn a i {
    font-size: 18px;
    margin-right: 0;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
  }

  /* Scrolled / sticky: solid bar for readability */
  #myHeader.sticky {
    position: fixed;
    background: rgba(235, 231, 224, 0.92) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }

  #myHeader.sticky .mobile-glass-pill {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(54, 81, 64, 0.15);
  }

  #myHeader.sticky .toggle > * {
    background: #365140;
  }

  /* Hide Google top banner on mobile */
  .goog-te-banner-frame,
  body > .skiptranslate {
    display: none !important;
  }

  body {
    top: 0 !important;
  }

  .inner_banner {
    padding-top: 118px;
  }

  .inner_banner .in_text {
    top: auto;
    bottom: 18%;
  }

  /* Quote page: header in document flow so BOOK NOW does not cover content */
  body.page-getquote #myHeader {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding-bottom: 8px;
  }

  body.page-getquote #myHeader.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  body.page-getquote nav.breadcrumb,
  body.page-getquote .page-quote-banner {
    padding-top: 16px !important;
  }

  body.page-getquote section > .container,
  body.page-getquote #getquote {
    scroll-margin-top: 140px;
  }
}
