/* Montserrat comes with the other typefaces in main/style.css, which every page with a header loads. */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 1rem;
}

.logo {
    max-width: 35%;
    /* The 35% is of whatever width the menu leaves over - without a floor, a five-item menu
       squeezes the logo to a thumbnail just above the mobile breakpoint. */
    min-width: 150px;
}

nav ul {
    padding: .5rem 1rem;
    display: flex;
    list-style: none;
    gap: 2rem;
    font-size: .9em;
    align-items: end;
}

nav a {
    font-family: "Montserrat", arial, sans-serif;
    letter-spacing: -.5px;
    text-decoration: none;
    white-space: nowrap;
    color: var(--primary-color-dark, #1f5f93);
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary-color, #946700);
}

/* EN | PT (2026-10-06): two small linked halves of one outlined control. It sits outside the
   nav list, so on a phone it stays beside the menu button rather than inside the folded menu. */
.language-switch {
    display: inline-flex;
    flex: none;
    white-space: nowrap;
    margin-left: 1rem;
    border: 1px solid var(--primary-color-dark, #1f5f93);
    border-radius: 6px;
    overflow: hidden;
    font-family: "Montserrat", arial, sans-serif;
    font-size: .8rem;
    font-weight: 600;
}

.language-switch__option {
    padding: 4px 9px;
    color: var(--primary-color-dark, #1f5f93);
    text-decoration: none;
}

.language-switch__option--active {
    background-color: var(--primary-color-dark, #1f5f93);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color-dark, #1f5f93);
    margin: 3px 0;
}

@media (max-width: 1000px) {
    nav ul {
        gap: 1.25rem;
    }
}

/* The Portuguese menu ("Gerir a minha reserva") ran up to 23px past the screen's edge just above
   the phone menu, pushing the language switch off it (measured in Firefox, 5 November 2026). */
@media (max-width: 860px) {
    nav ul {
        gap: .75rem;
    }
}

@media (max-width: 768px) {
    /* The phone menu (2026-10-05, per Thomas): a full-width panel straight under the header -
       no gap for the hero to show through (the list's default top margin made one), one
       full-width row per link, big enough to tap. */
    nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0 0 8px;
        background-color: #ffffff;
        border-top: 1px solid #eee;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        font-size: 1.05rem;
    }

    nav ul.active {
        display: flex;
    }

    nav li + li {
        border-top: 1px solid #f0f0f0;
    }

    nav ul a {
        display: block;
        padding: 14px 24px;
    }

    .language-switch {
        margin-left: auto;
        margin-right: .75rem;
    }

    .menu-toggle {
        display: flex;
        padding: 8px;
        margin-right: -8px;
    }

    .menu-toggle span {
        transition: transform 0.2s, opacity 0.2s;
    }

    /* The three bars turn into a cross while the menu is open. */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}
