/* Integration adjustments over the original museum styles. */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid #222;
    outline-offset: 4px;
}

.catalogue-alert {
    padding: 16px;
    border: 1px solid #b00020;
    color: #8a0019;
}

.searchItems {
    border: 0;
    padding: 0;
    min-width: 0;
}

.formItemsFree,
.formItemsContainer {
    list-style: none;
    padding: 0;
}

.advanced-search {
    clear: both;
}

.advanced-search summary {
    cursor: pointer;
    padding: 12px 0;
    font-weight: bold;
}

.advanced-search[open] .formItemsContainer {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 20px;
}

.advanced-search .formItemsContainer li {
    float: none!important;
    width: auto!important;
    margin: 0!important;
    clear: none!important;
}

.advanced-search .formItem label {
    height: auto!important;
    min-height: 32px;
    display: block;
}

.advanced-search input {
    box-sizing: border-box;
    width: 100%!important;
    min-width: 0;
    height: 36px;
    border: 1px solid #aaa;
    padding: 5px 8px;
    font: inherit;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    clear: both;
    padding: 16px 0;
}

.form-actions button,
.catalogue-toolbar button,
.print-record {
    border: 1px solid #222;
    background: #fff;
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
}

.formItemsFree #fulltextSearch {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.formItemsFree #fullTextField {
    flex: 1;
    min-width: 180px;
    height: 38px;
    padding: 6px;
    border: 1px solid #999;
}

.formItemsFree .formButton {
    position: static!important;
    float: none!important;
    margin: 0!important;
}

.catalogue-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    float: none!important;
}

.catalogue-toolbar form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.catalogue-toolbar select {
    max-width: 100%;
    height: 36px;
    font: inherit;
}

.catalogue-toolbar .vistes {
    position: static!important;
    float: none!important;
    display: flex;
    gap: 12px;
}

.catalogue-toolbar [aria-current] {
    font-weight: bold;
    text-decoration: underline;
}

.catalogue-pagination {
    clear: both;
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 32px 0;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    min-height: 180px;
    color: #666;
}

.resultados-set h2.titol-coleccio {
    font-size: 24px;
    line-height: 1.1;
    font-weight: bold;
}

.object-detail {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.object-detail .col-media,
.object-detail .col-description {
    float: none!important;
    width: calc(50% - 16px)!important;
    min-width: 0;
}

.object-detail figure {
    margin: 0 0 28px;
}

.object-detail img {
    max-width: 100%;
    height: auto;
}

.image-zoom {
    border: 0;
    background: none;
    padding: 0;
    cursor: zoom-in;
    width: 100%;
}

.object-detail figcaption {
    font-size: 12px;
    margin-top: 8px;
}

.info-table th,
.info-table td {
    overflow-wrap: anywhere;
}

.image-zoom img {
    max-height: 650px;
    object-fit: contain;
}

.print-record {
    margin: 24px 0;
}

#image-viewer {
    border: 0;
    padding: 40px 12px 12px;
    max-width: 94vw;
    max-height: 94vh;
}

#image-viewer::backdrop {
    background: rgb(0 0 0 / .8);
}

#image-viewer img {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
}

.close-viewer {
    position: absolute;
    right: 10px;
    top: 4px;
    font-size: 30px;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.language-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 0;
    font-size: 13px;
}

.language-switcher [aria-current] {
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
}

.catalogue-footer {
    clear: both;
}

.catalogue-footer address {
    font-style: normal;
}

