/* Основной контейнер header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    z-index: 1000;
}

/* Контейнер для контента */
.header-container {
    max-width: 1416px;
    width: 1416px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Адаптив для экранов меньше 1920px */
@media (max-width: 1919px) {
    .header-container {
        max-width: 1200px;
        width: auto;
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* Верхняя часть header */
.header-top {
    height: 48px;
    display: flex;
    align-items: center;
}

/* Логотип */
.header-logo {
    width: 216px;
    height: 49.13px;
    flex-shrink: 0;
    transition: opacity 0.3s;
}

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

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Контактная информация */
.header-contacts {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2vw, 24px);
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666666;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.contact-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.contact-item a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #1D5794;
}

/* Социальные сети */
.header-social {
    display: flex;
    align-items: center;
    gap: 11px;
}

.social-link {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.social-link:hover {
    transform: scale(1.15);
}

.social-link img {
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
}

.social-link:hover img {
    opacity: 0.7;
}

/* Разделительная линия */
.header-divider {
    width: 1176px;
    height: 1px;
    background: rgba(102, 102, 102, 0.5);
    margin: 0 auto;
    margin-left: 492px;
    margin-right: auto;
}

/* Адаптив для экранов меньше 1920px */
@media (max-width: 1919px) {
    .header-divider {
        max-width: 1200px;
        width: auto;
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* Навигация */
.header-nav {
    height: 48px;
    display: flex;
    align-items: center;
}

.header-nav .header-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Меню навигации */
.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.5vw, 32px);
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: #666666;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #1D5794;
}

.nav-arrow {
    width: 7px;
    height: 4px;
    transition: transform 0.3s;
}

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

/* Кнопка записи */
.header-cta-button {
    width: 216px;
    height: 30px;
    background: #5E96CF;
    border: none;
    border-radius: 1px;
    color: white;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-cta-button:hover {
    background: #4a7aad;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-cta-button:active {
    transform: translateY(0);
}

/* Мобильное меню (бургер) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #666666;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover span {
    background: #1D5794;
}

/* Адаптив для планшетов */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
    }
    
    .header-contacts {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .contact-item {
        font-size: 12px;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 12px;
    }
    
    .header-cta-button {
        width: 180px;
        font-size: 12px;
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .site-header {
        position: relative;
    }
    
    .header-top {
        height: auto;
        padding: 12px 0;
    }
    
    .header-container {
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    .header-logo {
        width: 150px;
        height: auto;
    }
    
    .header-contacts {
        display: none;
    }
    
    .header-social {
        margin-left: auto;
    }
    
    .header-divider {
        display: none;
    }
    
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }
    
    .header-nav.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 0 20px;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .header-cta-button {
        width: 100%;
        margin: 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Адаптив для маленьких экранов */
@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .header-logo {
        width: 120px;
    }
    
    .header-social {
        gap: 8px;
    }
    
    .social-link {
        width: 14px;
        height: 14px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}


/* ===== ВЫПАДАЮЩИЕ МЕНЮ - INLINE СТИЛИ + CSS ===== */

/* ТОЛЬКО для элементов с классом nav-item-dropdown */
.nav-menu .nav-item-dropdown {
    position: relative !important;
}

/* Само выпадающее меню */
.nav-menu .nav-item-dropdown > ul.dropdown-menu,
.nav-menu .nav-item-dropdown > .dropdown-menu {
    /* Позиционирование - КРИТИЧНО! */
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    
    /* Отменяем любые transform из style.css */
    transform: none !important;
    
    /* Размеры */
    min-width: 250px !important;
    width: auto !important;
    max-width: 300px !important;
    
    /* Отступы */
    margin: 0 !important;
    padding: 8px 0 !important;
    
    /* Внешний вид */
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    
    /* Скрываем по умолчанию */
    display: none !important;
    
    /* z-index */
    z-index: 10000 !important;
    
    /* Список */
    list-style: none !important;
}

/* Показываем меню при hover */
.nav-menu .nav-item-dropdown:hover > ul.dropdown-menu,
.nav-menu .nav-item-dropdown:hover > .dropdown-menu {
    display: block !important;
}

/* Пункты меню */
.nav-menu .nav-item-dropdown > ul.dropdown-menu > li,
.nav-menu .nav-item-dropdown > .dropdown-menu > li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Ссылки в меню */
.nav-menu .nav-item-dropdown > ul.dropdown-menu > li > a,
.nav-menu .nav-item-dropdown > .dropdown-menu > li > a {
    display: block !important;
    padding: 10px 20px !important;
    color: #666 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

/* Hover на ссылках */
.nav-menu .nav-item-dropdown > ul.dropdown-menu > li > a:hover,
.nav-menu .nav-item-dropdown > .dropdown-menu > li > a:hover {
    background: #f5f5f5 !important;
    color: #5E96CF !important;
    padding-left: 24px !important;
}

/* Стрелка при hover */
.nav-menu .nav-item-dropdown:hover > .nav-arrow {
    transform: rotate(180deg) !important;
}

/* Цвет ссылки при hover */
.nav-menu .nav-item-dropdown:hover > .nav-link {
    color: #5E96CF !important;
}


/* КРИТИЧНО: Отменяем конфликтующие стили из style.css */
.nav-menu .dropdown-menu {
    left: 0 !important;
    transform: none !important;
}

.nav-menu li.nav-item-dropdown .dropdown-menu {
    left: 0 !important;
    transform: none !important;
}

/* Убираем стили для .has-dropdown если они применяются */
.nav-menu .has-dropdown .dropdown {
    display: none !important;
}
