/**
 * NAVIGATION THEME OVERRIDES - WordPress Theme CSS Conflicts
 * 
 * Pure theme override CSS - fixes conflicts with skin-3.css and template.css
 * Only contains !important declarations needed for WordPress theme overrides
 * 
 * @package RentAssistenz  
 * @version 3.0.0 - Modular Split Architecture
 * @priority 10000 (loads AFTER all theme CSS)
 */

/* =============================================================================
   WORDPRESS THEME OVERRIDES - CRITICAL FIXES
   ============================================================================= */

/* CSS Custom Properties */
:root {
    /* Theme Override Colors */
    --rent-nav-theme-text: #333333;
    --rent-nav-theme-text-hover: #007cba;
    --rent-nav-theme-bg: #ffffff;
}

/* ===== NAVIGATION COLOR FIXES - Override skin-3.css invisible colors ===== */

/* PRIMARY SELECTORS - Fix invisible #8dd7f7 color from skin-3.css */
.header-nav a,
.navbar-nav a,
.nav-menu a,
.nav a,
#navbarNavDropdown a,
.navbar-collapse a,
.site-header .nav a,
.main-bar .nav a {
    color: var(--rent-nav-theme-text) !important; /* WCAG AA compliant contrast */
    font-weight: 500 !important;
    opacity: 1;
    visibility: visible;
    text-decoration: none !important;
    display: block;
}

/* NAVIGATION HOVER - Brand blue instead of invisible #8dd7f7 */
.header-nav a:hover,
.navbar-nav a:hover,
.nav-menu a:hover,
.nav a:hover,
#navbarNavDropdown a:hover,
.navbar-collapse a:hover,
.site-header .nav a:hover,
.main-bar .nav a:hover {
    color: var(--rent-nav-theme-text-hover) !important;
    text-decoration: none !important;
}

/* ACTIVE NAVIGATION ITEM - Clear brand color */
.header-nav li.active a,
.navbar-nav li.active a,
.nav-menu li.active a,
.nav li.active a,
#navbarNavDropdown li.active a,
.navbar-collapse li.active a,
.site-header .nav li.active a,
.main-bar .nav li.active a {
    color: var(--rent-nav-theme-text-hover) !important;
    font-weight: 600 !important;
}

/* ===== LAYOUT FIXES - Override theme positioning issues ===== */

/* MAIN NAVIGATION BAR - NO HEIGHT! .site-header in nav-sticky.css handles height */
.main-bar {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    /* NO min-height - prevents double navbar! height is handled by .site-header */
}

/* NAVIGATION CONTAINER - Override theme container styles - FULL WIDTH FIX */
.main-bar .container,
.site-header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: none !important; /* CRITICAL: Remove theme max-width restrictions */
    padding: 0 15px !important;
    margin: 0 !important; /* Ensure full width, no centering */
}

/* NAV CONTAINER - Critical flex container for logo + nav + button in ONE ROW */
.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* BALANCED: Equal spacing */
    width: 100% !important;
    flex-wrap: nowrap !important; /* CRITICAL: Prevent wrapping to second line */
    gap: 1rem !important; /* REDUCED: Smaller gap for balanced look */
}

/* LOGO POSITIONING - Left side */
.logo-header {
    order: 1 !important;
    flex: 0 0 auto !important;
}

/* NAVIGATION POSITIONING - Center area with balanced flex */
.header-nav {
    order: 2 !important;
    flex: 0 1 auto !important; /* Allow shrinking but don't grow excessively */
    display: flex !important;
    justify-content: center !important;
}

/* CTA POSITIONING - Right side */
.cta-section,
.extra-nav {
    order: 3 !important;
    flex: 0 0 auto !important;
}

/* Ensure navbar takes full screen width */
.main-bar,
.site-header {
    width: 100vw !important; /* Force full viewport width */
    max-width: none !important; /* Override theme restrictions */
}

/* LOGO POSITIONING - Override theme logo styles */
.logo-header,
.navbar-brand,
.site-header .logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    order: 1 !important;
}

.logo-header img,
.navbar-brand img,
.site-header .logo img {
    height: 45px !important;
    width: auto !important;
    max-width: none !important;
}

/* ===== NAVIGATION MENU FIXES ===== */

