/* =========================================
   HEADER — MOBILE FIRST
========================================= */

#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-anchor: none;
}

.site-header {
    position: relative;
    background: var(--white);
}

.utility-wrap,
.desktop-nav,
.desktop-search,
.menu-shade {
    display: none;
}

/* Main navigation bar */

.main-bar {
    position: relative;
    z-index: 3;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.main-row {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    min-height: 72px;
}

/* Company logo */

.brand {
    flex: 0 1 185px;
    min-width: 0;
    display: flex;
    align-items: center;
    margin-inline-end: auto;
    cursor: pointer;
}

.brand img {
    width: 100%;
    height: 64px;
    object-fit: contain;
    object-position: left center;
}

.brand-fallback {
    font-size: clamp(10px, 2.8vw, 15px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.025em;
    color: var(--green);
}

.brand-fallback strong {
    display: block;
    font-size: 1.25em;
}

.brand-fallback small {
    display: block;
    margin-top: 4px;
    color: var(--charcoal);
    font-size: 0.68em;
    letter-spacing: 0.025em;
}

/* Primary buttons */

.plan-button,
.detail-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--green);
    color: var(--white);
    border-radius: 12px;
    font-weight: 750;
    padding: 11px 13px;
    min-height: 44px;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;

    transition:
        background-color 200ms ease,
        color 200ms ease;
}

.plan-button {
    font-size: clamp(11px, 3.1vw, 15px);
    flex: 0 1 auto;
    max-width: 48%;
}

.plan-button .icon {
    width: 19px;
    height: 19px;
}

.plan-button:hover,
.detail-cta:hover {
    background: var(--orange);
    color: var(--black);
}

.plan-button span,
.nav-button span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Icon buttons */

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;

    transition:
        color 200ms ease,
        background-color 200ms ease;
}

.mobile-toggle .icon {
    width: 25px;
    height: 25px;
    stroke-width: 2;
}

/* Currency and language controls */

.utility-select {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #EEEDEB;
    border: 0;
    border-radius: 6px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 14px;
    cursor: pointer;
}

.utility-select .icon {
    width: 15px;
    height: 15px;
}

/* Smooth language selector arrow */

.language-trigger .icon {
    transition: transform 200ms ease;
}

.language-trigger[aria-expanded="true"] .icon {
    transform: rotate(180deg);
}

/* Language dropdown */

.language-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.language-filter,
.search-input {
    width: 100%;
    min-width: 0;
    border: 1px solid #D9DCE0;
    background: var(--white);
    border-radius: 10px;
    padding: 12px 14px;
}

.language-options {
    display: grid;
    gap: 2px;
    margin-top: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: start;
    width: 100%;
    padding: 12px 10px;
    border-radius: 6px;
    cursor: pointer;

    transition:
        background-color 180ms ease,
        color 180ms ease;
}

.language-option .icon {
    margin-inline-start: auto;
    color: var(--green);
    width: 18px;
    height: 18px;
}

.language-option:hover,
.language-option[aria-pressed="true"] {
    background: var(--soft-green);
}

/* Website search */

.search-form {
    display: flex;
    gap: 10px;
}

.search-submit {
    background: var(--green);
    color: var(--white);
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;

    transition:
        background-color 200ms ease,
        color 200ms ease;
}

.search-submit:hover {
    background: var(--orange);
    color: var(--black);
}

.search-results {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    max-height: 280px;
    overflow: auto;
}

.search-results a {
    display: block;
    padding: 10px;
    border-bottom: 1px solid var(--line);

    transition:
        background-color 180ms ease,
        color 180ms ease;
}

.search-results a:hover {
    color: var(--green);
    background: var(--soft-green);
}

/* Very small smartphones */

@media (max-width: 359px) {

    .plan-button .icon {
        display: none;
    }

    .main-row {
        gap: 5px;
    }

    .mobile-toggle {
        width: 36px;
        flex-basis: 36px;
    }
}

