:root {
    --ink: #111;
    --muted: #626262;
    --line: #d9d9d9;
    --accent: #b5d7ff;
    --surface: #f5f5f5;
    --font: 'Source Sans 3',Arial,sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font: 400 18px/1.55 var(--font);
}

a {
    color: inherit;
    text-underline-offset: 4px;
}

a:hover {
    color: #333;
    text-decoration: underline;
}

button,
input,
select {
    font: inherit;
}

button,
summary {
    cursor: pointer;
}

button {
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    padding: 10px 22px;
    font-weight: 600;
    line-height: 1.25;
}

button:hover {
    background: #333;
}

input,
select {
    border: 1px solid #aaa;
    background: white;
    color: var(--ink);
    border-radius: 0;
    min-width: 0;
}

input {
    min-height: 48px;
    padding: 9px 12px;
    width: 100%;
}

:focus-visible {
    outline: 3px solid #4385d6;
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: -80px;
    left: 20px;
    z-index: 1000;
    background: #fff;
    padding: 12px;
}

.skip-link:focus {
    top: 10px;
}

.city-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px max(24px,calc((100% - 1180px)/2));
    border-bottom: 1px solid #eee;
}

.city-bar img {
    display: block;
    width: 234px;
    height: auto;
}

.city-bar nav {
    display: flex;
    gap: 18px;
    font-size: 15px;
}

.city-bar nav a {
    text-decoration: none;
}

.city-bar [aria-current] {
    font-weight: 700;
}

/* Institutional header copied from the museum website. */

#header {
    box-shadow: 0 8px 20px #0000000a;
    position: relative;
    z-index: 40;
    background: #fff;
}

#header>.region-header {
    display: grid;
    grid-template-columns: 100px minmax(0,1fr);
    align-items: center;
    gap: 30px;
    max-width: 1280px;
    padding: 24px 50px;
    margin: auto;
    min-height: 112px;
}

#block-minerva-subtheme-sitebranding .logo-header,
#header .minerva-xarxes-socials,
#header .minerva-menu-hidden:not(#minerva_menu_main),
#header .help,
#header .minerva_menu_header,
#header .minerva_menu_header_mobile,
#header .minerva_menu_main_description {
    display: none;
}

#header .minerva-branding-logo img {
    display: block;
    width: 74px;
    height: auto;
}

#header .minerva-branding-header {
    display: flex;
    align-items: center;
}

#header #minerva_menu_main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#header #minerva_menu_main>li {
    position: static;
}

#header #minerva_menu_main>li>[aria-haspopup] {
    display: block;
    font-size: 19px;
    font-weight: 300;
    cursor: pointer;
    padding: 14px 0;
    border-bottom: 7px solid transparent;
}

#header #minerva_menu_main>li:nth-child(2)>[aria-haspopup] {
    border-bottom-color: var(--accent);
}

#header [aria-haspopup]:after {
    content: '⌄';
    font-size: 14px;
    margin-left: 8px;
}

#header .minerva-menu-toggle {
    display: none;
}

#header .minerva_menu_dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 30px max(24px,calc((100% - 1110px)/2));
    max-height: 65vh;
    overflow: auto;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 14px 20px #0002;
}

#header .minerva_menu_dropdown[aria-hidden=false] {
    display: block;
}

#header .minerva_menu_dropdown ul {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px 28px;
}

#header .minerva_menu_dropdown ul ul {
    display: block;
    padding-left: 18px;
    margin-top: 8px;
}

#header .minerva_menu_dropdown a {
    display: block;
    padding: 5px 0;
    text-decoration: none;
}

#header .minerva_menu_dropdown span[aria-haspopup] {
    font-weight: 600;
}

#header .minerva_menu_dropdown .minerva_menu_dropdown {
    position: static;
    display: block;
    padding: 0;
    box-shadow: none;
    border: 0;
    max-height: none;
}

#header .minerva_menu_dropdown [role=menuitem] {
    tab-index: 0;
}

.catalogue-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 35px 80px;
}

.catalogue-breadcrumb {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 28px;
}

.catalogue-breadcrumb a {
    text-decoration: none;
}

.catalogue-body {
    min-width: 0;
}

.catalogue-body main {
    min-width: 0;
}

h1 {
    font-size: 36px;
    line-height: 1.18;
    font-weight: 750;
    margin: 0 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ink);
    letter-spacing: -.8px;
}

h2 {
    font-size: 27px;
    line-height: 1.25;
    font-weight: 700;
    margin: 44px 0 24px;
}

p {
    margin: 0 0 20px;
}

.introduction {
    max-width: 850px;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.5;
    margin: 0 0 32px;
}

