/* ==============================================
   NAVIGATION FINAL FIX - ABSOLUTE OVERRIDE
   File này PHẢI load cuối cùng để override mọi thứ
   ============================================== */

/* ==============================================
   CRITICAL: Force No Transform - Highest Priority
   ============================================== */

/* Force translateZ(0) for ALL navigation elements - No exceptions */
header nav,
header nav *,
nav.main-navigation,
nav.main-navigation *,
.desktop-nav,
.desktop-nav *,
.mobile-menu,
.mobile-menu *,
.submenu,
.submenu * {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    -moz-transform: translateZ(0) !important;
    -ms-transform: translateZ(0) !important;
}

/* Force NO scale/translate on ANY state */
header nav a,
header nav a:hover,
header nav a:active,
header nav a:focus,
header nav button,
header nav button:hover,
header nav button:active,
nav.main-navigation a,
nav.main-navigation a:hover,
nav.main-navigation a:active,
nav.main-navigation a:focus,
.desktop-nav a,
.desktop-nav a:hover,
.desktop-nav a:active,
.desktop-nav a:focus,
.mobile-menu a,
.mobile-menu a:hover,
.mobile-menu a:active,
.mobile-menu a:focus,
.submenu a,
.submenu a:hover,
.submenu a:active,
.submenu a:focus,
.nav-link,
.nav-link:hover,
.nav-link:active,
.nav-link:focus {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    scale: 1 !important;
    -webkit-scale: 1 !important;
    translate: 0 0 !important;
    -webkit-translate: 0 0 !important;
}

/* ==============================================
   CRITICAL: Force Specific Transitions Only
   ============================================== */

/* Only allow color, background-color, and opacity transitions */
header nav a,
nav.main-navigation a,
.desktop-nav a,
.mobile-menu a,
.submenu a,
.nav-link,
.btn.btn-primary,
.btn.btn-secondary {
    transition: color 200ms ease-in-out,
                background-color 200ms ease-in-out,
                opacity 200ms ease-in-out !important;
}

/* ==============================================
   CRITICAL: Disable Smooth Scroll
   ============================================== */

/* Force auto scroll behavior */
html,
body,
header nav,
nav.main-navigation,
.desktop-nav,
.mobile-menu {
    scroll-behavior: auto !important;
}

/* During navigation */
html.navigating,
body.navigating {
    scroll-behavior: auto !important;
}

/* ==============================================
   CRITICAL: Active State - No Feedback
   ============================================== */

/* Remove ALL feedback on active state for navigation */
header nav a:active,
nav.main-navigation a:active,
.desktop-nav a:active,
.mobile-menu a:active,
.nav-link:active {
    opacity: 1 !important;
    transform: translateZ(0) !important;
    transition: none !important;
}

/* ==============================================
   CRITICAL: HTMX States
   ============================================== */

/* No animations during HTMX transitions */
body.htmx-swapping header nav a,
body.htmx-swapping nav.main-navigation a,
body.htmx-swapping .desktop-nav a,
body.htmx-settling header nav a,
body.htmx-settling nav.main-navigation a,
body.htmx-settling .desktop-nav a {
    transition: none !important;
    transform: translateZ(0) !important;
    opacity: 1 !important;
}

/* ==============================================
   END OF FINAL FIX
   ============================================== */
