/**
 * NAVIGATION UNIFIED CSS - COMPLETE NAVIGATION SYSTEM CONSOLIDATION
 * 
 * CONSOLIDATES ALL Navigation CSS from:
 * - Original navigation-unified.css (951 lines - Desktop navigation + BEM system)
 * - navigation-critical-fix.css (390 lines - Theme overrides, hamburger control)
 * - navigation-mobile.css (257 lines - Mobile navigation overlay system)
 * - navigation-theme-overrides.css (320 lines - Template.css overrides)
 * 
 * TOTAL: 1,918 lines of navigation CSS unified into single source of truth
 */

 * 
 * Previous consolidations:
 * - mobile-menu-professional.css (Professional mobile menu overlay)
 * - navbar-critical-fix.css (Sticky navbar fixes and positioning)
 * 
 * @package RentAssistenz
 * @version 2.4.0 - MOBILE UX PERFECTION: Touch-to-close + perfect hamburger positioning (COMPLETE)
 * @priority 5 (loads very early for navigation)
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES - NAVIGATION DESIGN SYSTEM
   ============================================================================= */

:root {
    /* Z-index layers */
    --z-navbar: 1000;
    --z-mobile-menu: 1100;
    --z-overlay: 1050;
    
    /* Navigation colors */
    --nav-bg: #ffffff;
    --nav-bg-transparent: rgba(255, 255, 255, 0.95);
    --nav-text: #333333;
    --nav-text-hover: #007cba;
    --nav-border: rgba(0, 124, 186, 0.1);
    --nav-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    
    /* Mobile menu colors */
    --mobile-menu-bg: rgba(0, 0, 0, 0.8);
    --mobile-menu-panel: #ffffff;
    --mobile-menu-text: #333333;
    --mobile-menu-hover: #f8f9fa;
    --mobile-menu-accent: #007cba;
    
    /* Animation timings */
    --nav-transition: all 0.3s ease;
    --mobile-menu-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --nav-padding: 1rem 1.5rem;
    --nav-item-spacing: 1.5rem;
    --mobile-menu-spacing: 2rem;
}

/* =============================================================================
   DESKTOP NAVIGATION - BEM ARCHITECTURE
   ============================================================================= */

/* === ORIGINAL WORKING NAVBAR - WORDPRESS THEME SELEKTOREN === */

/* Clear specific conflicts - keep sticky functionality */
.main-bar-wraper,
.main-bar {
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Reset conflicting transforms but KEEP position sticky */
.header-transparent {
    transform: none;
}

/* GLOBAL STICKY GUARANTEE - WORKS ON ALL PAGES */
html body.page .site-header,
html body.single .site-header,
html body.archive .site-header,
html body.home .site-header,
html body.front-page .site-header,
html body .site-header[class*="header-"],
body .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999; /* FIREFOX COMPATIBLE - fixed value */
}

/* STICKY NAVBAR - ALWAYS FIXED AT TOP - NUCLEAR STRENGTH */
html body .site-header,
html body .site-header.header-style1,
html body .site-header.header-style2,
html body .site-header.header-style3,
html body .site-header.header-transparent,
html body .site-header.center,
html body header.site-header,
html body header.site-header.header-style1,
html body header.site-header.header-style2,
html body header.site-header.header-style3,
/* 🔧 STICKY NAVIGATION CRITICAL FIX - AFTER MAXIMUM-BULK OPERATION */
html body .sticky-header,
html body .main-bar-wraper.sticky-header,
html body .sticky-header.main-bar-wraper,
body .site-header,
body header.site-header {
    position: fixed !important; /* CRITICAL: Must override theme CSS */
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 999 !important; /* FIREFOX COMPATIBLE - fixed value */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
    will-change: transform;
    transform: translateZ(0);
    background: rgba(255, 255, 255, 0.95) !important; /* Override theme background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* WordPress Admin Bar Compensation */
.admin-bar html body .sticky-header,
.admin-bar body .site-header {
    top: 32px !important; /* Compensate for WordPress admin bar */
}

/* BODY PADDING TO PREVENT CONTENT OVERLAP - CRITICAL AFTER MAXIMUM-BULK */
html body,
body.page,
body.home {
    padding-top: 80px !important; /* Standard navbar height - MUST override theme */
}

/* Dynamic height adjustment for different navbar states */
html body.admin-bar {
    padding-top: 112px !important; /* WordPress admin bar + navbar - MUST override */
}

/* STICKY SCROLL BEHAVIOR */
html body .site-header.scrolled,
body .site-header.scrolled,
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15) !important;
}

