/*
  Feather Suspensions navbar override

  Load this file AFTER assets/css/feathersuspensions.css on every page:
    <link rel="stylesheet" href="assets/css/mobile-navbar-fix-v2.css">

  Required HTML change on every page:
    Replace:
      <div class="collapse navbar-collapse" id="navbarResponsive">
    with:
      <div class="navbar-collapse-custom" id="navbarResponsive">
*/

/* ---------- Desktop / shared navbar layout ---------- */

.navbar-inner {
  width: 80%;
  margin-left: 10%;
  margin-right: 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .navbar-brand {
  position: static !important;
  left: auto !important;
  top: auto !important;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
}

/* #logoImg {
  display: block;
  width: auto;
  height: 70px;
  max-width: 60vw;
  float: none !important;
} */

.navbar-collapse-custom {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.navbar-collapse-custom .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.navbar .navbar-nav .nav-item {
  margin: 0 15px;
  border-bottom: none !important;
}

#navbarResponsive {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  text-align: right !important;
  background-color: transparent !important;
  box-shadow: none !important;
  z-index: 99999;
}

.navbar .navbar-nav a.nav-link {
  white-space: nowrap;
}

/* ---------- Override old Bootstrap/mobile dropdown behavior ---------- */

@media (max-width: 992px) {
  .navbar .navbar-brand {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
  }

  #navbarResponsive {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    text-align: right !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  .navbar .navbar-nav .nav-item {
    border-bottom: none !important;
  }


  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .active > .nav-link,
  .navbar .navbar-nav .nav-link.active,
  .navbar .navbar-nav .nav-link.show,
  .navbar .navbar-nav .show > .nav-link {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }
}

/* ---------- Mobile navbar: logo left, nav stacked on right ---------- */

@media (max-width: 768px) {
  header {
    position: relative;
    height: auto;
  }

  header .navbar {
    padding-top: 22px;
    padding-bottom: 10px;
  }

  .navbar-inner {
    width: 94%;
    margin-left: 3%;
    margin-right: 3%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .navbar .navbar-brand {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  #logoImg {
    height: 45px;
    width: auto;
    max-width: 58vw;
  }

  #navbarResponsive {
    position: static !important;
    width: auto !important;
    background-color: transparent !important;
    box-shadow: none !important;
    flex: 0 0 auto;
  }

  .navbar-collapse-custom {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
  }

  .navbar-collapse-custom .navbar-nav {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
  }

  .navbar .navbar-nav .nav-item {
    margin: 0;
    border-bottom: none !important;
  }

  .navbar .navbar-nav a.nav-link {
    font-size: 15px;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    text-align: right;
  }

  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .active > .nav-link,
  .navbar .navbar-nav .nav-link.active,
  .navbar .navbar-nav .nav-link.show,
  .navbar .navbar-nav .show > .nav-link {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }
}

/* ---------- Very narrow phones ---------- */

@media (max-width: 420px) {
  .navbar-inner {
    gap: 8px;
  }

  /* #logoImg {
    height: 36px;
    width: auto;
  } */

  .navbar .navbar-nav a.nav-link {
    font-size: 15px;
  }

  .navbar-collapse-custom .navbar-nav {
    gap: 3px;
  }
}
