/* ===== СТИЛИ МЕНЮ (общие для всех страниц сайта) ===== */

/* Сброс для меню */
.menu-wrapper * {
    box-sizing: border-box;
}

.menu-wrapper {
    background: #ffffff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.menu-wrapper a {
    text-decoration: none;
    color: inherit;
}

.menu-wrapper ul {
    list-style: none;
}

.logo {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0b2a4a !important; /* Тёмно-синий цвет для "Egry" */
    letter-spacing: -0.5px !important;
    display: inline-block !important;
}

.logo span { 
    color: #7c3aed !important; /* Фиолетовый для "Luck" */
    font-weight: 800 !important;
}

.nav-list {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-list > li { 
    position: relative; 
}

.nav-list > li > a,
.nav-list > li > .dropbtn {
    display: block;
    padding: 10px 16px;
    color: #1e293b;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.nav-list > li > a:hover, 
.nav-list > li > a.active,
.nav-list > li > .dropbtn:hover {
    background: #f1f5f9;
    color: #7c3aed;
}

/* Выпадающее меню */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 16px 0 8px 0;
    z-index: 1001;
    border: 1px solid #e2e8f0;
}

.dropdown-content::before {
    display: none;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { 
        display: block; 
    }
}

.dropdown-content > a {
    padding: 10px 20px;
    font-size: 14px;
    display: block;
    color: #1e293b;
    transition: all 0.2s ease;
}

.dropdown-content > a:hover {
    background: #f8fafc;
    color: #7c3aed;
}

/* Вложенный список (Мои АИ сервисы) */
.dropdown-content .dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-content .dropdown-list li {
    width: 100%;
}

.dropdown-content .dropdown-list a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s ease;
}

.dropdown-content .dropdown-list a:hover {
    background: #f8fafc;
    color: #7c3aed;
    padding-left: 24px;
}

.dropdown-content .dropdown-list a.active {
    background-color: #f0fdf4;
    color: #16a34a;
    font-weight: 600;
    border-left: 3px solid #16a34a;
}

.dropdown-content .dropdown-list a.has-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-content .dropdown-list a.has-badge:hover {
    padding-left: 20px;
}

.badge-new {
    display: inline-block;
    background-color: #16a34a;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Гамбургер */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0b2a4a;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ МЕНЮ ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle { 
        display: block; 
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 10px 0;
        gap: 0;
        z-index: 100;
    }

    .nav-list.mobile-open {
        display: flex;
    }

    .nav-list > li {
        width: 100%;
    }

    .nav-list > li > a,
    .nav-list > li > .dropbtn {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
    }

    .nav-list > li > a:hover {
        background: #f8f9fa;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        padding: 0;
        background: #f8f9fa;
        border: none;
        margin-top: 0;
        min-width: 100%;
    }

    .dropdown-content > a {
        padding: 15px 20px;
        border-bottom: 1px solid #e2e8f0;
    }

    .dropdown-content .dropdown-list a {
        padding: 15px 20px 15px 40px;
        border-bottom: 1px solid #e2e8f0;
    }

    .dropdown-content .dropdown-list a:hover {
        padding-left: 40px;
        background: #eef2ff;
    }

    .dropdown-content .dropdown-list a.active {
        border-left: none;
        border-bottom: 3px solid #16a34a;
        background: #dcfce7;
    }
}