.site-header.scrolled .nav-menu > li > a {
    color: #333333;
}

.site-header.scrolled .site-button {
    background: var(--rent-primary-blue) !important;
    color: var(--rent-bg-white) !important;
}

/* HOME PAGE - TRANSPARENT NAVBAR OVER HERO */
body.home .site-header,
body.home .site-header.header-style1,
body.home .site-header.header-style2,
body.home .site-header.header-style3 {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03) !important;
}

/* OTHER PAGES - SOLID NAVBAR */
body:not(.home) .site-header,
body:not(.home) .site-header.header-style1,
body:not(.home) .site-header.header-style2,
body:not(.home) .site-header.header-style3 {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Clear conflicting transforms but keep sticky functionality */
.header-transparent {
    transform: none;
}

.main-bar,
.main-bar-wraper .main-bar,
.sticky-header .main-bar,
.is-fixed .main-bar,
.site-header .main-bar,
.site-header.header-style1 .main-bar,
.site-header.header-style2 .main-bar,
.site-header.header-style3 .main-bar {
    padding: 5px 0;
    transition: padding 0.3s ease !important;
    position: relative !important;
    min-height: 50px;
    z-index: inherit !important;
    background: transparent !important;
}

/* BODY SPACING - DIFFERENTIAL FOR HOME VS OTHER PAGES */
body:not(.home) {
    padding-top: 70px !important;
    margin-top: 0 !important;
}

/* HOME PAGE - NO PADDING FOR FULLSCREEN HERO */
body.home {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* FIX ALL PARENT CONTAINERS THAT COULD INTERFERE */
html,
body,
.page-wraper,
.container,
.container-fluid {
    overflow-x: visible !important;
    overflow-y: visible !important;
    transform: none;
    perspective: none !important;
    contain: none !important;
}

.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 20px;
    gap: 40px !important;
    position: relative !important;
    width: 100%;
    height: 70px !important; /* Standard navbar height */
}

/* LOGO - LINKS POSITIONIERT FÜR DESKTOP */
.brand-logo {
    order: 1 !important;
    flex: 0 0 auto !important;
    margin-right: auto !important;
}

.brand-logo img {
    max-height: 45px;
    width: auto !important;
    transition: all 0.3s ease;
}

/* NAVIGATION - ZENTRIERT MIT PROPER SPACING */
.header-nav {
    display: flex !important;
    flex: 1 !important;
    justify-content: center !important;
    order: 2 !important;
    max-width: none; /* REMOVE WIDTH RESTRICTION */
    width: 100% !important;
}

/* NAVBAR COLLAPSE - DESKTOP DEFAULT DISPLAY */
.navbar-collapse {
    display: flex !important;
    flex: 1 !important;
    justify-content: center !important;
    align-items: center !important;
    position: static !important;
    margin: 0 auto !important;
    visibility: visible;
    opacity: 1;
    width: 100% !important;
    max-width: none;
}

/* FORCE DESKTOP NAVIGATION VISIBILITY - EMERGENCY FIX */
@media (min-width: 992px) {
    .header-nav,
    .navbar-collapse,
    #navbarNavDropdown,
    .nav-menu,
    .logo-header,
    .brand-logo,
    .cta-section,
    .extra-nav {
        display: flex !important;
        visibility: visible;
        opacity: 1;
        position: static !important;
    }
    
    /* HIDE HAMBURGER MENU ON DESKTOP */
    .navbar-toggler,
    .mobile-toggle,
    #mobile-menu-toggle,
    .hamburger-menu {
        display: none !important;
        visibility: hidden;
        opacity: 0;
    }
    
    /* OPTIMIZE LOGO SIZE ON DESKTOP */
    .logo-header,
    .brand-logo {
        margin-right: 1rem !important; /* REDUCE MARGIN */
        flex-shrink: 0 !important;
        max-width: 200px; /* LIMIT LOGO WIDTH */
    }
    
    .logo-header img,
    .brand-logo img,
    .main-logo {
        height: 35px !important; /* SMALLER LOGO ON DESKTOP */
        max-width: 180px;
    }
    
    .nav-container {
        display: flex !important;
        width: 100%;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* DESKTOP MENU OPTIMIZATION - ENSURE ALL ITEMS VISIBLE */
    .nav-menu {
        gap: 20px !important; /* COMPACT SPACING for desktop */
        width: auto !important;
        max-width: none;
        flex-shrink: 0 !important;
    }
    
    .nav-menu li {
        flex-shrink: 0 !important; /* PREVENT COMPRESSION */
    }
    
    .nav-menu a {
        padding: 8px 16px; /* COMPACT PADDING */
        white-space: nowrap !important; /* PREVENT TEXT WRAPPING */
        font-size: 15px !important; /* SLIGHTLY SMALLER FONT */
    }
}

/* FORCE MOBILE NAVIGATION VISIBILITY - EMERGENCY FIX */
@media (max-width: 991px) {
    /* FORCE LOGO VISIBILITY ON MOBILE */
    .logo-header,
    .brand-logo {
        display: flex !important;
        visibility: visible;
        opacity: 1;
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
    /* CLEAN HAMBURGER BUTTON STYLING */
    .navbar-toggler,
    .mobile-toggle,
    #mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 8px;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: 1001;
        outline: none !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation;
    }
    
    /* HAMBURGER LINES - COMPACT & CENTERED */
    .navbar-toggler .burger-line,
    .mobile-toggle .burger-line,
    #mobile-menu-toggle .burger-line {
        display: block;
        background: #333333;
        height: 2px;
        width: 20px;
        margin: 2px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    /* MOBILE NAVIGATION CONTAINER - CLEAN FLEXBOX LAYOUT */
    .nav-container {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        min-height: 60px;
    }
    
    /* ALIGNED POSITIONING - LOGO AND HAMBURGER ON SAME LINE */
    .navbar-toggler,
    .mobile-toggle,
    #mobile-menu-toggle {
        margin-left: auto;
        margin-right: 15px; /* SAME DISTANCE AS LOGO FROM LEFT */
        order: 2;
    }
    
    .logo-header,
    .brand-logo {
        order: 1;
        margin-left: 15px; /* SAME DISTANCE AS HAMBURGER FROM RIGHT */
    }
    
    /* HIDE DESKTOP NAVIGATION ON MOBILE */
    .header-nav,
    .navbar-collapse,
    #navbarNavDropdown,
    .nav-menu,
    .cta-section {
        display: none !important;
    }
}

.nav-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0;
    padding: 0;
    gap: 24px !important; /* REDUCE GAP to fit more items */
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    flex-wrap: nowrap !important; /* PREVENT WRAPPING */
}

