/* header.css */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0066cc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    height: auto;
    min-height: 80px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 60px;
    margin-right: 10px;
    content: url('/images/logo.png');
}

.logo h1 {
    color: white;
    font-size: 28px;
    margin: 0;
    white-space: nowrap;
}

/* Navigation Styles */
.main-nav {
    display: flex;
    flex-grow: 1;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 14px;
    border-radius: 3px;
    white-space: nowrap;
}

.lang-btn.active {
    background-color: white;
    color: #0066cc;
    border-color: white;
    font-weight: bold;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Стиль для активной навигационной ссылки */
.nav-link.active {
    border-bottom: 2px solid white;
    font-weight: bold;
}

/* Стили для ссылки логотипа */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .header .container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 15px;
    }
    
    .logo {
        order: 1;
        margin-bottom: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .language-switcher {
        order: 2;
        margin-bottom: 10px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .main-nav li {
        margin: 0 10px;
    }
}

@media (max-width: 640px) {
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px 8px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Плавная анимация для изменяющихся элементов */
.header, .logo-img, .main-nav {
    transition: all 0.3s ease;
}

/* Гарантия, что шапка всегда поверх всего */
.header {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}