/* Mobile navigation for Dar Al Mualaqat */
.menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .topbar {
    position: relative;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
  }

  .brand-wrap {
    min-width: 0;
  }

  .topbar-cta {
    min-height: 42px;
    padding-inline: 14px;
    white-space: nowrap;
  }

  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition:
      background 0.22s ease,
      border-color 0.22s ease,
      transform 0.22s ease;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(216, 192, 154, 0.45);
  }

  .menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      transform 0.24s ease,
      opacity 0.2s ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .topbar .nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    z-index: 100;
    display: flex;
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid transparent;
    border-radius: 20px;
    background: rgba(12, 12, 14, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
    transition:
      max-height 0.35s ease,
      padding 0.35s ease,
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0.22s ease,
      border-color 0.22s ease;
  }

  .topbar .nav.is-open {
    max-height: 430px;
    padding: 12px 16px;
    border-color: rgba(255, 255, 255, 0.12);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .topbar .nav a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar .nav a:last-child {
    border-bottom: 0;
  }

  .topbar .nav a:hover,
  .topbar .nav a:focus-visible {
    color: var(--accent);
  }
}

@media (max-width: 480px) {
  .topbar {
    grid-template-columns: minmax(72px, 1fr) auto auto;
    padding: 10px;
  }

  .brand-logo {
    height: 42px;
  }

  .topbar-cta {
    min-height: 40px;
    padding-inline: 11px;
    border-radius: 14px;
    font-size: 0.82rem;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}
