/* ============================================
   UNIFIED NAVIGATION STYLES FOR PUMP MIX BUILDER
   ============================================
   
   This file contains all navigation-related styles including:
   - Desktop navigation bar
   - Mobile hamburger menu 
   - Mobile menu content background
   - Language selectors
   - Responsive breakpoints
   
   All navigation styles are centralized here to avoid duplication.
   ============================================ */

/* Navigation Container */
.unified-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(7, 58, 75, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Auto-hide navigation when scrolling down */
.unified-navigation.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFD167;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #06D7A0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #073A4B;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #FFD167, #F6C453);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
}

.nav-link:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547);
    color: #073A4B;
    transform: translateY(-1px) rotate(2deg);
    box-shadow: 0 4px 16px rgba(255, 209, 103, 0.5);
}

.nav-link.active {
    background: linear-gradient(135deg, #FFD167, #F6C453);
    color: #073A4B;
    font-weight: 500;
    box-shadow: 0 0 20px rgba(255, 209, 103, 0.4);
    border: 1px solid rgba(255, 209, 103, 0.6);
}

.nav-link.active:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547);
    color: #073A4B;
    transform: translateY(-1px) rotate(2deg);
    box-shadow: 0 0 25px rgba(255, 209, 103, 0.6);
    border: 1px solid rgba(255, 209, 103, 0.8);
}

/* All nav buttons are now uniformly yellow - no special cases needed */

/* nav-button-primary class no longer needed - all buttons are yellow by default */

/* Ensure button elements have consistent height with anchor elements */
.nav-link[type="button"],
.nav-link.nav-button-primary,
button.nav-link {
    height: 40px;
    line-height: normal;
    box-sizing: border-box;
    vertical-align: top;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Language Selector Container */
.nav-language-container {
    margin-left: 10px;
    position: relative;
}

.nav-language-container .language-selector {
    position: relative;
}

.nav-language-container .language-dropdown {
    position: relative;
}

.nav-language-container .language-btn {
    background: linear-gradient(135deg, #FFD167, #F6C453);
    color: #073A4B;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    height: 40px;
    box-sizing: border-box;
}

.nav-language-container .language-btn:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547);
    color: #073A4B;
    transform: translateY(-1px) rotate(2deg);
    box-shadow: 0 4px 16px rgba(255, 209, 103, 0.5);
}

.nav-language-container .language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: #073A4B;
    border: 2px solid rgba(255, 209, 103, 0.3);
    border-radius: 8px;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.nav-language-container .language-options.show {
    display: block;
}

.nav-language-container .language-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #F6F2F2;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-language-container .language-option:hover {
    background: rgba(255, 209, 103, 0.1);
    color: #FFD167;
}

.nav-language-container .language-option:first-child {
    border-radius: 6px 6px 0 0;
}

.nav-language-container .language-option:last-child {
    border-radius: 0 0 6px 6px;
}

.nav-language-container .flag-icon {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
}

/* Mobile language selector styling */
.nav-mobile-language-container {
    position: relative;
    width: 100%;
}

.nav-mobile-language-container .language-selector {
    width: 100%;
}

.nav-mobile-language-container .language-dropdown {
    position: relative;
    width: 100%;
}

.nav-mobile-language-container .language-btn {
    width: 100%;
    justify-content: center;
    background: rgba(246, 242, 242, 0.1);
    border: 1px solid rgba(255, 209, 103, 0.2);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-mobile-language-container .language-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #073A4B;
    border: 2px solid rgba(255, 209, 103, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
    margin-top: 5px;
}

.nav-mobile-language-container .language-options.show {
    display: block;
}

.nav-mobile-language-container .language-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #F6F2F2;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 209, 103, 0.1);
}

.nav-mobile-language-container .language-option:last-child {
    border-bottom: none;
}

.nav-mobile-language-container .language-option:hover {
    background: rgba(255, 209, 103, 0.1);
    color: #FFD167;
}

.nav-mobile-language-container .flag-icon {
    width: 18px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
}