.back {
    display: inline-block;
    color: var(--muted);
    font-size: 16px;
    margin: 0 0 18px;
    text-decoration: none;
}

.result-count {
    font-size: 22px;
    margin-bottom: 24px;
}

.mares-search {
    margin: 0 0 42px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 24px;
}

.free-search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.free-search label {
    font-size: 16px;
    font-weight: 600;
}

.free-search>div {
    display: flex;
    gap: 12px;
}

.free-search input {
    flex: 1;
    min-width: 0;
}

.free-search button {
    min-width: 120px;
}

.advanced-search>summary {
    list-style: none;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.advanced-search>summary::-webkit-details-marker {
    display: none;
}

.advanced-close-label {
    display: none;
}

.advanced-search[open] .advanced-open-label {
    display: none;
}

.advanced-search[open] .advanced-close-label {
    display: inline;
}

.advanced-search[open] .formItemsContainer {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 20px;
    margin: 24px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
}

.formItem {
    grid-column: span 2;
    min-width: 0;
    position: relative;
}

.formItem label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 7px;
}

#formItem_dateFrom,
#formItem_dateTo {
    grid-column: span 1;
}

.form-actions {
    grid-column: 1/-1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: stretch;
    list-style: none;
}

.form-actions button[type=reset] {
    background: transparent;
    color: var(--ink);
}

.form-actions button[type=reset]:hover {
    background: #e9e9e9;
}

.design-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow: auto;
    z-index: 30;
    background: white;
    border: 1px solid #aaa;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 10px #0001;
}

.design-suggestions[hidden] {
    display: none;
}

.design-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
}

.design-suggestions [aria-selected=true],
.design-suggestions li:hover {
    background: #e5f0ff;
}

.collections {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 36px 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.collections a {
    display: block;
    text-decoration: none;
}

.collections img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: filter .2s;
}

.collections a:hover img {
    filter: brightness(.94);
}

.collections h2 {
    font-size: 23px;
    font-weight: 600;
    margin: 15px 0 0;
    line-height: 1.2;
}

.collections a:hover h2 {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.has-facets {
    display: grid;
    grid-template-columns: minmax(0,1fr) 230px;
    gap: 45px;
}

.mares-facets {
    min-width: 0;
    padding-top: 8px;
}

.mares-facets summary {
    font-size: 22px;
    font-weight: 700;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 16px;
    margin-bottom: 14px;
    list-style: none;
}

.facet-option {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    font-size: 16px;
    line-height: 1.35;
}

.facet-option small {
    font-size: 14px;
    color: var(--muted);
}

.selected-facet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #e5f0ff;
    margin-bottom: 12px;
    font-size: 16px;
}

.selected-facet a {
    font-size: 24px;
    text-decoration: none;
}

.sort-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}

.catalogue-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalogue-sort label {
    font-weight: 600;
}

.catalogue-sort select {
    max-width: 190px;
    padding: 6px 8px;
    font-size: 16px;
}

.catalogue-sort button {
    display: none;
}

.sort-toolbar a {
    margin-left: 10px;
}

.sort-toolbar [aria-current] {
    font-weight: 700;
    text-decoration: none;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-controls img {
    width: 20px;
    height: 20px;
}

.catalogue-range {
    font-size: 15px;
    color: var(--muted);
    margin: 20px 0 28px;
}

.cob-resultlist {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    list-style: none;
    gap: 36px 22px;
    padding: 0;
    margin: 0;
}

.cob-resultlist li {
    min-width: 0;
}

.result-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    aspect-ratio: 1;
    margin-bottom: 15px;
    padding: 10px;
}

.result-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cob-resultlist h3 {
    font-size: 21px;
    font-weight: 650;
    line-height: 1.2;
    margin: 0 0 7px;
}

.cob-resultlist h3 a {
    text-decoration: none;
}

.cob-resultlist h3 a:hover {
    text-decoration: underline;
}

.cob-resultlist p {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 4px;
    font-weight: 300;
}

.simpleList .cob-resultlist {
    display: block;
}

.simpleList .cob-resultlist li {
    display: grid;
    grid-template-columns: 150px minmax(0,1fr);
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.simpleList .result-image {
    margin: 0;
}

.catalogue-pagination {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

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

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

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

.mares-object>header {
    margin-bottom: 25px;
}

.mares-object h1 {
    margin-bottom: 16px;
}

.object-print-controls {
    display: flex;
    justify-content: flex-end;
}

.print-record {
    background: white;
    color: var(--ink);
    font-size: 15px;
    padding: 9px 16px;
}

.print-record:hover {
    background: #f0f0f0;
}

.object-gallery {
    margin: 0 0 24px;
    background: #f7f7f7;
}

.image-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 540px;
    border: 0;
    padding: 25px;
    background: transparent;
    cursor: zoom-in;
}

.image-zoom:hover {
    background: transparent;
}

.image-zoom img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 28px;
}