.nav-menu li {
    display: block !important;
}

/* ADAPTIVE NAVIGATION COLORS */
body.home .nav-menu a {
    display: block !important;
    color: var(--rent-bg-white) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    padding: 12px 20px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body:not(.home) .nav-menu a {
    display: block !important;
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    padding: 12px 20px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

body.home .nav-menu a:hover {
    color: var(--rent-bg-white) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

body:not(.home) .nav-menu a:hover {
    color: #007CBA !important;
    background: rgba(0, 124, 186, 0.05) !important;
}

/* CTA BUTTON - RECHTS POSITIONIERT */
.cta-section {
    display: flex !important;
    align-items: center !important;
    order: 3 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

/* MOBILE - CTA VERSTECKEN, BURGER GANZ RECHTS */
@media (max-width: 991px) {
    .cta-section {
        display: none !important;
    }
}

/* ADAPTIVE CTA BUTTON */
body.home .cta-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #007CBA !important;
    padding: 14px 28px;
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    white-space: nowrap !important;
    backdrop-filter: blur(10px) !important;
}

body:not(.home) .cta-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #007CBA !important;
    color: #fff !important;
    padding: 14px 28px;
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: 2px solid #007CBA !important;
    transition: all 0.3s ease;
    white-space: nowrap !important;
}

body.home .cta-button:hover {
    background: var(--rent-bg-white) !important;
    color: #007CBA !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25) !important;
}

body:not(.home) .cta-button:hover {
    background: transparent !important;
    color: #007CBA !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.25) !important;
}

/* MOBILE TOGGLE - VERSTECKT AUF DESKTOP */
.mobile-toggle {
    display: none;
}

/* FORCE CONTENT UNDER NAVBAR */
.section-full,
#maks,
.content-inner,
.dlab-bnr-inr {
    position: static !important;
    z-index: auto !important;
}

/* ADAPTIVE BURGER LINES */
body.home .burger-line {
    width: 24px !important;
    height: 3px !important;
    background: var(--rent-bg-white) !important;
    border-radius: 2px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

body:not(.home) .burger-line {
    width: 24px !important;
    height: 3px !important;
    background: #333 !important;
    border-radius: 2px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth !important;
}

/* MOBILE STICKY ENHANCEMENTS */
@media (max-width: 768px) {
    /* Mobile specific body padding */
    html body,
    body.page,
    body.home {
        padding-top: 70px !important; /* Reduced navbar height for mobile */
    }
    
    /* Mobile sticky header height */
    html body .site-header,
    body .site-header,
    html body .sticky-header,
    body .sticky-header {
        min-height: 70px !important;
        height: 70px !important;
    }
    
/* =============================================================================
   THEME CSS OVERRIDES - EXTRACTED TO navigation-theme-overrides.css
   Component-based architecture: Theme overrides moved to separate file
   ============================================================================= */

/* 
   THEME OVERRIDE CODE MOVED TO: navigation-theme-overrides.css
   
   Original theme override code (300+ lines) has been extracted to
   navigation-theme-overrides.css for better separation of concerns.
   
   This architectural debt includes:
   - Template.css overrides with !important
   - Theme-specific selectors
   - CSS specificity wars
   
   TODO: Remove remaining theme override code block below (lines 430-714)
   
   ⚠️ ARCHITECTURAL CLEANUP NEEDED:
   The theme override code below (280+ lines) has been duplicated in 
   navigation-theme-overrides.css and should be removed from this file
   to complete the component separation.
*/
    
/* THEME OVERRIDE CODE EXTRACTED ✅ COMPLETED
   
   This theme override code (156 lines) has been successfully extracted to:
   → navigation-theme-overrides.css (registered with priority 9998)
   
   Theme overrides included CSS specificity wars and !important declarations
   needed to work with template.css, but created architectural debt.
   
   Component separation now complete for better maintainability.
*/
}

/* === Navigation Container === */
.navbar__container,
.main-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--nav-padding);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* === Navigation Brand/Logo === */
.navbar__brand,
.navbar-brand,
.logo-header,
.brand-logo,
.site-header .logo {
    display: flex !important;
    align-items: center !important;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nav-text);
    transition: var(--nav-transition);
    flex-shrink: 0 !important;
    order: 1 !important;
    margin-right: 2rem !important;
}

.navbar__brand:hover,
.navbar-brand:hover,
.logo-header:hover,
.brand-logo:hover,
.site-header .logo:hover {
    color: var(--nav-text-hover);
    text-decoration: none;
}

.navbar__logo,
.navbar-brand img,
.logo-header img,
.brand-logo img,
.logo-main img,
.main-logo,
.site-header .logo img {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

/* === Desktop Navigation Menu === */
.navbar__nav,
.navbar-nav,
.main-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--nav-item-spacing);
}

