/* Общие стили шапки для всех страниц */
:root {
    --primary-color: #1a2980;
    --secondary-color: #26d0ce;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 15px 0;
}

.header.transparent {
    background-color: transparent;
    box-shadow: none;
}

.header.scrolled {
    background-color: rgba(26, 41, 128, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    z-index: 1001;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
    filter: brightness(0) invert(1);
}

/* Основное меню (десктоп) */
.desktop-nav {
    display: block; /* Изменено с flex на block */
}

.nav-menu {
    display: flex; /* Меню всегда flex на ПК */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Контакты в шапке */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.header-phone:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.telegram-btn {
    background-color: #0088cc;
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.telegram-btn:hover {
    background-color: #006699;
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Иконка мобильного меню */
.mobile-menu-btn {
    display: none; /* Скрыто на ПК по умолчанию */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    color: var(--secondary-color);
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background-color: rgba(26, 41, 128, 0.98);
    z-index: 1100;
    padding: 80px 30px 30px;
    transition: left 0.4s ease;
    backdrop-filter: blur(10px);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    margin-bottom: 20px;
}

.mobile-menu-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s;
}

.mobile-menu-link:hover {
    color: var(--secondary-color);
}

.mobile-menu-contacts {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-phone {
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

.mobile-menu-telegram {
    background-color: #0088cc;
    color: var(--white);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.close-menu-btn:hover {
    color: var(--secondary-color);
}

/* Оверлей для меню */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Стили для выпадающего меню (десктоп) */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    min-width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2000;
    border: 1px solid #eee;
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #1a2980;
    padding-left: 25px;
    border-left-color: #26d0ce;
}

.dropdown-item-icon {
    width: 20px;
    color: #1a2980;
    font-size: 1rem;
}

/* Стили для мобильного выпадающего меню */
.mobile-dropdown {
    flex-direction: column;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-header:hover {
    color: var(--secondary-color);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -30px;
    padding: 0 30px;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 500px;
    padding: 10px 30px;
}

.mobile-dropdown.active .mobile-dropdown-icon {
    transform: rotate(180deg);
}

.mobile-dropdown-icon {
    transition: transform 0.3s;
    font-size: 0.9rem;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    font-size: 1rem;
    margin-left: 10px;
}

.mobile-submenu-link:hover {
    color: white;
    border-left-color: #26d0ce;
    padding-left: 20px;
}

.mobile-submenu-link i {
    width: 20px;
    color: #26d0ce;
    font-size: 1rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .desktop-nav {
        display: none; /* Скрываем десктопное меню на мобильных */
    }
    
    .header-contacts {
        display: none; /* Скрываем контакты в шапке на мобильных */
    }
    
    .mobile-menu-btn {
        display: block; /* Показываем кнопку меню на мобильных */
    }
    
    /* Скрываем выпадающее меню на мобильных в десктопной версии */
    .dropdown-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        width: 250px;
        padding: 80px 20px 20px;
    }
    
    .mobile-dropdown-content {
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .mobile-dropdown.active .mobile-dropdown-content {
        padding: 10px 20px;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 15px;
    }
}

/* Стили для выпадающего меню (десктоп) - добавьте это в конец файла */
.nav-item.dropdown {
    position: relative !important;
    z-index: 2001 !important;
}

.dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    position: relative !important;
    z-index: 2002 !important;
}

.dropdown-icon {
    font-size: 0.8rem !important;
    transition: transform 0.3s !important;
    margin-left: 5px !important;
}

.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: -20px !important;
    min-width: 280px !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 10px 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.3s ease !important;
    z-index: 2100 !important;
    border: 1px solid #eee !important;
	display: block;
}

/* Убедитесь, что это правило работает */
.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(5px) !important;
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg) !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    border-left: 3px solid transparent !important;
}

.dropdown-item:hover {
    background: #f8f9fa !important;
    color: #1a2980 !important;
    padding-left: 25px !important;
    border-left-color: #26d0ce !important;
}

.dropdown-item-icon {
    width: 20px !important;
    color: #1a2980 !important;
    font-size: 1rem !important;
}

/* Отладка - добавьте временно для тестирования */
.nav-item.dropdown:hover {
    background-color: rgba(255, 0, 0, 0.1) !important;
}