/* BYNDbiz navigation repair 2026-09-08; verified TEST source 80aea7a. */
/* ── Navbar fixes for self-hosted (no webflow.js) ── */

/* CSS-only dropdown hover — DESKTOP ONLY */
@media (hover: hover) and (min-width: 992px) {
  .w-dropdown:hover > .w-dropdown-list,
  .w-dropdown-list:hover {
    display: block !important;
  }
}

/* RTL / LTR dropdown positioning */
html[dir="rtl"] .w-dropdown-list {
  right: 0;
  left: auto;
  text-align: right;
}

html:not([dir="rtl"]) .w-dropdown-list {
  left: 0;
  right: auto;
  text-align: left;
}

/* Desktop dropdown sizing & styling — prevent clipping */
@media screen and (min-width: 992px) {
  .w-dropdown {
    position: relative !important;
  }

  .w-dropdown-list {
    min-width: max-content !important;
    width: max-content !important;
    max-width: min(90vw, 26rem) !important;
  }

  .custom-menu-dropdown-item-list {
    background: #fff !important;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
    min-width: max-content !important;
    width: max-content !important;
    max-width: min(90vw, 26rem) !important;
    z-index: 950;
  }

  .custom-menu-dropdown-item {
    display: block !important;
    padding: 0.55rem 1.25rem !important;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap !important;
    max-width: none !important;
    box-sizing: border-box !important;
    font-size: 0.9375rem;
    color: #1e293b;
  }

  .custom-menu-dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
  }
}

/* Top-level navbar links and responsive spacing */
.custom-menu-dropdown {
  padding: 1.5rem 0.9rem !important;
  cursor: pointer;
}

.navbar5_link {
  padding: 1.5rem 0.9rem !important;
}

@media screen and (min-width: 992px) and (max-width: 1200px) {
  .navbar5_link {
    padding: 1.5rem 0.65rem !important;
    font-size: 0.95rem;
  }
  .custom-menu-dropdown {
    padding: 1.5rem 0.55rem !important;
    font-size: 0.95rem;
  }
  .navbar5_menu {
    margin-left: 0.75rem !important;
  }
}

/* Dropdown chevron indicator */
.dropdown-chevron-mobile {
  display: none;
}

/* ── Mobile menu fixes ── */
@media screen and (max-width: 991px) {
  /* Show chevron on mobile */
  .dropdown-chevron-mobile {
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    border-left: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(-45deg);
    transition: transform 0.25s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
  }

  /* Rotate chevron when dropdown is open */
  .w-dropdown.dropdown--open .dropdown-chevron-mobile {
    transform: rotate(135deg);
  }

  /* Dropdown container on mobile */
  .w-dropdown {
    position: relative !important;
    width: 100% !important;
  }

  /* Make dropdown toggles full-width with space-between layout */
  .custom-menu-dropdown {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
  }

  .w-dropdown-list {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: #f8fafc !important;
    padding: 0 !important;
    display: none;
    box-sizing: border-box !important;
  }

  .w-dropdown-list.w--open {
    display: block !important;
    padding: 0.25rem 0 0.5rem !important;
    margin-bottom: 0.25rem;
  }

  /* Sub-item styling */
  .custom-menu-dropdown-item-list {
    background: #f8fafc !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .custom-menu-dropdown-item {
    display: block !important;
    padding: 0.75rem 1rem !important;
    white-space: normal !important;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #334155;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word;
  }

  .custom-menu-dropdown-item:last-child {
    border-bottom: none;
  }

  .custom-menu-dropdown-item:active {
    background-color: #e2e8f0;
  }

  /* Plain nav links also get separator */
  .navbar5_link {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.85rem 0 !important;
    box-sizing: border-box !important;
  }

  /* Menu right section (EN + CTA) */
  .navbar5_menu-right {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .navbar5_menu-right .button {
    text-align: center;
    width: 100%;
    display: block;
  }
}
