/* ===== NAVIGATION.CSS ===== */
/* Header und Navigation Styles für Stirnimann AG */
/* Datei: assets/css/navigation.css */

/* ===== HEADER GRUNDSTYLES ===== */
header {
    background: var(--dark-blue);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
    padding: 10px 0;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
    min-height: 65px;
}

/* ===== LOGO-SYSTEM ===== */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.3s ease;
    position: relative;
}

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

/* Haupt-Logo (SVG) */
.logo-image {
    height: 45px;
    width: auto;
    margin-right: var(--spacing-sm);
    /* removed dim filter */
    transition: opacity 0.3s ease;
}

/* Fallback-Logo (wird nur angezeigt wenn SVG nicht lädt) */
.logo-fallback {
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent-yellow), var(--primary-orange));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    color: var(--primary-blue);
    text-shadow: none;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

/* Logo Text (immer sichtbar) */
.logo-text {
    color: var(--accent-yellow);
    font-size: 22px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
}

.logo-text .logo-subtitle {
    display: none;
    color: var(--white);
    font-weight: 300;
    margin-left: 4px;
}

/* ===== MOBILE NAVIGATION ===== */
nav {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--dark-blue);
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 9998;
}

nav.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* UNIFIED: Alle nav a Elemente haben font-weight: 500 */
nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500 !important;
    transition: all 0.3s ease;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    display: block;
    background: rgba(255,255,255,0.05);
}

nav a:active {
    background: rgba(255,255,255,0.2);
    transform: scale(0.98);
}

nav a:hover {
    color: var(--accent-yellow);
    background: rgba(255,255,255,0.1);
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    position: relative;
    z-index: 9999; /* Höher als andere Elemente */
}

/* UNIFIED: Language toggle auch font-weight: 500 */
.language-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px !important;
    cursor: pointer;
    font-weight: 500 !important;
}

.globe-icon {
    width: 20px;
    height: 20px;
    /* removed dim filter */
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.language-toggle:hover .globe-icon {
    /* removed dim filter */
    transform: scale(1.1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e3a8a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 130px;
    width: 130px;
    z-index: 9999;
    padding: 8px 0;
    display: none;
    list-style: none;
    margin: 0;
}

.language-dropdown.open {
    display: block;
}

.language-dropdown li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.language-dropdown a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.language-dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

.language-dropdown a.active {
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* CSS Hover entfernt - wird jetzt vollständig über JavaScript gesteuert */

/* Fallback für ältere Browser ohne CSS-Variable-Support */
@supports not (color: var(--dark-blue)) {
    .language-dropdown {
        background: #1e3a8a;
    }
    .language-link.active {
        color: #fbbf24 !important;
        background: rgba(251, 191, 36, 0.1) !important;
    }
    .language-link:hover {
        color: #fbbf24 !important;
    }
}

/* Erweiterte Hover-Zone für bessere Usability */
.language-selector::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    bottom: -10px;
    left: -10px;
    z-index: -1;
}

/* Erweiterte Hover-Zone für das Dropdown */
.language-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
    z-index: -1;
}

.language-dropdown li {
    margin: 0;
}

.language-link {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center;
    background: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

.language-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--accent-yellow) !important;
}

.language-link.active {
    color: var(--accent-yellow) !important;
    background: rgba(251, 191, 36, 0.1) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: var(--spacing-sm);
    width: 48px;
    height: 48px;
    position: relative;
    z-index: 10001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* ===== DESKTOP NAVIGATION (ab 768px) ===== */
@media (min-width: 768px) {
    .header-container {
        padding: 0 var(--spacing-lg);
    }

    .logo-image {
        height: 55px;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .logo-text {
        font-size: 26px;
    }

    .logo-text .logo-subtitle {
        display: inline;
    }

    /* Mobile Menu ausblenden */
    .mobile-menu-toggle {
        display: none;
    }

    /* Desktop Navigation */
    nav {
        display: block !important;
        position: static;
        padding: 0;
        background: transparent;
        border-top: none;
        box-shadow: none;
        animation: none;
        max-height: none;
        overflow: visible;
    }

    nav ul {
        flex-direction: row;
        gap: var(--spacing-lg); /* Reduziert von xl zu lg für mehr Platz */
        flex-wrap: nowrap; /* Verhindert Umbruch */
    }

    /* UNIFIED: Desktop nav a auch font-weight: 500 */
    nav a {
        font-size: 15px; /* Reduziert von 16px zu 15px für französische Texte */
        font-weight: 500 !important;
        padding: var(--spacing-sm) 0;
        background: none;
        position: relative;
        white-space: nowrap; /* Verhindert Textumbruch in Links */
    }

    nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--accent-yellow);
        transition: width 0.3s ease;
    }

    nav a:hover::after {
        width: 100%;
    }

    nav a:hover {
        color: var(--accent-yellow);
        background: none;
        transform: none;
    }

    nav a:active {
        background: none;
        transform: none;
    }

    /* Desktop Language Selector */
    .language-selector {
        position: relative;
    }

    /* UNIFIED: Desktop language toggle font-weight: 500 */
    .language-toggle {
        padding: var(--spacing-sm) 0 !important;
        background: none !important;
        font-weight: 500 !important;
    }

    .globe-icon {
        width: 18px;
        height: 18px;
    }

    .language-dropdown {
        top: calc(100% + 10px);
        right: -10px;
    }

    .language-link {
        padding: 6px 12px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
    }
}

