/* Mobile navigation only. */
@media (max-width: 1024px) {
  nav.navbar {
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--mobile-nav-height);
    min-height: var(--mobile-nav-height);
    padding: 8px 16px;
    justify-content: space-between;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 3px 14px rgba(0,0,0,.05);
  }
  .navbar .logo { flex: 0 0 auto; }
  .navbar .logo img { display: block; height: 48px; width: auto; }
  .navbar .nav-right { display: none; }

  .mobile-menu-toggle {
    display: inline-grid !important;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px;
    background: transparent !important;
    color: #111 !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu-toggle-bars,
  .mobile-menu-toggle-bars::before,
  .mobile-menu-toggle-bars::after {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .mobile-menu-toggle-bars { position: relative; }
  .mobile-menu-toggle-bars::before,
  .mobile-menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .mobile-menu-toggle-bars::before { top: -7px; }
  .mobile-menu-toggle-bars::after { top: 7px; }
  .navbar.mobile-nav-open .mobile-menu-toggle-bars { background: transparent; }
  .navbar.mobile-nav-open .mobile-menu-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .navbar.mobile-nav-open .mobile-menu-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .mobile-nav-backdrop {
    position: fixed;
    inset: var(--mobile-nav-height) 0 0;
    z-index: 1001;
    display: block;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(0,0,0,.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .navbar.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .navbar > .menu {
    position: fixed;
    top: calc(var(--mobile-nav-height) + 8px);
    left: 12px;
    right: 12px;
    z-index: 1002;
    display: flex;
    width: auto;
    max-height: calc(100dvh - var(--mobile-nav-height) - 20px);
    padding: 12px;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0,0,0,.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .navbar.mobile-nav-open > .menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navbar .menu > a,
  .navbar .menu > .dropdown > a,
  .navbar .menu-title {
    display: flex;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    padding: 12px 44px 12px 12px;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
  }
  .navbar .menu a::after { display: none; }
  .navbar .dropdown {
    position: relative;
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
    border-radius: 10px;
  }
  .navbar .dropdown:hover .dropdown-content { display: block; }
  .navbar .dropdown-content {
    position: static;
    display: block;
    width: 100%;
    min-width: 0;
    max-height: 0;
    padding: 0 0 0 12px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fafafa;
    box-shadow: none;
    border-radius: 0 0 10px 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
      max-height .28s cubic-bezier(.2,.8,.2,1),
      padding .28s cubic-bezier(.2,.8,.2,1),
      opacity .18s ease,
      transform .28s cubic-bezier(.2,.8,.2,1),
      visibility .28s ease;
  }
  .navbar .dropdown.is-open .dropdown-content {
    max-height: 280px;
    padding: 2px 0 8px 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .navbar .dropdown-content a {
    min-height: 42px;
    padding: 10px 12px;
    box-sizing: border-box;
    color: #444;
    font-size: 14px;
  }

  .mobile-dropdown-toggle {
    position: absolute;
    top: 5px;
    right: 4px;
    display: grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px;
    background: transparent !important;
    color: #555 !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-dropdown-toggle::before {
    content: "⌄";
    transform: translateY(-2px);
    transition: transform .18s ease;
  }
  .dropdown.is-open > .mobile-dropdown-toggle::before {
    transform: translateY(2px) rotate(180deg);
  }

  .mobile-nav-tools {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #ececec;
  }
  .mobile-nav-tools .nav-social-link,
  .mobile-nav-tools .contact-btn {
    min-height: 46px;
    margin: 0;
    padding: 8px 6px;
    box-sizing: border-box;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
  }
  .mobile-nav-tools .contact-btn {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    border-color: #111;
    background: #111;
    color: #fff;
    font-size: 14px;
  }
  .mobile-nav-tools .nav-social-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-nav-tools .nav-social-link img {
    width: 26px;
    height: 26px;
    object-fit: contain;
  }
  .mobile-nav-tools .nav-social-label {
    position: static;
    transform: none;
    opacity: 1;
    font-size: 10px;
    color: #555;
  }
}
@media (max-width: 480px) {
  nav.navbar { padding: 6px 12px; }
  .navbar .logo img { height: 44px; }
  .mobile-menu-toggle { width: 44px; height: 44px; }
  .navbar > .menu { left: 8px; right: 8px; top: calc(var(--mobile-nav-height) + 6px); }
}