@media(max-width:767px) {
    body #page-wrapper,
    body #page,
    body #main,
    body #content,
    body #content-inner,
    body #content-area,
    body #main>.inner {
        width: auto!important;
        max-width: 100%;
        min-width: 0;
        float: none!important;
    }

    body #page {
        padding: 0 18px;
    }

    body header[role=banner]>.inner {
        width: auto!important;
    }

    .mobile-menu-toggle {
        display: block;
        background: #fff;
        border: 1px solid #222;
        padding: 8px;
        font: inherit;
        margin: 10px 0;
    }

    body #header-region {
        display: none;
        width: 100%!important;
        position: static!important;
    }

    body #header-region.menu-open {
        display: block;
    }

    body #block-system-main-menu nav>ul.menu {
        display: block;
        height: auto;
    }

    body #block-system-main-menu nav>ul.menu>li {
        float: none;
        display: block;
        width: auto;
    }

    body #block-system-main-menu nav>ul.menu>li>ul {
        display: none;
    }

    body article.node-collection h1 {
        font-size: 32px;
        line-height: 1.1;
    }

    .advanced-search[open] .formItemsContainer {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .formItemsFree #fullTextField {
        width: 100%!important;
        flex-basis: 100%;
    }

    .catalogue-toolbar {
        padding: 16px 0;
    }

    .catalogue-toolbar form {
        width: 100%;
    }

    .catalogue-toolbar select {
        flex: 1;
        min-width: 0;
    }

    .catalogue-pagination {
        gap: 16px;
        font-size: 14px;
    }

    .object-detail {
        display: block;
    }

    .object-detail .col-media,
    .object-detail .col-description {
        width: 100%!important;
    }

    .object-detail .text-container {
        padding-left: 0!important;
    }

    body .resultados-set .resultats_peces,
    body #infinite-scroll.galleryList .resultats_peces {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 20px;
    }

    body .resultados-set .resultats_peces>li,
    body #infinite-scroll.galleryList .resultats_peces>li {
        width: auto!important;
        float: none!important;
        margin: 0!important;
        padding: 0!important;
        min-width: 0;
    }

    body .resultats_peces p.image {
        height: 180px!important;
    }

    body .resultats_peces p.image img {
        max-height: 180px!important;
        max-width: 100%!important;
        width: auto!important;
    }

    body .resultados-set h2.titol-coleccio {
        font-size: 20px;
    }

    .catalogue-footer .region-footer {
        display: block!important;
        width: auto!important;
    }

    .catalogue-footer .block {
        float: none!important;
        width: auto!important;
    }

    .info-table {
        width: 100%!important;
    }

    .info-table th {
        width: 35%!important;
    }

    .language-switcher {
        justify-content: flex-start;
    }
}

@media print {
    header[role=banner],
    #brand-cultura,
    .language-switcher,
    .catalogue-footer,
    .tornar-enrere,
    .print-record,
    .mobile-menu-toggle {
        display: none!important;
    }

    .object-detail {
        display: block;
    }

    .object-detail .col-media,
    .object-detail .col-description {
        width: 100%!important;
    }

    .object-detail figure:not(:first-child) {
        display: none;
    }

    .object-detail img {
        max-height: 300px;
    }

    body #page {
        width: 100%!important;
        padding: 0;
    }

    a {
        color: #000;
        text-decoration: none;
    }
}

.form-actions {
    justify-content: flex-end!important;
    margin: 0!important;
    float: none!important;
    width: 100%!important;
    box-sizing: border-box;
}

.form-actions>button {
    display: none;
}

.formAvancada:has(.advanced-search[open]) .form-actions>button {
    display: inline-block;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.gallery-thumbnails button {
    width: 72px;
    height: 86px;
    padding: 3px;
    border: 1px solid #bbb;
    background: white;
    cursor: pointer;
}

.gallery-thumbnails button[aria-pressed=true] {
    border: 2px solid #222;
}

.gallery-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.object-detail .gallery-thumbnails img {
    max-height: 76px;
}

@media(max-width:767px) {
    body .box-search-result,
    body .search-advanced,
    body .search-advanced .container,
    body .formAvancada,
    body .searchItems,
    body .formItemsFree,
    body #fulltextSearch {
        width: 100%!important;
        max-width: 100%!important;
        min-width: 0!important;
        margin-left: 0!important;
        margin-right: 0!important;
        box-sizing: border-box!important;
        float: none!important;
    }

    body #fulltextSearch {
        display: flex!important;
        height: auto!important;
        min-height: 0!important;
        position: static!important;
        padding: 0!important;
    }

    body #fulltextSearch>label {
        width: 100%!important;
        position: static!important;
        padding: 0!important;
        margin: 0!important;
    }

    body .formItemsFree #fullTextField {
        box-sizing: border-box!important;
        max-width: 100%!important;
        min-width: 0!important;
        position: static!important;
        float: none!important;
        margin: 0!important;
    }

    .formItemsFree .formButton {
        width: auto!important;
        height: auto!important;
    }

    .formItemsFree .startButton {
        position: static!important;
    }

    .form-actions {
        padding: 12px 0;
    }

    .advanced-search {
        margin-top: 16px;
    }

    body .navegacio {
        column-gap: 12px;
    }

    .advanced-search[open] .formItemsContainer {
        padding: 0;
    }

    .catalogue-toolbar select {
        width: 100%;
        flex-basis: 100%;
    }
}

.infinite-controls {
    clear: both;
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
}

.infinite-controls[hidden],
.infinite-controls [hidden],
.catalogue-pagination[hidden] {
    display: none!important;
}

.infinite-controls button {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #222;
    font: inherit;
    cursor: pointer;
}

.infinite-status {
    margin: 0 0 12px;
}

.infinite-sentinel {
    clear: both;
    height: 1px;
    width: 100%;
}