/* =========================================
   DESKTOP HEADER
========================================= */

@media (min-width: 1100px) {

    /* Desktop utility bar */

    .utility-wrap {
        display: block;
        position: relative;
        z-index: 5;

        height: 48px;

        background: #F7F7F7;

        overflow: clip;

        transition: height 280ms ease-in-out;
    }

    .utility-inner {
        opacity: 1;
        visibility: visible;

        transition:
            opacity 200ms ease,
            visibility 0s;
    }

    .utility-row {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        min-height: 48px;
    }

    .utility-row .utility-select {
        min-height: 32px;
        padding-block: 4px;
    }

    .utility-row .icon-button {
        height: 36px;
    }

    /* Allow language dropdown outside utility bar */

    .site-header:not(.is-scrolled)
    .utility-wrap:has(.language-trigger[aria-expanded="true"]) {
        overflow: visible;
    }

    /* Smooth utility bar collapse when scrolling */

    .site-header.is-scrolled .utility-wrap {
        height: 0;
        pointer-events: none;
    }

    .site-header.is-scrolled .utility-inner {
        opacity: 0;
        visibility: hidden;

        transition:
            opacity 180ms ease,
            visibility 0s linear 280ms;
    }

    /* Desktop language dropdown */

    .language-control {
        position: relative;
    }

    .language-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: 340px;
        max-height: calc(100dvh - 65px);
        overflow: auto;
        box-shadow: 0 8px 24px #00000015;
    }

    /* Main desktop navigation */

    .main-row {
        min-height: 104px;
        gap: clamp(14px, 2vw, 30px);
    }

    /* Desktop company logo */

    .brand {
        flex-basis: 185px;
    }

    .brand img {
        height: 94px;
    }

    .brand-fallback {
        font-size: 16px;
    }

    /* Desktop navigation items */

    .desktop-nav {
        display: flex;
        align-items: stretch;
        align-self: stretch;
        gap: clamp(9px, 1.5vw, 25px);
        min-width: 0;
    }

    .nav-button {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 2px;
        font-size: clamp(13px, 1.12vw, 17px);
        font-weight: 750;
        text-transform: uppercase;
        line-height: 1.2;
        text-align: center;
        cursor: pointer;
        min-width: 0;
    }

    /* Smooth black navigation underline */

    .nav-button::after {
        content: '';
        position: absolute;
        inset-inline: 0;
        bottom: -1px;
        height: 3px;
        background: var(--black);

        transform: scaleX(0);
        transform-origin: center;

        transition: transform 200ms ease-in-out;

        pointer-events: none;
    }

    .nav-button:hover::after,
    .nav-button:focus-visible::after,
    .nav-button[aria-expanded="true"]::after {
        transform: scaleX(1);
    }

    /* Desktop booking button */

    .plan-button {
        flex: 0 1 auto;
        max-width: 220px;
        min-height: 56px;
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 15px;
    }

    .mobile-toggle {
        display: none;
    }

    /* Desktop search panel */

    .desktop-search {
        position: absolute;
        z-index: 4;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        padding: 28px 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
    }

    .desktop-search h2 {
        margin: 0 0 16px;
        font-size: 24px;
    }
}

/* =========================================
   SMALLER DESKTOP SCREENS
========================================= */

@media (min-width: 1100px) and (max-width: 1279px) {

    .main-row {
        gap: 14px;
    }

    .brand {
        flex-basis: 150px;
    }

    .desktop-nav {
        gap: 12px;
    }

    .plan-button {
        padding-inline: 12px;
        font-size: 14px;
    }
}

/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    .utility-wrap,
    .utility-inner,
    .nav-button::after,
    .plan-button,
    .detail-cta,
    .icon-button,
    .language-trigger .icon,
    .language-option,
    .search-submit,
    .search-results a {
        transition: none;
    }
}