.gallery-controls button {
    padding: 8px 14px;
    background: #fff;
    color: #111;
}

.gallery-controls [aria-pressed=true] {
    background: #111;
    color: #fff;
}

.object-data {
    border-collapse: collapse;
    width: 100%;
    font-size: 18px;
    line-height: 1.45;
    margin: 30px 0 60px;
}

.object-data th,
.object-data td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.object-data th {
    width: 30%;
    padding-right: 30px;
    font-weight: 600;
}

.object-data td {
    font-weight: 300;
    overflow-wrap: anywhere;
}

.object-data p {
    margin: 0 0 12px;
}

.object-data p:last-child {
    margin-bottom: 0;
}

.mares-related {
    margin: 48px 0;
}

.mares-related h2 {
    border-bottom: 1px solid #111;
    padding-bottom: 18px;
}

.mares-related ul {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    list-style: none;
    padding: 0;
    gap: 28px;
}

.mares-related img {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background: #f7f7f7;
}

.mares-related p {
    font-size: 16px;
    margin: 3px 0;
}

.mares-related a {
    text-decoration: none;
}

dialog {
    padding: 45px 20px 20px;
    border: 0;
    max-width: 95vw;
    max-height: 95vh;
}

dialog::backdrop {
    background: #000b;
}

dialog img {
    max-width: 85vw;
    max-height: 76vh;
}

.close-viewer {
    position: absolute;
    right: 8px;
    top: 6px;
    padding: 4px 12px;
    font-size: 24px;
}

#gallery-credit {
    font-size: 14px;
    margin: 12px 0 0;
}

/* Institutional footer copied from the museum website. */

.footer {
    background: #f4f4f4;
    padding: 54px max(28px,calc((100% - 1110px)/2));
    margin-top: 25px;
}

.footer .footer-menus {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 30px;
}

.footer h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

.footer nav+nav {
    margin-top: 32px;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer li {
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.4;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer p {
    font-size: 17px;
    font-weight: 300;
}

.last-footer {
    padding: 28px max(28px,calc((100% - 1110px)/2));
    background: #fff;
}

.last-footer #menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.last-footer img {
    max-width: 230px;
    height: auto;
}

.last-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 15px;
}

.last-footer a {
    text-decoration: none;
}

@media(min-width:1000px) {
    .mares-object {
        display: grid;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        gap: 0 50px;
    }

    .mares-object>header {
        grid-column: 1/-1;
    }

    .mares-object .object-media {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        position: sticky;
        top: 24px;
    }

    .mares-object .object-data {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }

    .mares-object .object-data th {
        width: 34%;
        padding-right: 20px;
    }

    .mares-object .image-zoom {
        height: 580px;
    }
}

