/* Основные стили шапки */
.navbar {
    position: fixed;
    left: 0;
    top: 0px;
    width: 100%;
    max-height: 100%;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0px;
}

.navbar_wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%; /* Заменяем max-width на 100% */
    margin: 0 auto;
    padding: 5px 20px;
    box-sizing: border-box;
}

/* Логотип с фиксированной шириной */
.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    min-width: 200px; /* Фиксированная ширина */
    flex-shrink: 0; /* Запрещаем сжатие */
}

.logo img {
    width: 100px;
    margin-right: 10px;
    height: auto;
}

/* Основное меню - теперь занимает всё доступное пространство */
.menu {
    display: flex;
    flex-grow: 1;
    justify-content: space-around; /* Равномерное распределение */
    align-items: center;
    margin: 0;
    padding: 0 20px;
    min-width: 0; /* Важно для правильной работы flex */
}

.menu > li {
    list-style: none;
    flex: 1 1 auto; /* Элементы растягиваются и сжимаются */
    text-align: center;
    min-width: 0; /* Разрешаем сжатие */
    white-space: nowrap; /* Запрещаем перенос текста */
    padding: 0 5px; /* Минимальные отступы */
}

.menu > li > a {
    display: block;
    padding: 10px 5px;
    color: #101010;
    font-size: 16px; /* Уменьшенный шрифт */
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.menu > li:not(.active) > a:hover {
    color: var(--primary-color);
}

.menu > li.active > a {
    color: var(--primary-color);
    font-weight: 600;
}

.menu > li.active > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Контакты */
.conctacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 180px; /* Фиксированная ширина */
    flex-shrink: 0; /* Запрещаем сжатие */
    margin-left: 20px;
}

.conctacts h3 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 500;
    margin: 2px 0;
    white-space: nowrap;
}

/* Гамбургер меню */
.hamb {
    display: none;
    align-items: center;
}

.hamb_field {
    padding: 10px;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}
/* Мобильное меню */
.popup {
    position: fixed;
    top: 100px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 100px);
    background-color: #fff;
    z-index: 999;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.popup.open {
    left: 0;
}

.popup .menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.popup .menu > li {
    width: 100%;
    margin: 0;
}

.popup .menu > li > a {
    display: block;
    padding: 15px 20px;
    text-align: center;
    font-size: 18px;
    color: #101010;
    transition: all 0.3s ease;
}

.popup .menu > li > a:hover {
    background-color: rgba(255, 199, 0, 0.1);
}

/* Анимация гамбургера */
.hamb_field.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamb_field.active .bar:nth-child(2) {
    opacity: 0;
}

.hamb_field.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
@media (max-width: 1600px) {
    .menu {
        display: none;
    }
    
    .hamb {
        display: flex;
    }
    
    .logo {
        min-width: auto;
        font-size: 18px;
    }
    
    .logo img {
        width: 60px;
    }
    .conctacts{
        display: none;
    }
}

/* Адаптив */
@media (max-width: 992px) {
    .menu {
        display: none;
    }
    
    .hamb {
        display: flex;
    }
    
    .logo {
        min-width: auto;
        font-size: 18px;
    }
    
    .logo img {
        width: 60px;
    }
    .conctacts{
        display: none;
    }
}

@media (max-width: 768px) {
    .menu {
        display: none;
    }
    
    .hamb {
        display: flex;
    }
    
    .logo {
        min-width: auto;
        font-size: 18px;
    }
    
    .logo img {
        width: 60px;
    }
    .conctacts{
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 70px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo img {
        width: 50px;
    }
    .conctacts{
        display: none;
    }
    .popup {
        top: 80px;
    }
} 