@media (max-width: 1024px) {
    section#company_banner img {
        display: none;
    }

    header h2.phone-title {
        display: block;
    }

    section#company_banner h1,
    section#company_banner div {
        font-size: 18px;
        text-align: center;
    }

    section#company_banner div {
        padding-top: 10px;
        padding-bottom: 0;
    }

    section#company_banner div.row-th h2 {
        display: none;
    }

    section#company_banner span.text-right {
        display: none;
    }

    section#navigation ul {
        display: flex;
        flex-direction: column;
    }

    header span.slogan-phone {
        display: block;
        background-color: var(--primary-bg-color);
        color: var(--primary-color);
        text-align: center;
        font-size: 18px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    #hamburger-menu {
        display: flex;
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        flex: 0 0 48px;
        margin: 10px 12px 10px 10px;
    }

    /* 2. Full Screen Navigation Menu for mobile (Starts below header) */
    /* 1. Set the menu background to solid white */
    section#navigation ul {
        display: none;
        flex-direction: column;
        background: #ffffff; /* Changed to solid white */
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 80%;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        border: none;
        border-radius: 0;
        padding: 24px 24px 40px 24px;
        text-align: left;
        overflow-y: auto;
        z-index: 9998;
        margin: 0;
    }

    /* 2. Update the active item to a dark blue box with rounded corners */
    section#navigation ul li a.active {
        background: #001760; /* Dark blue background */
        color: #ffffff; /* White text for contrast */
        border-radius: 8px; /* Corner radius (you can increase this to 12px or 16px if you want it rounder) */
        border: none; /* Clears the old border */
    }

    section#navigation ul li {
        text-align: left;
        border-bottom: none;
        width: 100%;
        /*margin-left: auto;*/
        /*margin-right: auto;*/
        display: flex;
        justify-content: flex-start;
    }

    /* Optional: Slightly increased padding and font-size for a better full-screen feel */
    section#navigation ul li a {
        margin: 0;
        padding: 16px 14px;
        border-radius: 12px;
        border: 1px solid transparent;
        justify-content: flex-start;
        font-size: 18px; /* Increased from 16px */
        color: var(--primary-color);
        width: 100%;
    }

    section#navigation ul li.lang-inline {
        width: 100%;
        margin-left: 0;
        padding-right: 0 !important;
        gap: 10px;
        min-width: 140px;
        justify-content: flex-start;
    }

    section#navigation ul li.lang-inline a.active {
        margin-left: 5px;
        margin-right: 5px;
        padding-left: 5px;
        padding-right: 5px;
    }

    section#navigation ul li.lang-inline a.lang-link {
        padding-left: 6px;
        padding-right: 6px;
        width: auto;
    }

    section#navigation ul li.lang-inline .lang-pipe {
        padding: 0 2px;
        color: var(--primary-color);
    }

    section#navigation ul li a {
        margin: 0;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid transparent;
        justify-content: flex-start;
        font-size: 16px;
        color: var(--primary-color);
    }

    section#navigation ul li a::after {
        display: none;
    }

    section#navigation ul li a:hover {
        color: #A6D1F0;
    }

    #navigation .dropdown-lang {
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #navigation .dropdown-lang > a.lang-btn {
        width: 100%;
        justify-content: space-between;
        cursor: pointer;
    }

    #navigation .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background: transparent;
    }

    #navigation .dropdown-content a {
        width: 100%;
        border-radius: 10px;
        margin-top: 6px;
        background: #f8fbff;
    }

    #navigation .dropdown-lang.open .dropdown-content {
        display: block;
    }

    #navigation .dropdown-lang:not(.open):hover .dropdown-content,
    #navigation .dropdown-lang:not(.open):focus-within .dropdown-content {
        display: none;
    }

    /* 3. Show the navigation list when the '.open' class is added by JS */
    #navigation.open ul {
        display: flex;
    }

    #navigation {
        width: auto;
        min-width: 0;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
    }

    header span#slogan-mobile.open {
        display: none;
    }

    #hamburger-menu.active span:nth-child(1) {
        /* Move down to the center, then rotate */
        transform: translateY(10px) rotate(45deg);
    }
    #hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    #hamburger-menu.active span:nth-child(3) {
        /* Move up to the center, then rotate */
        transform: translateY(-10px) rotate(-45deg);
    }

    section#content aside {
        display: none;

    }

    footer p span.full-yr,
    footer span.desktop {
        display: none;
    }

    footer span.mobile {
        display: contents;
    }

    /* Ensure header remains a relative container for absolute positioning of nav */
    header {
        position: sticky;
        top: 0;
        z-index: 9999;
    }

    section#bottom_nav {
        grid-template-columns: 1fr; /* Switch to 1 column on small screens */
    }

    section#bottom_nav a img {
        height: 45px;
        width: auto;
    }

    div#search-box {
        display: flex;
        flex-direction: column;
    }

    article section#before-footer {
        padding-right: 20px;
    }

    div#search-box section.search_box {
        align-self: center;
        width: 100%;
    }

    article {
        padding-left: 15px;
        padding-right: 15px;
    }

    section#company_banner a.desktop-only-image {
        display: none;
    }

    section#content div p {
        padding-left: 0;
    }

    section#contact_bar div.row-box.hide-small {
        display: none;
    }

    #company_banner div h1.category-title {
        font-size: 20px;
        margin-left: 0;
    }

    section#contact_bar {
        display: none;
    }
}

