/* ============================================
   MODERN HEADER DESIGN für Fleet Data
   Trends 2025/2026: Glassmorphism, Micro-Animations,
   Smooth Transitions, Modern Typography
   ============================================ */

/* ============================================
   CSS Variables & Design Tokens
   ============================================ */
:root {
    /* Colors */
    --primary-color: #178687;
    --primary-hover: #147273;
    --secondary-color: #64748b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;

    /* Spacing */
    --header-height: 80px;
    --header-height-sticky: 70px;
    --top-bar-height: 40px;
    --container-padding: 40px;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-header: 1000;
    --z-dropdown: 1010;
    --z-overlay: 1020;
    --z-mobile-menu: 1030;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   MAIN HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
    z-index: var(--z-header);
    /* Hardware acceleration */
    will-change: transform;
    transform: translateZ(0);
}

/* Sticky State with Glassmorphism */
.header.is-sticky {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: var(--shadow-md);
}

.header.is-sticky .header-content {
    padding: 12px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: padding var(--transition-base);
}

/* ============================================
   LOGO
   ============================================ */
.logo {
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo a {
    display: flex;
    align-items: center;
    transition: transform var(--transition-fast);
}

.logo a:hover {
    transform: translateY(-2px);
}

.logo-img, .logo-svg {
    object-fit: contain;
    transition: all var(--transition-base);
}


/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.desktop-nav {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    border-radius: 8px;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Active State with Modern Indicator */
.nav-link.active {
    color: var(--primary-color);
}

.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform var(--transition-base);
}

.nav-link.active .nav-indicator,
.nav-link:hover .nav-indicator {
    transform: translateX(-50%) scaleX(1);
}

.dropdown-icon {
    transition: transform var(--transition-fast);
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* ============================================
   MEGA MENU
   ============================================ */

/* Old dropdown-menu system removed - replaced by mega-menu below */

/* ============================================
   HEADER ACTIONS
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Toggle */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Email Link in Header */
.header-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(15, 23, 42, 0.85);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all var(--transition-fast);
    font-size: 15px;
    font-weight: 700;
}

.header-email:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.header-email svg {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.header-email:hover svg {
    transform: scale(1.1);
}

.email-text {
    white-space: nowrap;
}

/* ============================================
   BUTTONS (CTA)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    border-radius: 10px;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(20, 114, 115, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 114, 115, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn svg {
    transition: transform var(--transition-fast);
}

.btn:hover svg {
    transform: translateX(4px);
}

/* ============================================
   MOBILE MENU TOGGLE (Hamburger)
   ============================================ */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.mobile-toggle:hover {
    background: var(--bg-light);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    z-index: var(--z-mobile-menu);
    overflow-y: auto;
}

.mobile-menu.is-active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 100px 30px 30px;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    border-radius: 10px;
    transition: all var(--transition-fast);
    width: 100%;
    text-align: left;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-dropdown-icon,
.mobile-dropdown-arrow {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.mobile-nav-item.is-open .mobile-dropdown-icon,
.mobile-nav-item.is-open .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding-left: 0;
    margin-top: 8px;
    margin-bottom: 4px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
}

.mobile-nav-item.is-open .mobile-submenu {
    display: flex;
}

.mobile-submenu-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 8px;
    margin-top: 8px;
}

.mobile-submenu-header:first-child {
    margin-top: 0;
}

.mobile-submenu-item {
    list-style: none;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all var(--transition-fast);
    background: white;
}

.mobile-submenu-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.mobile-submenu-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.mobile-menu-footer {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
}

.mobile-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.mobile-contact a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.mobile-contact a:hover {
    color: var(--primary-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and Small Desktops */
@media (min-width: 768px) {
    :root {
        --container-padding: 30px;
    }

    .mobile-toggle {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    :root {
        --container-padding: 40px;
    }

    .desktop-nav {
        display: block;
    }

    .mobile-toggle {
        display: none;
    }

    .top-bar {
        display: block;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    :root {
        --container-padding: 60px;
    }
}

/* Mobile Only Styles */
@media (max-width: 767px) {
    :root {
        --container-padding: 20px;
        --header-height: 70px;
    }

    .top-bar {
        display: none;
    }

    .search-toggle {
        display: none;
    }

    .btn {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

}


/* ============================================
   RESPONSIVE HEADER & LOGO - PERFEKT ANGEPASST
   ============================================ */

/* Desktop Large (1280px+) */
@media (min-width: 1280px) {
    .header-content {
        padding: 18px 0;
    }


    .header.is-sticky .header-content {
    padding: 12px 0;
    }

}

/* Desktop Medium (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .header-content {
        padding: 16px 0;
    }


    .header.is-sticky .header-content {
    padding: 12px 0;
    }

}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .header-content {
        padding: 12px 0;
    }


    .header.is-sticky .header-content {
        padding: 6px 0;
    }

}

/* Mobile Large (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .header-content {
        padding: 8px 0;
    }


    .header.is-sticky .header-content {
        padding: 6px 0;
    }

}

/* Mobile Small (unter 480px) */
@media (max-width: 479px) {
    .header-content {
        padding: 6px 0;
    }


    .header.is-sticky .header-content {
        padding: 5px 0;
    }

}


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

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen Reader 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-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }

    .top-bar,
    .header-actions,
    .mobile-toggle {
        display: none !important;
    }
}
/* ============================================
   IONOS-STYLE MODERNE SUCHE
   ============================================ */

/* Such-Toggle Button im Header - Minimalistisch */
.search-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.search-toggle:hover {
    background: rgba(23, 134, 135, 0.15);
    color: #178687;
    transform: scale(1.05);
}

.search-toggle svg {
    width: 22px;
    height: 22px;
}

.search-overlay-content {
    background: rgba(11, 42, 99, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Close Button - Klein und dezent */
.search-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 10;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

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

/* Search Form - Kompakt und modern */
.search-form {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Open Sans', Arial, sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #178687;
    box-shadow: 0 0 0 4px rgba(23, 134, 135, 0.2);
}

.search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #178687 0%, #147273 100%);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.search-submit:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(23, 134, 135, 0.4);
}

.search-submit svg {
    width: 18px;
    height: 18px;
}

/* Search Suggestions - Kompakt */
.search-suggestions {
    margin-top: 0;
}

.suggestions-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-tag {
    padding: 8px 14px;
    background: rgba(23, 134, 135, 0.15);
    border: 1px solid rgba(23, 134, 135, 0.25);
    border-radius: 20px;
    color: #178687;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.suggestion-tag:hover {
    background: rgba(23, 134, 135, 0.25);
    border-color: #178687;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 134, 135, 0.3);
}

/* Backdrop wenn Suche aktiv */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.search-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .search-input {
        font-size: 14px;
        padding: 12px 45px 12px 16px;
    }

    .search-submit {
        width: 32px;
        height: 32px;
    }

    .suggestion-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Animation für Search Toggle Icon */
.search-toggle.active svg {
    transform: scale(0.9);
}

/* Header Actions - Flexbox Fix */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
 
/* Updated: $(date) */

/* SICHTBARE SUCHLEISTE UNTER HEADER - Removed (not used in templates) */


/* Hide email text on tablets and below */
@media (max-width: 1023px) {
    .header-email .email-text {
        display: none;
    }

    .header-email {
        padding: 10px;
        min-width: 40px;
        justify-content: center;
    }
}


/* ============================================
   COMPREHENSIVE RESPONSIVE OPTIMIZATIONS
   ============================================ */

/* Desktop Large - Optimal spacing and sizing */
@media (min-width: 1280px) {
    .desktop-nav {
        display: block;
    }

    .mobile-toggle {
        display: none;
    }

    .nav-menu {
        gap: 12px;
    }

    .nav-link {
        font-size: 16px;
        padding: 12px 22px;
    }

    .btn-primary {
        padding: 13px 26px;
        font-size: 16px;
    }
}

/* Desktop Medium - Balanced layout */
@media (min-width: 1024px) and (max-width: 1279px) {
    .desktop-nav {
        display: block;
    }

    .mobile-toggle {
        display: none;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-link {
        font-size: 15px;
        padding: 10px 18px;
    }

    .btn-primary {
        padding: 11px 22px;
        font-size: 15px;
    }

    .header-email {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Tablet - Compact but readable */
@media (min-width: 768px) and (max-width: 1023px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .search-toggle,
    .btn-primary {
        font-size: 14px;
        padding: 10px 18px;
    }


    .search-bar-wrapper {
        padding: 6px 6px 6px 16px;
    }

    .search-bar-input {
        font-size: 15px;
        padding: 10px 14px;
    }

    .search-bar-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile Large - Touch-friendly */
@media (min-width: 480px) and (max-width: 767px) {
    .desktop-nav {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .search-toggle {
        width: 38px;
        height: 38px;
    }

    .btn-primary span {
        display: none;
    }

    .btn-primary {
        padding: 10px;
        min-width: 44px;
    }


    .search-bar-wrapper {
        padding: 5px 5px 5px 12px;
    }

    .search-bar-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .search-bar-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .search-bar-tags {
        padding: 10px 14px;
    }

    .search-bar-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Mobile Small - Minimal but functional */
@media (max-width: 479px) {
    .desktop-nav {
        display: none;
    }

    .header-content {
        padding: 4px 0 !important;
    }

    .header-actions {
        gap: 6px;
    }

    .search-toggle {
        width: 36px;
        height: 36px;
    }

    .btn-primary span {
        display: none;
    }

    .btn-primary {
        padding: 8px;
        min-width: 40px;
    }


    .search-bar-container {
        padding: 15px 0;
    }

    .search-bar-wrapper {
        padding: 4px 4px 4px 10px;
        border-radius: 20px;
    }

    .search-bar-input {
        font-size: 14px;
        padding: 8px 10px;
    }

    .search-bar-input::placeholder {
        font-size: 13px;
    }

    .search-bar-button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .search-bar-button svg {
        display: none;
    }

    .search-bar-tags {
        padding: 8px 12px;
        gap: 6px;
    }

    .search-bar-label {
        font-size: 11px;
        width: 100%;
        margin-bottom: 4px;
    }

    .search-bar-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .btn,
    .search-toggle,
    .mobile-toggle,
    .header-email,
    .search-bar-button {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link:active,
    .btn:active {
        transform: scale(0.98);
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
/* CSS Ergänzungen für Such-Button rechts und Overlay von rechts */

/* Nav Wrapper für Flexbox */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Such-Button im Menü rechts */
.nav-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: auto;
}

.nav-search-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Search Overlay von RECHTS öffnen */
.search-overlay {
    position: absolute;
    top: 100%;
    left: auto !important;
    right: 0 !important;
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.search-overlay.active {
    width: 480px;
    height: auto;
    opacity: 1;
    visibility: visible;
    margin-top: 15px;
}
/* ============================================
   MOBILE FIX - Menu und Such-Button sichtbar
   ============================================ */

/* Mobile Toggle Button immer sichtbar auf Mobile */
@media (max-width: 1023px) {
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        padding: 8px;
        border-radius: 8px;
        transition: all var(--transition-fast);
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .mobile-toggle:hover {
        background: var(--bg-light);
    }
    
    /* Desktop Nav verstecken auf Mobile */
    .desktop-nav {
        display: none;
    }
    
    /* Header Actions sichtbar machen */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

/* Such-Button für Mobile in Header Actions */
@media (max-width: 1023px) {
    .header-actions .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: var(--text-secondary);
        background: none;
        border: none;
        cursor: pointer;
        transition: all var(--transition-fast);
    }
    
    .header-actions .mobile-search-toggle:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }
}

/* Desktop Nav nur auf Desktop sichtbar */
@media (min-width: 1024px) {
    .desktop-nav {
        display: block;
    }
    
    .mobile-toggle {
        display: none;
    }
}
/* ============================================
   MOBILE/DESKTOP SICHTBARKEIT FIX
   ============================================ */

/* Mobile Such-Button auf Desktop verstecken */
@media (min-width: 1024px) {
    .mobile-search-toggle {
        display: none;
    }
}

/* Mobile Such-Button auf Mobile/Tablet sichtbar */
@media (max-width: 1023px) {
    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: var(--text-secondary);
        background: none;
        border: none;
        cursor: pointer;
        transition: all var(--transition-fast);
    }
    
    .mobile-search-toggle:hover,
    .mobile-search-toggle:active {
        background: var(--bg-light);
        color: var(--primary-color);
    }
}
/* ============================================
   VOLLSTÄNDIG RESPONSIVE DESIGN
   Alle Breakpoints optimiert
   ============================================ */

/* ============================================
   DESKTOP LARGE (1280px+)
   ============================================ */
@media (min-width: 1280px) {
    /* Desktop Nav sichtbar */
    .desktop-nav {
        display: block;
    }
    
    .nav-wrapper {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .nav-search-toggle {
        width: 44px;
        height: 44px;
        margin-left: 16px;
    }
    
    /* Mobile Elemente verstecken */
    .mobile-toggle,
    .mobile-search-toggle {
        display: none;
    }
    
    /* Header Actions für Desktop */
    .header-actions {
        display: flex;
        gap: 12px;
    }
}

/* ============================================
   DESKTOP MEDIUM (1024px - 1279px)
   ============================================ */
@media (min-width: 1024px) and (max-width: 1279px) {
    .desktop-nav {
        display: block;
    }
    
    .nav-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .nav-menu {
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .nav-search-toggle {
        width: 40px;
        height: 40px;
        margin-left: 8px;
    }
    
    /* Mobile Elemente verstecken */
    .mobile-toggle,
    .mobile-search-toggle {
        display: none;
    }
    
    .header-actions {
        display: flex;
    }
}

/* ============================================
   TABLET (768px - 1023px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Desktop Nav verstecken */
    .desktop-nav {
        display: none;
    }
    
    /* Mobile Elemente anzeigen */
    .header-actions {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .mobile-search-toggle,
    .mobile-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-search-toggle svg,
    .mobile-toggle svg {
        width: 22px;
        height: 22px;
    }
    
    
    /* Header Content */
    .header-content {
        padding: 14px 0;
    }
}

/* ============================================
   MOBILE LARGE (480px - 767px)
   ============================================ */
@media (min-width: 480px) and (max-width: 767px) {
    .desktop-nav {
        display: none;
    }
    
    .header-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .mobile-search-toggle,
    .mobile-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-search-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    
    .header-content {
        padding: 12px 0;
    }
    
    
    .search-overlay-content {
        padding: 20px;
    }
}

/* ============================================
   MOBILE SMALL (unter 480px)
   ============================================ */
@media (max-width: 479px) {
    .desktop-nav {
        display: none;
    }
    
    .header-actions {
        display: flex;
        gap: 6px;
        align-items: center;
    }
    
    .mobile-search-toggle,
    .mobile-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    .mobile-search-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .hamburger-line {
        width: 20px;
    }
    
    
    .header-content {
        padding: 4px 0;
    }
    
    /* Search Overlay volle Breite auf kleinen Screens */
    .search-overlay.active {
        width: calc(100vw - 24px);
        right: 12px !important;
        left: 12px !important;
        margin-top: 10px;
    }
    
    .search-overlay-content {
        padding: 16px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 45px 10px 14px;
    }
    
    .search-submit {
        width: 32px;
        height: 32px;
    }
    
    .suggestion-tag {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (unter 360px)
   ============================================ */
@media (max-width: 359px) {
    
    .mobile-search-toggle,
    .mobile-toggle {
        width: 34px;
        height: 34px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .header-content {
        padding: 8px 0;
    }
}

/* ============================================
   LANDSCAPE MODE (Mobile horizontal)
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
    .header-content {
        padding: 8px 0;
    }
    
    
    .mobile-search-toggle,
    .mobile-toggle {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   TOUCH DEVICES - Größere Touch-Targets
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .nav-search-toggle,
    .mobile-search-toggle,
    .mobile-toggle,
    .search-submit,
    .search-close {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Active State für Touch Feedback */
    .mobile-search-toggle:active,
    .mobile-toggle:active {
        transform: scale(0.95);
        background: var(--bg-light);
    }
}

/* HIGH DPI / RETINA DISPLAYS - See line 1191-1196 for main definition */

/* ============================================
   REDUCED MOTION - Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .search-overlay,
    .mobile-menu,
    .nav-search-toggle,
    .mobile-search-toggle,
    .mobile-toggle {
        transition: none !important;
    }
}
/* ============================================
   MOBILE BUTTONS FORCE VISIBLE
   Höchste Priorität für Mobile Sichtbarkeit
   ============================================ */

/* Base: Mobile Buttons versteckt auf Desktop */
    /* Mobile Toggle MUSS sichtbar sein */
    .mobile-toggle,
    .header .mobile-toggle,
    header .mobile-toggle,
    .header-actions .mobile-toggle,
    #mobile-toggle {
        display: flex;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 8px !important;
        gap: 5px !important;
        position: relative !important;
        z-index: 9999 !important;
    }
    
    /* Mobile Search Toggle MUSS sichtbar sein */
    .mobile-search-toggle,
    .header .mobile-search-toggle,
    header .mobile-search-toggle,
    .header-actions .mobile-search-toggle,
    #mobile-search-toggle {
        display: flex;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 8px !important;
        border-radius: 8px !important;
        color: var(--text-secondary) !important;
        position: relative !important;
        z-index: 9999 !important;
    }
    
    /* Hamburger Lines MÜSSEN sichtbar sein */
    .hamburger-line,
    .mobile-toggle .hamburger-line {
        display: block !important;
        visibility: visible !important;
        width: 24px !important;
        height: 2px !important;
        background: var(--text-primary) !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Desktop Nav verstecken auf Mobile */
    .desktop-nav,
    .header .desktop-nav,
    header .desktop-nav {
        display: none;
    }
}

/* Extra sicherstellen für sehr kleine Screens */
@media screen and (max-width: 767px) {
    .mobile-toggle,
    .mobile-search-toggle {
        display: flex;
        visibility: visible !important;
    }
    
    .header-actions {
        display: flex;
        visibility: visible !important;
    }
}

/* Desktop: Mobile Buttons verstecken */
@media screen and (min-width: 1024px) {
    .mobile-toggle,
    .mobile-search-toggle {
        display: none;
    }

    .desktop-nav {
        display: block;
    }
}

/* ============================================
   MEGA MENU für Branchen/Solutions
   ============================================ */

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.mega-menu-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mega-menu-header h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.mega-menu-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Wenn 5 Items vorhanden, mache 5 Spalten */
.mega-menu-grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);
}

.mega-menu-item {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mega-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #147273 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(23, 134, 135, 0.15);
}

.mega-menu-item:hover::before {
    transform: scaleX(1);
}

/* Icons ausblenden - kompaktere Darstellung */
.mega-menu-icon {
    display: none;
}

.mega-menu-text h4,
.mega-menu-text h5 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0;
    font-weight: 600;
}

/* Beschreibungstext ausblenden */
.mega-menu-text p {
    display: none;
}

/* Mega Menu Two Sections Layout */
.mega-menu-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Mega Menu Three Sections Layout */
.mega-menu-three-sections .mega-menu-sections {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.mega-menu-section {
    display: flex;
    flex-direction: column;
}

.mega-menu-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.mega-menu-section .mega-menu-grid {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Liste-Style für Mega Menu Items in Sections - kompakter */
.mega-menu-section .mega-menu-item {
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0.5rem 0.75rem 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    transition: all 0.2s ease;
}

.mega-menu-section .mega-menu-item:last-child {
    border-bottom: none;
}

.mega-menu-section .mega-menu-item::before {
    display: none;
}

.mega-menu-section .mega-menu-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(5px);
    box-shadow: none;
    padding-left: 1rem;
}

.mega-menu-section .mega-menu-icon {
    display: none;
}

.mega-menu-section .mega-menu-text {
    flex: 1;
}

.mega-menu-section .mega-menu-text h5 {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.mega-menu-section .mega-menu-text p {
    display: none;
}

.mega-menu-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.mega-menu-all {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-all:hover {
    color: var(--primary-hover);
    transform: translateX(5px);
}

/* Mega Menu Trigger - Neuer Lösungen Button */
.nav-item-mega-menu {
    position: relative;
}

.mega-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mega-menu-trigger:hover {
    color: var(--primary-color);
}

.mega-menu-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-trigger[aria-expanded="true"] .mega-menu-arrow {
    transform: rotate(180deg);
}

.nav-item-mega-menu:hover .mega-menu,
.nav-item-mega-menu.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive Design für Mega Menu */
@media screen and (max-width: 1200px) {
    .mega-menu-sections {
        gap: 1.5rem;
    }

    .mega-menu-three-sections .mega-menu-sections {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
}

@media screen and (max-width: 1024px) {
    .mega-menu {
        display: none;
    }

    .mega-menu-sections,
    .mega-menu-three-sections .mega-menu-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mega-menu-section {
        padding-bottom: 1.5rem;
        border-bottom: 2px solid #e2e8f0;
    }

    .mega-menu-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }

    .mega-menu-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mega-menu-section-title {
        font-size: 1.1rem;
    }

    .mega-menu-section .mega-menu-icon {
        font-size: 1.5rem;
    }

    .mega-menu-section .mega-menu-text h5 {
        font-size: 1rem;
    }

    .mega-menu-section .mega-menu-text p {
        font-size: 0.8rem;
    }
}

/* ============================================
   SUBMENÜ NAVIGATION (moved from Customizer)
   ============================================ */

/* Submenü standardmäßig versteckt */
.menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    min-width: 240px;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.menu-item-has-children {
    position: relative;
}

/* Nur offen, wenn JS die Klasse setzt */
.menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.sub-menu li {
    list-style: none;
}

.sub-menu li a {
    display: block;
    padding: 0.65rem 1.2rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.sub-menu li a:hover {
    background: rgba(255,255,255,0.08);
}

/* Kleiner Pfeil-Indikator am Parent */
.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 0.75em;
    opacity: 0.7;
}

/* === Mega-Menu 4 Spalten === */
.mega-menu-four-sections .mega-menu-sections {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) and (max-width: 1100px) {
    .mega-menu-four-sections .mega-menu-sections {
        grid-template-columns: 1fr 1fr;
    }
}
/* === Ende Mega-Menu 4 Spalten === */
