/* ===== НОВЫЙ СТИЛЬ ШАПКИ ===== */
/* Базовые стили для navbar */
.navbar {
    transition: all 0.3s ease;
}

/* Стили для шапки с закругленными краями (ПК версия) */
.navbar.rounded-nav {
    margin: 20px 20px 0 20px;
    width: calc(100% - 40px);
    border-radius: 90px;
    background-color: #fff !important;
    backdrop-filter: none;
    border-bottom: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* При скролле шапка может стать чуть меньше */
.navbar.rounded-nav.scrolled {
    padding: 8px 32px;
    margin: 15px 20px 0 20px;
    width: calc(100% - 40px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Ссылки в навигации (ПК) */
.navbar.rounded-nav .nav-links a {
    color: #1a2c3e !important;
}

.navbar.rounded-nav .nav-links a:hover {
    color: #2360e8 !important;
}

.navbar.rounded-nav .nav-links a:after {
    background: #2360e8 !important;
}

.navbar.rounded-nav .nav-links a.active {
    color: #2360e8 !important;
}

/* Иконка бургер-меню */
.navbar.rounded-nav .mobile-menu-toggle {
    color: #1a2c3e !important;
    background: none;
    border: none;
    cursor: pointer;
}

/* Кнопки в шапке (ПК) */
.navbar.rounded-nav .header-contacts .btn-outline-small {
    background: #2360e8 !important;
    color: #ffffff !important;
}

.navbar.rounded-nav .header-contacts .btn-outline-small:hover {
    border-color: rgba(26, 44, 62, 0.3);
    color: #ffffff !important;
    background: #1a2c3e !important;
}

.navbar.rounded-nav .header-contacts .btn-primary-small {
    background: #2360e8 !important;
    color: #ffffff !important;
    box-shadow: none;
}

.navbar.rounded-nav .header-contacts .btn-primary-small:hover {
    background: #1a4cb8 !important;
    transform: translateY(-2px);
}

/* Кнопка MAX в шапке */
.navbar.rounded-nav .btn-outline-small-max {
    color: #1a2c3e;
    border-color: rgba(0, 0, 0, 0.2);
}

.navbar.rounded-nav .btn-outline-small-max:hover {
    color: #2360e8;
}

.navbar.rounded-nav .btn-outline-small-max:hover svg {
    color: #2360e8;
}

/* Логотип и текст в шапке */
.navbar.rounded-nav .logo-main {
    color: #1a2c3e !important;
}

.navbar.rounded-nav .logo-desc {
    color: rgba(26, 44, 62, 0.8) !important;
}

.navbar.rounded-nav .logo-icon {
    color: #1a2c3e !important;
}

/* ===== СОЦИАЛЬНЫЕ ИКОНКИ В ШАПКЕ ===== */
.navbar.rounded-nav .social-icons-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    padding-right: 8px;
    border-right: 0px solid rgba(26, 44, 62, 0.2);
}

.navbar.rounded-nav .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(26, 44, 62, 0.08);
    color: #1a2c3e;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar.rounded-nav .social-icon:hover {
    background: #2360e8;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Специальные стили для иконки MAX */
.navbar.rounded-nav .social-icon.icon-max {
    background: rgba(26, 44, 62, 0.08);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar.rounded-nav .social-icon.icon-max svg {
    width: 24px;
    height: auto;
    transform: none;
}

.navbar.rounded-nav .social-icon.icon-max:hover {
    background: #2360e8;
}

.navbar.rounded-nav .social-icon.icon-max:hover svg {
    color: #ffffff;
}

/* ===== СТРЕЛКИ ПОДМЕНЮ (ПК) ===== */
/* Все стрелки по умолчанию - ЧЕРНЫЕ */
.submenu-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    transition: all 0.25s ease;
}

.submenu-indicator i {
    font-size: 11px;
    color: #000000;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* При наведении на пункт с подменю - стрелка становится СИНЕЙ и поворачивается */
.menu-item-has-children:hover > a .submenu-indicator i {
    transform: rotate(-90deg);
    color: #3B82F6;
}

/* Стрелки в выпадающем подменю - тоже черные по умолчанию */
.sub-menu .menu-item-has-children > a .submenu-indicator i,
.mobile-sub-menu .menu-item-has-children > a .submenu-indicator i {
    color: #000000;
}

.sub-menu .menu-item-has-children:hover > a .submenu-indicator i,
.mobile-sub-menu .menu-item-has-children:hover > a .submenu-indicator i {
    transform: rotate(-90deg);
    color: #3B82F6;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ (до 1000px) ===== */
@media (max-width: 1000px) {
    /* Шапка */
    .navbar.rounded-nav {
        padding: 10px 20px !important;
    }
    
    /* Контейнер шапки */
    .navbar.rounded-nav .navbar-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        position: relative;
    }
    
    /* Логотип */
    .navbar.rounded-nav .logo-block {
        flex-shrink: 1;
    }
    
    .navbar.rounded-nav .logo-main {
        font-size: 18px !important;
        white-space: nowrap;
    }
    
    .navbar.rounded-nav .logo-desc {
        font-size: 9px !important;
        white-space: nowrap;
    }
    
    .navbar.rounded-nav .logo-icon {
        font-size: 28px !important;
    }
    
    .navbar.rounded-nav .logo-img {
        max-height: 60px !important;
    }
    
    /* Бургер-кнопка */
    .navbar.rounded-nav .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 24px !important;
        margin-left: auto;
        flex-shrink: 0;
        z-index: 1002;
        position: relative;
    }
    
    /* Скрываем контакты в шапке на мобильных */
    .navbar.rounded-nav .header-contacts {
        display: none !important;
    }
    
    /* Скрываем соцсети в шапке на мобильных */
    .navbar.rounded-nav .social-icons-header {
        display: none !important;
    }
    
    /* Мобильное меню (навигация) */
    .navbar.rounded-nav .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 350px !important;
        height: 100vh !important;
        background-color: #ffffff !important;
        z-index: 1001 !important;
        padding: 80px 20px 20px 20px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Открытое меню */
    .navbar.rounded-nav .nav-links.show,
    .navbar.rounded-nav .nav-links.active {
        left: 0 !important;
    }
    
    /* Ссылки в меню */
    .navbar.rounded-nav .nav-links a,
    .navbar.rounded-nav .nav-links.show a {
        color: #1a2c3e !important;
        font-weight: 500 !important;
        background: transparent !important;
        padding: 12px 0 !important;
        width: 100% !important;
        text-align: left !important;
        font-size: 16px !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    
    .navbar.rounded-nav .nav-links a:hover,
    .navbar.rounded-nav .nav-links.show a:hover {
        color: #2360e8 !important;
        background: transparent !important;
        padding-left: 10px !important;
        border-bottom-color: #2360e8 !important;
    }
    
    .navbar.rounded-nav .nav-links a.active,
    .navbar.rounded-nav .nav-links.show a.active {
        color: #2360e8 !important;
        background: transparent !important;
        font-weight: 700 !important;
    }
    
    /* Убираем подчёркивание */
    .navbar.rounded-nav .nav-links a:after,
    .navbar.rounded-nav .nav-links.show a:after {
        display: none !important;
    }
    
    /* ===== ПОДМЕНЮ В МОБИЛЬНОЙ ВЕРСИИ ===== */
    .navbar.rounded-nav .nav-links .mobile-menu .sub-menu,
    .navbar.rounded-nav .nav-links .mobile-menu .mobile-sub-menu,
    .navbar.rounded-nav .nav-links .mobile-menu ul {
        display: none;
        padding-left: 20px;
        margin: 0;
        list-style: none;
        background: #f8fafc;
        border-radius: 12px;
        margin-top: 5px;
        margin-bottom: 10px;
    }
    
    .navbar.rounded-nav .nav-links .mobile-menu li.active > .sub-menu,
    .navbar.rounded-nav .nav-links .mobile-menu li.active > .mobile-sub-menu,
    .navbar.rounded-nav .nav-links .mobile-menu li.active > ul {
        display: block;
    }
    
    .navbar.rounded-nav .nav-links .mobile-menu .sub-menu a,
    .navbar.rounded-nav .nav-links .mobile-menu .mobile-sub-menu a,
    .navbar.rounded-nav .nav-links .mobile-menu ul a {
        padding: 10px 0 10px 15px !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        border-bottom: none !important;
        color: #4a5568 !important;
    }
    
    .navbar.rounded-nav .nav-links .mobile-menu .sub-menu a:hover,
    .navbar.rounded-nav .nav-links .mobile-menu .mobile-sub-menu a:hover,
    .navbar.rounded-nav .nav-links .mobile-menu ul a:hover {
        color: #2360e8 !important;
        padding-left: 20px !important;
    }
    
    /* Индикатор подменю в мобильной версии */
    .submenu-indicator-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        cursor: pointer;
        transition: transform 0.3s ease;
    }
    
    .submenu-indicator-mobile i {
        font-size: 12px;
        color: #000000;
        transition: all 0.3s ease;
    }
    
    .navbar.rounded-nav .nav-links .mobile-menu li.active > a .submenu-indicator-mobile {
        transform: rotate(180deg);
    }
    
    .navbar.rounded-nav .nav-links .mobile-menu li.active > a .submenu-indicator-mobile i {
        color: #2360e8;
    }
    
    /* ===== МОБИЛЬНЫЕ КОНТАКТЫ (ОТДЕЛЬНО ОТ МЕНЮ, ВНИЗУ) ===== */
    .navbar.rounded-nav .mobile-contacts {
        position: fixed !important;
        bottom: 0 !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 350px !important;
        background: #ffffff !important;
        z-index: 1001 !important;
        padding: 20px !important;
        transition: left 0.3s ease 0.05s !important;
        border-top: 1px solid #e2e8f0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Когда меню открыто - показываем контакты снизу */
    body.menu-open .navbar.rounded-nav .mobile-contacts {
        left: 0 !important;
    }
    
    /* Кнопки в мобильных контактах */
    .navbar.rounded-nav .mobile-contacts .btn-outline-small,
    .navbar.rounded-nav .mobile-contacts .btn-primary-small,
    .navbar.rounded-nav .mobile-contacts .btn-outline-small-max {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 12px 16px !important;
        border-radius: 50px !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        width: 100% !important;
    }
    
    .navbar.rounded-nav .mobile-contacts .btn-outline-small {
        background: #f1f5f9 !important;
        color: #1a2c3e !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .navbar.rounded-nav .mobile-contacts .btn-primary-small {
        background: #2360e8 !important;
        color: #ffffff !important;
    }
    
    .navbar.rounded-nav .mobile-contacts .btn-outline-small-max {
        background: #f1f5f9 !important;
        color: #1a2c3e !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .navbar.rounded-nav .mobile-contacts .btn-outline-small-max:hover svg {
        color: #2360e8 !important;
    }
    
    /* Социальные иконки в мобильных контактах */
    .navbar.rounded-nav .mobile-contacts .mobile-social-icons {
        display: flex !important;
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
        padding-top: 15px;
        border-top: 1px solid #e2e8f0;
    }
    
    .navbar.rounded-nav .mobile-contacts .mobile-social-icons .social-icon {
        width: 44px;
        height: 44px;
        background: #f1f5f9;
        color: #1a2c3e;
        font-size: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .navbar.rounded-nav .mobile-contacts .mobile-social-icons .social-icon:hover {
        background: #2360e8;
        color: #ffffff;
        transform: translateY(-2px);
    }
    
    /* Затемнение фона */
    body.menu-open {
        overflow: hidden !important;
    }
    
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: block;
    }
}

/* ===== ПЛАНШЕТЫ (768px - 1000px) ===== */
@media (max-width: 768px) {
    .navbar.rounded-nav .nav-links .mobile-menu .sub-menu a,
    .navbar.rounded-nav .nav-links .mobile-menu .mobile-sub-menu a,
    .navbar.rounded-nav .nav-links .mobile-menu ul a {
        padding: 10px 0 10px 15px !important;
        font-size: 13px !important;
    }
    
    .submenu-indicator-mobile {
        width: 28px;
        height: 28px;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) ===== */
@media (max-width: 480px) {
    .navbar.rounded-nav {
        padding: 8px 16px !important;
        margin: 10px 10px 0 10px !important;
        width: calc(100% - 20px) !important;
    }
    
    .navbar.rounded-nav .logo-main {
        font-size: 16px !important;
    }
    
    .navbar.rounded-nav .logo-desc {
        display: none !important;
    }
    
    .navbar.rounded-nav .logo-icon {
        font-size: 24px !important;
    }
    
    .navbar.rounded-nav .logo-img {
        max-height: 50px !important;
    }
    
    .navbar.rounded-nav .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 22px !important;
    }
    
    .navbar.rounded-nav .nav-links,
    .navbar.rounded-nav .mobile-contacts {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .navbar.rounded-nav .nav-links {
        padding: 70px 20px 20px 20px !important;
    }
    
    .navbar.rounded-nav .nav-links a {
        font-size: 16px !important;
        padding: 12px 0 !important;
    }
}

/* ===== ОЧЕНЬ УЗКИЕ ЭКРАНЫ (до 380px) ===== */
@media (max-width: 380px) {
    .navbar.rounded-nav {
        padding: 6px 12px !important;
    }
    
    .navbar.rounded-nav .logo-main {
        font-size: 14px !important;
    }
    
    .navbar.rounded-nav .logo-icon {
        font-size: 22px !important;
    }
    
    .navbar.rounded-nav .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 20px !important;
    }
}

/* ===== ДЕСКТОПНАЯ ВЕРСИЯ - СКРЫВАЕМ МОБИЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
@media (min-width: 1001px) {
    .mobile-menu-wrapper,
    .mobile-contacts,
    .mobile-social-icons,
    .submenu-indicator-mobile {
        display: none;
    }
}