.nav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* Hamburger Menu Button */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-hamburger:hover {
    background: rgba(255, 209, 103, 0.1);
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #FFD167;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Animation */
.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.nav-mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 58, 75, 0.85);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.nav-mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.nav-mobile-menu-content {
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 350px;
    margin: 30px auto 0;
    background: rgba(7, 58, 75, 0.95) !important;
    border-radius: 16px;
    border: 2px solid rgba(255, 209, 103, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 
                0 4px 12px rgba(255, 209, 103, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    transform: translateY(-10px);
    animation: slideDown 0.3s ease-out;
}

/* Force consistent background across all pages and contexts */
.unified-navigation .nav-mobile-menu-content,
.nav-mobile-menu .nav-mobile-menu-content,
#nav-mobile-menu .nav-mobile-menu-content {
    background: rgba(7, 58, 75, 0.95) !important;
}

.nav-mobile-link {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: #073A4B;
    text-decoration: none;
    padding: 18px 24px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
    background: linear-gradient(135deg, #FFD167, #F6C453);
    border: 2px solid rgba(7, 58, 75, 0.1);
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 
                0 2px 4px rgba(255, 209, 103, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-mobile-link:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547);
    color: #073A4B;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 
                0 3px 6px rgba(255, 209, 103, 0.4);
}

.nav-mobile-link.active {
    background: linear-gradient(135deg, #FFD167, #F6C453);
    color: #073A4B;
    font-weight: 500;
    box-shadow: 0 0 20px rgba(255, 209, 103, 0.4);
    border: 1px solid rgba(255, 209, 103, 0.6);
}

.nav-mobile-link.active:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547);
    color: #073A4B;
    transform: translateX(5px) rotate(2deg);
    border: 1px solid rgba(255, 209, 103, 0.8);
    box-shadow: 0 0 25px rgba(255, 209, 103, 0.6);
}

/* nav-mobile-button-primary class no longer needed - all mobile buttons are yellow by default */

/* Mobile Language Selector */
.nav-mobile-language-container {
    margin-top: 10px;
}

.nav-mobile-language-container .language-selector {
    width: 100%;
}

.nav-mobile-language-container .language-btn {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 209, 103, 0.4) !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    margin-bottom: 8px !important;
    font-size: 1.1rem !important;
    /* Override any nav-link styles */
    transform: none !important;
}

.nav-mobile-language-container .language-btn:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547) !important;
    color: #073A4B !important;
    transform: translateX(5px) rotate(2deg) !important;
    border: 1px solid rgba(255, 209, 103, 0.6) !important;
    box-shadow: 0 4px 16px rgba(255, 209, 103, 0.5) !important;
}

/* ==================== ULTIMATE MOBILE LANGUAGE BUTTON OVERRIDE ==================== */
/* This section completely overrides all conflicting nav-link styles for mobile language button */

/* Reset all nav-link styles when inside mobile language container */
.nav-mobile-language-container .language-btn.nav-link,
.nav-mobile-menu-content .nav-mobile-language-container .language-btn.nav-link,
.nav-mobile-menu-content .nav-mobile-language-container .language-btn {
    /* Complete reset of all properties */
    all: unset !important;
    
    /* Re-apply only the mobile language button styles */
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 15px 20px !important;
    margin-bottom: 8px !important;
    
    /* Visual styling */
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    
    /* Border and effects */
    border: 1px solid rgba(255, 209, 103, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
    
    /* Layout */
    gap: 8px !important;
    text-decoration: none !important;
    text-align: center !important;
    
    /* Interaction */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    transform: none !important;
    
    /* Position */
    position: relative !important;
    z-index: auto !important;
}

.nav-mobile-language-container .language-btn.nav-link:hover,
.nav-mobile-menu-content .nav-mobile-language-container .language-btn.nav-link:hover,
.nav-mobile-menu-content .nav-mobile-language-container .language-btn:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547) !important;
    color: #073A4B !important;
    transform: translateX(5px) rotate(2deg) !important;
    border: 1px solid rgba(255, 209, 103, 0.6) !important;
    box-shadow: 0 4px 16px rgba(255, 209, 103, 0.5) !important;
    text-decoration: none !important;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: block;
    }

    /* Adjust body padding to account for fixed nav */
    body {
        padding-top: 60px;
    }
}

@media (min-width: 769px) {
    /* Adjust body padding to account for fixed nav */
    body {
        padding-top: 70px;
    }
}

/* Hide old hamburger menu if it exists */
.hamburger-menu,
.mobile-menu-overlay {
    display: none !important;
}

/* Ensure navigation appears above other content */
.hero,
.gallery-hero,
main {
    position: relative;
    z-index: 1;
}