.navbar__nav-item,
.nav-item {
    position: relative;
}

.navbar__nav-link,
.nav-link,
.main-nav a {
    display: block;
    padding: 0.5rem 0;
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--nav-transition);
    position: relative;
}

.navbar__nav-link:hover,
.nav-link:hover,
.main-nav a:hover {
    color: var(--nav-text-hover);
    text-decoration: none;
}

/* Navigation link underline effect */
.navbar__nav-link::after,
.nav-link::after,
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nav-text-hover);
    transition: width 0.3s ease;
}

.navbar__nav-link:hover::after,
.nav-link:hover::after,
.main-nav a:hover::after {
    width: 100%;
}

/* === Mobile Toggle Button === */
/* REMOVED: navbar-toggler definitions moved to navigation-critical-fix.css */
/* This prevents CSS conflicts between navigation files */

.navbar__toggle:not(.navbar-toggler),
.mobile-menu-toggle:not(.navbar-toggler) {
    display: none; /* Hide non-navbar-toggler buttons */
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    position: relative;
}

/* Mobile toggle animation */
.navbar__toggle--active .navbar__toggle-icon:nth-child(1),
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar__toggle--active .navbar__toggle-icon:nth-child(2),
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle--active .navbar__toggle-icon:nth-child(3),
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =============================================================================
   MOBILE NAVIGATION - EXTRACTED TO navigation-mobile.css
   Component-based architecture: Mobile navigation moved to separate file
   ============================================================================= */