/* DESKTOP NAVIGATION - Force visibility and proper layout */
.navbar-nav,
.header-nav .nav,
.main-nav {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 1.5rem !important;
}

.navbar-nav li,
.header-nav .nav > li,
.main-nav li {
    position: relative !important;
    margin: 0 !important;
}

/* NAVIGATION LINKS - Override theme link styles */
.navbar-nav .nav-link,
.header-nav .nav > li > a,
.main-nav a {
    display: block !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

/* ===== MOBILE NAVIGATION OVERRIDES ===== */

/* HAMBURGER MENU - Minimal positioning only */
.navbar-toggler,
#mobile-menu-toggle,
.mobile-toggle {
    order: 3 !important; /* Position after navigation */
}

/* NOTE: Burger line styling is handled in nav-mobile.css to avoid duplication */

/* ===== CTA BUTTON OVERRIDES ===== */

/* CTA BUTTON - Override theme button styles */
.header-cta,
.navbar-cta,
.nav-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.75rem 1.5rem !important;
    background: var(--rent-nav-theme-text-hover) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    order: 2 !important;
}

.header-cta:hover,
.navbar-cta:hover,
.nav-cta-btn:hover {
    background: #005a8a !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3) !important;
}

.header-cta i,
.navbar-cta i,
.nav-cta-btn i {
    margin-right: 0.5rem !important;
    font-size: 1rem !important;
}

/* ===== RESPONSIVE OVERRIDES ===== */

/* DESKTOP - Hide mobile elements */
@media (min-width: 992px) {
    /* Mobile Burger Button - HIDE on desktop */
    .navbar-toggler,
    #mobile-menu-toggle,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .navbar-nav,
    .header-nav .nav,
    .main-nav {
        display: flex !important;
    }
    
    .logo-header img,
    .navbar-brand img,
    .site-header .logo img {
        height: 45px !important;
    }
}

/* TABLET & MOBILE - Show mobile elements, hide desktop */
@media (max-width: 991px) {
    .navbar-toggler,
    #mobile-menu-toggle {
        display: block !important;
    }
    
    /* Hide desktop navigation */
    .navbar-nav,
    .header-nav .nav,
    .main-nav {
        display: none !important;
    }
    
    /* Keep desktop navigation hidden on mobile */
    
    .logo-header img,
    .navbar-brand img,
    .site-header .logo img {
        height: 40px !important;
    }
    
    .header-cta,
    .navbar-cta,
    .nav-cta-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* MOBILE - Smaller elements */
@media (max-width: 768px) {
    .logo-header img,
    .navbar-brand img,
    .site-header .logo img {
        height: 35px !important;
    }
    
    .main-bar .container,
    .site-header .container {
        padding: 0 10px !important;
    }
}

/* ===== THEME SPECIFIC FIXES ===== */

/* Fix specific theme conflicts */
.dz-info-has .main-bar {
    background: var(--rent-nav-theme-bg) !important;
}

/* Fix transparent header on homepage */
body.home .site-header,
body.front-page .site-header {
    background: var(--rent-nav-theme-bg) !important;
}

/* Fix dropdown menus if they exist */
.dropdown-menu {
    background: var(--rent-nav-theme-bg) !important;
    border: 1px solid rgba(0, 124, 186, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-menu .dropdown-item {
    color: var(--rent-nav-theme-text) !important;
    padding: 0.75rem 1rem !important;
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(0, 124, 186, 0.05) !important;
    color: var(--rent-nav-theme-text-hover) !important;
}

/* ===== ACCESSIBILITY OVERRIDES ===== */

/* Focus states that override theme focus */
.navbar-nav .nav-link:focus,
.header-nav .nav > li > a:focus,
.main-nav a:focus,
.navbar-toggler:focus,
#mobile-menu-toggle:focus {
    outline: 2px solid var(--rent-nav-theme-text-hover) !important;
    outline-offset: 2px !important;
}

/* High contrast mode overrides */
@media (prefers-contrast: high) {
    .navbar-nav .nav-link,
    .header-nav .nav > li > a,
    .main-nav a {
        border: 1px solid transparent !important;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus,
    .header-nav .nav > li > a:hover,
    .header-nav .nav > li > a:focus,
    .main-nav a:hover,
    .main-nav a:focus {
        border-color: var(--rent-nav-theme-text-hover) !important;
    }
}