/* =========================================================
   LML Menu Hover Only Fix 2026-06-06
   Scope: learner main navigation only.
   Purpose: make hover/click response instant and prevent hover/focus stuck state
            without touching footer, buttons, cards, lesson page, certificate page,
            design-system.css, style.css, or global styles.
   ========================================================= */

/* Base: only the learner main menu links */
.site-header .main-menu-band .main-nav a {
  transition:
    color .14s ease,
    background-color .14s ease !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  will-change: auto !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}

/* Kill inherited hover movement/shadow from global button/card/nav rules */
.site-header .main-menu-band .main-nav a:hover,
.site-header .main-menu-band .main-nav a:active,
.site-header .main-menu-band .main-nav a:focus,
.site-header .main-menu-band .main-nav a.active {
  transition:
    color .14s ease,
    background-color .14s ease !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

/* Underline indicator: quick hover/active response */
.site-header .main-menu-band .main-nav a::after,
.site-header .main-menu-band .main-nav a:hover::after,
.site-header .main-menu-band .main-nav a:active::after,
.site-header .main-menu-band .main-nav a:focus::after,
.site-header .main-menu-band .main-nav a.active::after {
  transition:
    transform .14s ease,
    background-color .14s ease,
    opacity .14s ease !important;
  animation: none !important;
  transform-origin: center !important;
}

.site-header .main-menu-band .main-nav a::after {
  transform: scaleX(0) !important;
}

/* Desktop with mouse: keep hover visual, but make it instant */
@media (hover: hover) and (pointer: fine) {
  .site-header .main-menu-band .main-nav a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .08) !important;
  }

  .site-header .main-menu-band .main-nav a:hover::after {
    background: var(--gold-500, #f4c542) !important;
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }
}

/* Click response: immediate feedback, no delayed movement */
.site-header .main-menu-band .main-nav a:active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .11) !important;
}

.site-header .main-menu-band .main-nav a:active::after {
  background: transparent !important;
  opacity: 0 !important;
  transform: scaleX(0) !important;
}

/* Prevent focus from looking like a stuck hover after click */
.site-header .main-menu-band .main-nav a:focus,
.site-header .main-menu-band .main-nav a:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.site-header .main-menu-band .main-nav a:not(.active):focus,
.site-header .main-menu-band .main-nav a:not(.active):focus-visible {
  color: rgba(255, 255, 255, .94) !important;
  background: transparent !important;
}

.site-header .main-menu-band .main-nav a:not(.active):focus::after,
.site-header .main-menu-band .main-nav a:not(.active):focus-visible::after {
  background: transparent !important;
  opacity: 0 !important;
  transform: scaleX(0) !important;
}

/* Active page state remains visible */
.site-header .main-menu-band .main-nav a.active,
.site-header .main-menu-band .main-nav a.active:focus,
.site-header .main-menu-band .main-nav a.active:focus-visible {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .08) !important;
}

.site-header .main-menu-band .main-nav a.active::after,
.site-header .main-menu-band .main-nav a.active:focus::after,
.site-header .main-menu-band .main-nav a.active:focus-visible::after {
  background: var(--gold-500, #f4c542) !important;
  opacity: 1 !important;
  transform: scaleX(1) !important;
}

/* If menu contains icon spans, make them instant too */
.site-header .main-menu-band .main-nav .nav-icon,
.site-header .main-menu-band .main-nav a span,
.site-header .main-menu-band .main-nav a i,
.site-header .main-menu-band .main-nav a svg {
  transition:
    color .14s ease,
    opacity .14s ease !important;
  animation: none !important;
  transform: none !important;
  filter: none !important;
}

/* Touch devices: disable hover simulation to prevent stuck state */
@media (hover: none), (pointer: coarse) {
  .site-header .main-menu-band .main-nav a:hover,
  .site-header .main-menu-band .main-nav a:not(.active):hover,
  .site-header .main-menu-band .main-nav a:not(.active):focus,
  .site-header .main-menu-band .main-nav a:not(.active):focus-visible {
    color: rgba(255, 255, 255, .94) !important;
    background: transparent !important;
  }

  .site-header .main-menu-band .main-nav a:hover::after,
  .site-header .main-menu-band .main-nav a:not(.active):hover::after,
  .site-header .main-menu-band .main-nav a:not(.active):focus::after,
  .site-header .main-menu-band .main-nav a:not(.active):focus-visible::after {
    background: transparent !important;
    opacity: 0 !important;
    transform: scaleX(0) !important;
  }

  .site-header .main-menu-band .main-nav a:active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .11) !important;
  }

  .site-header .main-menu-band .main-nav a.active,
  .site-header .main-menu-band .main-nav a.active:hover,
  .site-header .main-menu-band .main-nav a.active:focus,
  .site-header .main-menu-band .main-nav a.active:focus-visible {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .08) !important;
  }

  .site-header .main-menu-band .main-nav a.active::after,
  .site-header .main-menu-band .main-nav a.active:hover::after,
  .site-header .main-menu-band .main-nav a.active:focus::after,
  .site-header .main-menu-band .main-nav a.active:focus-visible::after {
    background: var(--gold-500, #f4c542) !important;
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }
}
