/* === Exo 2 — локальный шрифт для логотипа === */
@font-face {
    font-family: "Exo2Local";
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url("/local/templates/main/css/fonts/exo2/exo2-latin-700-800-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
    font-family: "Exo2Local";
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url("/local/templates/main/css/fonts/exo2/exo2-cyrillic-700-800-normal.woff2") format("woff2");
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Exo2Local";
    font-style: italic;
    font-weight: 700 800;
    font-display: swap;
    src: url("/local/templates/main/css/fonts/exo2/exo2-latin-700-800-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
    font-family: "Exo2Local";
    font-style: italic;
    font-weight: 700 800;
    font-display: swap;
    src: url("/local/templates/main/css/fonts/exo2/exo2-cyrillic-700-800-italic.woff2") format("woff2");
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}


/* === Топ-бар: layout (лого слева, профиль справа), высота 64px === */

#top-bar.top-bar-branding {
    box-sizing: border-box;
    min-height: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

#top-bar.top-bar-branding > .container {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    align-items: center;
}

#top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Левая колонка: иначе блок тянется по высоте строки, а лого остаётся у верхнего края */
#top-bar .container > .col_half:first-child {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: center;
    min-height: 0;
}

#top-bar .col_half {
    width: auto;
    float: none !important;
    margin: 0;
}

#top-bar .col_half.fright.col_last {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-left: auto;
}


/* === Логотип мир.экспресс === */

.mir-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 0;
    text-decoration: none;
}

.mir-brand__img {
    display: block;
    width: 200px;
    max-width: min(200px, 100%);
    height: auto;
}

/* Логотип в топ-баре: не выше полосы 64px, до 200px по ширине */
#top-bar .mir-brand__img {
    width: auto;
    max-width: 200px;
    max-height: 56px;
    height: auto;
    object-fit: contain;
    object-position: left center;
}


/* === Иконка выхода рядом с ником === */

.top-links-login .auth-user-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.top-links-login .auth-user-item__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #555;
    transition: all 0.2s ease;
}

.top-links-login .auth-user-item__logout:hover {
    border-color: #f7941d;
    color: #f7941d;
}


/* === Скрыть старый логотип и header-extras === */

#header #logo,
#header .header-extras {
    display: none !important;
}

/* === Поиск в топ-баре (без #top-search компонента) === */

.topbar-search {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 14px;
}

.topbar-search-form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0;
}

.topbar-search-input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 0;
    line-height: 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    line-height: 1.2;
    color: #333;
    text-align: right;
}

.topbar-search-input::placeholder {
    text-align: right;
}

.topbar-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-search-submit:hover {
    color: #f7941d;
}

.top-links-login ul li > a.auth-enter-link {
    width: auto;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
}

/* Keep login dropdown original width. */
.top-links-login ul div.top-link-section {
    width: 280px;
}


/* === UTP-полоска: тёмная, только внутри #header === */

.header-promo-strip {
    width: 100%;
    background:
        radial-gradient(ellipse 100% 120% at 18% 0%, rgba(88, 140, 220, 0.22) 0%, transparent 52%),
        radial-gradient(ellipse 90% 100% at 82% 100%, rgba(243, 187, 100, 0.14) 0%, transparent 48%),
        linear-gradient(108deg, #060a11 0%, #122238 38%, #1a3354 52%, #101a2c 78%, #070b12 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header-promo-strip__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 28px 12px 26px;
    text-align: center;
}

.header-promo-strip__copy {
    max-width: 900px;
}

/* Как на PNG логотипе: вертикально жёлтый → оранжевый + лёгкая «обводка» тенью */
.header-promo-strip__title {
    margin: 0 0 10px;
    color: #f3bb64;
    font-family: "Exo2Local", "Exo 2", sans-serif;
    font-size: 30px;
    font-style: italic;
    font-weight: 800;
    line-height: 1.25;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .header-promo-strip__title {
        background-image: linear-gradient(
            180deg,
            #fff9c4 0%,
            #ffeb3b 14%,
            #ffd54f 40%,
            #ffa726 72%,
            #fb8c00 92%,
            #e65100 100%
        );
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(0 1px 0 rgba(110, 42, 0, 0.55)) drop-shadow(0 -0.5px 0 rgba(255, 255, 210, 0.22));
    }
}

.header-promo-strip__text {
    margin: 0 auto;
    max-width: 840px;
    color: rgba(249, 251, 255, 0.95);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.55;
}

.header-promo-strip__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 14px;
}

