/* Responsive navbar fixes */

.custom-dropdown > .dropdown-toggle {
  appearance: none;
  background: none;
  border: 0;
}

.custom-dropdown > .dropdown-toggle:focus {
  box-shadow: none;
}

.custom-dropdown:hover .custom-dropdown-menu,
.custom-dropdown .dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown > .dropdown-toggle[aria-expanded="true"]::after {
  transform: translateY(-35%) rotate(225deg);
}

@media (max-width: 991px) {
  .custom-navbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  .brand-logo {
    max-width: calc(100% - 72px);
  }

  .navbar-toggler {
    margin-left: auto;
    flex-shrink: 0;
  }

  .custom-collapse {
    position: static !important;
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-top: 14px;
    display: none;
  }

  .custom-collapse.show {
    display: block;
  }

  .custom-collapse .navbar-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 42, 68, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow-strong);
  }

  .custom-collapse .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-call-btn {
    margin-left: 0;
    margin-top: 8px;
  }

  .custom-dropdown {
    width: 100%;
  }

  .custom-dropdown > .dropdown-toggle {
    width: 100%;
    padding-right: 40px !important;
    text-align: left;
  }

  .dropdown-toggle::after {
    right: 14px;
  }

  .custom-dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 8px;
    padding: 10px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 16px;
    border: 1px solid rgba(15, 42, 68, 0.08);
    background: rgba(58, 110, 165, 0.05);
  }

  .custom-dropdown .dropdown-menu.show {
    display: block;
  }
}
