/* HEADER */
body.menu-open header {position: fixed; top: 0; left: 0; right: 0; z-index: 4;}
header nav {
    color: white;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 1;
}
header nav > a {
    display: inline-block;
    padding: 1rem;
    text-decoration: none;
    color: white;
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    font-size: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: -0.015em;
    z-index: 3;
}
header nav button {
    position: absolute;
    right: 1.5rem;
    top: 1.9rem;
    border: 0;
    background: transparent;
    color: white;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
}
/* Over a hero image the header is white; without one it takes the page's own
   strong colour — near-black on a light page, white on a dark one. */
body:not(:has(main .header),.home) {
    header nav button,
    .main-menu ul li a,
    header nav > a {color: var(--text-strong);}
    .main-menu ul li a {font-weight: 350;}
}



/* The menu button is the mobile-only toggle; hidden on larger displays. */
.menu-toggle {display: none;}
.menu-toggle[aria-expanded="true"] {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 2rem;
    line-height: 1;
    font-family: sans-serif;
    font-weight: 400;
    top: 1.07rem;
}


.header {
    position: relative;
    max-height: 100vh;
}
.header-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 100vh;
    min-height: 60rem;
}
.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-weight: 450;
    font-size: 1.1rem;
}
.header-content h1 {color: white;}
.header-content .availability-button {
    display: flex;
    position: absolute;
    bottom: 2rem;
    right: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    font-size: 1.1rem;
}
.header-content .availability-button > div:first-child {background: rgba(255, 255, 255, 0.3); font-weight: 400;}
.header-content .availability-button > div {
    color: white;
    backdrop-filter: blur(1rem);
    padding: 1rem 2rem;
}
.header-content .availability-button > div:last-child {background: rgba(0,0,0,0.85); font-weight: 400;}


/* MAIN MENU */
.main-menu {display: flex; justify-content: center; margin-top: 1.45rem; position: relative; right: 0.1rem;}
.main-menu ul {display: flex; gap: 2rem}
.main-menu ul li {list-style: none;}
.main-menu ul li a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 400;
}
.main-menu ul li:nth-child(3) {margin-right: 7rem;}
.main-menu ul li:nth-child(4) {margin-left: 7rem;}

/* On smaller displays the menu collapses behind the toggle button. */
@media (max-width: 60rem) {
    header nav > a {
        left: 0;
        transform: none;
        padding-top: 1.1rem;
        padding-inline: 1.5rem;
    }
    .menu-toggle {display: block;}
    .main-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin-top: 0;
        background: rgba(19, 16, 16, 0.95);
        padding: 1.5rem;
        height: 100vh;
        display: flex;
        flex-direction: column  ;
        justify-content: center;
        align-items: center;
        z-index: -1;
        transition: all 0.2s ease;
    }
    .main-menu ul {flex-direction: column; align-items: center; gap: 1.25rem;}
    .main-menu ul li:nth-child(3) {margin-right: 0;}
    .main-menu ul li:nth-child(4) {margin-left: 0;}
    .main-menu[hidden] {opacity: 0; pointer-events: none;}
    
    body.menu-open {
        header nav button,
        .main-menu ul li a,
        header nav > a {color: white!important;}
        .main-menu ul li a {font-weight: 400;}
    }
}