/* 
   MOBILE NAVIGATION CODE MOVED TO: navigation-mobile.css
   
   Original mobile navigation code (140+ lines) has been extracted to 
   navigation-mobile.css for component-based architecture.
   
   This provides:
   - Better maintainability (mobile code in one place)
   - Performance improvement (mobile-only loading)
   - Cleaner separation of concerns
   
   TODO: Remove remaining mobile code block below (lines 722-861)
*/
/* DUPLICATE DEFINITION REMOVED - Using single definition above */

.mobile-menu--active,
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* === Mobile Menu Panel === */
.mobile-menu__panel {
    background: var(--mobile-menu-panel);
    border-radius: 20px;
    padding: var(--mobile-menu-spacing);
    max-width: 90vw;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.mobile-menu--active .mobile-menu__panel {
    transform: translateY(0);
}

/* === Mobile Menu Close Button === */
.mobile-menu__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    font-size: 24px;
    transition: var(--nav-transition);
}

.mobile-menu__close:hover {
    background: var(--mobile-menu-hover);
    color: var(--mobile-menu-text);
}

/* === Mobile Menu Navigation === */
.mobile-menu__nav {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: 3rem;
}

.mobile-menu__nav-item {
    margin-bottom: 0.5rem;
}

.mobile-menu__nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--mobile-menu-text);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    border-radius: 12px;
    transition: var(--nav-transition);
    position: relative;
}

.mobile-menu__nav-link:hover {
    background: var(--mobile-menu-hover);
    color: var(--mobile-menu-accent);
    text-decoration: none;
    transform: translateX(8px);
}

.mobile-menu__nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--mobile-menu-accent);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.mobile-menu__nav-link:hover::before {
    height: 60%;
}

/* === Mobile Menu Branding === */
.mobile-menu__brand {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.mobile-menu__logo {
    height: 50px;
    width: auto;
    margin-bottom: 0.5rem;
}

.mobile-menu__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mobile-menu-text);
    margin: 0;
}

/* =============================================================================
   RESPONSIVE NAVIGATION BEHAVIOR
   ============================================================================= */

/* Hide mobile menu by default on desktop */
@media (min-width: 992px) {
    /* REMOVED: navbar-toggler handled by navigation-critical-fix.css */
    .navbar__toggle:not(.navbar-toggler),
    .mobile-menu-toggle:not(.navbar-toggler) {
        display: none;
    }
    
    .mobile-menu,
    .mobile-menu-overlay {
        display: none;
    }
    
    .navbar__nav,
    .navbar-nav,
    .main-nav {
        display: flex;
    }
}

/* Show mobile menu on tablet and mobile */
@media (max-width: 991px) {
    /* REMOVED: navbar-toggler handled by navigation-critical-fix.css */
    .navbar__toggle:not(.navbar-toggler),
    .mobile-menu-toggle:not(.navbar-toggler) {
        display: none; /* Keep hidden - navbar-toggler handled elsewhere */
    }
    
    .navbar__nav,
    .navbar-nav,
    .main-nav {
        display: none;
    }
    
    .navbar__container,
    .main-bar .container {
        padding: 0.75rem 1rem;
    }
    
    .navbar__logo,
    .navbar-brand img,
    .site-header .logo img {
        height: 35px;
    }
}

@media (max-width: 768px) {
    .mobile-menu__panel {
        width: 95vw;
        padding: 1.5rem;
    }
    
    .mobile-menu__nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .navbar__brand,
    .navbar-brand,
    .site-header .logo {
        font-size: 1.25rem;
    }
}

/* MOBILE RESPONSIVE BEHAVIOR MOVED TO: navigation-mobile.css */

/* =============================================================================
   NAVIGATION STATES AND INTERACTIONS
   ============================================================================= */

