@media (max-width: 1040px) {
  header {
    position: sticky !important;
    top: 0;
  }

  .header-inner {
    position: relative !important;
    justify-content: center !important;
    min-height: 64px;
    padding-left: 64px !important;
    padding-right: 64px !important;
  }

  .logo {
    min-width: 0;
  }

  .logo img {
    max-width: min(68vw, 360px) !important;
    height: auto !important;
    max-height: 34px !important;
  }

  .menu-toggle {
    display: inline-flex !important;
    position: absolute !important;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 102;
  }

  #site-navigation {
    display: none !important;
  }

  header.nav-open #site-navigation {
    display: flex !important;
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 10px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(60, 42, 31, 0.14);
  }

  header.nav-open #site-navigation a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding-left: 56px !important;
    padding-right: 56px !important;
  }

  .menu-toggle {
    right: 14px;
  }
}
