.header-top .row {
    min-height: 100px;
    height: 100%;
}

.header-bottom {
    background-color: var(--color-grey-section);
}

@media (max-width: 990px) {
    .menu-header-main-container {
        max-width: 58%;
        overflow-x: auto;
    }

    .nav-menu li a {
        white-space: nowrap;
    }
}

@media (max-width: 571px) {
    .menu-header-main-container {
        max-width: 32%;
    }
}

/* ——— Мега-меню: Компания, Товары, Услуги (общие стили) ——— */

body.company-mega-open,
body.products-mega-open,
body.services-mega-open {
    overflow: hidden;
}

.company-mega-parent > a,
.products-mega-parent > a,
.services-mega-parent > a {
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

body.company-mega-open .company-mega-parent > a,
body.products-mega-open .products-mega-parent > a,
body.services-mega-open .services-mega-parent > a {
    border-bottom-color: var(--color-headings);
}

/* Как у .language-switcher: плавное «раздвигание» по высоте + opacity */
.company-mega-menu,
.products-mega-menu,
.services-mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--company-mega-viewport-top, 160px);
    z-index: 200;
    width: 100%;
    height: 0;
    overflow: hidden;
    opacity: 0;
    background-color: var(--color-white);
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    transition: height 0.7s ease, opacity 0.7s ease;
}

.company-mega-menu.is-open,
.products-mega-menu.is-open,
.services-mega-menu.is-open {
    height: calc(100vh - var(--company-mega-viewport-top, 160px));
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
    transition: height 1s ease, opacity 1s ease;
}

.company-mega-menu__inner,
.products-mega-menu__inner,
.services-mega-menu__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.35fr) auto;
    gap: var(--margin-4);
    align-items: start;
    padding-top: var(--margin-4);
    padding-bottom: var(--margin-4);
    min-height: calc(100vh - var(--company-mega-viewport-top, 160px));
    box-sizing: border-box;
}

.company-mega-menu__mid,
.products-mega-menu__mid,
.services-mega-menu__mid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--margin-4);
    min-width: 0;
}

.company-mega-menu__nav,
.products-mega-menu__nav,
.services-mega-menu__nav {
    flex: 1 1 220px;
    min-width: 0;
}

.company-mega-menu__subpanels,
.products-mega-menu__subpanels,
.services-mega-menu__subpanels {
    display: none;
    flex: 1 1 260px;
    min-width: 0;
}

.company-mega-menu--sub-open .company-mega-menu__subpanels,
.products-mega-menu--sub-open .products-mega-menu__subpanels,
.services-mega-menu--sub-open .services-mega-menu__subpanels {
    display: block;
    border-left: 1px solid var(--color-border);
    padding-left: var(--margin-4);
    box-sizing: border-box;
}

.company-mega-menu__subpanel[hidden],
.products-mega-menu__subpanel[hidden],
.services-mega-menu__subpanel[hidden] {
    display: none !important;
}

.company-mega-menu__subpanel.is-active,
.products-mega-menu__subpanel.is-active,
.services-mega-menu__subpanel.is-active {
    display: block;
}

.company-mega-menu__subpanel-title,
.products-mega-menu__subpanel-title,
.services-mega-menu__subpanel-title {
    margin: 0 0 var(--margin-2);
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.3;
}

.company-mega-menu__subpanel-title a,
.products-mega-menu__subpanel-title a,
.services-mega-menu__subpanel-title a {
    color: var(--color-headings);
    text-decoration: none;
}

.company-mega-menu__subpanel-title a:hover,
.products-mega-menu__subpanel-title a:hover,
.services-mega-menu__subpanel-title a:hover {
    text-decoration: underline;
}

.company-mega-menu__sublist,
.products-mega-menu__sublist,
.services-mega-menu__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.company-mega-menu__sublist li + li,
.products-mega-menu__sublist li + li,
.services-mega-menu__sublist li + li {
    margin-top: 8px;
}

.company-mega-menu__sublist a,
.products-mega-menu__sublist a,
.services-mega-menu__sublist a {
    font-size: 18px;
    font-weight: 300;
    color: #666;
    text-decoration: none;
    font-family: "Roboto-Light", sans-serif;
    transition: color 0.2s ease;
}

