/* Navigation Consistency Fix - Ensure all pages have identical navigation styling */

/* MOBILE NAVIGATION FIXES */
@media (max-width: 991.98px) {
    /* Bootstrap navbar mobile toggle button styling */
    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 0.375rem !important;
        padding: 0.5rem !important;
        background: transparent !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
        outline: none !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    /* Ensure mobile navigation collapse is consistently styled */
    .navbar-collapse {
        background-color: rgba(20, 136, 204, 0.95) !important;
        border-radius: 0.5rem !important;
        margin-top: 0.5rem !important;
        padding: 1rem !important;
        overflow: hidden !important;
        position: relative !important;
        z-index: 1050 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Mobile navigation menu items - consistent centering */
    .navbar-nav {
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100% !important;
        flex-direction: column !important;
    }
    
    /* Bootstrap navbar mobile menu items - override default Bootstrap */
    .navbar-nav.me-auto {
        margin-right: 0 !important;
        margin-left: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        max-width: 280px !important;
    }
    
    /* Bootstrap specific nav item styling */
    .navbar-nav li.nav-item {
        width: 280px !important;
        max-width: 280px !important;
        margin: 0.5rem auto !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .navbar-nav .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 1rem 1.5rem !important;
        border-radius: 0.75rem !important;
        background-color: rgba(255, 255, 255, 0.15) !important;
        transition: all 0.3s ease !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        border: none !important;
        color: white !important;
        text-decoration: none !important;
    }
    
    /* Bootstrap specific button styling for mobile */
    .navbar-nav .btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 1rem 1.5rem !important;
        border-radius: 0.75rem !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
    
    /* Fix specific Sign Up button text wrapping */
    .navbar-nav .btn .nav-text {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.25) !important;
        color: white !important;
        text-decoration: none !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
        border: none !important;
    }
    
    .navbar-nav .nav-link.active {
        background-color: rgba(255, 255, 255, 0.3) !important;
        border: none !important;
        color: white !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Mobile dropdown styles - consistent with main nav */
    .navbar-nav .dropdown-menu {
        background-color: rgba(20, 136, 204, 0.95) !important;
        border: none !important;
        margin: 0.5rem 0 !important;
        width: 280px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .navbar-nav .dropdown-item {
        color: white !important;
        padding: 0.75rem 1.5rem !important;
        border-radius: 0.5rem !important;
        margin: 0.25rem 0 !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
    }
    
    /* Right side navbar items (for logged in users) */
    .navbar-nav:not(.me-auto) {
        margin-top: 0.5rem !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    /* Tier badge styling on mobile */
    .navbar-text.tier-badge {
        display: flex !important;
        justify-content: center !important;
        margin: 0.5rem auto !important;
        width: 280px !important;
    }
}

/* DESKTOP NAVIGATION FIXES */
@media (min-width: 992px) {
    /* Fix Sign Up button alignment on desktop */
    .navbar-nav .nav-item .nav-link,
    .navbar-nav .nav-item .btn {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: auto !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* Ensure proper spacing for desktop auth buttons */
    .navbar-nav:not(.me-auto) .nav-item {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }
    
    /* Fix button text wrapping issues */
    .navbar-nav .btn .nav-text,
    .navbar-nav .nav-link .nav-text {
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: initial !important;
    }
}

/* BRAND LOGO CONSISTENCY - Remove borders everywhere */
.navbar-brand,
.landing-logo,
a.navbar-brand,
a.landing-logo,
.navbar .navbar-brand,
.navbar a.navbar-brand {
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0.25rem 0 !important;
}

.navbar-brand:hover,
.landing-logo:hover,
a.navbar-brand:hover,
a.landing-logo:hover,
.navbar .navbar-brand:hover,
.navbar a.navbar-brand:hover {
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

.navbar-brand:focus,
.landing-logo:focus,
a.navbar-brand:focus,
a.landing-logo:focus,
.navbar .navbar-brand:focus,
.navbar a.navbar-brand:focus {
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

/* LOGO IMAGE CONSISTENCY */
.navbar-brand img,
.landing-logo img {
    height: 32px !important;
    width: auto !important;
    margin-right: 8px !important;
}

/* NAVIGATION TEXT CONSISTENCY */
.navbar-brand,
.landing-logo {
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
}

/* FORCE CONSISTENCY ACROSS ALL NAVIGATION IMPLEMENTATIONS */
.navbar-nav .nav-link,
.nav-actions .nav-link,
.landing-nav .nav-link {
    color: white !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.navbar-nav .nav-link:hover,
.nav-actions .nav-link:hover,
.landing-nav .nav-link:hover {
    color: white !important;
    text-decoration: none !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* DESKTOP CONSISTENCY - All navigation buttons should look the same */
@media (min-width: 992px) {
    .navbar-nav .nav-link,
    .nav-actions .nav-link {
        padding: 0.5rem 1rem !important;
        border-radius: 0.4rem !important;
        margin: 0 0.25rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        background-color: transparent !important;
    }
}