/* ===== DESKTOP (ab 1024px) ===== */
@media (min-width: 1024px) {
    header {
        padding: 15px 0;
    }
    
    /* Mehr Platz für französische Navigation auf größeren Bildschirmen */
    nav ul {
        gap: var(--spacing-xl); /* Zurück zu xl gap auf größeren Bildschirmen */
    }
    
    /* UNIFIED: Auch auf großen Bildschirmen font-weight: 500 */
    nav a {
        font-size: 16px; /* Zurück zu 16px auf größeren Bildschirmen */
        font-weight: 500 !important;
    }
}

/* ===== MOBILE OPTIMIERUNGEN ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    /* Touch-optimierte Navigation */
    .nav-link {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Mobile Menu Button */
    .mobile-menu-toggle {
        min-width: 48px;
        min-height: 48px;
        padding: 12px;
    }
    
    /* Logo responsive */
    .logo img {
        max-height: 40px;
        width: auto;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-image {
        height: 45px;
        margin-right: 15px;
    }
    
    /* Improved Mobile Navigation */
    nav {
        backdrop-filter: blur(20px);
        background: rgba(30, 58, 138, 0.98);
        border-top: 2px solid var(--accent-yellow);
    }
    
    nav ul {
        gap: 0;
        padding: var(--spacing-sm) 0;
    }
    
    nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    /* UNIFIED: Mobile improved nav a auch font-weight: 500 */
    nav a {
        padding: 18px 20px;
        font-size: 16px;
        font-weight: 500 !important;
        min-height: 56px;
        display: flex;
        align-items: center;
        border-radius: 0;
        background: transparent;
        transition: all 0.2s ease;
        position: relative;
    }
    
    nav a:hover,
    nav a:active {
        background: rgba(251, 191, 36, 0.1);
        color: var(--accent-yellow);
        transform: translateX(8px);
    }
    
    nav a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--accent-yellow);
        transform: scaleY(0);
        transition: transform 0.2s ease;
    }
    
    nav a:hover::before {
        transform: scaleY(1);
    }
    
    /* Enhanced Mobile Language Selector */
    .language-selector {
        position: relative;
        z-index: 10000 !important;
        border-top: 2px solid rgba(255,255,255,0.1);
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }
    
    /* UNIFIED: Mobile language toggle font-weight: 500 */
    .language-toggle {
        padding: 18px 20px !important;
        min-height: 56px;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        background: rgba(255,255,255,0.05);
        border-radius: var(--radius-sm);
        margin: 0 var(--spacing-sm);
        transition: all 0.2s ease;
        font-weight: 500 !important;
    }
    
    .language-toggle:hover,
    .language-toggle:active {
        background: rgba(251, 191, 36, 0.1);
        transform: none;
    }
    
    .language-toggle::after {
        content: 'Sprache / Language';
        font-size: 14px;
        color: rgba(255,255,255,0.8);
        margin-left: auto;
        margin-right: var(--spacing-sm);
    }
    
    .globe-icon {
        width: 24px;
        height: 24px;
        pointer-events: none;
        flex-shrink: 0;
    }
    
    .language-dropdown {
        position: static !important;
        background: rgba(15, 23, 42, 0.95) !important;
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: var(--radius-sm);
        box-shadow: inset 0 2px 10px rgba(0,0,0,0.2) !important;
        margin: var(--spacing-xs) var(--spacing-sm) 0;
        min-width: auto;
        width: auto;
        z-index: 10001 !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
    }
    
    .language-dropdown.show {
        display: block !important;
        animation: slideDownMobile 0.3s ease-out;
    }
    
    @keyframes slideDownMobile {
        from {
            opacity: 0;
            transform: translateY(-10px);
            max-height: 0;
        }
        to {
            opacity: 1;
            transform: translateY(0);
            max-height: 200px;
        }
    }
    
    .language-dropdown ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: var(--spacing-xs);
    }
    
    .language-link {
        display: flex !important;
        padding: 14px 16px !important;
        color: white !important;
        text-decoration: none;
        font-size: 15px !important;
        font-weight: 500 !important;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        border-radius: var(--radius-xs);
        transition: all 0.2s ease;
        text-align: center;
        background: rgba(255,255,255,0.05);
        margin: 2px;
    }
    
    .language-link:hover,
    .language-link:active {
        background: rgba(251, 191, 36, 0.2) !important;
        color: var(--accent-yellow) !important;
        transform: scale(0.98);
    }
    
    .language-link.active {
        background: var(--accent-yellow) !important;
        color: var(--dark-blue) !important;
        font-weight: 500 !important;
    }
    
    .language-link.active:hover {
        background: var(--accent-yellow) !important;
        color: var(--dark-blue) !important;
        transform: scale(0.98);
    }
    
    /* Mobile Menu Toggle Improvements */
    .mobile-menu-toggle {
        padding: 12px;
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .mobile-menu-toggle span {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Improved Mobile Menu Animation */
    nav.active {
        animation: slideDownImproved 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideDownImproved {
        from {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* ===== ACCESSIBILITY - Skip Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10001;
}

.skip-link:focus {
    top: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
    header, .mobile-menu-toggle {
        display: none;
    }
}
/* === EINHEITLICHE SCHRIFTDEFINITION === */
.language-dropdown a,
.language-selector a,
nav a {
    font-weight: 500 !important;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    color: white;
    letter-spacing: 0 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Harmonized social icon visibility */
.social-icons img,
.social-icons svg,
.adress_footer .social-icons img,
.adress_footer .social-icons svg,
#adress_footer .social-icons img,
#adress_footer .social-icons svg {
  filter: none !important;
  opacity: 1 !important;
}
