:root {
    --page-background: #f0f0f0;
    --muted-text: #747474;
    --image-placeholder: #bcbcbc;
    --content-width: 940px;
    --content-padding: 15px;
    --header-height: 70px;
    --section-spacing: 50px;
    --project-gutter: 20px;
}

/* Shared layout and typography */

html,
body {
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-family: CenturyGothicStd;
    color: #000;
    background-color: var(--page-background);
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:focus:not(:focus-visible) {
    outline: none;
}

a {
    color: var(--muted-text);
}

h1 {
    font-size: 25px;
    font-weight: normal;
}

p {
    line-height: 1.4em;
}

.inside {
    position: relative;
    width: var(--content-width);
    margin: auto;
    padding-inline: var(--content-padding);
}

.columnleft {
    float: left;
    width: 630px;
}

.columnright {
    float: right;
    width: 240px;
    text-align: right;
    font-size: 13px;
}

.columnright h2,
.refcol1 h2,
.refcol2 h2 {
    padding: 0;
    font-size: 11px;
    font-weight: normal;
    text-transform: uppercase;
    color: var(--muted-text);
}

.clear {
    clear: both;
}

.mobile {
    display: none !important;
}

#footer {
    position: relative;
    height: var(--section-spacing);
}

.home #footer {
    height: 0;
}

/* Fixed header and navigation */

#header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30000;
    width: 100%;
    min-height: var(--header-height);
    background-color: #fff;
}

#header > .inside,
#headerplaceholder {
    height: var(--header-height);
}

#headerplaceholder {
    position: relative;
    margin-bottom: var(--section-spacing);
}

.home #headerplaceholder {
    margin-bottom: 0;
}

#header #logo {
    position: absolute;
    top: 12px;
    left: 10px;
    display: block;
    width: 285px;
    height: 38px;
    overflow: hidden;
    background: url("../img/logo_omarini_micello.png") center / 100% 38px no-repeat;
}

#header #logo h1 {
    text-indent: -60000px;
}

.subheader {
    position: relative;
    width: 100%;
    min-height: 37px;
    background-color: #e3e3e3;
}

.subheader > .inside {
    height: 37px;
}

#main_menu,
#sub_menu {
    position: absolute;
    right: 10px;
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

#main_menu {
    top: 30px;
}

#sub_menu {
    top: 50%;
    transform: translateY(-50%);
}

#main_menu li,
#sub_menu li {
    display: inline-block;
    margin-left: 30px;
}

#main_menu li a,
#sub_menu li a {
    font-size: 11px;
    text-decoration: none;
    text-transform: uppercase;
    color: #000;
}

#main_menu li a:is(:hover, .selected),
#sub_menu li a:is(:hover, .selected) {
    color: var(--muted-text);
}

.menuopener {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 44px;
    text-align: center;
}

.menuopener i {
    line-height: inherit;
}

/* Home */

#homeimages {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin: auto;
    background-color: #000;
}

#homeimages .homeimage,
.objet,
.detailimage,
:is(a.prevobjet, a.nextobjet) div.thumb,
a.teambox .teamimg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#homeimages .homeimage {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 500ms;
}

#homeimages .homeimage.is-current {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #homeimages .homeimage {
        transition: none;
    }
}

#biglogo {
    position: absolute;
    top: 56px;
    left: 50%;
    z-index: 3000000000;
    display: block;
    width: 542px;
    height: 551px;
    max-width: 90%;
    max-height: calc(100% - 56px);
    overflow: hidden;
    transform: translateX(-50%);
    background: url("../img/logo_large.png") top center / 100% auto no-repeat;
}

/* Project grid and detail */

.gutterwidth {
    width: var(--project-gutter);
}

#objets_listing {
    position: relative;
    width: var(--content-width);
    margin: auto;
}

.objet {
    display: block;
    background-color: var(--image-placeholder);
}

a.objet .hover,
a.teambox .teamimg .hover {
    position: absolute;
    inset: 0;
    display: none;
    font-weight: bold;
    line-height: 100%;
    color: #fff;
}

a.objet .hover span,
a.teambox .teamimg .hover span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    text-align: center;
}

a.objet .hover span {
    box-sizing: border-box;
    padding: 20px;
}

a.objet:hover .hover,
a.teambox:hover .teamimg .hover {
    display: block;
}

a.objet:hover img,
a.teambox:hover .teamimg img {
    opacity: 0.1;
}

#objets_details {
    position: relative;
    width: 960px;
    margin: auto -10px 130px;
}

.detailimage {
    position: relative;
    float: left;
    display: block;
    margin: 10px;
}

.detailimage--media::before {
    display: block;
    aspect-ratio: var(--detail-image-ratio);
    content: "";
}

.detailimage img,
a.teambox .teamimg img,
iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.detailimage.objetcontent {
    width: 460px;
    height: 650px;
}

.detailimage.objetcontent h2 {
    margin: 0;
    font-size: 11px;
    font-weight: normal;
    text-transform: uppercase;
    color: var(--muted-text);
}

.detailimage.objetcontent p {
    margin-top: 0;
    font-size: 13px;
}

.detailimage.objetcontent .description {
    position: absolute;
    bottom: 0;
    left: 0;
}

.detailimage.objetcontent .description p {
    margin-bottom: 0;
}

a.prevobjet,
a.nextobjet {
    display: block;
    width: 300px;
    font-size: 13px;
    line-height: 24px;
    text-decoration: none;
    color: #000;
}

a.prevobjet {
    float: left;
}

a.nextobjet {
    float: right;
    text-align: right;
}

:is(a.prevobjet, a.nextobjet) i {
    font-size: 24px;
    vertical-align: sub;
    color: var(--muted-text);
}