/* Animation for smooth transitions */
@keyframes slideIn {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.unified-navigation {
    animation: slideIn 0.3s ease-out;
}

/* Fix for floating buttons that might conflict */
.hero-floating-buttons,
.mix-builder-floating-buttons {
    top: 90px; /* Adjusted to be below navigation */
}

/* ==================== ULTRA-HIGH SPECIFICITY ACTIVE BUTTON FIXES ==================== */

/* Desktop Active Button - Maximum Specificity Override */
.unified-navigation .nav-container .nav-desktop .nav-links a.nav-link.active,
.unified-navigation .nav-container .nav-desktop .nav-links .nav-link.active {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
    border: 1px solid rgba(255, 209, 103, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.unified-navigation .nav-container .nav-desktop .nav-links a.nav-link.active:hover,
.unified-navigation .nav-container .nav-desktop .nav-links .nav-link.active:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547) !important;
    color: #073A4B !important;
    box-shadow: 0 4px 12px rgba(255, 209, 103, 0.4) !important;
    transform: translateY(-1px);
    border: 1px solid rgba(255, 209, 103, 0.6) !important;
}

/* Mobile Active Button - Maximum Specificity Override */
.unified-navigation .nav-mobile-menu .nav-mobile-menu-content a.nav-mobile-link.active,
.unified-navigation .nav-mobile-menu .nav-mobile-menu-content .nav-mobile-link.active {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
    border: 1px solid rgba(255, 209, 103, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.unified-navigation .nav-mobile-menu .nav-mobile-menu-content a.nav-mobile-link.active:hover,
.unified-navigation .nav-mobile-menu .nav-mobile-menu-content .nav-mobile-link.active:hover {
    background: linear-gradient(135deg, #F6C453, #E6B547) !important;
    color: #073A4B !important;
    transform: translateX(5px);
    border: 1px solid rgba(255, 209, 103, 0.6) !important;
    box-shadow: 0 4px 16px rgba(255, 209, 103, 0.3) !important;
}

/* Force Yellow Debug Class - For Testing Purposes */
.force-yellow-debug {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
    border: 2px solid #FFD167 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ==================== BROWN GLASS INTERFERENCE NEUTRALIZATION ==================== */

/* Neutralize brown glass container effects for active navigation buttons */
.nav-mobile-menu-content:has(.nav-mobile-link.active) {
    background: rgba(7, 58, 75, 0.25) !important;
}

/* Override all brown glass effects on active mobile nav buttons */
.nav-mobile-menu-content .nav-mobile-link.active {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: relative;
    z-index: 1002;
    isolation: isolate;
}

/* Create a solid yellow background layer that can't be affected by parent glass */
.nav-mobile-menu-content .nav-mobile-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FFD167, #F6C453);
    border-radius: inherit;
    z-index: -1;
}

/* Ensure text appears above the yellow background */
.nav-mobile-menu-content .nav-mobile-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

/* Alternative mobile glass container with less brown interference */
.nav-mobile-menu-content.active-nav-present {
    background: rgba(7, 58, 75, 0.85) !important;
    backdrop-filter: blur(17.5px) saturate(100%) brightness(1.0);
    -webkit-backdrop-filter: blur(17.5px) saturate(100%) brightness(1.0);
}

/* Fallback: Force solid yellow if all else fails */
.nav-mobile-link.force-solid-yellow {
    background: #FFD167 !important;
    color: #073A4B !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #F6C453 !important;
    position: relative;
    z-index: 1003;
}

/* ==================== DEBUGGING & TESTING UTILITIES ==================== */

/* Debug: Force all nav buttons to be yellow for testing */
.debug-force-all-yellow .nav-link,
.debug-force-all-yellow .nav-mobile-link {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    border: 2px solid #FFD167 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
}

/* Debug: Show active state detection */
.debug-active-detection .nav-link.active::after,
.debug-active-detection .nav-mobile-link.active::after {
    content: " ✅ACTIVE";
    color: #FF0000;
    font-weight: bold;
    font-size: 10px;
    position: absolute;
    top: -15px;
    right: -10px;
    background: #FFFFFF;
    padding: 2px 4px;
    border-radius: 3px;
    z-index: 10000;
}

/* Debug: Highlight page detection */
.debug-page-detection::before {
    content: "PAGE: " attr(data-page);
    position: fixed;
    top: 80px;
    left: 20px;
    background: #FF0000;
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10000;
}

/* Debug: CSS Cascade Inspector */
.debug-css-cascade .nav-link,
.debug-css-cascade .nav-mobile-link {
    outline: 3px solid #FF0000 !important;
    position: relative !important;
}

.debug-css-cascade .nav-link::before,
.debug-css-cascade .nav-mobile-link::before {
    content: "CSS DEBUG";
    position: absolute;
    top: -20px;
    left: 0;
    background: #FF0000;
    color: #FFFFFF;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10000;
}

/* Debug: Force Mix Gallery to appear active always */
.debug-force-gallery-active .nav-link[href*="mix-gallery"],
.debug-force-gallery-active .nav-mobile-link[href*="mix-gallery"] {
    background: linear-gradient(135deg, #FFD167, #F6C453) !important;
    color: #073A4B !important;
    font-weight: 500 !important;
    border: 2px solid #FFD167 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(255, 209, 103, 0.3) !important;
}

/* Debug: Remove all glass effects for testing */
.debug-no-glass * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.debug-no-glass .nav-mobile-menu-content {
    background: rgba(7, 58, 75, 0.95) !important;
}

/* Mobile menu animation */
@keyframes slideDown {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(-10px);
        opacity: 1;
    }
}