/* Scrolled navbar styling */
.navbar--scrolled,
.site-header.scrolled {
    background: var(--nav-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Active navigation item */
.navbar__nav-link--active,
.nav-link.active,
.main-nav a.current {
    color: var(--nav-text-hover);
    font-weight: 600;
}

.navbar__nav-link--active::after,
.nav-link.active::after,
.main-nav a.current::after {
    width: 100%;
}

/* Mobile menu active state */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* =============================================================================
   ACCESSIBILITY - WCAG 2.1 AA COMPLIANCE
   ============================================================================= */

/* Focus indicators for keyboard navigation */
.navbar__nav-link:focus,
.nav-link:focus,
.main-nav a:focus,
/* REMOVED: navbar-toggler:focus handled by navigation-critical-fix.css */
.navbar__toggle:focus,
.mobile-menu-toggle:focus,
.mobile-menu__nav-link:focus,
.mobile-menu__close:focus {
    outline: 3px solid rgba(0, 124, 186, 0.8);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar,
    .main-bar-wraper,
    .site-header {
        background: #ffffff;
        border-bottom: 2px solid #000000;
    }
    
    .navbar__nav-link,
    .nav-link,
    .main-nav a {
        color: #000000;
    }
    
    .mobile-menu,
    .mobile-menu-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .mobile-menu__panel {
        background: #ffffff;
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .navbar,
    .main-bar-wraper,
    .site-header,
    .navbar__nav-link,
    .nav-link,
    .main-nav a,
    .navbar__toggle-icon,
    .mobile-menu-toggle span,
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu__panel,
    .mobile-menu__nav-link {
        transition: none;
    }
    
    .mobile-menu__nav-link:hover {
        transform: none;
    }
}

/* Screen reader only content */
.navbar__sr-only,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================= */

/* GPU acceleration for smooth animations */
.navbar,
.main-bar-wraper,
.site-header,
.mobile-menu,
.mobile-menu-overlay,
.mobile-menu__panel {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize mobile menu rendering */
.mobile-menu,
.mobile-menu-overlay {
    will-change: opacity, visibility, transform;
}

.mobile-menu__panel {
    will-change: transform;
}

/* Remove will-change after animation completes */
.mobile-menu--animation-complete {
    will-change: auto;
}

.mobile-menu--animation-complete .mobile-menu__panel {
    will-change: auto;
}

/* =============================================================================
   CONSOLIDATED NAVIGATION CSS FROM OTHER FILES - Version 2.0.0
   ============================================================================= */

/* === FROM NAVIGATION-CRITICAL-FIX.CSS - THEME OVERRIDES === */
/* NAVIGATION VISIBILITY FIX - Overrides skin-3.css invisible colors */
.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: #333333; /* Dark gray - WCAG AA compliant contrast */
    font-weight: 500 !important;
    opacity: 1;
    visibility: visible;
    text-decoration: none !important;
    display: block !important;
}

/* 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: #007cba; /* Brand blue - visible and accessible */
    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: #007cba;
    font-weight: 600 !important;
}

/* MAIN NAVIGATION BAR - Ensure proper layout */
.main-bar,
.site-header {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

/* HAMBURGER MENU BUTTON - SINGLE SOURCE OF TRUTH CONTROL */
.navbar-toggler,
button.navbar-toggler,
.navbar-toggler-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    z-index: var(--z-mobile-menu) !important;
    position: relative !important;
}

/* === FROM NAVIGATION-MOBILE.CSS - MOBILE NAVIGATION SYSTEM === */
@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: var(--z-mobile-menu);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease-in-out;
    }
    
    .mobile-menu.active {
        left: 0;
    }
    
    .mobile-menu__panel {
        background: var(--mobile-menu-panel);
        width: 280px;
        height: 100vh;
        padding: 2rem 1.5rem;
        box-shadow: var(--mobile-menu-shadow);
        overflow-y: auto;
    }
    
    .mobile-menu__item {
        margin-bottom: 1rem;
    }
    
    .mobile-menu__link {
        color: var(--mobile-menu-text);
        font-size: 1.1rem;
        font-weight: 500;
        text-decoration: none;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--mobile-menu-border);
        display: block;
        transition: color 0.2s ease;
    }
    
    .mobile-menu__link:hover {
        color: var(--mobile-menu-text-hover);
    }
}

