html,
body {
    margin: 0;
    padding: 0;
}

html.admin-bar body {
    margin-top: 0 !important;
}

body {
    background: #F5F5F5;
}

/* New Header Design */

.site-header-new {
    background: #F5F5F5;
    border-radius: 15px;
    padding-top: clamp(16.5px, calc(0.59203vw + 10.633px), 22px); /* Масштабирование */
    padding-right: clamp(20px, calc(1.61463vw + 4.000px), 35px); /* Масштабирование */
    padding-bottom: clamp(5px, calc(0.48439vw + 7.200px), 7px); /* Масштабирование */
    padding-left: clamp(20px, calc(1.61463vw + 4.000px), 35px); /* Масштабирование */
    position: absolute; /* Изменено с static на absolute */
    top: -30px; /* Изменено с -30px на 0 */
    left: 100px; /* Возвращено для absolute */
    right: 100px; /* Возвращено для absolute */
    /* margin-left: 100px; */ /* Удалено, так как не нужно с absolute и top/left/right */
    /* margin-right: 100px; */ /* Удалено, так как не нужно с absolute и top/left/right */
    z-index: 100;
    transition: all 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-container-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.main-navigation-new .main-menu-new {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    /* отступ от логотипа */
    margin-left: clamp(40px, calc(3.22927vw + 8.000px), 70px); /* Масштабирование */
}

/* Вертикальный разделитель */
.menu-separator {
    width: 1px;
    height: clamp(18px, calc(0.75349vw + 10.534px), 25px); /* Масштабирование */
    background-color: #9C9B9A;
    opacity: 0.4;
}

.main-menu-new .menu-separator {
    margin: 0 clamp(15px, calc(1.82992vw - 3.138px), 32px) 0 clamp(15px, calc(2.26049vw - 7.400px), 36px); /* Масштабирование */
}

/* Стили для всех ссылок в меню */
.main-navigation-new .main-menu-new a {
    font-family: "Commissioner", sans-serif;
    font-size: clamp(14px, calc(0.21528vw + 11.867px), 16px); /* Масштабирование */
    line-height: 100%;
    letter-spacing: -0.04em;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Стили для первого пункта "Каталог объектов" */
.main-menu-new .has-submenu a {
    font-weight: 600;
    color: #353331;
    display: flex;
    align-items: baseline;
}

.main-navigation-new .main-menu-new .menu-arrow {
    margin-left: clamp(0.5px, calc(0.05382vw - 0.033px), 1px); /* Масштабирование */
    display: flex;
    align-items: center;
}

/* Стили для остальных пунктов меню */
.main-menu-new li:not(.has-submenu):not(.menu-separator) {
    margin-right: clamp(15px, calc(1.61463vw - 1.000px), 30px); /* Масштабирование */
}

.main-menu-new li:not(.has-submenu):not(.menu-separator):last-child {
    margin-right: 0;
}

.main-menu-new li:not(.has-submenu):not(.menu-separator) a {
    font-weight: 400;
    color: #353331;
} 

/* Правая часть хедера */
.header-right .menu-separator {
    margin: 0 clamp(10px, calc(1.61463vw - 6.000px), 25px); /* Масштабирование */
}

.header-phone {
    display: flex;
    align-items: center;
    gap: clamp(3px, calc(0.21528vw + 0.867px), 5px); /* Масштабирование */
    font-family: "Commissioner", sans-serif;
    font-weight: 500;
    font-size: clamp(14px, calc(0.21528vw + 11.867px), 16px); /* Масштабирование */
    line-height: 100%;
    letter-spacing: -0.04em;
    color: #353331;
    text-decoration: none;
}

.header-phone img {
    width: clamp(8px, calc(0.350vw + 4.532px), 11.25px); /* Масштабирование */
}

.lang-switcher {
    font-family: "Commissioner", sans-serif;
    font-weight: 500;
    font-size: clamp(14px, calc(0.21528vw + 11.867px), 16px); /* Масштабирование */
    line-height: 100%;
    letter-spacing: -0.04em;
}

.lang-switcher a {
    text-decoration: none;
}

.lang-switcher a.active {
    color: #353331;
}

.lang-switcher a:not(.active) {
    color: #9C9B9A;
}

.lang-switcher span {
    color: #9C9B9A;
    margin: 0 clamp(1px, calc(0.10764vw - 0.066px), 2px); /* Масштабирование */
}

.header-search {
    margin-left: clamp(15px, calc(1.61463vw - 1.000px), 30px); /* Масштабирование */
}

.header-search img {
    width: clamp(10px, calc(0.21528vw + 7.867px), 12px); /* Масштабирование */
    height: clamp(10px, calc(0.21528vw + 7.867px), 12px); /* Масштабирование */
}

.btn-partner {
    display: inline-block;
    margin-left: clamp(15px, calc(1.61463vw - 1.000px), 30px); /* Масштабирование */
    background: #353331;
    color: #FFFFFF;
    font-family: "Commissioner", sans-serif;
    font-weight: 400;
    font-size: clamp(14px, calc(0.21528vw + 11.867px), 16px); /* Масштабирование */
    line-height: 100%;
    letter-spacing: -0.04em;
    padding: clamp(8px, calc(0.21528vw + 5.867px), 10px); /* Масштабирование */
    border-radius: 5px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.btn-partner:hover {
    opacity: 0.8;
}

/* Скрываем бургер на десктопе */
.header-burger {
    display: none;
}

.header-left .logo .logo-img-desktop {
    display: block;
    width: clamp(140px, calc(3.98277vw + 100.521px), 177px); /* Масштабирование */
    height: auto; /* Автоматическая высота для сохранения пропорций */
}

.header-left .logo .logo-img-mobile {
    display: none;
}

.header-angle-left {
    position: absolute;
    left: -18px;
    top: 27px;
    transform: rotate(270deg);
}

.header-angle-right {
    position: absolute;
    right: -21px;
    top: 24px;
    transform: rotate(180deg);
}

/* --- Адаптив хедера --- */

/* Планшеты и малые ноутбуки (меньше 1401px) */
@media (max-width: 1400px) {
    /* Скрываем ненужные элементы */
    .main-navigation-new,
    .header-right .menu-separator,
    .lang-switcher,
    .header-search,
    .btn-partner {
        display: none;
    }

    /* Показываем бургер */
    .header-burger {
        display: block;
        margin-left: 30px;
    }

    .header-burger img {
        width: 58px;
        height: auto;
    }

    /* Уменьшаем логотип */
    .header-left .logo-img {
        width: 140px;
    }

    /* Уменьшаем боковые отступы хедера */
    .site-header-new {
        padding: 20px 20px 5px;
        left: 70px;
        right: 70px;
    }
}

@media (max-width: 991px) {
    .header-angle-left svg {
        width: 15px;
        height: 15px;
    }
    .header-angle-right svg {
        width: 15px;
        height: 15px;
    }
    .header-angle-left {
        left: -12px;
        top: 26px;
    }
    .header-angle-right {
        right: -14px;
        top: 23px;
    }
}

/* Очень маленькие мобильные устройства (меньше 576px) */
@media (max-width: 575px) {
    /* Скрываем телефон */
    .header-phone {
        display: none;
    }

    /* Уменьшаем логотип еще сильнее */
    .header-left .logo-img {
        width: 80px;
    }

    .header-left .logo .logo-img-desktop {
        display: none;
    }

    .header-left .logo .logo-img-mobile {
        display: block;
    }

    /* Уменьшаем бургер */
    .header-burger img {
        width: 35px;
    }
    
    /* Уменьшаем боковые отступы хедера */
    .site-header-new {
        padding: 5px 12px;
        left: 32px;
        right: 32px;
        top: -7px; /* Изменено с -30px на -7px */
        border-radius: 0 0 15px 15px; /* Верхние радиусы убраны, нижние 15px */
    }

    /* Фикс выравнивания для ссылок с иконками на мобилке */
    .header-left .logo,
    .header-right .header-burger {
        display: flex;
        align-items: center;
    }
    .header-angle-left svg {
        width: 10px;
        height: 10px;
    }
    .header-angle-right svg {
        width: 10px;
        height: 10px;
    }
    .header-angle-left {
        left: -8px;
        top: 0px;
    }
    .header-angle-right {
        right: -8px;
        top: 0px;
    }
} 

/* Десктоп: логотип в хедере max-width: 180px */
.header-logo-img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .header-logo-img {
        max-width: 140px;
    }
} 

@media (max-width: 575px) {
    .header-logo-img {
        max-width: 80px;
    }
} 