/**
 * Стили для нового хэдера КОНТЕНТЗАВОД
 * header-new.css
 */

/* === NEW HEADER — WRAPPER === */
.header-new {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    box-sizing: border-box;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--header-gap);
    transition: top 0.3s ease;

    /* Размеры правой части для расчёта max-width плашки */
    --header-gap: 10px;            /* отступ между плашкой и кнопками */
    --account-size: 48px;          /* ширина кнопки аккаунта (круг) */
    --buttons-gap: 12px;           /* отступ между аккаунтом и CTA */
    --cta-width: 178px;            /* ширина кнопки "Оставить заявку" */
    --right-total: calc(var(--header-gap) + var(--account-size) + var(--buttons-gap) + var(--cta-width));
}

.header-new * {
    box-sizing: border-box;
}

.header-new.scrolled {
    top: 12px;
}

/* Белая плашка — только логотипы + навигация */
.header-new__bar {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - var(--right-total));
    padding: 10px 24px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: #ffffff;
    border-radius: 32px;
    gap: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header-new.scrolled .header-new__bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* === BRAND / LOGO === */
.header-new__brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-new__logo-icon {
    height: 38px;
    width: auto;
    display: block;
}

.header-new__logo-fittin {
    height: 11px;
    width: auto;
    display: block;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.header-new__brand:hover .header-new__logo-fittin {
    opacity: 1;
}

/* === NAV LINKS === */
.header-new__nav {
    display: flex;
    align-items: center;
    gap: 30px !important;
    min-width: 0;
    margin-left: auto;
}

.header-new__link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px !important;
    color: #3E3E3E;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 8px 0;
    white-space: nowrap;
}

.header-new__link:hover {
    color: #1537A3;
    transform: translateY(-1px);
}

/* === RIGHT SECTION (вне плашки) === */
.header-new__right {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-shrink: 0;
    align-self: stretch;
}

.header-new__account {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 50%;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}
.header-new.scrolled .header-new__account {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.header-new__account:hover {
    /*background: rgba(238, 240, 254, 1);*/
    /*border-color: rgba(21, 55, 163, 0.25);*/
    transform: translateY(-1px);
}

.header-new__account-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/*.header-new__account-icon:hover {*/
/*    color: #1537A3;*/
/*}*/

.header-new__cta {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #ffffff;
    background: rgb(8, 46, 116);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(16px);
    border: none;
    border-radius: 32px;
    padding: 0 15px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-new__cta:hover {
    transform: translateY(-1px);
    background: rgba(27, 13, 150, 0.74);
}

/* Кнопка Войти — без заливки, с обводкой */
.header-new__login {
    background: transparent !important;
    color: #082E74 !important;
    border: 2px solid #082E74 !important;
}

.header-new__login:hover {
    background: rgba(8, 46, 116, 0.08) !important;
    color: #082E74 !important;
    border-color: #082E74 !important;
}

/* Мобильная правая часть — скрыта на десктопе */
.header-new__right--mobile {
    display: none;
}

/* === MOBILE TOGGLE === */
.header-new__toggle {
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    background: none;
    border: none;
}

.header-new__toggle span {
    width: 22px;
    height: 2px;
    background-color: #3E3E3E;
    transition: all 0.3s ease;
    border-radius: 1px;
    display: block;
}

.header-new__toggle.active span:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}

.header-new__toggle.active span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* === RESPONSIVE === */

@media (max-width: 1100px) {
    .hero-section {
        min-height: 80vh;
    }

    .header-new {
        top: 14px;
        height: 56px;
        width: calc(100% - 30px);
    }

    .header-new__bar {
        padding: 0 20px;
        max-width: 100%;
        overflow: visible;
    }

    .header-new.scrolled {
        top: 8px;
    }

    /* Навигация сворачивается в выпадающее меню */
    .header-new__nav {
        position: fixed;
        top: 78px;
        left: 65%;
        right: auto;
        transform: translateX(-50%);
        width: min(calc(100% - 30px), 420px);
        margin: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: flex-start;
        gap: 4px;
        padding: 28px 24px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .header-new__nav.active {
        opacity: 1;
        visibility: visible;
    }

    .header-new__link {
        font-size: 18px;
        color: #000;
        padding: 16px 0;
        text-align: center;
        width: 100%;
    }

     Правая часть в мобильном меню
    .header-new__right--mobile {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        padding-top: 20px;
        margin-top: 12px;
        border-top: 1px solid rgba(21, 55, 163, 0.1);
    }


    .header-new__nav.active .header-new__right--mobile {
        display: flex;
    }

    .header-new__right--mobile .header-new__cta {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 15px 24px !important;
        font-size: 16px !important;
    }

    .header-new__toggle {
        display: flex !important;
        margin-left: auto;
    }

    .header-new__logo-icon {
        height: 32px !important;
    }

    .header-new__logo-fittin {
        height: 12px;
    }
}

/* 900–1000px: кнопки в хедере видны, в меню гамбургера скрываем */
@media (min-width: 901px) and (max-width: 1100px) {
    .header-new__right--desktop {
        display: flex !important;
    }

    .header-new__right--mobile {
        display: none !important;
        padding-top: 0;
        margin-top: 0;
        border-top: none;
    }
}

@media (max-width: 900px) {

    /* Скрываем десктопные кнопки вне плашки */
    .header-new__right--desktop {
        display: none;
    }

    .header-new__right--mobile .header-new__cta.header-new__login {
        width: 100%;
        text-align: center;
        color: #082E74 !important;
        border-color: #082E74 !important;
        justify-content: center;
        padding: 15px 24px !important;
        font-size: 16px !important;
    }

    .header-new__right--mobile .header-new__cta {
        background: #082E74;
    }

    .header-new__nav {
        left: 50% !important;
    }

    .header-new__cta {
        background: #082E74;
    }
}

@media (max-width: 480px) {
    .header-new {
        top: 10px;
        height: 50px;
        width: calc(100% - 20px);
    }

    .hero-section {
        min-height: 60vh !important;
    }

    .header-new__bar {
        gap: 15px !important;
    }

    .header-new.scrolled {
        top: 6px;
    }

    .header-new__nav {
        top: 66px;
        width: min(calc(100% - 20px), 420px);
    }

    .header-new__logo-icon {
        height: 32px;
    }

    .header-new__logo-fittin {
        height: 11px;
    }
}

/* === SCROLL PADDING === */
html {
    scroll-padding-top: 100px;
}

@media (max-width: 1100px) {
    html {
        scroll-padding-top: 80px;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* === PRINT === */
@media print {
    .header-new {
        display: none;
    }
}