/* === FROM NAVIGATION-THEME-OVERRIDES.CSS - TEMPLATE.CSS OVERRIDES === */
/* MOBILE 991px - KORREKTE HTML-ORDER BEHANDLUNG */
@media only screen and (max-width: 991px) {
    .cta-section,
    .contact-section {
        display: none !important; /* Hide complex sections on mobile */
    }
    
    /* MOBILE STICKY HEADER ENFORCEMENT */
    .site-header,
    .sticky-header,
    .main-bar-wraper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 999 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    .navbar-collapse {
        position: fixed;
        top: 70px !important;
        left: 0;
        width: 100%;
        background: #ffffff !important;
        border-top: 1px solid #e0e0e0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
}

/* DESKTOP NAVIGATION FIXES */
@media only screen and (min-width: 992px) {
    .navbar-nav {
        display: flex !important;
        align-items: center !important;
    }
    
    .navbar-nav .nav-item {
        margin-right: 2rem !important;
    }
    
    .navbar-toggler {
        display: none; /* Hide hamburger on desktop */
    }
}

/* === DARK MODE NAVIGATION === */
@media (prefers-color-scheme: dark) {
    .navbar,
    .site-header {
        background-color: #1a252f !important;
        border-bottom: 1px solid #34495e !important;
    }
    
    .navbar-brand,
    .site-title {
        color: #ffffff;
    }
    
    .header-nav a,
    .navbar-nav a,
    .nav-menu a {
        color: #ecf0f1 !important;
    }
    
    .header-nav a:hover,
    .navbar-nav a:hover,
    .nav-menu a:hover {
        color: #3498db !important;
    }
}

/* =============================================================================
   MOBILE MENU OVERLAY - SINGLE CLEAN DEFINITION 
   ============================================================================= */

/* === Mobile Menu Overlay - STABILIZED === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -moz-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* ANTI-WACKEL: Minimal fixes only */
    overscroll-behavior: none;
    -webkit-user-select: none;
    -moz-user-select: none;  
    user-select: none;
    
    /* Initially hidden */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1.1);
    transition: var(--mobile-menu-transition);
}

.mobile-menu--active,
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* === Mobile Menu Panel === */
.mobile-menu__panel {
    background: var(--mobile-menu-panel);
    border-radius: 20px;
    padding: var(--mobile-menu-spacing);
    max-width: 90vw;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.mobile-menu--active .mobile-menu__panel {
    transform: translateY(0);
}

/* === Mobile Menu Content (from header.php structure) === */
.mobile-menu-content {
    padding: 2rem;
    padding-top: 4rem; /* MORE space for browser address bar */
    text-align: center;
    width: 100%;
    margin-top: env(safe-area-inset-top, 40px); /* iOS safe area */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 124, 186, 0.1);
}

.mobile-menu-title {
    color: #ffffff;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    color: #ffffff;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    flex-shrink: 0 !important;
}

.mobile-menu-close:hover,
.mobile-menu-close:active,
.mobile-menu-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    outline: none !important;
}

.close-icon {
    display: block !important;
    font-size: 2rem !important;
    line-height: 1 !important;
}

/* === Mobile Navigation Links === */
.mobile-navigation {
    margin-bottom: 2rem;
}

.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    color: var(--mobile-menu-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1.1rem;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: var(--mobile-menu-hover);
    color: var(--mobile-menu-accent);
    outline: none;
}

.mobile-nav-link .nav-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* === Mobile CTA Section === */
.mobile-cta-section {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-call-btn {
    display: block;
    padding: 1rem 1.5rem;
    background: #ffffff !important; /* WHITE background for "Jetzt Anrufen" */
    color: #007cba; /* BLUE text for contrast on white */
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid #007cba !important; /* Blue border */
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-book-btn {
    display: block;
    padding: 1rem 1.5rem;
    background: #28a745 !important; /* GREEN for "Termin buchen" - stays same */
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid #ffffff !important; /* White border for consistency */
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-call-btn:hover {
    background: #007cba !important; /* Blue background on hover */
    color: #ffffff; /* White text on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: #007cba !important;
}


.mobile-book-btn:hover {
    background: #1e7e34 !important;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: #ffffff !important;
}

/* === Mobile Contact Info === */
.mobile-contact-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 124, 186, 0.1);
    font-size: 0.9rem;
    color: #666;
}

.contact-item {
    margin-bottom: 0.5rem;
}

/* PREVENT BODY SCROLL WHEN MOBILE MENU IS OPEN */
body.mobile-menu-open,
body.menu-open {
    overflow: hidden !important;
    position: fixed;
    width: 100% !important;
}

/* === PRINT MODE NAVIGATION === */
@media print {
    .navbar,
    .site-header,
    .mobile-menu,
    .navbar-toggler {
        display: none;
    }
}