a.prevobjet i {
    margin-right: 10px;
}

a.nextobjet i {
    margin-left: 10px;
}

:is(a.prevobjet, a.nextobjet) div.thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
}

:is(a.prevobjet, a.nextobjet) span {
    position: relative;
    display: block;
    line-height: 1em;
}

a.prevobjet span {
    padding-left: 15px;
}

a.nextobjet span {
    padding-right: 15px;
}

a.prevobjet span::before,
a.nextobjet span::after,
.styled-select::after {
    position: absolute;
    display: block;
    font: 24px / 1 FontAwesome;
    color: var(--muted-text);
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a.prevobjet span::before {
    top: -8px;
    left: 0;
    content: "\f104";
}

a.nextobjet span::after {
    top: -8px;
    right: 0;
    content: "\f105";
}

/* Team, references and contact */

#teamlist {
    margin-inline: -10px;
}

a.teambox {
    float: left;
    display: block;
    width: 140px;
    margin: 10px 10px 50px;
    text-align: center;
    text-decoration: none;
    color: #000;
}

a.teambox .teamimg {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--image-placeholder);
}

a.teambox .teamimg,
a.teambox .teamimg img {
    border-radius: 100%;
}

a.teambox .teamimg .hover span i {
    margin-bottom: 5px;
    font-size: 30px;
}

a.teambox h3,
a.teambox h4 {
    font-size: 13px;
    font-weight: normal;
}

a.teambox h3 {
    margin-bottom: 10px;
}

a.teambox h4 {
    margin: 0;
    color: var(--muted-text);
}

.refcol1,
.refcol2 {
    float: left;
    width: calc(50% - 10px);
}

.refcol1 {
    margin-right: 10px;
}

.refcol2 {
    margin-left: 10px;
}

.contact-map {
    position: relative;
    height: 400px;
}

.contact-map + .contact-map {
    margin-top: 20px;
}

.contact-map > iframe,
.contact-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-map-canvas:not(.is-ready) {
    visibility: hidden;
}

.contact-map--openstreetmap .contact-map-canvas {
    background-color: var(--page-background);
    font-family: inherit;
}

.contact-map--openstreetmap > iframe,
.contact-map--openstreetmap .leaflet-tile-pane {
    filter: grayscale(1) brightness(1.02);
}

.contact-map--openstreetmap .leaflet-container .leaflet-control-zoom {
    border: 0;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgb(0 0 0 / 25%);
}

/* Filters and news */

select {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 1px solid #fff;
    border-radius: 0;
    background-color: #fff;
    font-size: 15px;
    font-family: CenturyGothicStd;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.styled-select {
    position: relative;
    display: block;
}

.styled-select::after {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    content: "\f107";
}

#newstypecontainer {
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
}

#newstypecontainer select {
    box-sizing: content-box;
    padding-right: 45px;
}

.newsitem {
    margin-bottom: 50px;
}

.newsitem .newsimage {
    float: left;
    width: 23.4%;
}

.newsitem .newsimage img {
    display: block;
    width: 100%;
    height: auto;
}

.newsitem .newsimage + .newscontent {
    float: right;
    width: calc(76.6% - 20px);
}

.newsitem .newscontent h3 {
    margin: 0;
    font-size: 11px;
    font-weight: normal;
    text-transform: uppercase;
}

.newsitem .newscontent h3 span.date {
    margin-right: 20px;
    color: var(--muted-text);
}

.newsitem .newscontent h2 {
    margin: 1em 0 0;
    font-size: 20px;
    font-weight: normal;
}

@media (width <= 800px) {
    :root {
        --content-width: 100%;
        --header-height: 60px;
        --section-spacing: 20px;
        --project-gutter: 10px;
    }

    html,
    body {
        font-size: 17px;
    }

    p {
        line-height: 1.3em;
    }

    .nomobile {
        display: none !important;
    }

    .mobile {
        display: block !important;
    }

    .inside {
        box-sizing: border-box;
    }

    .subheader {
        padding-block: 10px;
        background-color: var(--page-background);
    }

    /* Match the historical filter height before the menu or a gallery opens. */
    :root:not([data-overlay-opened]) #catselect {
        min-height: 39px;
    }

    #header #logo {
        width: 248px;
        background-image: url("../img/logo_omarini_micello_mobile.png");
    }

    #objets_details {
        width: 100%;
        margin-bottom: 65px;
    }

    .objet {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3;
    }

    .objet img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .detailimage {
        width: 100% !important;
    }

    .detailimage img {
        height: auto;
    }

    .detailimage.objetcontent {
        width: 100%;
        height: auto;
    }

    .detailimage.objetcontent .description {
        position: relative;
        inset: auto;
    }

    .detailimage.objetcontent .description p {
        margin-bottom: 1em;
    }

    a.prevobjet,
    a.nextobjet {
        width: 120px;
    }

    .columnleft,
    .columnright {
        float: none;
        width: 100%;
        text-align: left;
    }

    a.teambox {
        width: calc(100% / 3 - 20px);
    }

    .refcol1,
    .refcol2 {
        float: none;
        width: 100%;
        margin-inline: 0;
    }

    #newstypecontainer {
        position: relative;
        inset: auto;
        margin-bottom: 1em;
    }

    :root:not([data-overlay-opened]) #newstype {
        min-height: 17px;
    }
}

@media screen and (resolution >= 2dppx) {
    #header #logo {
        background-image: url("../img/logo_omarini_micello@2x.png");
    }

    #biglogo {
        background-image: url("../img/logo_large@2x.png");
    }
}

@media screen and (resolution >= 2dppx) and (width <= 800px) {
    #header #logo {
        background-image: url("../img/logo_omarini_micello_mobile@2x.png");
    }
}
