/* Neutralize cached toggler SVG line transformations for the close-icon */
.navbar-toggler[aria-expanded="true"] .close-icon svg line {
    transform: none !important;
    opacity: 1 !important;
}
/* ===== MOBILE NAV OVERRIDES ===== */
@media (max-width: 1199.98px) {
    #mobile-menu {
        background: linear-gradient(180deg, #5a423c 0%, #4a3530 100%);
        border-radius: 0 0 1rem 1rem;
        margin: 0.5rem -0.75rem 0;
        padding: 0.75rem 1rem 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        /* Smooth slide animation - override Bootstrap collapse */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease-out,
                    transform 0.3s ease-out;
    }
    #mobile-menu.show {
        max-height: 600px;
        opacity: 1;
        transform: translateY(0);
    }
    #mobile-menu .navbar-nav {
        margin-bottom: 0 !important;
    }
    #mobile-menu .nav-link {
        padding: 0.55rem 1rem !important;
        border-radius: 0.5rem;
        font-size: 0.95rem;
        transition: background 0.2s;
    }
    #mobile-menu .nav-link:hover,
    #mobile-menu .nav-link.active {
        background: rgba(255,255,255,0.1);
    }
    #mobile-menu .nav-divider {
        border-top: 1px solid rgba(255,255,255,0.12);
        margin: 0.35rem 0;
    }
    /* Profile section on mobile */
    .mobile-profile-section {
        background: rgba(255,255,255,0.08);
        border-radius: 0.75rem;
        padding: 0.6rem 1rem;
    }
    /* Force dropdown to be static on mobile (not absolute positioned) */
    #mobile-menu .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        background: #fff;
        border-radius: 0.75rem !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
        border: none !important;
        transform: none !important;
    }
    /* Hide desktop profile on mobile */
    .desktop-profile-only {
        display: none !important;
    }
}
@media (min-width: 1200px) {
    /* Hide mobile profile on desktop */
    .mobile-profile-only {
        display: none !important;
    }
}

/* ===== DESKTOP PROFILE DROPDOWN SMOOTH ANIMATION ===== */
@media (min-width: 1200px) {
    #profileDropdownContainer .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.98);
        transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0s linear 0.25s;
        pointer-events: none;
        display: block;
    }
    #profileDropdownContainer .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0s linear 0s;
    }

    /* Active Link Underline and Highlight Indicators */
    .navbar-nav .nav-link {
        position: relative;
        padding-bottom: 0.5rem !important;
        transition: opacity 0.25s ease;
    }
    
    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 10%;
        width: 80%;
        height: 2.5px;
        background-color: #ffffff;
        border-radius: 50rem;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Hover micro-animation */
    .navbar-nav .nav-link:hover::after {
        transform: scaleX(0.6);
    }
    
    /* Active indicator solid reveal */
    .navbar-nav .nav-link.active::after {
        transform: scaleX(1);
    }
    
    .navbar-nav .nav-link.active {
        opacity: 1 !important;
        font-weight: 700 !important;
    }
}