/* Shared by both header stylesheet entry points. Desktop starts at 1024px. */
.lgic-header .mob,
#lgic-drawer { display: none; }

/* Let the logo fit beside the existing desktop nav/CTAs at the boundary.
   Their spacing, typography and interaction rules remain unchanged. */
@media (min-width: 1024px) and (max-width: 1100px) {
  html .lgic-header .wrap { grid-template-columns: minmax(0, 1fr) auto auto; }
  html .lgic-header .brand img { max-width: 100%; }
}

@media (max-width: 1023px) {
  /* Keep real fragment links clear of the sticky shared header. */
  html { scroll-padding-top: calc(var(--lgic-header-height, 65px) + 16px); }
  #site-header { position: sticky; top: 0; z-index: 100000; }
  html .lgic-header { background: #fff; box-shadow: none; backdrop-filter: none; }
  html .lgic-header .wrap {
    min-height: 64px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
  }
  html .lgic-header nav[aria-label="Primary"],
  html .lgic-header .ctas { display: none; }
  html .lgic-header .brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
  }
  html .lgic-header .brand img {
    width: 180px; max-width: 100%; height: 36px;
    object-fit: contain; transform: none; filter: none;
  }
  html .lgic-header .mob { display: flex; align-items: center; gap: 8px; }
  html .lgic-header .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px; padding: 0;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    background: #fff; color: #0b1e3a;
    box-shadow: none; cursor: pointer; text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease;
  }
  html .lgic-header .icon-btn:hover,
  html .lgic-header .icon-btn[aria-expanded="true"] { background: #f2f4f7; border-color: #b6c0cc; }
  html .lgic-header .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; }
  .lgic-header .burger-icon { display: block; }
  .lgic-header .close-icon { display: none; font-size: 21px; line-height: 1; }
  .lgic-header .burger[aria-expanded="true"] .burger-icon { display: none; }
  .lgic-header .burger[aria-expanded="true"] .close-icon { display: block; }

  html.nav-open { overflow: hidden; overscroll-behavior: none; }
  html.nav-open body {
    position: fixed;
    top: var(--lgic-scroll-top, 0px);
    left: 0; width: 100%; overflow: hidden;
  }
  .nav-open #site-header { min-height: var(--lgic-header-height, 65px); }
  html.nav-open .lgic-header { position: fixed; top: 0; left: 0; right: 0; }

  #lgic-drawer {
    position: fixed;
    top: var(--lgic-header-height, 65px);
    left: 0; right: 0;
    height: calc(100vh - var(--lgic-header-height, 65px));
    height: calc(100dvh - var(--lgic-header-height, 65px));
    z-index: 999; overflow: hidden;
    background: #0b1e3a; color: #fff;
    font-family: "Montserrat", system-ui, sans-serif;
  }
  #lgic-drawer[aria-hidden="false"] { display: block; }
  #lgic-drawer[hidden],
  #lgic-drawer [hidden] { display: none; }
  #lgic-drawer .mobile-drawer-inner {
    width: 100%; max-width: 600px; height: 100%; margin: 0 auto;
    display: flex; flex-direction: column;
  }
  #lgic-drawer .mobile-nav {
    flex: 1; min-height: 0; overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin; scrollbar-color: #697586 transparent;
    scroll-padding-block: 12px;
    padding: 16px max(24px, env(safe-area-inset-right, 0px)) 20px max(24px, env(safe-area-inset-left, 0px));
  }
  #lgic-drawer a,
  #lgic-drawer button {
    color: inherit; font-family: inherit; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  #lgic-drawer .mobile-nav-link,
  #lgic-drawer .mobile-nav-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 54px; padding: 12px 0;
    font-size: 15px; font-weight: 650; line-height: 1.4;
    letter-spacing: .09em; text-transform: uppercase; text-align: left;
    background: none; border: 0; border-radius: 0; cursor: pointer;
  }
  #lgic-drawer .mobile-nav > * + * { border-top: 1px solid rgba(255,255,255,.12); }
  #lgic-drawer .mobile-chevron {
    width: 8px; height: 8px; margin-right: 3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform 150ms ease;
  }
  #lgic-drawer .mobile-nav-toggle[aria-expanded="true"] .mobile-chevron { transform: rotate(225deg); }
  #lgic-drawer button[aria-expanded="true"] { color: #d9ba7b; }
  #lgic-drawer .mobile-submenu { padding: 0 0 12px 12px; }
  #lgic-drawer .mobile-submenu a {
    display: flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 10px 0;
    color: #dce3ed; font-size: 14px; line-height: 1.5; font-weight: 500;
    overflow-wrap: anywhere;
  }
  #lgic-drawer .mobile-region-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 48px; padding: 10px 0;
    background: none; border: 0; border-radius: 0;
    font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .06em;
    text-align: left; text-transform: uppercase; cursor: pointer;
  }
  #lgic-drawer .mobile-plus { position: relative; flex: 0 0 14px; height: 14px; }
  #lgic-drawer .mobile-plus::before,
  #lgic-drawer .mobile-plus::after { content: ""; position: absolute; background: currentColor; }
  #lgic-drawer .mobile-plus::before { width: 12px; height: 1px; top: 6px; left: 1px; }
  #lgic-drawer .mobile-plus::after { width: 1px; height: 12px; top: 1px; left: 6px; }
  #lgic-drawer [aria-expanded="true"] .mobile-plus::after { display: none; }
  #lgic-drawer .mobile-cities { padding: 0 0 8px 12px; }
  #lgic-drawer .mobile-cities a { font-size: 13px; font-weight: 400; }
  #lgic-drawer .mobile-submenu .mobile-overview { margin-top: 4px; color: #d9ba7b; font-size: 12px; }
  #lgic-drawer .mobile-actions {
    flex: none; display: grid; gap: 4px;
    padding: 16px max(24px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
    border-top: 1px solid rgba(255,255,255,.12);
  }
  #lgic-drawer .mobile-estimate,
  #lgic-drawer .mobile-call {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    min-height: 48px; padding: 12px 16px; line-height: 1.4; text-align: center;
  }
  #lgic-drawer .mobile-estimate {
    background: #c5a059; color: #0b1e3a; border-radius: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  }
  #lgic-drawer .mobile-call { color: #e0e6ee; font-size: 13px; font-weight: 500; }
  #lgic-drawer .mobile-call svg { width: 16px; height: 16px; flex: none; }
  #lgic-drawer .mobile-nav a:hover { color: #fff; }
  #lgic-drawer .mobile-estimate:hover { background: #d9ba7b; }
  #lgic-drawer .mobile-call:hover { color: #fff; }
  #lgic-drawer :focus-visible,
  html .lgic-header :focus-visible { outline: 2px solid #c5a059; outline-offset: 3px; }
}

@media (max-width: 1023px) and (max-height: 450px) {
  #lgic-drawer .mobile-nav { padding-top: 8px; padding-bottom: 8px; }
  #lgic-drawer .mobile-actions { padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
  #lgic-drawer .mobile-estimate,
  #lgic-drawer .mobile-call { min-height: 44px; padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #lgic-drawer *,
  html .lgic-header .icon-btn { transition: none; }
}