@media (min-width: 1025px) {
    #company_banner div h1.category-title {
        margin-left: 0;
    }
}

@media (max-width: 1500px) {
    li.search_box section.search_box {
        display: none;
    }
}

@media (max-width: 767px) {
    /*section#company_banner {*/
    /*    position: relative;*/
    /*    display: grid;*/
    /*    grid-template-columns: 60px minmax(0, 1fr) 60px;*/
    /*    align-items: center;*/
    /*    top: 0;*/
    /*}*/

    section#navigation ul {
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        right: 0;
        text-align: center;
        padding: 24px;
        align-items: center;
    }

    section#navigation ul li {
        justify-content: center;
    }

    section#navigation ul li a {
        justify-content: center;
        text-align: center;
    }

    section#navigation ul li.lang-inline {
        justify-content: center;
    }

    #navigation {
        grid-column: 3;
        width: 0;
        min-width: 0;
        max-width: 0;
        flex: 0 0 60px;
        justify-self: end;
    }

    section#company_banner > div > a {
        display: block;
        width: 100%;
        text-align: center;
    }

    #search-box .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem; /* Adjust gap for vertical layout */
        max-width: none; /* Allow full width on mobile */
    }

    #search-box .product-filter-reset-link {
        text-align: center; /* Align reset link to the center on phones */
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    /* Header needs to be sticky as the container */
    header {
        position: sticky;
        top: 0;
        z-index: 10000;
    }

    section#company_banner {
        flex-wrap: wrap;
        align-items: stretch;
        height: auto;
        min-height: 70px;
    }

    section#company_banner > a.desktop-only-image {
        display: flex;
        align-self: center;
    }

    section#company_banner > .company-title-area {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        background: var(--primary-color);
    }

    #hamburger-menu {
        display: none;
    }

    section#company_banner > div:not(.company-title-area) {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
    }

    #navigation {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        align-self: stretch;
        display: block;
        min-height: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 12px;
    }

    /* Keep the navigation list always visible */
    #navigation ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        overflow: visible;
        max-height: none;
        opacity: 1;
        transform: translateY(0);
        text-align: center;
    }

    aside div.category {
        top: 188px;
    }
}

/* per-article */
@media (max-width: 1070px) {
    br#desktop_only_1070 {
        display: none;
    }
}

@media (max-width: 845px) {
    br#desktop_only_845 {
        display: none;
    }
}

@media (max-width: 958px) {
    br#desktop_only_958 {
        display: none;
    }
}

@media (max-width: 763px) {
    br#desktop_only_763 {
        display: none;
    }
}

@media (max-width: 1015px) {
    br#desktop_only_1015 {
        display: none;
    }
}

@media (max-width: 945px) {
    br#desktop_only_945 {
        display: none;
    }
}