/* Mobile layout: desktop styles remain in effect from 960px upwards. */
.mobile-menu-toggle {
    display: none;
}

@media (width < 960px) {
    #centerpage.menu-ready .mobile-menu-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 12px 16px;
        border: 0;
        border-radius: 0;
        background: #205b8a;
        color: white;
        font: inherit;
        text-align: left;
    }

    .mobile-menu-toggle:focus-visible {
        outline: 3px solid #009aca;
        outline-offset: -3px;
    }

    .mobile-menu-icon {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 24px;
    }

    .mobile-menu-icon > span {
        display: block;
        height: 2px;
        background: currentColor;
    }

    #centerpage.menu-ready:not(.menu-open) #leftbar {
        display: none;
    }

    body {
        font-size: 16px;
        line-height: 1.5;
    }

    #centerpage {
        width: 100%;
        min-height: 0;
    }

    #centerpage, #centerpage * {
        box-sizing: border-box;
    }

    .logo {
        display: block;
        padding: 24px 16px;
    }

    .logo img {
        max-width: 100%;
        height: auto;
        margin: 0;
    }

    #horizontalmenu {
        height: auto;
        background: #205b8a;
        overflow: visible;
    }

    #horizontalmenu > ul {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        text-align: center;
    }

    #horizontalmenu li {
        min-width: 0;
    }

    #horizontalmenu li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 10px 16px;
        line-height: 1.5;
        height: 100%;
    }

    #featured {
        height: auto;
        border-radius: 0;
    }

    #featured > div {
        display: block;
        width: 100%;
        height: auto;
    }

    #slideshow {
        aspect-ratio: 730 / 250;
        overflow: hidden;
    }

    #slideshow .bx-wrapper {
        margin-bottom: 0;
    }

    #slideshow img {
        width: 100%;
        height: auto;
    }

    #slideshow .description {
        padding: 12px 16px;
        font-size: 1rem;
    }

    #rightcontact {
        padding: 10px 16px;
    }

    #rightcontact .contact-quick {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 20px;
        padding-right: 36px;
    }

    #rightcontact .contact-details > summary {
        top: 0;
        right: 8px;
    }

    #rightcontact h3 {
        margin-top: 0;
    }

    #rightcontact table {
        width: auto !important;
        margin: 8px auto;
    }

    #rightcontact td {
        width: auto !important;
        padding: 4px 8px;
    }

    #middle {
        min-height: 0;
        margin-top: 16px;
        padding: 0;
    }

    #middle > div {
        display: block;
        width: 100%;
        height: auto;
        padding: 16px;
        min-width: 0;
    }

    .mainmenu {
        margin-bottom: 0;
    }

    .mainmenu a {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Keep nested links usable on touch screens without hover or JavaScript. */
    .mainmenu ul.nav-child,
    .mainmenu ul.nav-child.show {
        display: block;
        position: static;
        width: auto;
        overflow: visible;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .mainmenu ul.nav-child a {
        padding-left: 46px;
        background-position: 30px center;
    }

    #content, #rightbar, #foot {
        overflow-wrap: anywhere;
    }

    #content img {
        max-width: 100%;
        height: auto;
    }

    #content img[style*="float"] {
        float: none !important;
        display: block;
        margin: 12px auto !important;
    }

    #content iframe {
        width: 100%;
        max-width: 100%;
    }

    .cols-2,
    .contact .contact-block,
    .contact .adress-block {
        display: block;
        width: 100%;
        padding: 0;
    }

    .cols-2 .item {
        text-align: left;
    }

    .contact .page-header {
        display: block;
        margin: 12px 0;
    }

    .contact-category li > div {
        max-width: 100%;
        margin-right: 0;
    }

    #content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #content table td {
        padding: 10px;
    }

    /* These tables arrange illustrations and text rather than tabular data. */
    #content table.table-greystripes,
    #content table.table-greystripes tbody,
    #content table.table-greystripes tr,
    #content table.table-greystripes td {
        display: block;
        width: 100%;
    }

    #content table.table-greystripes img {
        display: block;
        margin: 0 auto;
    }

    #content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #content select,
    #content textarea {
        max-width: 100%;
        font: inherit;
    }

    .web-contact-form button {
        min-height: 44px;
    }

    #rightbar > div:last-child {
        margin-bottom: 0;
    }
}

@media (width < 500px) {
    #horizontalmenu li > a {
        gap: 6px;
        padding: 10px 8px;
        font-size: 14px;
    }

    #horizontalmenu li > a > img {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        margin-right: 0;
    }
}
