/* ======================================
   Navigation Styles - COMPLETE FIXED VERSION
   File: packages/poerner2025/Resources/Public/Css/navigation.css
   ====================================== */

/* Body padding adjustment for fixed navigation - ergänzt theme.css */
body {
    padding-top: 150px; /* Space for fixed navigation */
    transition: padding-top 0.3s ease;
}

body.scrolled {
    padding-top: 80px;
}

/* Navigation Wrapper */
.navigation-wrapper {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    height: 150px;
}

.navigation-wrapper.scrolled {
    height: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Menu Container */
.menucontainer {
    max-width: 1520px;
    margin: 0 auto;
    padding: 25px 10px 25px;
    display: flex;
    flex-direction: row;
    height: 150px;
    transition: all 0.3s ease;
    position: relative;
}

.navigation-wrapper.scrolled .menucontainer {
    height: 80px;
    padding: 10px;
}

/* Logo */
.menu_logo {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.logo__placeholder {
    width: 89px;
    height: 100px;
    background: #000;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navigation-wrapper.scrolled .logo__placeholder {
    width: 53px;
    height: 60px;
    border-radius: 6px;
}

.logo__placeholder span {
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.3s ease;
}

.navigation-wrapper.scrolled .logo__placeholder span {
    font-size: 8px;
}

.logo__placeholder small {
    font-size: 8px;
    font-weight: normal;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.navigation-wrapper.scrolled .logo__placeholder small {
    font-size: 6px;
    margin-top: 1px;
}

/* Logo Image Support */
.logo__image {
    width: 89px;
    height: 100px;
    transition: all 0.3s ease;
}

.navigation-wrapper.scrolled .logo__image {
    width: 53px;
    height: 60px;
}

/* Text Submenu Container - Normal state */
.textsubmenucontainer {
    height: 100px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.navigation-wrapper.scrolled .textsubmenucontainer {
    display: none;
}

/* Menu Text Block - Top navigation */
.menu-text-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    font-size: 14.4px;
    color: #aaaaaa;
    margin-bottom: 8px;
}

/* FIXED: Secondary menu links (Media, Kontakt) - GRAY instead of blue */
.menu-text-block span,
.menu-text-block a {
    color: #aaaaaa;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-text-block span:hover,
.menu-text-block a:hover {
    color: #ab0033;
    text-shadow: 0 1px 3px rgba(171, 0, 51, 0.3);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.language-switcher:hover {
    background: rgba(0, 0, 0, 0.03);
}

.language-switcher__icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    opacity: 0.7;
}

.language-switcher__item {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 14.4px;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 2px 2px;
    border-radius: 4px;
}

.language-switcher__item:hover {
    color: #ab0033;
    background: rgba(171, 0, 51, 0.1);
    text-shadow: 0 1px 3px rgba(171, 0, 51, 0.3);
}

.language-switcher__item--active {
    color: #aaaaaa;
    font-weight: 700;
}

.language-switcher__separator {
    color: #aaaaaa;
    font-size: 14.4px;
    margin: 0 2px;
}

/* Search functionality - IMPROVED */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 100;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 12px;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 100;
}

.search-container:hover .search-input-container {
    width: 220px;
    opacity: 1;
    margin-right: 8px;
}

.search-form {
    position: relative;
    width: 100%;
    margin: 0;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    outline: none;
    border-color: #ab0033;
    box-shadow: 0 0 0 2px rgba(171, 0, 51, 0.1);
}

.search-icon {
    color: #aaaaaa;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.search-icon:hover {
    color: #ab0033;
    background: rgba(171, 0, 51, 0.1);
    text-shadow: 0 1px 3px rgba(171, 0, 51, 0.3);
}

.search-icon svg {
    width: 16px;
    height: 16px;
}

/* Text Main Menu Container - Normal state */
.textmainmenucontainer {
    height: 49.390625px;
    padding: 22px 0px 0px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 40px;
    transition: all 0.3s ease;
}

.navigation-wrapper.scrolled .textmainmenucontainer {
    display: none;
}

/* Main Menu Items - Normal state */
.main-menu__item {
    position: relative;
}

.main-menu__item span {
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 0;
}

.main-menu__item span:hover {
    color: #ab0033;
    text-shadow: 0 2px 4px rgba(171, 0, 51, 0.3);
}

/* Dropdown Menu */
.main-menu__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-menu__item:hover .main-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu__dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.main-menu__dropdown-item:last-child {
    border-bottom: none;
}

.main-menu__dropdown-item:hover {
    background: rgba(171, 0, 51, 0.1);
    color: #ab0033;
}

/* SEPARATOR LINE - Between menu rows */
.separator-line {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

/* STICKY HEADER - Improved layout */
.sticky-menu-container {
    display: none;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 60px;
    margin-left: auto;
}

.navigation-wrapper.scrolled .sticky-menu-container {
    display: flex;
}

.sticky-menu-all {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #666666;
}

.sticky-menu-all span,
.sticky-menu-all a {
    color: #666666;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.sticky-menu-all span:hover,
.sticky-menu-all a:hover {
    color: #ab0033;
    text-shadow: 0 1px 2px rgba(171, 0, 51, 0.3);
}

/* Mobile Menu Toggle - Larger and centered */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    width: 48px;
    height: 48px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* IMPROVED Mobile Menu - Full Width */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw; /* Full viewport width */
    max-width: 100%; /* Ensure it doesn't exceed viewport */
    height: 100vh;
    background: #ffffff;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu {
    right: 0;
}

/* Mobile Menu Header - Full Width */
.mobile-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px; /* Increased padding for better spacing */
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu__close {
    background: none;
    border: none;
    font-size: 28px; /* Slightly larger close button */
    cursor: pointer;
    color: #666;
    padding: 8px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu__close:hover {
    background: rgba(171, 0, 51, 0.1);
    color: #ab0033;
}

/* Mobile Menu Items - Better spacing */
.mobile-menu__item {
    border-bottom: 1px solid #e5e7eb;
}

/* Main Menu Items - Large and prominent with better padding */
.mobile-menu__main-item .mobile-menu__main-link {
    font-size: 22px; /* Slightly larger for better readability */
    font-weight: 600;
    color: #00304a;
    padding: 18px 30px; /* Increased padding */
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu__main-item .mobile-menu__main-link:hover {
    background-color: #f8f9fa;
    color: #ab0033;
}

/* Submenu items for main menu - Better spacing */
.mobile-menu__main-item .mobile-menu__submenu {
    background-color: #f8f9fa;
    border-left: 4px solid #ab0033; /* Slightly thicker accent line */
    margin-left: 20px; /* Reduced margin */
}

.mobile-menu__main-item .mobile-menu__submenu-link {
    font-size: 17px; /* Slightly larger */
    color: #666;
    padding: 12px 30px; /* Better padding */
    font-weight: 400;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu__main-item .mobile-menu__submenu-link:hover {
    color: #ab0033;
    background-color: #fff;
}

/* Secondary Menu Section - Better spacing */
.mobile-menu__secondary-section {
    background-color: #f8f9fa;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

/* Secondary Menu Items - Better spacing */
.mobile-menu__secondary-item .mobile-menu__secondary-link {
    font-size: 18px; /* Larger for better readability */
    font-weight: 400;
    color: #666;
    padding: 15px 30px; /* Better padding */
    display: block;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.mobile-menu__secondary-item .mobile-menu__secondary-link:hover {
    background-color: #fff;
    color: #ab0033;
}

/* Submenu items for secondary menu - Better spacing */
.mobile-menu__secondary-item .mobile-menu__submenu {
    background-color: #fff;
    border-left: 3px solid #ccc; /* Slightly thicker */
    margin-left: 20px; /* Reduced margin */
}

.mobile-menu__secondary-item .mobile-menu__submenu-link {
    font-size: 15px; /* Slightly larger */
    color: #888;
    padding: 10px 30px; /* Better padding */
    font-weight: 300;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu__secondary-item .mobile-menu__submenu-link:hover {
    color: #ab0033;
    background-color: #f8f9fa;
}

/* Search field styling in mobile menu - Better spacing */
.mobile-menu__item form.search-form {
    background-color: #fff;
    border-bottom: 2px solid #ab0033;
    padding: 20px 30px; /* Better padding */
}

.mobile-menu__item .search-input {
    border: 1px solid #ab0033;
    border-radius: 6px; /* Slightly more rounded */
    font-size: 16px;
    padding: 15px; /* Better padding */
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu__item .search-input:focus {
    outline: none;
    border-color: #ab0033;
    box-shadow: 0 0 0 3px rgba(171, 0, 51, 0.1); /* Slightly larger focus ring */
}

/* Language switcher in mobile menu - Better spacing */
.mobile-menu__item .mobile-menu__language {
    text-align: center;
    padding: 25px 30px; /* Better padding */
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.mobile-menu__language a {
    color: #666;
    text-decoration: none;
    font-size: 18px; /* Larger for better touch targets */
    font-weight: 500;
    padding: 8px 12px; /* Better touch targets */
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu__language a.active {
    color: #00304a;
    font-weight: bold;
    background: white;
}

.mobile-menu__language a:hover {
    color: #ab0033;
    background: white;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .mobile-menu__header {
        padding: 15px 20px;
    }
    
    .mobile-menu__main-item .mobile-menu__main-link {
        padding: 16px 20px;
        font-size: 20px;
    }
    
    .mobile-menu__main-item .mobile-menu__submenu-link {
        padding: 10px 25px;
        font-size: 16px;
    }
    
    .mobile-menu__secondary-item .mobile-menu__secondary-link {
        padding: 13px 20px;
        font-size: 17px;
    }
    
    .mobile-menu__item form.search-form {
        padding: 15px 20px;
    }
    
    .mobile-menu__item .search-input {
        padding: 12px;
    }
}

/* ke_search_suggest Integration - MINIMAL AND CLEAN */
.ke_search_sword-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    display: block;
    margin-top: 0;
    font-family: inherit;
    animation: fadeInDown 0.2s ease-out;
}

.ke_search_sword-item {
    display: block;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    box-sizing: border-box;
    font-weight: 400;
}

.ke_search_sword-item:hover {
    background-color: #f8f9fa;
    color: #ab0033;
}

.ke_search_sword-item.active {
    background-color: #ab0033;
    color: white;
}

.ke_search_sword-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.ke_search_sword-item:first-child {
    border-top: 1px solid #e5e7eb;
}

/* Mobile ke_search_suggest */
#mobile_ke_search_sword + .ke_search_sword-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0;
}

/* Scrollbar styling for dropdown */
.ke_search_sword-items::-webkit-scrollbar {
    width: 6px;
}

.ke_search_sword-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ke_search_sword-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.ke_search_sword-items::-webkit-scrollbar-thumb:hover {
    background: #ab0033;
}

/* Animation for dropdown appearance */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design - Navigation spezifisch */
@media (max-width: 768px) {
    body {
        padding-top: 80px !important;
    }

    .navigation-wrapper {
        height: 80px;
    }

    .menucontainer {
        padding: 10px;
        height: 80px;
    }

    .textsubmenucontainer {
        display: none;
    }

    .textmainmenucontainer {
        display: none;
    }

    .sticky-menu-container {
        display: none !important;
    }

    .menu_logo img,
    .logo__placeholder {
        height: 60px;
        width: auto;
    }

    .logo__placeholder {
        width: 53px;
    }

    .logo__image {
        height: 60px;
        width: auto;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .search-container {
        display: none;
    }

    .separator-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .menucontainer {
        padding: 10px 16px;
    }

    .menu_logo img,
    .logo__placeholder {
        height: 50px;
    }

    .logo__placeholder {
        width: 44px;
    }

    .logo__image {
        height: 50px;
    }
}

/* Performance-Optimierungen für bessere Scroll-Performance */
.navigation-wrapper {
    will-change: transform;
}

/* Zusätzlich: alle Links in der Navigation ohne Unterstreichung */
.navigation-wrapper a,
.mobile-menu-overlay a {
    text-decoration: none !important;
}

/* Ensure proper overflow settings */
.search-container,
.search-input-container,
.search-form {
    overflow: visible !important;
}