/* =============================================
   NVSD Custom Navigation Styles
   Mirrors the bundled navbar-secondary styles
   using nvsd- prefixed classes.
   ============================================= */

/* Logo + school header wrapper */
.header .navbar-logo.nvsd-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  width: auto;
}

/* Logo: consistent height regardless of uploaded image size */
.header .navbar-logo img {
  width: auto;
  height: 60px;
  max-height: 60px;
  object-fit: contain;
  object-position: left center;
}

.header.header-shrink .navbar-logo img {
  height: 45px;
  max-height: 45px;
}

/* School header text next to logo */
.nvsd-school-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nvsd-school-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #02292e;
  line-height: 1.3;
}

.nvsd-school-tagline {
  font-size: 0.8rem;
  font-weight: 400;
  color: #355458;
  line-height: 1.3;
}

@media (max-width: 1199px) {
  .header .navbar-logo img {
    height: 45px;
    max-height: 45px;
  }

  .nvsd-school-header {
    display: flex;
    flex-direction: column;
  }

  .nvsd-school-name {
    font-size: 0.875rem;
  }

  .nvsd-school-tagline {
    font-size: 0.7rem;
  }
}

/* Base: dropdowns hidden by default at all screen sizes */
.nvsd-dropdown-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nvsd-dropdown-menu.nvsd-show {
  display: block;
}

/* --- Desktop (>= 1200px) --- */
@media (min-width: 1200px) {
  .nvsd-navbar-secondary {
    background-color: #fff;
    width: 100%;
    height: 100px;
    transition: all 0.3s;
  }

  .header-shrink .nvsd-navbar-secondary {
    height: 70px;
    transition: all 0.3s;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    margin-right: 5rem;
    height: inherit;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: inherit;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: #355458 !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: text-decoration 0.3s ease-in-out;
  }

  /* Underline hover effect */
  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a::before {
    position: absolute;
    bottom: 0.2rem;
    left: 0;
    z-index: -1;
    display: block;
    width: 0;
    height: 6px;
    content: "";
    background-color: rgba(231, 127, 130, 0.5);
    transition: width 0.3s ease-in-out;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a:hover::before,
  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a:focus::before,
  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a.nvsd-active::before {
    width: 100%;
    transition: width 0.3s ease-in-out;
  }

  /* Dropdown panel */
  .nvsd-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: max-content;
    padding: 0.75rem 0;
    background-color: #02292e;
    border: none;
    font-size: 0.875rem;
    letter-spacing: 0.025rem;
  }

  .nvsd-dropdown-menu li {
    padding: 0.5rem 1.25rem;
  }

  .nvsd-dropdown-menu li:last-child {
    padding-bottom: 0.25rem;
  }

  .nvsd-dropdown-menu li a {
    color: #fff !important;
    text-decoration: none;
    opacity: 0.75;
    font-weight: 400;
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
  }

  .nvsd-dropdown-menu li a:hover,
  .nvsd-dropdown-menu li a:focus {
    opacity: 1;
    text-decoration: underline;
  }

  .nvsd-nav-search .btn-open-search {
    margin-left: 1rem;
    margin-right: 0.75rem;
  }

  .nvsd-nav-search .btn-open-search > svg {
    fill: #02292e;
  }

  /* Hide quick links on desktop */
  .nvsd-navbar-secondary .nvsd-navbar-nav > li.nvsd-nav-quick-links {
    display: none;
  }
}

/* --- Mobile (< 1200px) --- */
@media (max-width: 1199px) {
  .nvsd-navbar-secondary {
    background-color: transparent !important;
    padding-top: 2rem;
    padding-bottom: 5rem;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item {
    padding: 0.75rem 1.75rem 0.75rem 2rem;
    position: relative;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a {
    font-weight: 500;
    width: 75%;
    word-wrap: break-word;
    display: inline-flex;
    color: #fff !important;
    text-decoration: none;
    transition: text-decoration 0.3s ease-in-out;
  }

  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a:hover,
  .nvsd-navbar-secondary .nvsd-navbar-nav > .nvsd-nav-item > a:focus {
    text-decoration: underline;
    text-decoration-color: currentColor;
  }

  .nvsd-dropdown-menu {
    background-color: #02292e;
    font-size: 0.875rem;
    letter-spacing: 0.025rem;
    border: none;
  }

  .nvsd-dropdown-menu li {
    padding: 0.75rem 0 0.75rem 1rem;
  }

  .nvsd-dropdown-menu li:last-child {
    padding-bottom: 0.75rem;
  }

  .nvsd-dropdown-menu li a {
    display: inline-block;
    font-weight: 400;
    opacity: 1;
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.3s ease-in-out;
  }

  .nvsd-dropdown-menu li a:hover,
  .nvsd-dropdown-menu li a:focus {
    opacity: 1;
    text-decoration: underline;
  }

  .nvsd-nav-search {
    display: none;
  }

  /* Dropdown toggle arrow */
  .nvsd-dropdown-icon-toggle {
    width: 25%;
    height: 18px;
    float: right;
    cursor: pointer;
  }

  .nvsd-dropdown-icon-toggle p {
    display: none;
  }

  .nvsd-dropdown-icon-toggle svg {
    fill: #fff;
    position: absolute;
    top: 0.85rem;
    right: 20px;
    transition: transform 0.3s ease-in-out;
  }

  .nvsd-dropdown-icon-toggle.nvsd-open svg {
    transform: rotate(90deg);
    transition: transform 0.3s ease-in-out;
  }

  /* Ensure nav-quick-links show on mobile */
  .nvsd-navbar-secondary .nvsd-navbar-nav > li.nvsd-nav-quick-links {
    display: list-item;
  }
}

/* Hide toggle arrows on desktop */
@media (min-width: 1200px) {
  .nvsd-dropdown-icon-toggle {
    display: none;
  }
}
