/* ===== ОСНОВНЫЕ СТИЛИ МЕНЮ ===== */
.nav-container {
    background-color: #2e7d32;
    position: relative;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-container.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Навбар */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

/* Основное меню */
.nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    height: 60px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== ВЫПАДАЮЩИЕ МЕНЮ ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1001;
    border-radius: 0 0 5px 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
}

.dropdown-link:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Вложенное меню */
.nested-menu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 220px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease;
    z-index: 1002;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nested-item:hover .nested-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nested-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
}

.nested-link:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* ===== КНОПКА "СВЯЗАТЬСЯ С НАМИ" ===== */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    background-color: #388E3C;
}

.desktop-contact-btn {
    margin-left: 10px;
}

/* Скрываем кнопку для мобильных на десктопе */
.mobile-contact-btn {
    display: none;
}

/* ===== БУРГЕР МЕНЮ ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
    width: 30px;
    height: 24px;
    position: relative;
}

.bar {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background: white;
}

.bar:nth-child(1) {
    top: 0;
}

.bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.bar:nth-child(3) {
    bottom: 0;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .navbar {
        height: 56px;
        padding: 0 15px;
    }
    
    .nav-menu,
    .desktop-contact-btn {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #2e7d32;
        padding: 0;
        margin: 0;
        z-index: 1002;
        overflow-y: auto;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        height: 56px;
        padding: 0 20px;
        justify-content: flex-start;
        font-size: 16px;
        color: white;
        background: transparent;
    }
    
    /* Стили для дропдаунов на мобильных */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: rgba(0, 0, 0, 0.1);
        box-shadow: none;
        border-radius: 0;
        border-left: 4px solid #4CAF50;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown-menu.active {
        display: block;
        max-height: 500px; /* Достаточно для отображения всех пунктов */
    }
    
    .dropdown-link {
        padding: 15px 25px;
        font-size: 15px;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
    }
    
    /* Стили для вложенного меню на мобильных */
    .nested-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: rgba(0, 0, 0, 0.15);
        border-left: 4px solid #81C784;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nested-menu.active {
        display: block;
        max-height: 300px;
    }
    
    .nested-link {
        padding: 15px 35px;
        font-size: 14px;
        color: white;
        background: transparent;
    }
    
    .mobile-contact-btn {
        display: block;
        padding: 15px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-btn {
        display: flex;
        justify-content: center;
        background-color: #4CAF50;
        border-radius: 4px;
        font-size: 16px;
        padding: 12px;
    }
    
    .nav-container.sticky {
        position: fixed;
        top: 0;
    }
}