/* ===== Existing rules (preserved) ===== */

/* --- 1. MOBILE MENU LAYOUT & OUTLINING --- */

@media (max-width: 767.98px) {
  #navcol-5.collapse, #navcol-5.collapsing, #navcol-5.collapse.show {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    width: 60% !important;
    height: auto !important;
    max-height: 100vh;
    overflow-y: auto !important;
    background: var(--bs-secondary);
    border: 5px solid rgba(255, 255, 255, 1);
    border-radius: 0px !important;
    z-index: 2000;
    padding: 0;
    border-bottom: 3px solid var(--bs-success);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
}

@media (max-width: 767.98px) {
  #navcol-5 .nav {
    flex-direction: column;
    align-items: stretch;
    width: 60% !important;
  }
}

@media (max-width: 767.98px) {
  #navcol-5 .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  }
}

@media (max-width: 767.98px) {
  #navcol-5 .nav-link {
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
  }
}

/* --- 2. DESKTOP HOVER LOGIC --- */

@media (min-width: 768px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* --- 3. GREEN COLOR FIX (Hover/Focus/Active) --- */

.navbar .nav-link:hover, .navbar .nav-link:focus, .navbar .nav-link.show {
  color: var(--bs-success) !important;
  background-color: transparent !important;
}

.navbar .dropdown-item:hover, .navbar .dropdown-item:focus {
  color: var(--bs-success) !important;
  background-color: transparent !important;
}

/* ===== New: hide-on-scroll behavior (minimal + non-invasive) ===== */

#site-navbar {
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

#site-navbar.nav-hidden {
  transform: translateY(-110%);
}