.company-mega-menu__sublist a:hover,
.products-mega-menu__sublist a:hover,
.services-mega-menu__sublist a:hover {
    color: var(--color-headings);
}

.company-mega-menu__kicker,
.products-mega-menu__kicker,
.services-mega-menu__kicker {
    margin: 0 0 var(--margin-2);
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.25;
    color: var(--color-headings);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.company-mega-menu__desc,
.products-mega-menu__desc,
.services-mega-menu__desc {
    margin: 0 0 var(--margin-4);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.5;
    color: #666;
    max-width: 36em;
}

.company-mega-menu__cta--accent,
.products-mega-menu__cta--accent,
.services-mega-menu__cta--accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    padding: 14px 22px;
    background-color: var(--color-accent);
    color: var(--color-white) !important;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
}

.company-mega-menu__cta--accent:hover,
.products-mega-menu__cta--accent:hover,
.services-mega-menu__cta--accent:hover {
    background-color: var(--color-btn-hover);
    opacity: 1;
}

.company-mega-menu__list,
.products-mega-menu__list,
.services-mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.company-mega-menu__list li + li,
.products-mega-menu__list li + li,
.services-mega-menu__list li + li {
    margin-top: 10px;
}

.company-mega-menu__list a,
.company-mega-menu__list-btn,
.products-mega-menu__list a,
.products-mega-menu__list-btn,
.services-mega-menu__list a,
.services-mega-menu__list-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 6px 0;
    font-size: 18px;
    font-weight: 300;
    color: #666;
    text-decoration: none;
    font-family: "Roboto-Light", sans-serif;
    transition: color 0.2s ease;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.company-mega-menu__list a:hover,
.company-mega-menu__list-btn:hover,
.products-mega-menu__list a:hover,
.products-mega-menu__list-btn:hover,
.services-mega-menu__list a:hover,
.services-mega-menu__list-btn:hover {
    color: var(--color-headings);
}

.company-mega-menu__list li.is-active > .company-mega-menu__list-btn,
.products-mega-menu__list li.is-active > .products-mega-menu__list-btn,
.services-mega-menu__list li.is-active > .services-mega-menu__list-btn {
    color: var(--color-headings);
    font-weight: 500;
}

.company-mega-menu__chev,
.products-mega-menu__chev,
.services-mega-menu__chev {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.company-mega-menu__chev::before,
.products-mega-menu__chev::before,
.services-mega-menu__chev::before {
    content: "\f180";
    font-family: "hansa-flex-icons", sans-serif;
    color: var(--color-headings);
    font-size: 13.5px;
    line-height: 1;
    font-style: normal;
    font-weight: normal;
    speak: never;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.company-mega-menu__close,
.products-mega-menu__close,
.services-mega-menu__close {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-headings);
    font-family: inherit;
}

.company-mega-menu__close-icon,
.products-mega-menu__close-icon,
.services-mega-menu__close-icon {
    font-size: 2rem;
    line-height: 1;
    font-weight: 300;
}

.company-mega-menu__close-hint,
.products-mega-menu__close-hint,
.services-mega-menu__close-hint {
    font-size: 12px;
    font-weight: 300;
    opacity: 0.85;
}

@media (max-width: 990px) {
    .company-mega-menu__inner,
    .products-mega-menu__inner,
    .services-mega-menu__inner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .company-mega-menu__close,
    .products-mega-menu__close,
    .services-mega-menu__close {
        position: absolute;
        top: var(--margin-2);
        right: 16px;
    }

    .company-mega-menu__inner,
    .products-mega-menu__inner,
    .services-mega-menu__inner {
        position: relative;
        padding-top: 56px;
    }

    .company-mega-menu__mid,
    .products-mega-menu__mid,
    .services-mega-menu__mid {
        flex-direction: column;
    }

    .company-mega-menu__subpanels,
    .products-mega-menu__subpanels,
    .services-mega-menu__subpanels {
        flex-basis: auto;
        width: 100%;
    }
}

