/* Shared navbar layout and mobile navigation */
.navbar-content {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.mobile-menu-button,
.mobile-menu-overlay,
.mobile-menu-header {
  display: none;
}

@media (max-width: 767px) {
  .navbar {
    height: 68px;
    padding: 0 18px;
    flex-direction: row;
    gap: 0;
  }

  .navbar-content {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1002;
    width: min(88vw, 350px);
    height: 100dvh;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: -18px 0 45px rgba(15, 23, 42, 0.2);
    transform: translateX(105%);
    transition: transform 0.28s ease;
  }

  .navbar-content.mobile-menu-open {
    transform: translateX(0);
  }

  .mobile-menu-button {
    width: 44px;
    height: 44px;
    margin-left: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
  }

  .mobile-menu-button span {
    width: 21px;
    height: 2px;
    border-radius: 4px;
    background: #0f172a;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-menu-button.menu-button-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-button.menu-button-active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-button.menu-button-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(15, 23, 42, 0.48);
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .mobile-menu-overlay.mobile-menu-overlay-open {
    visibility: visible;
    opacity: 1;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid #e7edf8;
  }

  .mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 17px;
    text-decoration: none;
  }

  .mobile-menu-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #eff6ff;
    color: #2457f5;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .navbar-content .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .navbar-content .nav-links li {
    width: 100%;
  }

  .navbar-content .nav-links a {
    display: block;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  .navbar-content .nav-links a.active,
  .navbar-content .nav-links a:hover {
    background: #eff6ff;
  }

  .navbar-content .nav-actions {
    width: 100%;
    margin-top: auto;
    flex-direction: column;
  }

  .navbar-content .nav-actions .btn {
    width: 100%;
  }

  body.mobile-menu-body-lock {
    overflow: hidden;
  }
}
/* Use a text icon so the control remains visible even when global span styles conflict. */
@media (max-width: 767px) {
  .mobile-menu-button span {
    display: none !important;
  }

  .mobile-menu-button::before {
    content: "☰";
    display: block !important;
    color: #0f172a !important;
    font-size: 25px !important;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-menu-button.menu-button-active::before {
    content: "×";
    font-size: 31px !important;
  }
}
