/* Keep the Barnys header inside its rounded panel at every breakpoint. */
@media (max-width: 1690px) {
    #header .topmainhead.header2-h2 {
        width: auto;
        box-sizing: border-box;
        padding-left: 40px;
        padding-right: 40px;
    }

    #header .topmainhead.header2-h2 > .elementor-container {
        width: 100%;
        max-width: 100%;
    }

    #header .topmainhead.header2-h2 > .elementor-container > .elementor-row {
        align-items: center;
        column-gap: 12px;
    }

    #header .topmainhead.header2-h2 .menu-top,
    #header .topmainhead.header2-h2 .right {
        width: auto !important;
        flex: 0 0 auto;
        margin: 0;
    }

    #header .topmainhead.header2-h2 .right {
        margin-left: auto;
    }
}

@media (min-width: 992px) {
    #header .topmainhead.header2-h2 .leo-megamenu .navbar-nav {
        display: flex;
        flex-wrap: nowrap;
    }

    #header .topmainhead.header2-h2 .leo-megamenu .navbar-nav > li {
        flex: 0 0 auto;
    }

    #header .topmainhead.header2-h2 .leo-megamenu .navbar-nav > li > a {
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1690px) {
    #header .topmainhead.header2-h2 .leo-megamenu .navbar-nav > li > a {
        padding-left: 16px;
        padding-right: 16px;
    }

    #header .topmainhead.header2-h2 > .elementor-container > .elementor-row {
        flex-wrap: wrap;
    }

    #header .topmainhead.header2-h2 .logo-h2 {
        order: -1;
        flex: 0 0 100%;
        width: 100% !important;
    }
}

@media (max-width: 991px) {
    #header .topmainhead.header2-h2 > .elementor-container > .elementor-row {
        flex-wrap: nowrap;
        column-gap: 8px;
    }

    #header .topmainhead.header2-h2 .menu-top {
        order: 0;
    }

    #header .topmainhead.header2-h2 .logo-h2 {
        order: 1;
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
    }

    #header .topmainhead.header2-h2 .right {
        order: 2;
    }

    #header .topmainhead.header2-h2 .logo-h2 .elementor-widget-wrap {
        margin-left: 0;
        justify-content: center !important;
    }
}

@media (max-width: 575px) {
    #header .topmainhead.header2-h2 > .elementor-container > .elementor-row {
        /* The base theme forces nowrap with !important on small screens. */
        flex-wrap: wrap !important;
    }

    #header .topmainhead.header2-h2 .logo-h2 {
        order: -1;
        flex: 0 0 100%;
    }
}

@media (max-width: 991px) {
    #header .topmainhead.header2-h2 {
        padding-left: 28px;
        padding-right: 28px;
    }
}

@media (max-width: 575px) {
    #header .topmainhead.header2-h2 {
        padding-left: 20px;
        padding-right: 20px;
    }
}