.header-promo-strip__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 22px;
    border-radius: 8px;
    font-family: "Exo2Local", "Exo 2", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.header-promo-strip__btn:focus-visible {
    outline: 2px solid rgba(243, 187, 100, 0.85);
    outline-offset: 3px;
}

.header-promo-strip__btn--primary {
    border: 1px solid rgba(255, 214, 140, 0.55);
    background: linear-gradient(180deg, #ffd78a 0%, #f0b24a 48%, #d8942a 100%);
    color: #1a1206;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 18px rgba(0, 0, 0, 0.28);
}

.header-promo-strip__btn--primary:hover {
    background: linear-gradient(180deg, #ffe2a8 0%, #f5bf58 50%, #e29f35 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 8px 22px rgba(0, 0, 0, 0.32);
}

.header-promo-strip__btn--primary:active {
    transform: translateY(1px);
}

.header-promo-strip__btn--ghost {
    border: 1px solid rgba(243, 187, 100, 0.45);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(252, 250, 245, 0.98);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.header-promo-strip__btn--ghost:hover {
    border-color: rgba(243, 187, 100, 0.75);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.header-promo-strip__btn--ghost:active {
    transform: translateY(1px);
}

/* === Высота шапки с UTP-полоской (базовая тема: 90px → меню наезжает на #content) === */

#header:has(.header-promo-strip) {
    height: auto !important;
}

#header:has(.header-promo-strip):not(.sticky-header) #header-wrap,
#header:has(.header-promo-strip).static-sticky #header-wrap {
    height: auto !important;
    min-height: 90px;
}

#header:has(.header-promo-strip).sticky-header:not(.static-sticky) #header-wrap {
    height: 60px !important;
}


/* === Primary menu: compact + no borders === */
#primary-menu,
#primary-menu.style-2,
#header,
#header-wrap,
#header.sticky-header #header-wrap,
#header.full-header #primary-menu > ul,
#header.full-header #header-wrap,
#primary-menu > ul,
#primary-menu > .container > ul {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

#primary-menu ul li,
#primary-menu ul ul li,
#primary-menu ul li .mega-menu-content,
#primary-menu ul li .mega-menu-content.style-2 li {
    border-top: 0 !important;
    border-bottom: 0 !important;
}

#primary-menu > ul > li > a,
#primary-menu > .container > ul > li > a {
    padding-top: 26px !important;
    padding-bottom: 26px !important;
}

/* Dropdown: remove top border/accent and keep normal line spacing */
#primary-menu ul ul:not(.mega-menu-column),
#primary-menu ul li .mega-menu-content {
    border-top: 0 !important;
}

#primary-menu ul ul li > a {
    line-height: 1.35 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}


/* === Адаптив === */

@media (max-width: 991px) {
    #top-bar.top-bar-branding {
        height: auto;
        min-height: 64px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    #top-bar .container {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .header-promo-strip__inner {
        gap: 18px;
        padding: 22px 10px 20px;
    }

    .header-promo-strip__title {
        font-size: 22px;
    }

    .header-promo-strip__text {
        font-size: 15px;
    }

    .header-promo-strip__actions {
        flex-direction: column;
        width: 100%;
        max-width: 360px;
    }

    .header-promo-strip__btn {
        width: 100%;
    }

    #primary-menu > ul > li > a,
    #primary-menu > .container > ul > li > a {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }
}