@media(max-width:1050px) {
    #header>.region-header {
        padding: 20px 28px;
        gap: 20px;
        grid-template-columns: 80px minmax(0,1fr);
    }

    #header #minerva_menu_main {
        gap: 12px;
    }

    #header #minerva_menu_main>li>[aria-haspopup] {
        font-size: 17px;
    }

    .has-facets {
        grid-template-columns: minmax(0,1fr) 200px;
        gap: 28px;
    }

    .cob-resultlist {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .footer .footer-menus {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media(max-width:760px) {
    body {
        font-size: 17px;
    }

    .city-bar {
        padding: 16px 20px;
        gap: 12px;
    }

    .city-bar img {
        width: 170px;
    }

    .city-bar nav {
        gap: 10px;
        font-size: 13px;
    }

    #header>.region-header {
        display: block;
        padding: 18px 22px;
        min-height: 90px;
    }

    #header .minerva-branding-header {
        justify-content: space-between;
    }

    #header .minerva-branding-logo img {
        width: 65px;
    }

    #header .minerva-menu-toggle {
        display: block;
        background: white;
        color: #111;
        border: 1px solid #ddd;
        padding: 8px 12px;
        font-size: 16px;
    }

    #header #minerva_menu_main {
        display: none;
        margin-top: 20px;
    }

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

    #header #minerva_menu_main>li {
        border-top: 1px solid var(--line);
    }

    #header #minerva_menu_main>li>[aria-haspopup] {
        font-size: 20px;
        padding: 12px 0;
        border-bottom: 0;
    }

    #header .minerva_menu_dropdown {
        position: static;
        padding: 8px 12px 20px;
        box-shadow: none;
        max-height: none;
    }

    #header .minerva_menu_dropdown ul {
        display: block;
    }

    #header .minerva_menu_dropdown ul ul {
        padding-left: 14px;
    }

    .catalogue-shell {
        padding: 24px 22px 50px;
    }

    .catalogue-breadcrumb {
        font-size: 14px;
        margin-bottom: 24px;
    }

    h1 {
        font-size: 30px;
        padding-bottom: 20px;
        letter-spacing: -.4px;
    }

    h2 {
        font-size: 25px;
    }

    .introduction {
        font-size: 19px;
    }

    .collections {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 28px 18px;
    }

    .collections h2 {
        font-size: 21px;
    }

    .has-facets {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .mares-facets {
        order: -1;
        padding: 0;
    }

    .mares-facets details {
        border: 1px solid var(--line);
        padding: 14px 18px;
    }

    .mares-facets summary {
        font-size: 19px;
        margin: 0;
        padding: 0;
        border: 0;
        list-style: revert;
    }

    .facet-content {
        max-height: 230px;
        overflow: auto;
    }

    .mares-facets details[open] .facet-content {
        margin-top: 14px;
    }

    .mares-search {
        padding: 20px;
        margin-bottom: 32px;
    }

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

    .formItem {
        grid-column: 1/-1;
    }

    #formItem_dateFrom,
    #formItem_dateTo {
        grid-column: span 1;
    }

    .free-search>div {
        gap: 8px;
    }

    .free-search button {
        min-width: 88px;
        padding: 9px 12px;
    }

    .sort-toolbar {
        font-size: 15px;
    }

    .catalogue-sort select {
        max-width: 170px;
    }

    .cob-resultlist {
        gap: 30px 18px;
    }

    .cob-resultlist h3 {
        font-size: 20px;
    }

    .image-zoom {
        height: 430px;
        padding: 15px;
    }

    .object-data {
        font-size: 17px;
    }

    .object-data th {
        width: 34%;
        padding-right: 18px;
    }

    .mares-related ul {
        gap: 18px;
    }

    .mares-related img {
        height: 180px;
    }

    .last-footer #menu-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .last-footer img {
        max-width: 200px;
    }
}

@media(max-width:430px) {
    .city-bar img {
        width: 145px;
    }

    .city-bar nav {
        gap: 8px;
        font-size: 12px;
    }

    .catalogue-shell {
        padding-left: 18px;
        padding-right: 18px;
    }

    .collections,
    .cob-resultlist {
        gap: 26px 14px;
    }

    .collections h2 {
        font-size: 19px;
    }

    .mares-search {
        padding: 16px;
    }

    .form-actions {
        gap: 10px;
    }

    .form-actions button {
        flex: 1;
        padding: 10px;
        font-size: 16px;
    }

    .cob-resultlist h3 {
        font-size: 19px;
    }

    .cob-resultlist p {
        font-size: 15px;
    }

    .object-data th,
    .object-data td {
        display: block;
        width: 100%;
        padding: 12px 0;
    }

    .object-data th {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .object-data td {
        padding-top: 5px;
    }

    .image-zoom {
        height: 340px;
    }

    .mares-related ul {
        grid-template-columns: 1fr;
    }

    .mares-related img {
        height: 240px;
    }

    .footer {
        padding: 35px 22px;
    }

    .footer .footer-menus {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .simpleList .cob-resultlist li {
        grid-template-columns: 100px minmax(0,1fr);
        gap: 16px;
    }
}

@media print {
    .mares-object .object-media {
        position: static;
    }

    .city-bar,
    #header,
    .catalogue-breadcrumb,
    .mares-facets,
    .footer,
    .last-footer,
    .object-print-controls,
    .back,
    .gallery-controls,
    .mares-search,
    .mares-related,
    .skip-link {
        display: none!important;
    }

    .catalogue-shell {
        max-width: none;
        padding: 0;
    }

    .mares-object {
        display: block;
    }

    .object-gallery {
        background: white;
    }

    .image-zoom {
        height: 280px!important;
    }

    .object-data {
        font-size: 11px;
        margin: 20px 0;
    }

    .object-data th,
    .object-data td {
        display: table-cell;
        padding: 6px 0;
    }

    .object-data th {
        width: 30%;
    }

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

    h1 {
        font-size: 24px;
    }
}

#header #minerva_menu_main>li>[aria-haspopup] {
    text-decoration: none;
}

#header #minerva_menu_main>li>[aria-haspopup]:hover {
    text-decoration: none;
    color: #111;
}

#header .minerva_menu_dropdown .minerva-menu-hidden {
    display: none!important;
}

.footer .footer-menus>.minerva-xarxes-socials {
    grid-column: 2;
    grid-row: 2;
}

.footer .minerva-xarxes-socials ul {
    display: flex;
    gap: 16px;
}

.footer .minerva-xarxes-socials li {
    font-weight: 600;
}

@media(max-width:1050px) {
    .footer .footer-menus>.minerva-xarxes-socials {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Match the institutional dropdowns: anchored panels, vertical links, inline third level. */

#header #minerva_menu_main>li {
    position: relative;
}

#header .minerva_menu_dropdown {
    top: calc(100% + 24px);
    left: -26px;
    right: auto;
    width: 456px;
    max-width: calc(100vw - 48px);
    padding: 24px 26px 36px;
    border: 0;
    box-shadow: 0 5px 12px #0002;
}

#header .minerva_menu_dropdown ul {
    display: block;
}

#header .minerva_menu_dropdown a {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 400;
    padding: 6px 0;
}

#header .minerva_menu_dropdown .minerva_menu_third_tree {
    padding: 6px 0 0 16px;
}

#header .minerva_menu_third_tree a {
    font-weight: 300;
}

#header .minerva_menu_dropdown span.no_haspopup {
    font-size: 20px;
    color: #666;
    font-style: italic;
    display: block;
    padding: 6px 0;
    font-weight: 400;
}

#header [aria-haspopup=true][aria-expanded=true]:after {
    content: '⌃';
}

#header .menu-level-back,
#header .menu-third-back {
    display: none;
}

#header .minerva_menu_dropdown a[aria-current=true]:before {
    content: '–';
    position: absolute;
    left: 10px;
    color: #ef2b2d;
}

@media(max-width:1199px) {
    #header>.region-header {
        display: block;
        padding: 18px 28px;
        min-height: 90px;
    }

    #header .minerva-branding-header {
        justify-content: space-between;
    }

    #header .minerva-menu-toggle {
        display: block;
        background: white;
        color: #111;
        border: 1px solid #ddd;
        padding: 8px 12px;
        font-size: 16px;
    }

    #header #minerva_menu_main {
        display: none;
        margin-top: 20px;
    }

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

    #header #minerva_menu_main>li {
        border-top: 1px solid var(--line);
        position: static;
    }

    #header #minerva_menu_main>li>[aria-haspopup] {
        padding: 14px 0;
        font-size: 21px;
        border-bottom: 0;
    }

    #header .minerva_menu_dropdown {
        position: static;
        width: 100%;
        max-width: none;
        max-height: none;
        padding: 0;
        box-shadow: none;
    }

    #header #minerva_menu_main.mobile-sublevel>li:not(.mobile-current) {
        display: none;
    }

    #header #minerva_menu_main.mobile-sublevel>.mobile-current>[aria-haspopup] {
        display: none;
    }

    #header .menu-level-back {
        display: block;
        background: white;
        color: #111;
        border: 0;
        border-bottom: 1px solid #ddd;
        padding: 12px 0;
        width: 100%;
        text-align: left;
        margin-bottom: 12px;
        font-size: 19px;
    }

    #header .minerva_menu_dropdown a {
        padding: 12px 0;
    }

    #header .minerva_menu_dropdown .minerva_menu_third_tree {
        display: none;
        padding-left: 0;
    }

    #header .minerva_menu_second_tree:has(.third-level-open)>li:not(.third-level-open) {
        display: none;
    }

    #header .third-level-open>.no_haspopup,
    #header .third-level-open>a {
        display: none!important;
    }

    #header .third-level-open>.minerva_menu_third_tree {
        display: block;
    }

    #header .menu-third-back {
        display: block;
        background: white;
        color: #111;
        border: 0;
        border-bottom: 1px solid #ddd;
        padding: 12px 0;
        text-align: left;
        width: 100%;
    }

    #header .minerva_menu_dropdown a[aria-current=true]:before {
        display: none;
    }

    #header .minerva_menu_dropdown span.no_haspopup {
        cursor: pointer;
        font-size: 20px;
        padding: 12px 0;
    }
}

/* Match the city banner container used by the institutional Marès website. */

body.mares-catalogue #brand {
    font-size: 16px;
}

body.mares-catalogue #brand .bcnbrand-navs-container.container {
    width: 100%;
    max-width: 1215px!important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 16px;
}

/* Municipal footer colour shared by the active catalogues. */

body.mares-catalogue .last-footer {
    background: var(--municipal-footer-background);
}
